/* ==========================================================================
   Sound Advice — landing page
   Tokens: brand navy on cool paper, with a pale signal blue for dark rooms.
   Type: Archivo (expanded for display, normal for body), Newsreader for
   the plain-spoken voice: problem statement and client quotes.
   ========================================================================== */

:root {
  --navy: #002d62;
  --navy-deep: #001a3d;
  --paper: #eef1f5;
  --ink: #0d1830;
  --signal: #a8c7f0;
  --steel: #8c9ab3;
  --muted-dark: rgb(255 255 255 / .66);
  --focus: var(--navy);

  --rule-light: rgb(255 255 255 / 0.14);
  --rule-dark: rgb(13 24 48 / 0.14);

  --f-sans: "Archivo", system-ui, sans-serif;
  --f-voice: "Newsreader", Georgia, serif;

  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --max: 1440px;
  --section-y: clamp(5rem, 11vw, 10rem);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

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

html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  margin: 0;
  font-family: var(--f-sans);
  font-size: clamp(1rem, 0.95rem + 0.2vw, 1.125rem);
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--navy); color: #fff; }
.hero ::selection, .work ::selection, .voices ::selection, .contact ::selection { background: var(--signal); color: var(--navy-deep); }
.site-header, .hero, .work, .voices, .contact { --focus: #fff; }

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, figure, blockquote, ul, ol { margin: 0; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }

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

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  padding: .75rem 1rem; background: #fff; color: var(--navy);
  font-weight: 600; text-decoration: none;
}
.skip:focus { top: 1rem; }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Type roles ---------- */
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

.display {
  font-family: var(--f-sans);
  font-stretch: 118%;
  font-weight: 700;
  font-size: clamp(2rem, 1.2rem + 3.2vw, 4.25rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.voice {
  font-family: var(--f-voice);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.label {
  font-size: .9rem;
  font-weight: 600;
  color: var(--muted-dark);
  margin-bottom: .4rem;
}

/* ---------- Buttons ---------- */
.btn {
  --h: 3.25rem;
  display: inline-flex; align-items: center; gap: .6rem;
  height: var(--h);
  padding-inline: 1.5rem;
  border-radius: 999px;
  font-family: var(--f-sans);
  font-weight: 600;
  font-stretch: 105%;
  font-size: .98rem;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .2s, color .2s, border-color .2s;
}
.btn:active { transform: translateY(1px); }
.btn--small { --h: 2.6rem; padding-inline: 1.1rem; font-size: .9rem; }
.btn--light { background: #fff; color: var(--navy); }
.btn--light:hover { background: var(--signal); }
.btn--ghost { border: 1px solid rgb(255 255 255 / .35); color: #fff; }
.btn--ghost:hover { border-color: #fff; background: rgb(255 255 255 / .06); }

.led {
  width: .5rem; height: .5rem; border-radius: 50%;
  background: currentColor;
  flex: none;
}

.link-arrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid currentColor;
  padding-bottom: .15rem;
}
.link-arrow::after { content: "→"; transition: transform .3s var(--ease-out); }
.link-arrow:hover::after { transform: translateX(4px); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50;
  color: #fff;
  transition: background-color .4s, backdrop-filter .4s, box-shadow .4s;
}
.site-header.is-scrolled {
  background: rgb(0 26 61 / .82);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: 0 1px 0 var(--rule-light);
}
.site-header__inner {
  max-width: var(--max); margin-inline: auto;
  padding: 1rem var(--gutter);
  display: flex; align-items: center; gap: 2rem;
}
.brand img { width: clamp(9.5rem, 14vw, 12.5rem); }
.site-nav { display: flex; gap: 1.75rem; margin-left: auto; }
.site-nav a {
  font-size: .92rem; font-weight: 500;
  text-decoration: none; opacity: .8;
  transition: opacity .2s;
}
.site-nav a:hover { opacity: 1; }
@media (max-width: 860px) {
  .site-nav { display: none; }
  .site-header__inner > .btn { margin-left: auto; }
}

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  background: var(--navy);
  color: #fff;
  padding-top: clamp(7rem, 12vw, 9.5rem);
  overflow: hidden;
}

/* Full-bleed background photo under a navy wash */
.hero__bg {
  position: absolute; inset: 0;
  z-index: -1;
  overflow: hidden;
}
.hero__bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 50% 45%;
  filter: saturate(.75) contrast(1.05);
  transform: scale(1.08);
}
.hero__bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgb(0 26 61 / .92) 0%, rgb(0 45 98 / .72) 45%, rgb(0 45 98 / .35) 100%),
    linear-gradient(180deg, rgb(0 26 61 / .55) 0%, transparent 30%, transparent 55%, var(--navy-deep) 100%);
}

.hero__grid {
  width: 100%;
  max-width: var(--max); margin-inline: auto;
  padding-inline: var(--gutter);
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(1rem, 2vw, 2rem);
  align-items: start;
}
.hero__title {
  grid-column: 1 / -1;
  grid-row: 1;
  position: relative; z-index: 2;
  font-stretch: 125%;
  font-weight: 700;
  font-size: clamp(2.25rem, 0.6rem + 5.2vw, 6rem);
  line-height: .98;
  letter-spacing: -0.035em;
}
.hero__title .line { display: block; overflow: hidden; padding-bottom: .06em; }
.hero__title .line > span { display: inline-block; }
.hero__title .line--last { color: var(--signal); }

.hero__copy {
  grid-column: 1 / span 6;
  grid-row: 2;
  margin-top: clamp(1.75rem, 3vw, 2.75rem);
}
.lede {
  font-size: clamp(1.05rem, 0.95rem + 0.4vw, 1.28rem);
  line-height: 1.55;
  max-width: 34rem;
  color: rgb(255 255 255 / .84);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }

@media (max-width: 900px) {
  .hero__copy { grid-column: 1 / -1; }
  .hero__bg::after {
    background: linear-gradient(180deg, rgb(0 26 61 / .75) 0%, rgb(0 45 98 / .7) 50%, var(--navy-deep) 100%);
  }
}

/* ---------- Oscilloscope (signature) ---------- */
.scope {
  position: relative;
  max-width: var(--max);
  margin: clamp(2.5rem, 5vw, 4rem) auto 0;
  padding-inline: var(--gutter);
}
/* Flex item with auto margins would otherwise shrink to the canvas's 300px default */
.hero > .scope { width: min(100%, 60rem); margin-bottom: clamp(1rem, 3vw, 2rem); }
.scope canvas {
  display: block;
  width: 100%;
  height: clamp(130px, 14vw, 200px);
}

/* ==========================================================================
   PROBLEM
   ========================================================================== */
.problem { padding-block: var(--section-y); }
.problem__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(1rem, 2vw, 2rem);
  row-gap: 2rem;
}
.problem__title {
  grid-column: 1 / -1;
  justify-self: center;
  max-width: 14em;
  text-align: center;
  font-family: var(--f-voice);
  font-weight: 400;
  font-size: clamp(2.2rem, 1.2rem + 3.6vw, 4.6rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.problem__body {
  grid-column: 1 / -1;
  justify-self: center;
  max-width: 38rem;
  display: grid; gap: 1.1rem;
  text-align: center;
  text-wrap: pretty;
  color: rgb(13 24 48 / .78);
}
.outcomes {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: clamp(2.5rem, 5vw, 4.5rem);
  border-top: 1px solid var(--rule-dark);
}
.outcomes li {
  padding: 1.75rem clamp(1rem, 2vw, 2rem) 0;
  text-align: center;
}
.outcomes li + li { border-left: 1px solid var(--rule-dark); }
.outcomes h3 {
  font-stretch: 112%;
  font-weight: 700;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
  margin-bottom: .5rem;
}
.outcomes p { color: rgb(13 24 48 / .72); max-width: 26rem; margin-inline: auto; }

@media (max-width: 820px) {
  .outcomes { grid-template-columns: 1fr; }
  .outcomes li + li { border-left: 0; border-top: 1px solid var(--rule-dark); }
  .outcomes li { padding-bottom: 1.5rem; }
}

/* ==========================================================================
   SERVICES (channel strips)
   ========================================================================== */
.services { padding-bottom: var(--section-y); }
.section-head { display: grid; gap: 1.25rem; max-width: 62rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }

.channels {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.75rem, 3vw, 3rem);
}
.channel {
  display: flex; flex-direction: column;
}
.channel__img {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 4px;
  margin-bottom: 1.5rem;
  background: var(--navy);
}
.channel__img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.2s var(--ease-out), filter .6s;
  filter: saturate(.9);
}
.channel:hover .channel__img img { transform: scale(1.05); filter: saturate(1.05); }
.channel h3 {
  font-stretch: 118%;
  font-weight: 700;
  font-size: clamp(1.4rem, 1.1rem + 0.8vw, 1.85rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: .75rem;
}
.channel > p { color: rgb(13 24 48 / .74); margin-bottom: 1.25rem; }
.channel ul {
  border-top: 1px solid var(--rule-dark);
  margin-bottom: 1.75rem;
}
.channel li {
  padding: .55rem 0;
  border-bottom: 1px solid var(--rule-dark);
  font-size: .95rem;
}
.channel .link-arrow { margin-top: auto; align-self: flex-start; color: var(--navy); }

@media (max-width: 980px) {
  .channels { grid-template-columns: 1fr; max-width: 40rem; gap: 3.5rem; }
}

/* ==========================================================================
   WORK (horizontal gallery)
   ========================================================================== */
.work {
  background: var(--navy-deep);
  color: #fff;
  overflow: hidden;
}
.work__pin {
  min-height: 100vh;
  display: flex; flex-direction: column;
  padding-block: clamp(5rem, 9vw, 7rem) clamp(3rem, 6vw, 5rem);
}
.work__head {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 1rem 2rem;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}
.work__head .display { max-width: 52rem; }
.work__hint {
  display: flex; align-items: center; gap: .75rem;
  font-size: .85rem; color: var(--muted-dark);
}
.work__progress {
  width: 8rem; height: 2px; background: var(--rule-light); position: relative; overflow: hidden;
}
.work__progress i {
  position: absolute; inset: 0; background: #fff;
  transform-origin: left; transform: scaleX(0);
}

.work__viewport {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
  scrollbar-width: none;
  padding-inline: var(--gutter);
}
.work__viewport::-webkit-scrollbar { display: none; }
.is-pinned .work__viewport { overflow: visible; }

.work__track {
  display: flex;
  gap: clamp(1rem, 2vw, 1.75rem);
  align-items: flex-end;
  width: max-content;
  padding-right: var(--gutter);
}
.tile {
  position: relative;
  flex: none;
  scroll-snap-align: start;
  height: clamp(18rem, 52vh, 34rem);
}
.tile--wide   { aspect-ratio: 4 / 3; }
.tile--tall   { aspect-ratio: 3 / 4; }
.tile--square { aspect-ratio: 1; height: clamp(15rem, 42vh, 27rem); }
.tile img {
  width: 100%; height: calc(100% - 3.25rem);
  object-fit: cover;
  border-radius: 3px;
}
.tile__cap {
  height: 3.25rem;
  padding-top: .7rem;
  font-size: .85rem;
  color: var(--muted-dark);
  line-height: 1.35;
}
.tile__cap b { display: block; color: #fff; font-weight: 600; font-stretch: 108%; }
.tile--end {
  aspect-ratio: auto;
  width: clamp(16rem, 28vw, 24rem);
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
  gap: 1.5rem;
  padding: 2rem;
  border: 1px solid var(--rule-light);
  border-radius: 3px;
  height: clamp(18rem, 52vh, 34rem);
}
.tile--end .voice { font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.4rem); line-height: 1.1; }

/* ==========================================================================
   PROCESS
   ========================================================================== */
.process { padding-block: var(--section-y); }
.process__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 5vw, 6rem);
  align-items: start;
}
.process header { position: sticky; top: 7rem; }
.steps li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.5rem;
  padding: 2rem 0;
  border-top: 1px solid var(--rule-dark);
}
.steps li:last-child { border-bottom: 1px solid var(--rule-dark); }
.steps__n {
  font-stretch: 112%;
  font-weight: 700;
  font-size: clamp(1.25rem, 1.05rem + .6vw, 1.6rem);
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
  color: #5d6c88;
  width: 1.5em;
}
.steps h3 {
  font-stretch: 112%;
  font-weight: 700;
  font-size: clamp(1.25rem, 1.05rem + .6vw, 1.6rem);
  letter-spacing: -0.015em;
  margin-bottom: .4rem;
}
.steps p { color: rgb(13 24 48 / .72); max-width: 32rem; }
@media (max-width: 860px) {
  .process__grid { grid-template-columns: 1fr; }
  .process header { position: static; }
}

/* ==========================================================================
   VOICES
   ========================================================================== */
.voices {
  background: var(--navy);
  color: #fff;
  padding-block: var(--section-y);
}
.quote--lead { margin-bottom: clamp(3rem, 6vw, 5rem); max-width: 68rem; }
.quote--lead blockquote {
  font-size: clamp(1.9rem, 1rem + 3.4vw, 4.4rem);
  line-height: 1.08;
  text-wrap: balance;
}
.quote figcaption {
  margin-top: 1rem;
  font-size: .95rem;
  font-weight: 600;
  color: var(--signal);
}
.quote--lead figcaption { margin-top: 1.5rem; font-size: 1.05rem; }
.quote figcaption::before { content: "— "; }
.quotes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.5rem, 3vw, 3rem);
  border-top: 1px solid var(--rule-light);
  padding-top: 2rem;
}
.quotes blockquote { color: rgb(255 255 255 / .84); }
@media (max-width: 900px) { .quotes { grid-template-columns: 1fr; } }

/* ==========================================================================
   CONTACT / FOOTER
   ========================================================================== */
.contact {
  background: var(--navy-deep);
  color: #fff;
  padding-top: var(--section-y);
  overflow: hidden;
}
.contact__title {
  font-stretch: 118%;
  font-weight: 700;
  font-size: clamp(1.8rem, 1rem + 2.8vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  max-width: 48rem;
  text-wrap: balance;
}

.phone {
  display: inline-block;
  margin-top: clamp(1.5rem, 3vw, 2.5rem);
  font-stretch: 112%;
  font-weight: 800;
  font-size: clamp(2.2rem, 0.4rem + 9.6vw, 9rem);
  line-height: .95;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  text-decoration: none;
  color: #fff;
  transition: color .25s;
}
.phone:hover { color: var(--signal); }

.scope--calm { margin-top: 1rem; padding-inline: 0; }
.scope--calm canvas { height: clamp(60px, 7vw, 100px); }

.contact__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2rem;
  padding-block: clamp(2.5rem, 5vw, 4rem);
  border-top: 1px solid var(--rule-light);
}
.contact__grid p { color: rgb(255 255 255 / .85); line-height: 1.7; }
.contact__grid a { text-decoration-color: rgb(255 255 255 / .3); text-underline-offset: .2em; }
.contact__grid a:hover { text-decoration-color: currentColor; }
.status { display: flex; align-items: center; gap: .6rem; }
.status .led { color: var(--steel); }
.status.is-open .led { color: #6fd39a; animation: blink 2.4s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .35; } }
@media (max-width: 900px) { .contact__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .contact__grid { grid-template-columns: 1fr; } }

.site-footer {
  display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem;
  padding-block: 2rem 2.5rem;
  border-top: 1px solid var(--rule-light);
  font-size: .85rem;
  color: var(--steel);
}
.site-footer img { width: 9rem; opacity: .9; margin-right: auto; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: #fff; }

/* ---------- Motion setup (only when JS + motion allowed) ---------- */
.js-motion [data-reveal] { opacity: 0; transform: translateY(28px); }
.js-motion [data-intro],
.js-motion [data-intro-photo] { opacity: 0; }
.js-motion [data-intro-line] { transform: translateY(110%); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
