/* ============================================
   DESIGN LAIR — BASE
   tokens · reset · typography
   ============================================ */

/* Using free Google Fonts (Fraunces + Caveat + Montserrat) as close substitutes
   for the brand's Transforma Mix and Luthon Southard Script.
   When licensed font files are available, drop them in /assets/fonts/ and
   add @font-face declarations back here, then update --font-display and
   --font-script tokens below. */

:root {
  /* Primary */
  --ink:        #000000;
  --blue:       #0018EB;
  --warm-grey:  #E8E4E0;

  /* Secondary */
  --purple:     #8353FF;

  /* Accent */
  --neon:       #C0FE6C;
  --orange:     #F76F08;
  --peri:       #B8C4F6;

  /* Surface tones */
  --off-white:  #F5F2EE;
  --paper:      #FBF9F6;
  --dark:       #0A0A14;

  /* Text */
  --text-strong: var(--ink);
  --text-muted:  rgba(0, 0, 0, 0.55);
  --text-onDark: #F5F2EE;

  /* Type — Google Fonts substitutes (licensed-safe for deployment) */
  --font-display: 'Fraunces', 'Times New Roman', serif;
  --font-body:    'Montserrat', system-ui, -apple-system, sans-serif;
  --font-script:  'Caveat', cursive;

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.76, 0, 0.24, 1);
  --ease-pop: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* Sizing */
  --nav-h: 104px;
  --max-w: 1440px;
  --gutter: clamp(20px, 4vw, 56px);
  --radius: 14px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--text-strong);
  background: var(--warm-grey);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.55;
  overflow-x: hidden;
}

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

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: transparent; }

/* ===== Typography ===== */

.h-display {
  font-family: var(--font-display);
  font-weight: 500;
  font-style: normal;
  font-variation-settings: "opsz" 144, "SOFT" 50, "WONK" 1;
  letter-spacing: -0.03em;
  line-height: 0.92;
}

h1, h2, h3, h4, h5 { margin: 0; font-weight: 500; letter-spacing: -0.02em; }

h1 { font-family: var(--font-display); font-size: clamp(3rem, 8.5vw, 8rem); line-height: 0.92; letter-spacing: -0.035em; }
h2 { font-family: var(--font-display); font-size: clamp(2.25rem, 5.5vw, 5rem); line-height: 0.96; letter-spacing: -0.03em; }
h3 { font-family: var(--font-display); font-size: clamp(1.5rem, 2.6vw, 2.5rem); line-height: 1.05; }
h4 { font-family: var(--font-body); font-size: 1rem; text-transform: uppercase; letter-spacing: 0.12em; font-weight: 600; }

p { margin: 0 0 1em; max-width: 60ch; }
p.lead { font-size: clamp(1.05rem, 1.4vw, 1.3rem); line-height: 1.5; max-width: 52ch; }

.script {
  font-family: var(--font-script);
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1;
}

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
}
.eyebrow::before {
  content: '';
  width: 18px;
  height: 1px;
  background: currentColor;
  opacity: 0.55;
}

/* ===== Layout helpers ===== */

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

section { padding-block: clamp(80px, 12vw, 160px); position: relative; }
section.tight { padding-block: clamp(60px, 8vw, 110px); }

.grid { display: grid; gap: clamp(24px, 3vw, 48px); }
.flex { display: flex; }

/* ===== Themed surfaces (sub-pages) ===== */

body[data-theme="branding"]   { --accent: var(--orange); }
body[data-theme="social"]     { --accent: var(--purple); }
body[data-theme="packaging"]  { --accent: var(--neon);   }
body[data-theme="digital"]    { --accent: var(--peri);   }
body { --accent: var(--blue); }

/* ===== Utility ===== */

.text-blue   { color: var(--blue); }
.text-orange { color: var(--orange); }
.text-onDark { color: var(--text-onDark); }
.bg-blue   { background: var(--blue); }
.bg-ink    { background: var(--ink); }
.bg-warm   { background: var(--warm-grey); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ===== Reveal base (JS adds .is-visible) ===== */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}
.reveal.is-visible { opacity: 1; transform: none; }

.reveal-stagger > * {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}
.reveal-stagger.is-visible > * { opacity: 1; transform: none; }
.reveal-stagger.is-visible > *:nth-child(1) { transition-delay: 0.05s; }
.reveal-stagger.is-visible > *:nth-child(2) { transition-delay: 0.15s; }
.reveal-stagger.is-visible > *:nth-child(3) { transition-delay: 0.25s; }
.reveal-stagger.is-visible > *:nth-child(4) { transition-delay: 0.35s; }
.reveal-stagger.is-visible > *:nth-child(5) { transition-delay: 0.45s; }
.reveal-stagger.is-visible > *:nth-child(6) { transition-delay: 0.55s; }

/* Honor reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  .reveal, .reveal-stagger > * { opacity: 1; transform: none; }
}
