/* SARV Labs — shared styles
   Brand: Deep Teal #043D40 · Cream #FAF4EA · Gold #DCB468 (on teal) · Deep Gold #8A5D14 (text on light)
   Type: Fraunces (display) + Source Sans 3 (text) */

/* Self-hosted variable fonts (no third-party requests) */
@font-face { font-family: "Fraunces"; src: url("../fonts/fraunces.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Fraunces"; src: url("../fonts/fraunces-ext.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Fraunces"; src: url("../fonts/fraunces-italic.woff2") format("woff2"); font-weight: 100 900; font-style: italic; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Fraunces"; src: url("../fonts/fraunces-ext-italic.woff2") format("woff2"); font-weight: 100 900; font-style: italic; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Source Sans 3"; src: url("../fonts/source-sans-3.woff2") format("woff2"); font-weight: 200 900; font-style: normal; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Source Sans 3"; src: url("../fonts/source-sans-3-ext.woff2") format("woff2"); font-weight: 200 900; font-style: normal; font-display: swap; unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Source Sans 3"; src: url("../fonts/source-sans-3-italic.woff2") format("woff2"); font-weight: 200 900; font-style: italic; font-display: swap; }

:root {
  color-scheme: light;
  --teal: #043D40;
  --teal-2: #2F6B6D;
  --teal-deep: #022B2D;
  --cream: #FAF4EA;
  --paper: #FFFDF8;
  --gold: #DCB468;
  --gold-deep: #8A5D14;
  --slate: #3E5658;
  --mist: #DDE9E6;
  --sand: #E6DCCB;
  --on-teal: #C9DCD9;
  --on-teal-2: #9FBDBA;

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", "Helvetica Neue", Arial, sans-serif;

  --fs-hero: clamp(3.1rem, 8.4vw, 8.25rem);
  --fs-h1: clamp(2.6rem, 6vw, 5.5rem);
  --fs-h2: clamp(2.1rem, 4.4vw, 4rem);
  --fs-h3: clamp(1.5rem, 2.2vw, 2rem);
  --fs-lead: clamp(1.15rem, 1.6vw, 1.45rem);
  --fs-body: 1.125rem;
  --fs-small: 0.95rem;
  --fs-label: 0.8rem;

  --gutter: clamp(20px, 5vw, 64px);
  --max: 1240px;
  --nav-h: 60px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --ease-soft: cubic-bezier(.45, 0, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--teal);
  font-family: var(--sans);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--gold-deep); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--gold); color: var(--teal); }

h1, h2, h3 { font-family: var(--serif); font-weight: 350; line-height: 1.04; letter-spacing: -0.02em; margin: 0; text-wrap: balance; font-optical-sizing: auto; }
h3 { font-weight: 400; line-height: 1.15; letter-spacing: -0.01em; }
p { margin: 0; text-wrap: pretty; }
em { font-style: italic; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.label {
  font-family: var(--sans); font-size: var(--fs-label); font-weight: 600;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-deep);
}
.lead { font-size: var(--fs-lead); line-height: 1.5; color: var(--slate); max-width: 38ch; }
.muted { color: var(--slate); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--teal); color: var(--cream); padding: 10px 16px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 12px; }

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55em; min-height: 48px; padding: 0 1.5em;
  border-radius: 999px; font: 600 1rem/1 var(--sans); text-decoration: none; letter-spacing: .01em;
  transition: transform .4s var(--ease), background-color .3s, color .3s, box-shadow .4s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn--teal { background: var(--teal); color: var(--cream); }
.btn--teal:hover { box-shadow: 0 12px 28px -12px rgba(4, 61, 64, .55); }
.btn--gold { background: var(--gold); color: var(--teal); }
.btn--ghost { color: currentColor; box-shadow: inset 0 0 0 1.5px currentColor; }
.more {
  display: inline-flex; align-items: center; gap: .3em; font-weight: 600; text-decoration: none;
  color: var(--teal-2); font-size: 1.05rem;
}
.more::after { content: "›"; font-size: 1.35em; line-height: 0; transform: translateY(-1px); transition: transform .35s var(--ease); }
.more:hover::after { transform: translate(4px, -1px); }
.more:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }

/* ---------- Navigation ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  background: rgba(250, 244, 234, .72);
  backdrop-filter: saturate(1.6) blur(18px); -webkit-backdrop-filter: saturate(1.6) blur(18px);
  border-bottom: 1px solid transparent;
  transition: border-color .4s, background-color .4s;
}
.nav.is-scrolled { border-bottom-color: rgba(4, 61, 64, .09); background: rgba(250, 244, 234, .86); }
.nav__inner { height: var(--nav-h); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.nav__logo img { height: 24px; width: auto; }
.nav__links { display: flex; align-items: center; gap: clamp(18px, 3vw, 36px); list-style: none; margin: 0; padding: 0; }
.nav__links a { text-decoration: none; font-size: .95rem; font-weight: 500; color: var(--teal); opacity: .8; transition: opacity .25s; padding: 8px 0; }
.nav__links a:hover, .nav__links a[aria-current="page"] { opacity: 1; }
.nav__links a[aria-current="page"] { box-shadow: inset 0 -1.5px 0 var(--gold-deep); }
.nav__toggle { display: none; width: 44px; height: 44px; border: 0; background: none; color: var(--teal); cursor: pointer; margin-right: -10px; }
.nav__toggle span { display: block; width: 20px; height: 1.5px; background: currentColor; margin: 5px auto; transition: transform .4s var(--ease), opacity .3s; }
.nav.is-open .nav__toggle span:first-child { transform: translateY(3.25px) rotate(45deg); }
.nav.is-open .nav__toggle span:last-child { transform: translateY(-3.25px) rotate(-45deg); }

@media (max-width: 760px) {
  .nav__toggle { display: block; }
  .nav__links {
    position: absolute; top: calc(var(--nav-h) + env(safe-area-inset-top, 0px)); left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    padding: 8px var(--gutter) 28px; background: rgba(250, 244, 234, .97);
    border-bottom: 1px solid rgba(4, 61, 64, .09);
    clip-path: inset(0 0 100% 0); transition: clip-path .5s var(--ease); pointer-events: none;
  }
  .nav.is-open .nav__links { clip-path: inset(0 0 0 0); pointer-events: auto; }
  .nav__links li { width: 100%; }
  .nav__links a { display: block; font-family: var(--serif); font-size: 1.9rem; font-weight: 350; padding: 10px 0; opacity: 1; }
  .nav__links a[aria-current="page"] { box-shadow: none; color: var(--gold-deep); }
}

main { display: block; }
.page-top { padding-top: calc(var(--nav-h) + env(safe-area-inset-top, 0px)); }

/* ---------- Reveal on scroll ----------
   Content is visible by default; only when JS is running (html.js) do
   below-the-fold elements start lowered and fade up as they enter. */
.js [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity 1s var(--ease), transform 1.1s var(--ease); transition-delay: var(--d, 0s); }
.js [data-reveal="scale"] { transform: scale(.94); }
.js [data-reveal="left"] { transform: translateX(-36px); }
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* Word-by-word scrub (Apple-style statement) */
.scrub .w { opacity: .16; transition: opacity .25s linear; }
.scrub .w.on { opacity: 1; }

/* ---------- Footer ---------- */
.footer { background: var(--teal); color: var(--cream); padding-block: clamp(64px, 9vw, 112px) 40px; }
.footer__top { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 48px 32px; }
.footer__brand img { height: 36px; width: auto; }
.footer__brand p { margin-top: 18px; color: var(--on-teal); font-size: 1rem; max-width: 30ch; }
.footer h4 { margin: 0 0 14px; font: 600 var(--fs-label)/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer a { color: var(--cream); text-decoration: none; opacity: .86; font-size: 1rem; }
.footer a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }
.footer__bottom { margin-top: 64px; padding-top: 24px; border-top: 1px solid rgba(250, 244, 234, .14); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .9rem; color: var(--on-teal-2); }
@media (max-width: 820px) { .footer__top { grid-template-columns: 1fr 1fr; } .footer__brand { grid-column: 1 / -1; } }

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
  .scrub .w { opacity: 1; }
}
