/* ═══════════════════════════════════════════════════════════════
   Whisker Wonder Labs — landing site
   Order: fonts → tokens → reset → a11y → shared → nav → hero →
   sections → sloe → footer → legal → reduced-motion

   Identity: ink on warm drafting paper. The studio works in
   black-and-white; lavender (#8A7BC8, Sloe's own colour) appears
   ONLY in and around the Sloe section — the one thing coloured in.
   Structure borrowed from a drafting sheet: hairline rules, real
   labels, no card kit, no numbered markers.
   ═══════════════════════════════════════════════════════════════ */

/* ─── FONTS ─── Space Grotesk (display) + Hanken Grotesk (text),
   both variable, SIL OFL, self-hosted — one file per family+subset. */
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../assets/fonts/space-grotesk-latin.woff2') format('woff2');
  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: 'Space Grotesk';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../assets/fonts/space-grotesk-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, 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: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../assets/fonts/hanken-grotesk-latin.woff2') format('woff2');
  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: 'Hanken Grotesk';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../assets/fonts/hanken-grotesk-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, 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;
}

/* ─── TOKENS ─── */
:root {
  --paper:       #FBFAF7;
  --paper-sink:  #F2F0EA;
  /* nav glass: the tone a grain-textured band renders at (--paper eased ~4%
     toward --ink) at 90% — blends into the grained hero on load, and the 10%
     translucency + blur keeps hero copy from colliding with the lockup as it
     scrolls under the bar. */
  --nav-glass:   color-mix(in srgb, color-mix(in srgb, var(--paper), var(--ink) 4%) 90%, transparent);
  --ink:         #262521;   /* body text — ~15:1 on paper */
  --ink-2:       #55554E;   /* secondary — ~7:1 */
  --ink-3:       #6E6E66;   /* meta — ~4.9:1 */
  --rule:        #DBD7CC;
  --rule-soft:   #E7E3D8;

  --lav:         #8A7BC8;   /* Sloe's brand hex — fills, borders, chips */
  --lav-ink:     #5E4E92;   /* lavender for text/links — ~6:1 on paper */
  --lav-wash:    #EFECF7;   /* faint tint for the Sloe band */
  --lav-edge:    #DED6F0;

  --footer:      #232320;
  --on-footer:   #EAE8E1;
  --on-footer-2: #A5A399;
  --footer-rule: rgba(255,255,255,0.12);

  --font-display: 'Space Grotesk', 'Segoe UI', system-ui, sans-serif;
  --font-text:    'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --gutter: clamp(20px, 5vw, 72px);
  --maxw:   1180px;
  --nav-h:  62px;

  --r-sm:  7px;
  --r-md:  11px;
  --r-pill: 999px;

  --ease: cubic-bezier(0.22, 0.61, 0.25, 1);
  --dur:  0.34s;
  --dur-fast: 0.16s;

  /* faint fibre grain. The alpha is baked into the SVG because these are painted
     as plain background layers: there is no per-layer opacity property, and no
     blend mode is used — `overlay` is very nearly a no-op against near-white
     paper (it can only shift it ~3 levels), so these composite normally.
     --grain sits on the light bands, --grain-strong on the dark footer. */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.28'/%3E%3C/svg%3E");
  --grain-strong: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.18'/%3E%3C/svg%3E");
}
@media (min-width: 1024px) { :root { --nav-h: 74px; } }

/* ─── RESET & BASE ─── */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 20px);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 1.0625rem;      /* 17px */
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
body.nav-open { overflow: hidden; }

h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
strong { font-weight: 600; color: var(--ink); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-wrap: balance;
}

a { color: var(--ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; text-decoration-color: var(--rule); transition: text-decoration-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease); }
a:hover { text-decoration-color: currentColor; }

::selection { background: var(--lav-edge); color: var(--ink); }

/* ─── A11Y ─── */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip-link {
  position: fixed; left: 12px; top: -80px; z-index: 300;
  padding: 10px 16px; border-radius: var(--r-sm);
  background: var(--ink); color: var(--paper);
  font-family: var(--font-display); font-size: 0.9rem; text-decoration: none;
  transition: top var(--dur-fast) var(--ease);
}
.skip-link:focus { top: 12px; }

:focus-visible {
  outline: 2px solid var(--lav-ink);
  outline-offset: 3px;
  border-radius: 2px;
}
.nav :focus-visible, .hero :focus-visible, .footer :focus-visible { outline-color: currentColor; }

/* ─── SHARED: layout + type helpers ─── */
.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

/* ─── PAPER GRAIN ───
   A whisper of fibre over every full-width band so the flat fills don't read as
   flat digital colour.

   Painted as a second background LAYER on the band itself — deliberately not an
   absolutely-positioned ::before. A ::before has to be stretched to match its
   parent's height, and WebKit sizes it short once a band's content grows past the
   parent's min-height (reported on iOS Safari and at any width where the hero
   stacks: the mobile hero got an unpainted white strip at the bottom, right
   before the next section). A background layer is always exactly its own box, so
   that cannot happen on any engine. It also needs no isolation/z-index
   scaffolding — backgrounds already paint behind content.

   Variant bands override only background-color, so they inherit the grain layer;
   never set the `background` shorthand on them or the grain is dropped. */
.hero, .section, .legal, .footer {
  background-image: var(--grain);
  background-repeat: repeat;
  background-size: 190px 190px;
}
.hero, .section, .legal { position: relative; background-color: var(--paper); }
.footer { background-image: var(--grain-strong); }

.kicker {
  display: inline-flex; align-items: center; gap: 10px;
  margin: 0 0 20px;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--ink-2);
}
.kicker::before {
  content: ''; width: 26px; height: 2px; border-radius: 2px;
  background: currentColor; flex: none; opacity: 0.55;
}

.section { padding-block: clamp(64px, 9vw, 108px); }
.section + .section { border-top: 1px solid var(--rule-soft); }
.section--sink { background-color: var(--paper-sink); }

.section-head { max-width: 52ch; margin-bottom: clamp(32px, 5vw, 52px); }
.section-head h2 {
  font-size: clamp(1.65rem, 3.4vw, 2.4rem);
}
.section-head p {
  margin-top: 14px;
  font-size: 1.125rem;
  color: var(--ink-2);
  text-wrap: pretty;
}
.prose p { max-width: 64ch; color: var(--ink-2); }
.prose p + p { margin-top: 1.1em; }
.prose strong { color: var(--ink); }

/* ─── NAV ─── injected by js/layout.js ─── */
/* Frosted glass at every scroll position (the blur is always on), so the moment
   you scroll — even while still inside the tall hero — the headline sliding
   under the bar is softened and pushed back instead of colliding with the
   lockup. --nav-glass is tinted to the grained-band tone, so at rest on the
   hero the bar blends in rather than reading as a lighter strip. The hairline
   is the only thing js toggles, once you're past the hero. */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center;
  background: var(--nav-glass);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) var(--ease);
}
/* hairline appears once the page is scrolled past the hero (js toggles .nav--solid) */
.nav--solid { border-bottom-color: var(--rule); }
.nav-inner {
  width: 100%; max-width: var(--maxw); margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.nav-brand { display: inline-flex; align-items: center; }
.nav-brand img { width: clamp(150px, 20vw, 188px); height: auto; }
.nav-links { display: none; align-items: center; gap: 30px; }
.nav-links a {
  font-family: var(--font-display); font-size: 0.98rem; font-weight: 500;
  color: var(--ink); text-decoration: none;
}
.nav-links a:hover { color: var(--ink-2); }

.nav-toggle {
  display: inline-flex; flex-direction: column; gap: 5px;
  width: 42px; height: 42px; padding: 10px;
  background: none; border: 0; cursor: pointer; color: var(--ink);
}
.nav-toggle span { height: 2px; width: 100%; background: currentColor; border-radius: 2px; }

.nav-drawer {
  position: fixed; inset: 0; z-index: 99;
  display: flex; flex-direction: column; gap: 6px;
  padding: calc(var(--nav-h) + 24px) var(--gutter) 40px;
  background: var(--paper);
  visibility: hidden; opacity: 0; transform: translateY(-8px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease), visibility var(--dur);
}
.nav-drawer.is-open { visibility: visible; opacity: 1; transform: none; }
.nav-drawer a {
  padding: 14px 4px; font-family: var(--font-display); font-size: 1.3rem; font-weight: 500;
  color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--rule-soft);
}
.nav-drawer .drawer-meta { margin-top: 20px; color: var(--ink-3); font-size: 0.95rem; }

@media (min-width: 880px) {
  .nav-links { display: flex; }
  .nav-toggle, .nav-drawer { display: none; }
}

/* ─── HERO ─── one screen tall, full-bleed art behind left-set copy ─── */
.hero {
  position: relative;
  min-height: 100svh;              /* always fill the viewport height */
  display: flex; align-items: center;
  padding: calc(var(--nav-h) + clamp(28px, 6vh, 64px)) var(--gutter) clamp(40px, 7vh, 76px);
}
.hero-inner {
  width: 100%; min-width: 0; max-width: var(--maxw); margin-inline: auto;
  display: grid; gap: clamp(24px, 5vw, 40px); align-items: center;
}
.hero-copy { min-width: 0; max-width: 40rem; }
.hero h1 {
  font-size: clamp(2.2rem, 4.4vw, 3.35rem);
  line-height: 1.06;
  letter-spacing: -0.026em;
  font-weight: 700;
  text-wrap: balance;
}
.hero-sub {
  margin-top: 20px; max-width: 44ch;
  font-size: clamp(1.03rem, 1.3vw, 1.16rem);
  color: var(--ink-2);
  text-wrap: pretty;
}
/* the illustration at a sane size, sitting directly on the page — its own
   near-white ground blends into --paper so the line work just reads as drawn
   on the sheet (no frame, no card, no stretched background) */
.hero-media { min-width: 0; }
.hero-media img { width: 100%; height: auto; display: block; }

@media (min-width: 900px) {
  .hero-inner { grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr); gap: clamp(32px, 4vw, 60px); }
}
@media (max-width: 899px) {
  .hero { align-items: start; }
  .hero-media { max-width: 460px; margin-top: 14px; }
}

/* ─── STUDIO / ABOUT ─── */
.about-grid { display: grid; gap: clamp(28px, 5vw, 56px); }
@media (min-width: 820px) { .about-grid { grid-template-columns: 0.9fr 1.1fr; } }
.about-aside {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  font-weight: 500; line-height: 1.35; letter-spacing: -0.01em;
  color: var(--ink);
  text-wrap: balance;
}

/* ─── SLOE ─── the one section with colour ─── */
.section--sloe {
  background-color: var(--lav-wash);
  border-top: 1px solid var(--lav-edge);
}
.section--sloe .kicker { color: var(--lav-ink); }
.sloe-grid { display: grid; gap: clamp(28px, 5vw, 52px); align-items: start; }
@media (min-width: 860px) { .sloe-grid { grid-template-columns: 1fr 1fr; } }

.sloe-lede {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.6vw, 1.9rem);
  font-weight: 500; line-height: 1.25; letter-spacing: -0.015em;
  color: var(--ink);
  text-wrap: balance;
}
.sloe-chip {
  display: inline-flex; align-items: center; gap: 9px;
  margin-top: 22px; padding: 7px 15px;
  border: 1px solid var(--lav-edge); border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--paper) 70%, transparent);
  font-family: var(--font-display); font-size: 0.86rem; font-weight: 500; color: var(--lav-ink);
}
.sloe-chip::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--lav); flex: none; }
a.sloe-chip { text-decoration: none; transition: background-color .15s, border-color .15s; }
a.sloe-chip:hover, a.sloe-chip:focus-visible { background: var(--paper); border-color: var(--lav); }

.sloe-feats { display: grid; gap: 2px; }
.sloe-feats > li { padding: 18px 0; border-bottom: 1px solid var(--lav-edge); }
.sloe-feats > li:first-child { border-top: 1px solid var(--lav-edge); }
.sloe-feats h3 {
  font-size: 1.08rem; font-weight: 600; margin-bottom: 5px;
  display: flex; gap: 11px; align-items: baseline;
}
.sloe-feats h3::before {
  content: ''; width: 8px; height: 8px; margin-top: 6px; flex: none;
  border-radius: 2px; background: var(--lav);
}
.sloe-feats p { color: var(--ink-2); font-size: 0.98rem; padding-left: 19px; }

.sloe-more { margin-top: 14px; font-size: 0.95rem; color: var(--ink-3); }

/* ─── CONTACT ─── */
.contact-row {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 18px;
}
.contact-row a {
  font-family: var(--font-display); font-size: clamp(1.2rem, 2.4vw, 1.7rem);
  font-weight: 500; color: var(--ink); text-decoration-color: var(--rule);
}

/* ─── FOOTER ─── injected by js/layout.js ─── */
.footer {
  background-color: var(--footer); color: var(--on-footer-2);
  padding: clamp(48px, 6vw, 72px) var(--gutter) 28px;
}
.footer-inner { max-width: var(--maxw); margin-inline: auto; }
.footer-top {
  display: grid; gap: 32px;
  padding-bottom: 30px; border-bottom: 1px solid var(--footer-rule);
}
@media (min-width: 760px) { .footer-top { grid-template-columns: 1.7fr 1fr 1fr; gap: 44px; } }
.footer-brand img {
  width: 176px; height: auto;
  filter: brightness(0) invert(1);   /* flip the ink lockup to white */
}
.footer-tag { margin-top: 14px; max-width: 32ch; font-size: 0.9rem; line-height: 1.6; color: var(--on-footer-2); }
.footer-col h2 {
  font-family: var(--font-display); font-size: 0.82rem; font-weight: 500;
  color: var(--on-footer-2); margin-bottom: 14px; letter-spacing: 0;
}
.footer-col ul { display: grid; gap: 10px; }
.footer-col a { font-size: 0.94rem; color: var(--on-footer); text-decoration: none; }
.footer-col a:hover { color: #fff; text-decoration: underline; text-decoration-color: var(--footer-rule); }
.footer-bottom {
  display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; justify-content: space-between;
  padding-top: 22px; font-size: 0.82rem; color: var(--on-footer-2);
}
.footer-bottom p { margin: 0; }

/* ─── LEGAL PAGES ─── light, long-form, comfortable measure ─── */
.legal { padding-top: var(--nav-h); }
.legal-inner {
  max-width: 44rem; margin-inline: auto;
  padding: clamp(40px, 7vw, 72px) var(--gutter) clamp(64px, 9vw, 104px);
}
.legal h1 {
  font-size: clamp(2rem, 5vw, 2.9rem); font-weight: 700; letter-spacing: -0.025em;
}
.legal-meta {
  margin-top: 12px; font-family: var(--font-display); font-size: 0.86rem; color: var(--ink-3);
}
.legal-summary {
  margin-top: 34px; padding: 22px 24px;
  background: var(--paper-sink); border: 1px solid var(--rule); border-radius: var(--r-md);
}
.legal-summary p { font-size: 0.98rem; color: var(--ink-2); }
.legal-summary p + p { margin-top: 0.7em; }
.legal-summary strong { color: var(--ink); }

.legal-toc { margin-top: 30px; }
.legal-toc h2 { font-family: var(--font-display); font-size: 0.8rem; font-weight: 500; color: var(--ink-3); margin-bottom: 10px; }
.legal-toc ol { counter-reset: toc; display: grid; gap: 6px; }
.legal-toc li { counter-increment: toc; font-size: 0.94rem; }
.legal-toc li::before { content: counter(toc) ". "; color: var(--ink-3); }
.legal-toc a { color: var(--ink-2); text-decoration-color: var(--rule); }

.legal-body { margin-top: 8px; }
.legal-body h2 {
  margin-top: 44px; padding-bottom: 10px; border-bottom: 1px solid var(--rule);
  font-size: 1.3rem; font-weight: 600; letter-spacing: -0.015em;
  scroll-margin-top: calc(var(--nav-h) + 16px);
}
.legal-body h2 .h2-num { color: var(--ink-3); font-weight: 500; margin-right: 10px; }
.legal-body h3 {
  margin-top: 26px; font-family: var(--font-display); font-size: 1rem; font-weight: 600; color: var(--ink);
}
.legal-body p, .legal-body li { font-size: 1rem; line-height: 1.72; color: var(--ink-2); }
.legal-body p { margin-top: 15px; max-width: 66ch; }
.legal-body strong { color: var(--ink); }
.legal-body em { color: var(--ink); font-style: italic; }
.legal-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.88em; padding: 1px 5px;
  background: var(--paper-sink); border: 1px solid var(--rule-soft); border-radius: 4px;
  word-break: break-word;
}
.legal-body a { color: var(--lav-ink); text-decoration-color: var(--lav-edge); }
.legal-body ul { margin-top: 15px; display: grid; gap: 9px; max-width: 66ch; }
.legal-body li { padding-left: 20px; position: relative; }
.legal-body li::before { content: ''; position: absolute; left: 3px; top: 11px; width: 6px; height: 2px; background: var(--ink-3); }
.legal-body dl { margin-top: 15px; max-width: 66ch; }
.legal-body dt { font-weight: 600; color: var(--ink); margin-top: 14px; }
.legal-body dd { color: var(--ink-2); }

/* ─── REVEAL ───
   One orchestrated moment: the hero copy rises in sequence on load. Nothing
   else on the page animates on scroll. */
.js [data-reveal] {
  opacity: 0; transform: translateY(14px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }
.js.hero-ready .hero [data-reveal] { opacity: 1; transform: none; }

.js .hero .kicker[data-reveal]        { transition-delay: 0ms; }
.js .hero h1[data-reveal]             { transition-delay: 70ms; }
.js .hero .hero-sub[data-reveal]      { transition-delay: 140ms; }
.js .hero .hero-media[data-reveal]    { transition-delay: 160ms; }

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