/* EXPERIMENT: bigger header logo, slightly smaller home-page text.
   Everything here overrides site.css. To revert to the previous design,
   delete the experiment line in src/partials/head.html (and this file).
   To keep it, leave it as is, or merge these rules into site.css. */

/* Gold line under the header, matching the gold accents across the page (client request) */
.site-header { border-bottom: 3px solid var(--accent); }

/* Header: logo, name and tagline on the left, menu on the right, all on one row
   on laptop/desktop screens. On narrower screens the menu drops below neatly. */
.header-inner { padding-block: 1.4rem; flex-wrap: wrap; }
.brand { gap: 0.75rem; flex-shrink: 0; }
.brand img { width: 84px; height: auto; border-radius: 6px; }
.brand-short { font-size: 1.5rem; line-height: 1.1; }
.brand-long { font-size: 1.05rem; max-width: 16rem; line-height: 1.3; margin-top: 0.2rem; }  /* client: bigger tagline */
.nav-list { gap: 0 0.1rem; }
.nav-list a { font-size: 0.9rem; padding: 0.45rem 0.42rem; }
.nav-list a.nav-cta { padding: 0.55rem 0.85rem; margin-left: 0.3rem; }
@media (min-width: 70rem) {
  .site-header nav[aria-label="Main"] { margin-left: auto; }
  .nav-list { flex-wrap: nowrap; }
  .nav-list a { white-space: nowrap; }
}
@media (max-width: 40rem) {
  .brand img { width: 72px; }
}

/* Slightly smaller text on the home page only */
.page-index .hero { padding-block: clamp(2.25rem, 1.5rem + 3vw, 4rem) clamp(3rem, 2rem + 5vw, 6rem); }
.page-index .hero h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.1rem); max-width: 20ch; }
.page-index .hero .lead { font-size: clamp(1.05rem, 0.98rem + 0.35vw, 1.2rem); }
.page-index .eyebrow { font-size: 1.05rem; letter-spacing: 0.1em; }  /* client: bigger */
.page-index main h2 { font-size: clamp(1.55rem, 1.2rem + 1.4vw, 2.2rem); }
.page-index main h3 { font-size: 1.2rem; }
.page-index main p,
.page-index main li,
.page-index main dd { font-size: 0.95rem; }  /* about 17px, still comfortably large */
.page-index .section-intro { font-size: 1.05rem; }
.page-index .testimonial blockquote { font-size: 1.05rem; }
.page-index .stat-number { font-size: clamp(1.8rem, 1.4rem + 1.2vw, 2.4rem); }
.page-index .stat-label { font-size: 0.9rem; }
.page-index .button { font-size: 1rem; }

/* ------------------------------------------------------------------
   Inner pages (everything except Home)
   ------------------------------------------------------------------ */

/* Banner: compact, with a faint black-and-white photo that fades out
   behind the text. The photo is decorative (CSS background, no alt text).
   The left-to-right fade keeps all text far above 7:1 contrast. */
.page-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: clamp(2.25rem, 1.5rem + 2.5vw, 3.75rem);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.page-hero::before {
  content: "";
  position: absolute; inset: 0; z-index: -2;
  background: var(--hero-img, none) center 30% / cover no-repeat;
  filter: grayscale(1);
  opacity: 0.4;
}
.page-hero::after {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, #000 0%, rgba(0,0,0,0.92) 40%, rgba(0,0,0,0.55) 75%, rgba(0,0,0,0.35) 100%);
}
@media (max-width: 52rem) {
  .page-hero::after { background: rgba(0,0,0,0.82); }
}
.page-hero h1 { font-size: clamp(2rem, 1.5rem + 1.8vw, 2.8rem); max-width: 24ch; margin-bottom: 0.35em; }
.page-hero .lead { font-size: clamp(1.05rem, 0.98rem + 0.3vw, 1.18rem); color: #e2e2de; max-width: 60ch; margin-bottom: 0.6em; }
.page-hero .lead strong { color: var(--text); font-weight: 400; }
.page-hero .button-row { margin-top: 1.25rem; }

/* Breadcrumb */
.crumbs ol { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-wrap: wrap; font-size: 0.85rem; color: #e2e2de; max-width: none; }
.crumbs li + li { margin-top: 0; }
.crumbs li + li::before { content: "/"; margin: 0 0.6rem; color: #8a8a86; }
.crumbs a { color: var(--text); text-decoration-thickness: 1px; }

/* Calmer section headings on inner pages */
body:not(.page-index) main .section h2 { font-size: clamp(1.55rem, 1.25rem + 1vw, 2rem); }
body:not(.page-index) .section { padding-block: clamp(2.75rem, 2rem + 2.5vw, 4.5rem); }
h2[id] { scroll-margin-top: 1.5rem; }

/* Services: a tidy grid of cards instead of alternating rows */
.service-grid {
  list-style: none; margin: 0; padding: 0; max-width: none;
  display: grid; gap: 1.75rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
}
.service-grid > li + li { margin-top: 0; }
.service-card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; overflow: hidden;
}
.service-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: center 20%; border-bottom: 1px solid var(--border); }
.service-body { padding: 1.5rem 1.75rem 1.75rem; }
body:not(.page-index) main .service-card h2 { font-size: 1.3rem; margin-bottom: 0.6rem; }
.service-body p, .service-body li { color: var(--muted); font-size: 0.95rem; }
.service-body ul { padding-left: 1.2rem; margin-bottom: 0.75rem; }
.service-body li + li { margin-top: 0.15rem; }
.service-body > :last-child { margin-bottom: 0; }

/* About: team members line up, with initials where there is no photo yet */
.person { grid-template-columns: 1fr; gap: 1.25rem 2rem; }
@media (min-width: 52rem) { .person, .person.no-photo { grid-template-columns: 12rem 1fr; } }
.person img, .avatar { width: 12rem; height: 12rem; border-radius: 8px; object-fit: cover; object-position: center 20%; }
.avatar {
  display: grid; place-items: center;
  background: var(--bg); border: 2px solid var(--accent);
  color: var(--accent); font-weight: 700; font-size: 2.8rem; letter-spacing: 0.04em;
}

/* About: values as a row of small cards */
.value-grid {
  list-style: none; margin: 0; padding: 0; max-width: none;
  display: grid; gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
}
.value-grid > li + li { margin-top: 0; }
@media (min-width: 64rem) { .value-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.value-card { border-top: 3px solid var(--accent); background: var(--surface); padding: 1.25rem 1.25rem 1.4rem; border-radius: 0 0 8px 8px; }
.value-card h3 { font-size: 1.1rem; margin-bottom: 0.4rem; }
.value-card p { color: var(--muted); font-size: 0.92rem; margin: 0; }
.why { margin-top: clamp(3rem, 2rem + 3vw, 4.5rem); padding-top: clamp(2.5rem, 2rem + 2vw, 3.5rem); border-top: 1px solid var(--border); }
.why p { color: var(--muted); max-width: 70ch; }
.split.even { grid-template-columns: 1fr; }
@media (min-width: 52rem) { .split.even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .split.even > :first-child { order: 2; } }

/* FAQ: chevron sits inside the box on the left, with space around it,
   and flips upward when the answer is open */
.faq details { max-width: 56rem; }
.faq summary {
  list-style: none; margin-left: 0;
  position: relative; padding: 1.2rem 1.5rem 1.2rem 3.5rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; left: 1.5rem; top: 50%;
  width: 0.65rem; height: 0.65rem; margin-top: -0.45rem;
  border-right: 3px solid var(--accent); border-bottom: 3px solid var(--accent);
  transform: rotate(45deg); transition: transform 0.15s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -0.15rem; }
.faq .answer { padding: 1.2rem 1.5rem 0.5rem; }

@media (forced-colors: active) {
  .page-hero::before, .page-hero::after { display: none; }
  .faq summary::after { border-color: CanvasText; }
}

/* Home: "Why Choose DB-TIP" (moved from About) */
.why-home { max-width: 62rem; }
.why-home p { color: var(--muted); max-width: 72ch; }

/* Services intro: interpreter expertise list (moved up from the DeafBlind card) */
.expertise-list { margin: 0 0 0.75rem; padding-left: 1.5rem; color: var(--text); font-size: clamp(1.05rem, 0.98rem + 0.3vw, 1.18rem); }
.expertise-list li { margin-top: 0.2rem; }
.expertise-list li::marker { color: var(--accent); }

/* Testimonials page: stacked quotes with breathing room */
.testimonial-list { display: grid; gap: 2rem; }
.testimonial-list .testimonial { max-width: 60rem; }

/* Text for screen readers only (keeps heading order correct without showing it) */
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* "DB-TIP Services" heading: same size as the page title (client request) */
body:not(.page-index) main .section h2.title-size { font-size: clamp(2rem, 1.5rem + 1.8vw, 2.8rem); margin-bottom: 1.5rem; }

/* "Our Interpreters in Action" photo strip */
.photo-strip { list-style: none; margin: 0; padding: 0; max-width: none; display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); }
.photo-strip li { margin: 0; }
.photo-strip img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 25%; border-radius: 10px; border: 1px solid var(--border); }

/* ------------------------------------------------------------------
   Request forms (request page). Native replacement for the Knack embed.
   Open layout: each group has a short heading on the left and its fields
   on the right, separated by hairlines. Choices are pill toggles.
   Error red #ff8a80 is 9:1 on black; everything else uses site tokens.
   ------------------------------------------------------------------ */
.request-intro p { color: var(--muted); }
.request-forms { max-width: 64rem; margin-top: 2.25rem; }

/* Interpreter / Co-Navigator switch */
.request-type.fgroup { border-top: 0; padding-top: 0.25rem; }
.request-type .field { margin: 0; border: 0; padding: 0; min-width: 0; }
.request-type legend { display: block; font-weight: 700; font-size: 0.98rem; color: var(--text); margin: 0 0 0.45rem; padding: 0; }
.chips.big .chip span { padding: 0.85rem 1.5rem; font-size: 1.05rem; }
.segmented { display: inline-flex; padding: 4px; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface); }
.seg { position: relative; cursor: pointer; }
.seg span { display: block; white-space: nowrap; padding: 0.6rem 1.4rem; border-radius: 999px; font-weight: 700; color: var(--muted); }
.seg:hover span { color: var(--text); }
.seg input:checked + span { background: var(--accent); color: var(--accent-text); }
@media (max-width: 26rem) { .seg span { padding: 0.55rem 0.9rem; font-size: 0.95rem; } }
.seg input:focus-visible + span { outline: 3px solid var(--text); outline-offset: 2px; }

/* Visually hidden but still focusable native inputs (segmented + chips) */
.seg input, .chip input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }

/* Groups */
.kform { margin: 0; }
.fgroup { display: grid; gap: 1rem 3rem; padding: 2.25rem 0; border-top: 1px solid var(--border); }
@media (min-width: 56rem) { .fgroup { grid-template-columns: 14rem minmax(0, 1fr); } }
.fgroup-head h4 { font-size: 1.2rem; margin: 0 0 0.35rem; }
.fgroup-head p { color: var(--muted); font-size: 0.92rem; line-height: 1.5; margin: 0; }
.fgroup-body > .field:last-child { margin-bottom: 0; }

/* Fields */
.kform .field { margin: 0 0 1.4rem; border: 0; padding: 0; min-width: 0; }
.field-grid { display: grid; gap: 0 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); }
.kform .field > label, .kform fieldset.field legend {
  display: block; font-weight: 700; font-size: 0.98rem; color: var(--text); margin: 0 0 0.45rem; padding: 0;
}
.optional, .hint-inline { font-weight: 400; color: var(--muted); }
.kform .hint { color: var(--muted); font-size: 0.875rem; margin: -0.2rem 0 0.5rem; }

.kform input[type="text"], .kform input[type="email"], .kform input[type="tel"],
.kform input[type="date"], .kform textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--text);
  background: var(--surface); border: 1px solid var(--border-strong); border-radius: 8px;
  padding: 0.8rem 1rem; color-scheme: dark; transition: border-color 0.15s ease;
}
.kform textarea { resize: vertical; min-height: 7.5rem; line-height: 1.55; }
.kform input::placeholder { color: #8e8e89; }
.kform input:hover, .kform textarea:hover { border-color: #7a7a75; }
.kform input:focus-visible, .kform textarea:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); box-shadow: none;
}

/* Pill choices (radios + checkboxes) */
.chips { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.chip { position: relative; cursor: pointer; }
.chip span {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.6rem 1.1rem; border: 1px solid var(--border-strong); border-radius: 999px;
  background: var(--surface); color: var(--text); font-size: 0.95rem; line-height: 1.3;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.chip:hover span { border-color: #7a7a75; }
.chip input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--accent-text); font-weight: 700; }
.chip input[type="checkbox"]:checked + span::before { content: "✓"; }
.chip input:focus-visible + span { outline: 3px solid var(--text); outline-offset: 2px; }

/* Errors */
.has-error input[type="text"], .has-error input[type="email"], .has-error input[type="tel"],
.has-error input[type="date"], .has-error textarea, .has-error .chip span { border-color: #ff8a80; }
.field-error { color: #ff8a80; font-weight: 700; font-size: 0.92rem; margin: 0.45rem 0 0; }
.error-summary {
  border-left: 4px solid #ff8a80; background: #1f1212; border-radius: 0 8px 8px 0;
  padding: 1rem 1.25rem; margin: 0 0 1.5rem;
}
.error-summary h4 { margin: 0 0 0.4rem; color: var(--text); font-size: 1.05rem; }
.error-summary ul { margin: 0; padding-left: 1.2rem; }
.error-summary li + li { margin-top: 0.2rem; }
.error-summary a { color: #ffb3ab; }

/* Submit row */
.form-actions {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem;
  border-top: 1px solid var(--border); padding-top: 1.75rem;
}
.form-note { margin: 0; color: var(--muted); font-size: 0.92rem; }
.form-actions .button { font-family: inherit; font-size: 1.05rem; padding: 0.95rem 1.9rem; cursor: pointer; }
.form-actions .button[disabled] { opacity: 0.6; cursor: wait; }
.form-status { flex-basis: 100%; margin: 0; color: var(--muted); text-align: right; }
.form-status:empty { display: none; }

/* Success */
.form-success { border-top: 1px solid var(--border); padding: 2.25rem 0 0; max-width: 44rem; }
.form-success h3 { font-size: 1.6rem; margin-bottom: 0.6rem; }
.form-success p { color: var(--muted); }
.form-success .button { font-family: inherit; cursor: pointer; margin-top: 0.5rem; }

/* Spam trap: hidden from people and screen readers */
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

@media (prefers-reduced-motion: reduce) { .kform *, .chip span { transition: none; } }
@media (forced-colors: active) {
  .chip span, .seg span { border: 1px solid CanvasText; }
  .chip input:checked + span, .seg input:checked + span { background: Highlight; color: HighlightText; }
  .field-error { color: CanvasText; }
}
