/* ============================================================
   DESIGN TOKENS
   The application chrome is deliberately quiet: warm white
   paper, ivory, charcoal ink, muted grey. Personality lives
   inside the template previews and the printed photostrip,
   never in the UI shell.

   Paper is a first-class material here — the same tokens
   describe the digital surface and the simulated print.
   ============================================================ */
:root {
  /* --- Modern surfaces --- */
  --bg: #f6f4ff;
  --surface: rgba(255, 255, 255, 0.82);
  --surface-alt: #f4f1ff;
  --surface-sunken: #ece9fb;
  --surface-strong: #ffffff;

  /* --- Paper (the print substrate) --- */
  --paper: #fdfbf7;
  --paper-cream: #f6efe1;
  --paper-kraft: #d9c6a5;
  --paper-ivory: #fbf6ea;
  --paper-shadow: rgba(58, 46, 36, 0.16);

  /* --- Ink --- */
  --ink: #171231;
  --ink-light: #2e2850;
  --muted: #625c85;
  --muted-light: #948eb3;

  /* --- Borders / glass --- */
  --line: rgba(124, 111, 191, 0.14);
  --line-strong: rgba(106, 90, 249, 0.22);

  /* --- Accent (home-inspired gradient system) --- */
  --accent: #6a5af9;
  --accent-hover: #5a48ef;
  --accent-soft: #f0edff;
  --accent-ring: rgba(106, 90, 249, 0.22);
  --signal: #ff4d6d;
  --signal-soft: #fff1f4;
  --brand-gradient: linear-gradient(120deg, #6a5af9 0%, #9b5cf6 52%, #d946ef 100%);
  --brand-gradient-warm: linear-gradient(120deg, #ff4d6d 0%, #ff7a45 48%, #ffab3d 100%);

  /* --- Status (used only by state components) --- */
  --success: #0ea371;
  --success-soft: #eafaf5;
  --warning: #b76b1f;
  --warning-soft: #fff5e9;
  --danger: #d84a67;
  --danger-soft: #fff1f4;

  /* --- Type scale --- */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-hand: 'Caveat', 'Segoe Script', cursive;
  --font-type: 'Special Elite', 'Courier New', monospace;
  --font-retro: 'Alfa Slab One', 'Playfair Display', serif;

  --fs-xs: 0.6875rem;
  --fs-sm: 0.8125rem;
  --fs-base: 0.9rem;
  --fs-md: 1rem;
  --fs-lg: 1.125rem;
  --fs-xl: 1.375rem;
  --fs-2xl: 1.75rem;
  --fs-3xl: clamp(1.75rem, 3vw, 2.25rem);
  --fs-4xl: clamp(2.25rem, 4.5vw, 3.5rem);

  /* --- Spacing --- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;

  /* --- Radius (small / medium only) --- */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  /* --- Strip width --- */
  --strip-max-width: 320px;

  /* --- Elevation --- */
  --shadow-sm: 0 4px 10px rgba(35, 28, 80, 0.05);
  --shadow-md: 0 8px 24px rgba(35, 28, 80, 0.08);
  --shadow-lg: 0 14px 36px rgba(35, 28, 80, 0.12);
  --shadow-xl: 0 28px 70px -18px rgba(35, 28, 80, 0.22);

  /* Paper lift — used by every photostrip and template preview */
  --shadow-paper:
    0 1px 1px rgba(58, 46, 36, 0.08),
    0 6px 16px rgba(58, 46, 36, 0.1),
    0 22px 44px rgba(58, 46, 36, 0.09);
  --shadow-paper-lg:
    0 2px 2px rgba(58, 46, 36, 0.07),
    0 12px 28px rgba(58, 46, 36, 0.13),
    0 40px 80px rgba(58, 46, 36, 0.12);
  --shadow-focus: 0 0 0 3px var(--accent-ring);

  /* --- Motion (explicit properties only, never `all`) --- */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: background-color 0.15s var(--ease), border-color 0.15s var(--ease), color 0.15s var(--ease);
  --transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease), box-shadow 0.2s var(--ease), opacity 0.2s var(--ease);
  --transition-base: transform 0.22s var(--ease), box-shadow 0.22s var(--ease), background-color 0.2s var(--ease), border-color 0.2s var(--ease), color 0.2s var(--ease);

  /* --- Layers --- */
  --z-sticky: 20;
  --z-overlay: 50;
  --z-modal: 60;
  --z-toast: 70;

  /* --- Photobooth motion vocabulary --- */
  --ease-print: cubic-bezier(0.22, 0.9, 0.24, 1);
  --ease-settle: cubic-bezier(0.34, 1.56, 0.64, 1);
  --dur-fast: 140ms;
  --dur-base: 240ms;
  --dur-print: 1100ms;
}

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

* {
  margin: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* Lucide icons render at a default 24px — normalize to text size */
.lucide {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
}

.brand-logo .lucide {
  width: 20px;
  height: 20px;
}

.nav-toggle .lucide {
  width: 18px;
  height: 18px;
}

.empty-state-icon .lucide {
  width: 22px;
  height: 22px;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
  margin: 0;
  padding: 0;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--ink);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 {
  font-size: var(--fs-4xl);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.05;
}

h2 {
  font-size: var(--fs-3xl);
  font-weight: 700;
  letter-spacing: -0.03em;
}

h3 {
  font-size: var(--fs-xl);
  font-weight: 600;
}

h4 {
  font-size: var(--fs-md);
}

p {
  color: var(--muted);
  line-height: 1.7;
}

.lead {
  max-width: 560px;
  font-size: var(--fs-md);
  color: var(--muted);
  line-height: 1.7;
}

.muted-text {
  color: var(--muted);
}

/* Small uppercase label used above groups and beside icons */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--signal);
}

/* ============================================================
   FOCUS
   ============================================================ */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ============================================================
   LAYOUT PRIMITIVES
   ============================================================ */
.shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: var(--space-4) var(--space-5) var(--space-7);
}

.screen {
  display: none;
  min-height: 70vh;
}

.screen.active {
  display: block;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.stack-lg {
  gap: var(--space-5);
}

.cluster {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.section {
  margin-top: var(--space-6);
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

/* ============================================================
   FORM BASE
   ============================================================ */
.input-box {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  font-size: var(--fs-base);
  transition: var(--transition-fast);
}

.input-box::placeholder {
  color: var(--muted-light);
}

.input-box:hover {
  border-color: var(--line-strong);
}

.input-box:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--shadow-focus);
}

/* ============================================================
   UTILITIES
   ============================================================ */
.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;
}

[hidden] {
  display: none !important;
}
