/* ============================================================
   Silentius, design tokens
   Subject: objective tinnitus diagnosis + personalized relief.
   Signature idea: a waveform that resolves from noise to a
   single calm line, "silence, restored", used as the page's
   recurring structural device instead of plain hairline rules.
   ============================================================ */

:root {
  --ink: #12202B;        /* primary text / dark sections */
  --paper: #F6F4EF;      /* base background */
  --paper-raised: #FFFFFF;
  --teal: #1F4B4C;       /* primary accent */
  --teal-deep: #123132;
  --gold: #B98A2E;       /* measurement / data accent, used sparingly */
  --mist: #DFE4DF;       /* dividers, card backgrounds */
  --slate: #55666A;      /* secondary text */
  --line: rgba(18,32,43,0.12);

  --display: "Newsreader", "Iowan Old Style", Georgia, serif;
  --body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; }

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 32px;
}

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
  color: var(--ink);
}

h1 { font-size: clamp(2.4rem, 5vw, 4rem); line-height: 1.05; font-weight: 400; }
h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); line-height: 1.15; }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; color: var(--slate); }
p:last-child { margin-bottom: 0; }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  display: inline-block;
  margin-bottom: 1em;
}

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246,244,239,0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 132px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-size: 1.3rem;
  color: var(--ink);
}
.brand .mark { width: 22px; height: 22px; flex-shrink: 0; }
.brand .mark path { stroke: var(--teal); }
.brand img.logo-mark { height: 108px; width: auto; }

nav.main-nav ul {
  list-style: none;
  display: flex;
  gap: 2.2rem;
  margin: 0;
  padding: 0;
}
nav.main-nav a {
  font-size: 0.86rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--slate);
  position: relative;
  padding-bottom: 4px;
}
nav.main-nav a:hover,
nav.main-nav a.active { color: var(--ink); }
nav.main-nav a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--gold);
}
.nav-toggle { display: none; }

@media (max-width: 780px) {
  nav.main-nav { display: none; }
  .nav-toggle {
    display: block;
    background: none; border: none;
    font-family: var(--mono); font-size: 0.8rem;
    letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--ink); cursor: pointer;
  }
  nav.main-nav.open {
    display: block;
    position: absolute;
    top: 132px; left: 0; right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 1rem 0;
  }
  nav.main-nav.open ul { flex-direction: column; gap: 0; }
  nav.main-nav.open li { padding: 0.9rem 32px; border-bottom: 1px solid var(--line); }
}

/* ---------- waveform divider (signature element) ---------- */
.waveform {
  width: 100%;
  height: 64px;
  display: block;
}
.waveform path {
  fill: none;
  stroke: var(--teal);
  stroke-width: 1.6;
  stroke-linecap: round;
}
.waveform.on-dark path { stroke: rgba(246,244,239,0.55); }

/* ---------- hero ---------- */
.hero {
  padding: 0 0 40px;
  position: relative;
}
.hero .wrap { position: relative; z-index: 1; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
.hero h1 { max-width: 720px; }
.hero .lede { font-size: 1.15rem; max-width: 640px; margin-top: 1.2em; }
.hero-figure {
  border: 1px solid var(--line);
  background: var(--paper-raised);
  border-radius: 4px;
  padding: 28px;
}
#hero-wave { width: 100%; height: 220px; }
#hero-wave path { fill: none; stroke: var(--teal); stroke-width: 1.8; stroke-linecap: round; }
#hero-wave .flat { stroke: var(--gold); }

.hero-photo {
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
}
.hero-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-photo.tall img { max-height: 420px; }

.hero-photo.full {
  width: 100%;
  margin-bottom: 2.5rem;
  border: none;
  border-radius: 0;
}
.hero-photo.full img {
  width: 100%;
  height: 62vh;
  min-height: 380px;
  max-height: 640px;
  object-fit: cover;
  display: block;
}
.hero-copy { max-width: 760px; }

@media (max-width: 700px) {
  .hero-photo.full img { height: 42vh; min-height: 260px; }
}

.page-banner {
  width: 100%;
  border-radius: 4px;
  overflow: hidden;
  margin-top: 2rem;
  border: 1px solid var(--line);
}
.page-banner img { width: 100%; display: block; object-fit: cover; max-height: 380px; }

.cta-row { display: flex; gap: 14px; margin-top: 2rem; flex-wrap: wrap; }
.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: 2px;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-family: var(--body);
  font-weight: 600;
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn-primary { background: var(--teal); color: var(--paper); }
.btn-primary:hover { background: var(--teal-deep); }
.btn-ghost { border: 1px solid var(--ink); color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
}

/* ---------- sections ---------- */
section { padding: 88px 0; }
section.tight { padding: 56px 0; }
.section-head { max-width: 640px; margin-bottom: 3rem; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.feature-card {
  background: var(--paper);
  padding: 32px 26px;
}
.feature-card .num {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--gold);
  display: block;
  margin-bottom: 1.2rem;
}
.feature-card .icon { width: 116px; height: 116px; margin-bottom: 1.2rem; display: block; }
.feature-card .icon img { width: 100%; height: 100%; object-fit: contain; }
.feature-card h3 { font-size: 1.05rem; margin-bottom: 0.5em; }
.feature-card p { font-size: 0.92rem; margin: 0; }

@media (max-width: 900px) {
  .feature-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .feature-grid { grid-template-columns: 1fr; }
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
@media (max-width: 860px) {
  .two-col { grid-template-columns: 1fr; gap: 32px; }
}

.dark-band {
  background: var(--ink);
  color: var(--paper);
}
.dark-band h2, .dark-band h3 { color: var(--paper); }
.dark-band p { color: rgba(246,244,239,0.72); }
.dark-band .eyebrow { color: var(--gold); }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-top: 2.5rem;
}
.stat .figure {
  font-family: var(--mono);
  font-size: 2.4rem;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 0.5rem;
}
.stat .label { font-size: 0.9rem; color: rgba(246,244,239,0.72); }
@media (max-width: 780px) {
  .stat-grid { grid-template-columns: 1fr; gap: 28px; }
}

.list-check { list-style: none; padding: 0; margin: 0; }
.list-check li {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 14px;
}
.list-check li::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gold);
  margin-top: 9px;
  flex-shrink: 0;
}
.list-check strong { color: var(--ink); }

.market-figure {
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--line);
}
.market-figure img { width: 100%; display: block; object-fit: cover; }

.figure-frame {
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--line);
  margin-top: 1.5rem;
}
.figure-frame img { width: 100%; display: block; object-fit: cover; max-height: 320px; }
.dark-band .figure-frame { border-color: rgba(246,244,239,0.18); }

/* ---------- team ---------- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.team-card {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  padding: 26px;
}
.avatar {
  width: 128px; height: 128px;
  border-radius: 50%;
  background: var(--teal);
  color: var(--paper);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--display);
  font-size: 1.2rem;
  margin-bottom: 1.2rem;
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }

.team-photo-home {
  width: 100%;
  aspect-ratio: 4/5;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 1.2rem;
  background: var(--mist);
}
.team-photo-home img { width: 100%; height: 100%; object-fit: cover; display: block; }

.team-photo {
  width: 100%;
  aspect-ratio: 4/5;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 1.2rem;
  background: var(--mist);
}
.team-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.team-card h3 { margin-bottom: 0.15em; }
.team-card .role {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
  display: block;
  margin-bottom: 0.9em;
}
.team-card p { font-size: 0.92rem; }

@media (max-width: 940px) { .team-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .team-grid { grid-template-columns: 1fr; } }

.advisor-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 1rem;
}
@media (max-width: 700px) { .advisor-row { grid-template-columns: 1fr; } }
.advisor-card {
  border-top: 2px solid var(--teal);
  padding-top: 16px;
}
.advisor-card ul { margin: 0.6em 0 0; padding-left: 1.1em; color: var(--slate); font-size: 0.92rem; }
.advisor-card li { margin-bottom: 0.3em; }

/* ---------- contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 60px;
}
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }

.field { margin-bottom: 20px; }
.field label {
  display: block;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--slate);
  margin-bottom: 8px;
}
.field input, .field textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line);
  background: var(--paper-raised);
  font-family: var(--body);
  font-size: 0.95rem;
  color: var(--ink);
  border-radius: 2px;
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--teal);
}
.field textarea { resize: vertical; min-height: 120px; }
.form-note { font-size: 0.82rem; color: var(--slate); margin-top: 1rem; }
.form-success {
  display: none;
  background: var(--mist);
  border-left: 3px solid var(--teal);
  padding: 16px 18px;
  font-size: 0.92rem;
  margin-top: 1.2rem;
}

.contact-meta { border-left: 1px solid var(--line); padding-left: 48px; }
@media (max-width: 860px) { .contact-meta { border-left: none; padding-left: 0; } }
.contact-meta .item { margin-bottom: 1.8rem; }
.contact-meta .item .k {
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold);
  display: block;
  margin-bottom: 0.3em;
}

/* ---------- footer ---------- */
footer.site-footer {
  background: var(--ink);
  color: rgba(246,244,239,0.7);
  padding: 56px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(246,244,239,0.14);
}
@media (max-width: 780px) { .footer-grid { grid-template-columns: 1fr; gap: 28px; } }
.footer-grid h4 {
  color: var(--paper);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1.1em;
}
.footer-grid .brand { color: var(--paper); margin-bottom: 0.8em; }
.footer-grid p { color: rgba(246,244,239,0.6); font-size: 0.92rem; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 0.6em; }
.footer-grid a:hover { color: var(--paper); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  font-size: 0.8rem;
  color: rgba(246,244,239,0.45);
  flex-wrap: wrap;
  gap: 10px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
