/**
 * tokens.css — design tokens and cascade layer order.
 * Everything visual should reference these variables rather than raw values.
 */

@layer tokens, base, components, cover, sections, motion;

/* Animatable custom properties must be registered at the top level. */
@property --cover-grow {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 0%;
}

@layer tokens {
  :root {
    /* ── Paper & ink ─────────────────────────────────────────────── */
    --paper: #fdf6ea;
    --paper-soft: #fffaf2;
    --paper-warm: #f7ecd9;
    --paper-deep: #f1e2cb;
    --ink: #1d1611;
    --ink-soft: #4b3f36;
    --ink-mute: #7b6a5b;
    --white: #fffdf9;

    /* ── Burnt orange accent family ──────────────────────────────── */
    --accent: #ee7d1f;
    --accent-strong: #d9660d;
    --accent-deep: #a24605;
    --accent-ink: #33190a;
    --accent-soft: #fbe3c9;
    --accent-wash: rgb(238 125 31 / 10%);
    --accent-glow: rgb(238 125 31 / 22%);

    /* ── Lines, shadows, states ──────────────────────────────────── */
    --line: rgb(120 72 30 / 16%);
    --line-strong: rgb(120 72 30 / 30%);
    --shadow-sm: 0 1px 2px rgb(74 45 20 / 5%), 0 10px 24px -20px rgb(74 45 20 / 45%);
    --shadow: 0 2px 6px rgb(74 45 20 / 5%), 0 24px 48px -34px rgb(74 45 20 / 55%);
    --shadow-lift: 0 10px 22px -12px rgb(74 45 20 / 25%), 0 34px 64px -40px rgb(74 45 20 / 60%);
    --focus-ring: rgb(162 70 5 / 55%);

    /* ── Typography ─────────────────────────────────────────────── */
    --font-display: "Cinzel", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
    --font-body: "Montserrat", "Segoe UI", system-ui, -apple-system, sans-serif;
    --font-arabic: "Amiri", "Traditional Arabic", "Times New Roman", serif;

    --fs-body: clamp(0.95rem, 0.55rem + 1.6vw, 1.05rem);
    --fs-sm: 0.875rem;
    --fs-xs: 0.75rem;
    --fs-h2: clamp(1.5rem, 0.95rem + 2.6vw, 2.05rem);
    --fs-h3: clamp(1.05rem, 0.9rem + 0.9vw, 1.25rem);
    --fs-plate: clamp(1.7rem, 1.05rem + 3.3vw, 2.5rem);

    /* ── Space & shape ──────────────────────────────────────────── */
    --gutter: clamp(1.35rem, 5vw, 2.25rem);
    --content: 33rem;
    --section-y: clamp(3.75rem, 2rem + 8vw, 6rem);
    --radius-xs: 0.45rem;
    --radius-sm: 0.7rem;
    --radius: 1.1rem;
    --radius-lg: 1.5rem;
    --pill: 999px;

    /* ── Motion ─────────────────────────────────────────────────── */
    --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);
    --ease-in-out: cubic-bezier(0.65, 0.05, 0.36, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-doors: cubic-bezier(0.76, 0, 0.24, 1);
    --dur-fast: 0.22s;
    --dur: 0.6s;
    --dur-slow: 1.2s;
    --reveal-dur: 0.95s;
    --stagger: 85ms;

    /* ── Chrome ─────────────────────────────────────────────────── */
    --dock-height: 4.25rem;
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
  }
}
