/* ───────────────────────────────────────────────────────────────────
   Nurtli — soft-tech terrarium
   Tokens, typography, base styles
   ─────────────────────────────────────────────────────────────────── */

:root {
  /* Pastel sage palette — "calm, not clinical" */
  --paper:        #F4F8F4;
  --paper-warm:   #F2EFE8;
  --mist:         #E5F0E8;
  --mint:         #D9E8C9;
  --sage-soft:    #B8D4C2;
  --sage:         #7FB3A0;
  --moss:         #5A9985;
  --moss-deep:    #3D6B57;
  --ink:          #1B2823;
  --ink-soft:     #2C3A33;
  --ink-muted:    rgba(27, 40, 35, 0.62);
  --ink-faint:    rgba(27, 40, 35, 0.42);

  --petal:        #F0DCD0;  /* warm pink-peach accent */
  --honey:        #E8C896;  /* warm honey accent */
  --bloom:        #E8B8C5;  /* deep pastel pink for highlights */

  /* Surfaces */
  --glass:        rgba(255, 255, 255, 0.58);
  --glass-strong: rgba(255, 255, 255, 0.78);
  --glass-tint:   rgba(127, 179, 160, 0.12);
  --glass-edge:   rgba(255, 255, 255, 0.85);
  --shadow-soft:  0 1px 0 rgba(255,255,255,0.85) inset,
                  0 24px 60px -24px rgba(61, 107, 87, 0.28),
                  0 1px 2px rgba(27, 40, 35, 0.04);

  /* Typography */
  --font-display: 'Instrument Serif', 'Cormorant Garamond', Georgia, serif;
  --font-body:    'Geist', 'Söhne', system-ui, -apple-system, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, 'SF Mono', monospace;

  /* Rhythm */
  --rule: rgba(61, 107, 87, 0.16);
  --rule-strong: rgba(61, 107, 87, 0.3);

  /* Easings */
  --ease-out:  cubic-bezier(.16,.84,.32,1);
  --ease-soft: cubic-bezier(.4,0,.2,1);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

/* Belt-and-braces: never allow horizontal scroll. `clip` (vs `hidden`)
   avoids creating a scroll container, so sticky/fixed children keep working. */
html, body { overflow-x: clip; max-width: 100%; }

html {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "ss02", "cv11";
}

body {
  background:
    radial-gradient(1200px 700px at 78% -10%, rgba(232, 200, 150, 0.18), transparent 60%),
    radial-gradient(900px 600px at 8% 10%, rgba(127, 179, 160, 0.18), transparent 65%),
    radial-gradient(1100px 800px at 50% 40%, rgba(229, 240, 232, 0.6), transparent 70%),
    var(--paper);
  background-attachment: fixed;
  overflow-x: clip;
  min-height: 100vh;
}

/* ── Type scale ─────────────────────────────────────────────── */
.display-1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(64px, 10vw, 168px);
  line-height: 0.92;
  letter-spacing: -0.025em;
  color: var(--ink);
}
.display-2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(48px, 6.5vw, 104px);
  line-height: 0.96;
  letter-spacing: -0.02em;
}
.display-3 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(36px, 4.6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.018em;
}
.serif-italic { font-style: italic; font-family: var(--font-display); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--moss-deep);
}
.lab {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.lede {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(20px, 2vw, 28px);
  line-height: 1.4;
  color: var(--ink-soft);
  letter-spacing: -0.005em;
}

.body-l { font-size: 19px; line-height: 1.55; color: var(--ink-soft); }
.body-m { font-size: 16px; line-height: 1.55; color: var(--ink-soft); }
.body-s { font-size: 14px; line-height: 1.5; color: var(--ink-muted); }

.text-balance { text-wrap: balance; }
.text-pretty  { text-wrap: pretty; }

/* ── Layout helpers ───────────────────────────────────────── */
.section {
  position: relative;
  padding: clamp(80px, 12vh, 160px) 0;
  overflow-x: clip; /* contain decorative absolute art (glows, orbs) */
}
.container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 clamp(24px, 5vw, 56px);
}
.container-narrow {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 clamp(24px, 5vw, 56px);
}

.rule { height: 1px; background: var(--rule); width: 100%; }
.dot  { width: 5px; height: 5px; border-radius: 50%; background: var(--moss); display: inline-block; }

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.005em;
  padding: 14px 22px 14px 24px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: transform .35s var(--ease-out), background .25s ease, box-shadow .25s ease, color .25s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--ink);
  color: #F4F8F4;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.18) inset,
    0 12px 28px -12px rgba(27, 40, 35, 0.6);
}
.btn-primary:hover { background: #0F1815; box-shadow: 0 18px 36px -14px rgba(27,40,35,0.7); }

.btn-ghost {
  background: var(--glass);
  color: var(--ink);
  border: 0.5px solid var(--glass-edge);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
}
.btn-ghost:hover { background: var(--glass-strong); }

/* ── Glass card ───────────────────────────────────────────── */
.glass {
  background: var(--glass);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border: 0.5px solid var(--glass-edge);
  border-radius: 28px;
  box-shadow: var(--shadow-soft);
}

/* ── Tag / chip ───────────────────────────────────────────── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 10px;
  border-radius: 999px;
  background: var(--glass);
  border: 0.5px solid var(--glass-edge);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--moss-deep);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.chip .dot { background: var(--moss); }

/* ── Common animations ───────────────────────────────────── */
@keyframes breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}
@keyframes float-up {
  0%   { transform: translateY(0) translateX(0); opacity: 0; }
  10%  { opacity: 0.8; }
  90%  { opacity: 0.8; }
  100% { transform: translateY(-180px) translateX(20px); opacity: 0; }
}
@keyframes drift {
  0%   { transform: translate(0, 0); }
  33%  { transform: translate(8px, -6px); }
  66%  { transform: translate(-6px, 8px); }
  100% { transform: translate(0, 0); }
}
@keyframes shimmer {
  0%, 100% { opacity: 0.6; }
  50%      { opacity: 1; }
}
@keyframes grow {
  from { stroke-dashoffset: var(--len, 200); }
  to   { stroke-dashoffset: 0; }
}
@keyframes rotate-slow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ── Reveal-on-scroll ─────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1s var(--ease-out), transform 1s var(--ease-out);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ── Noise overlay for tactility ─────────────────────────── */
.noise::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='1'/></svg>");
  border-radius: inherit;
}

/* No-motion mode (toggled by Tweaks) */
.no-motion *,
.no-motion *::before,
.no-motion *::after {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
}
