/* ==========================================================================
   InTune String Ensemble — site styles
   Original code. Clean editorial layout: a single sans typeface throughout,
   generous whitespace, wide centered measure.
   ========================================================================== */

/* --- Design tokens ------------------------------------------------------ */
:root {
  --ink:        #1c1c1c;
  --ink-soft:   #4a4a4a;
  --ink-faint:  #8a8a8a;
  --rule:       #e2e0dc;
  --paper:      #ffffff;
  --paper-warm: #faf9f7;
  --accent:     #6b7f6e;   /* muted sage — used for links + hover */

  /* One typeface sitewide. The three names are kept as aliases so the rules
     below stay readable — change this single stack to reskin everything. */
  --font-sans:    "Montserrat", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-display: var(--font-sans);
  --font-body:    var(--font-sans);
  --font-logo:    var(--font-sans);

  --measure:  760px;   /* text column */
  --shell:   1140px;   /* max page width */
  --gutter:  clamp(1.25rem, 5vw, 3.5rem);
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  /* Montserrat runs large for its point size — 0.95rem here reads like 1rem
     in a narrower face, and the extra leading keeps the wide letterforms open. */
  font-size: 0.95rem;
  line-height: 1.8;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { max-width: 100%; height: auto; display: block; }

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(107, 127, 110, 0.35);
  transition: color 0.2s ease, border-color 0.2s ease;
}
a:hover, a:focus-visible { color: var(--ink); border-color: var(--ink); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* --- Typography --------------------------------------------------------- */
/* Sans headings need weight and tighter tracking where a serif carried itself
   on contrast alone. Larger sizes get progressively tighter letter-spacing. */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.25;
  margin: 0 0 0.5em;
}

h1 {
  font-size: clamp(1.85rem, 4.5vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.18;
}

h2 {
  font-size: clamp(1.35rem, 2.8vw, 1.75rem);
  letter-spacing: -0.005em;
}

h3 {
  font-size: clamp(1.1rem, 2vw, 1.3rem);
  margin-bottom: 0.35em;
}

p { margin: 0 0 1.35em; color: var(--ink-soft); }
p:last-child { margin-bottom: 0; }

.lede {
  font-family: var(--font-display);
  font-size: clamp(1.02rem, 1.9vw, 1.2rem);
  font-weight: 400;
  line-height: 1.7;
  color: var(--ink);
}

.eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 1rem;
  font-weight: 600;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Skip link */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--ink); color: #fff; padding: 0.75rem 1.25rem; border: 0;
}
.skip-link:focus { left: 0; }

/* --- Layout ------------------------------------------------------------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.measure { max-width: var(--measure); }
.measure-center { max-width: var(--measure); margin-inline: auto; }

.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section--tight { padding-block: clamp(2rem, 4vw, 3rem); }
.section--warm { background: var(--paper-warm); }

.rule { border: 0; border-top: 1px solid var(--rule); margin: 0; }

/* --- Header / navigation ------------------------------------------------ */
.site-header {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
  position: relative;
  z-index: 50;
}

.site-header__inner {
  display: block;
  text-align: center;
  padding-block: clamp(1.75rem, 4vw, 2.75rem) 0;
  position: relative;
}

/* Wordmark: heavy geometric sans, all caps, wide tracking. */
.brand {
  display: inline-block;
  max-width: 100%;
  font-family: var(--font-logo);
  font-weight: 700;
  font-size: clamp(1.35rem, 4.2vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  /* tracking adds space after the final letter; nudge back to stay optically centered */
  text-indent: 0.13em;
  color: var(--ink);
  border: 0;
  transition: color 0.2s ease;
}
.brand:hover { color: var(--accent); }

.nav__list {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  margin: clamp(1.25rem, 3vw, 2rem) 0 0;
  padding: 0 0 clamp(1rem, 2.5vw, 1.5rem);
}

.nav__link {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border: 0;
  padding-block: 0.35rem;
  position: relative;
}
.nav__link::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.nav__link:hover { color: var(--ink); }
.nav__link:hover::after,
.nav__link[aria-current="page"]::after { transform: scaleX(1); }
.nav__link[aria-current="page"] { color: var(--ink); }

/* Mobile menu toggle — parked top-right so the wordmark stays centered */
.nav-toggle {
  display: none;
  position: absolute;
  top: 0.75rem;
  right: 0;
  background: none;
  border: 0;
  padding: 0.5rem;
  cursor: pointer;
  color: var(--ink);
}
.nav-toggle svg { display: block; }

/* --- Hero --------------------------------------------------------------- */
.hero { position: relative; }

.hero__media {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--paper-warm);
}

/* Home photo: shown whole, never cropped. No aspect-ratio and no object-fit
   here on purpose — the image sets its own height from its real proportions,
   so nothing can clip the top or bottom of the frame. */
.hero--portrait {
  padding-block: clamp(1.5rem, 4vw, 2.5rem) 0;
}
.hero--portrait .hero__media {
  aspect-ratio: auto;
  object-fit: fill;
  height: auto;
  max-width: 720px;
  margin-inline: auto;
}

.hero__caption {
  padding-block: clamp(2rem, 5vw, 3.5rem);
  text-align: center;
}

.page-head {
  padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(1.5rem, 3vw, 2.5rem);
  text-align: center;
}
/* Page titles sit a step below the homepage h1 — they label a page rather
   than open it, so they don't need the full display size. */
.page-head h1 {
  font-size: clamp(1.6rem, 3.6vw, 2.2rem);
}
.page-head p { max-width: 640px; margin-inline: auto; }

/* --- Prose blocks ------------------------------------------------------- */
.prose h2 { margin-top: 2.5rem; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 2.25rem; }
.prose h3:first-child { margin-top: 0; }

/* Feature image inside content flow */
.figure { margin: 0 0 clamp(2rem, 5vw, 3.5rem); }
.figure img { width: 100%; }
.figure figcaption {
  font-size: 0.82rem;
  color: var(--ink-faint);
  margin-top: 0.75rem;
  text-align: center;
}

/* --- Lists -------------------------------------------------------------- */
.org-list {
  list-style: none;
  margin: 0 0 2rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.25rem 2rem;
}
.org-list li {
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--rule);
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 500;
}

/* --- Member cards ------------------------------------------------------- */
.members { display: grid; gap: clamp(3rem, 7vw, 5rem); }

.member {
  display: grid;
  grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}
.member:nth-child(even) { direction: rtl; }
.member:nth-child(even) > * { direction: ltr; }

.member__photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: var(--paper-warm);
}
.member__name { margin-bottom: 0.25rem; }
.member__role {
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 1rem;
}

/* --- Contact / form ----------------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 6vw, 4.5rem);
  align-items: start;
}

.contact-details dl { margin: 0; }
.contact-details dt {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-top: 1.5rem;
}
.contact-details dt:first-child { margin-top: 0; }
.contact-details dd {
  margin: 0.35rem 0 0;
  font-size: 1.05rem;
  color: var(--ink);
}

.form-field { margin-bottom: 1.5rem; }
.form-field label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 0.5rem;
}
.form-field input,
.form-field textarea {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 0;
  padding: 0.75rem 0.9rem;
  transition: border-color 0.2s ease;
}
.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--ink);
  outline: none;
}
.form-field textarea { min-height: 170px; resize: vertical; }

/* Honeypot — hidden from humans, catches naive bots */
.form-hp { position: absolute; left: -9999px; opacity: 0; }

.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 0;
  padding: 0.95rem 2.4rem;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.btn:hover, .btn:focus-visible { background: var(--accent); border-color: var(--accent); color: #fff; }

.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: #fff; border-color: var(--ink); }

/* --- Footer ------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--rule);
  background: var(--paper-warm);
  padding-block: clamp(2.5rem, 5vw, 3.5rem);
  text-align: center;
}
.site-footer__brand {
  font-family: var(--font-logo);
  font-weight: 700;
  font-size: clamp(0.95rem, 2.2vw, 1.15rem);
  letter-spacing: 0.13em;
  text-indent: 0.13em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0 0 0.75rem;
}
.site-footer p { color: var(--ink-faint); font-size: 0.85rem; margin: 0.35rem 0; }
.site-footer a { color: var(--ink-soft); border-color: rgba(0,0,0,0.15); }
.site-footer a:hover { color: var(--ink); }

.social {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  border: 0;
}
.social svg { width: 22px; height: 22px; fill: currentColor; }

/* --- Responsive --------------------------------------------------------- */
@media (max-width: 820px) {
  .nav-toggle { display: block; }

  .site-header__inner { padding-bottom: 1.25rem; }

  .site-nav {
    position: absolute;
    left: 0; right: 0; top: 100%;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    display: none;
    text-align: left;
  }
  .site-nav[data-open="true"] { display: block; }

  .nav__list {
    flex-direction: column;
    align-items: stretch;
    flex-wrap: nowrap;
    gap: 0;
    margin: 0;
    padding: 0.5rem var(--gutter) 1.25rem;
  }
  .nav__list li { border-top: 1px solid var(--rule); }
  .nav__link { display: block; padding: 0.9rem 0; }
  .nav__link::after { display: none; }

  /* Keep the wordmark clear of the toggle button */
  .brand { padding-inline: 2.25rem; }

  .member,
  .member:nth-child(even) {
    grid-template-columns: 1fr;
    direction: ltr;
  }
  .member__photo { max-width: 320px; aspect-ratio: 4 / 5; }

  .contact-grid { grid-template-columns: 1fr; }

  .hero--portrait .hero__media { max-width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --- Print -------------------------------------------------------------- */
@media print {
  .site-header, .site-footer, .nav-toggle { display: none; }
  body { color: #000; }
}
