/* Chayil Services, Inc.: quiet registry-style corporate site
   Brand: field #040404, gold #EEBB12, gold-dark #C99B0E, cream #FBF6E9 */

:root {
  --field: #040404;
  --gold: #EEBB12;
  --gold-dark: #C99B0E;
  --white: #FFFFFF;
  --cream: #FBF6E9;
  --input-bg: #0D0D0D;
  --placeholder: #9A9484;
  --danger: #F2A6A0;
  --heading-font: 'Trebuchet MS', sans-serif;
  --body-font: 'Arial', sans-serif;
  --measure: 62ch;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--field);
  color: var(--cream);
  font-family: var(--body-font);
  font-size: 17px;
  line-height: 1.7;
}

.wrap {
  width: 100%;
  max-width: 860px;
  margin-inline: auto;
  padding-inline: 24px;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--gold);
  color: var(--field);
  font-family: var(--heading-font);
  font-weight: bold;
  padding: 10px 16px;
  z-index: 100;
  text-decoration: none;
}
.skip-link:focus { left: 8px; top: 8px; }

/* Focus visibility on all interactive elements */
a:focus-visible,
.skip-link:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

/* ---- Header: wordmark centered above a full-width 4px gold strip ---- */
.site-header { padding-top: 26px; }
.wordmark {
  display: block;
  text-align: center;
  font-family: var(--heading-font);
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--gold);
  font-size: clamp(1.05rem, 2.6vw, 1.5rem);
  line-height: 1.2;
  margin: 0 0 22px;
  padding-inline: 24px;
}
a.wordmark { text-decoration: none; }
.wordmark--icon {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
}
.wordmark-eagle { height: 46px; width: auto; }
a.wordmark:hover { color: var(--gold-dark); }
.wordmark::after { content: none; } /* suppress global h1 underline rule on the wordmark */
.gold-strip {
  width: 100%;
  height: 4px;
  background: var(--gold);
}

/* ---- Homepage emblem + tagline ---- */
.emblem-block {
  text-align: center;
  padding-top: 56px;
  padding-bottom: 8px;
}
.emblem {
  display: block;
  width: clamp(200px, 42vw, 300px);
  height: auto;
  margin: 0 auto 28px;
}
.tagline {
  font-family: var(--heading-font);
  color: var(--cream);
  font-size: clamp(1.05rem, 2.6vw, 1.3rem);
  letter-spacing: 0.01em;
  margin: 0;
  text-align: center;
}

/* ---- Button navigation row ---- */
.nav-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  padding-block: 44px;
  margin-block: 0;
}
.btn {
  display: inline-block;
  font-family: var(--heading-font);
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.9rem;
  color: var(--gold);
  background: var(--field);
  border: 2px solid var(--gold);
  padding: 14px 30px;
  text-decoration: none;
  min-width: 190px;
  text-align: center;
}
.btn:hover,
.btn:focus-visible {
  background: var(--gold);
  color: var(--field);
}
.btn[aria-current="page"] {
  background: var(--gold);
  color: var(--field);
}
@media (prefers-reduced-motion: no-preference) {
  .btn { transition: background-color 0.15s ease, color 0.15s ease; }
}

/* Stack buttons vertically on narrow screens */
@media (max-width: 560px) {
  .nav-buttons { flex-direction: column; align-items: stretch; }
  .btn { min-width: 0; }
}

/* ---- Subpage content ---- */
main { padding-bottom: 24px; }

h1 {
  font-family: var(--heading-font);
  color: var(--white);
  font-weight: bold;
  text-transform: uppercase;
  font-size: clamp(2rem, 6vw, 3rem);
  line-height: 1.15;
  margin: 40px 0 20px;
  position: relative;
}
h1::after {
  content: "";
  display: block;
  width: 96px;
  height: 2px;
  background: var(--gold);
  margin-top: 18px;
}

.section { padding-block: 40px; }
.section + .section { border-top: 1px solid rgba(238, 187, 18, 0.18); }

.eyebrow {
  font-family: var(--heading-font);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.8rem;
  color: var(--gold);
  margin: 0 0 14px;
}
h2 {
  font-family: var(--heading-font);
  color: var(--white);
  font-weight: bold;
  text-transform: uppercase;
  font-size: clamp(1.5rem, 3.6vw, 2rem);
  line-height: 1.2;
  margin: 0 0 22px;
  position: relative;
}
h2::after {
  content: "";
  display: block;
  width: 72px;
  height: 2px;
  background: var(--gold);
  margin-top: 14px;
}
.body-copy {
  max-width: var(--measure);
  margin: 0 0 20px;
  color: var(--cream);
  text-align: justify;
}
.body-copy:last-child { margin-bottom: 0; }

/* Inline links in copy */
.body-copy a, .holdings dd a, .note a {
  color: var(--gold);
  text-decoration: underline;
}
.body-copy a:hover, .holdings dd a:hover, .note a:hover { color: var(--gold-dark); }

/* Definition-list holdings/affiliates */
.holdings {
  margin: 0 0 28px;
  max-width: var(--measure);
}
.holdings dt {
  font-family: var(--heading-font);
  font-weight: bold;
  text-transform: uppercase;
  color: var(--gold);
  font-size: 1.15rem;
  letter-spacing: 0.06em;
  margin-top: 28px;
}
.holdings dt:first-child { margin-top: 0; }
.holdings dd {
  margin: 8px 0 0;
  color: var(--cream);
  text-align: justify;
}

/* Small standalone note */
.note {
  max-width: var(--measure);
  margin: 8px 0 0;
  font-size: 0.9rem;
  color: var(--cream);
  text-align: justify;
}

/* ---- Contact form ---- */
.contact-form {
  max-width: 40rem;
  margin: 8px auto 24px;
}
.contact-intro,
.fallback-line {
  text-align: center;
  margin-inline: auto;
}
.field { margin-bottom: 22px; }
.field label {
  display: block;
  font-family: var(--heading-font);
  font-weight: bold;
  letter-spacing: 0.04em;
  color: var(--gold);
  margin-bottom: 8px;
}
.field input,
.field textarea {
  display: block;
  width: 100%;
  font-family: var(--body-font);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--cream);
  background: var(--input-bg);
  border: 2px solid var(--gold-dark);
  border-radius: 0;
  padding: 12px 14px;
}
.field textarea {
  min-height: 160px;
  resize: vertical;
}
.field input::placeholder,
.field textarea::placeholder { color: var(--placeholder); }
.field input:focus-visible,
.field textarea:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  border-color: var(--gold);
}
.field input:user-invalid,
.field textarea:user-invalid {
  border-color: var(--danger);
}
.submit-btn {
  font-family: var(--heading-font);
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.9rem;
  color: var(--field);
  background: var(--gold);
  border: 2px solid var(--gold);
  padding: 14px 34px;
  cursor: pointer;
}
.submit-btn:hover,
.submit-btn:focus-visible {
  background: var(--gold-dark);
  border-color: var(--gold-dark);
  color: var(--field);
}
.submit-btn:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}
.fallback-line {
  max-width: var(--measure);
  margin: 20px 0 0;
  color: var(--cream);
}
.fallback-line a { color: var(--gold); text-decoration: underline; }
.fallback-line a:hover { color: var(--gold-dark); }

/* Centered page variant (About Us, Affiliates): headings centered,
   paragraph blocks centered on the page, text inside stays fully justified */
.page-centered h1,
.page-centered h2,
.page-centered .eyebrow,
.page-centered .holdings dt {
  text-align: center;
}
.page-centered h1::after,
.page-centered h2::after {
  margin-inline: auto;
}
.page-centered .body-copy,
.page-centered .holdings,
.page-centered .note {
  margin-inline: auto;
}

/* ---- Footer ---- */
.site-footer {
  border-top: 4px solid var(--gold);
  padding-block: 32px;
  margin-top: 48px;
}
.site-footer p {
  margin: 0;
  font-family: var(--heading-font);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: var(--cream);
  text-align: center;
}
.site-footer a {
  color: var(--gold);
  text-decoration: underline;
}
.site-footer a:hover { color: var(--gold-dark); }

/* Reduced motion safety net */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
