/* =====================================================================
   BAAYN — BASE (reset, typography, layout primitives)
   ===================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}
/* Desktop scale: the layout is sized in rem, so a smaller root size renders
   the whole site the way it looks at ~67% browser zoom on a wide screen.  */
@media (min-width: 1200px) { html { font-size: 85%; } }
@media (min-width: 1600px) { html { font-size: 78%; } }
html.lenis, html.lenis body { height: auto; }
/* Lenis does the smooth scrolling; CSS smooth-scroll on top of it turns
   ScrollTrigger's instant measuring jumps into glides and breaks the
   scroll animations after a refresh (e.g. the shop hero after a filter) */
html.lenis { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-ink);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  font-weight: var(--fw-light);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

/* Paper grain — gives every surface the feel of handmade paper */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: var(--z-overlay);
  pointer-events: none;
  opacity: .07;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .17 0 0 0 0 .09 0 0 0 0 .06 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input { font: inherit; color: inherit; }
ol, ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, p, figure, blockquote { margin: 0; }

::selection { background: var(--saffron-300); color: var(--walnut-900); }

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

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -100px;
  z-index: calc(var(--z-preloader) + 1);
  padding: var(--space-2) var(--space-4);
  background: var(--walnut-900);
  color: var(--paper-50);
  border-radius: var(--radius-pill);
}
.skip-link:focus { top: var(--space-4); }

/* ---------- Type ---------- */
.t-hero, .t-h1, .t-h2, .t-h3 {
  font-family: var(--font-display);
  font-weight: var(--fw-light);
  letter-spacing: var(--tracking-tight);
  line-height: var(--lh-snug);
}
.t-hero { font-size: var(--fs-hero); line-height: .95; }
.t-h1 { font-size: var(--fs-h1); line-height: 1; }
.t-h2 { font-size: var(--fs-h2); }
.t-h3 { font-size: var(--fs-h3); }
.t-h4 { font-family: var(--font-sans); font-size: var(--fs-h4); font-weight: var(--fw-regular); line-height: 1.3; }
.t-hero em, .t-h1 em, .t-h2 em, .t-h3 em {
  font-style: italic;
  color: var(--color-accent);
}
.t-lede { font-size: var(--fs-lede); line-height: 1.55; color: var(--color-ink-soft); max-width: var(--measure); }
.t-small { font-size: var(--fs-small); }
.t-mute { color: var(--color-ink-mute); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-sans);
  font-size: var(--fs-micro);
  font-weight: var(--fw-medium);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-ink-soft);
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
  opacity: .6;
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: var(--space-section); position: relative; }
.inverse {
  background: var(--color-bg-inverse);
  color: var(--color-ink-inverse);
  --color-ink-soft: var(--color-ink-inverse-soft);
  --color-ink-mute: color-mix(in srgb, var(--paper-50) 50%, transparent);
  --color-line: var(--color-line-inverse);
}
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Split text helpers (filled by JS) */
.split-word { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; margin-bottom: -.08em; }
.split-word > span { display: inline-block; will-change: transform; }
.fade-word { transition: opacity var(--dur-2) linear; }
