/* ---------- Design Tokens — She•Cute•rie Editorial ---------- */
:root,
[data-theme="light"] {
  /* Type scale */
  --text-xs: clamp(0.75rem, 0.7rem + 0.2vw, 0.85rem);
  --text-sm: clamp(0.875rem, 0.82rem + 0.25vw, 1rem);
  --text-base: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  --text-lg: clamp(1.125rem, 1rem + 0.6vw, 1.4rem);
  --text-xl: clamp(1.4rem, 1.1rem + 1.2vw, 2.1rem);
  --text-2xl: clamp(1.85rem, 1.2rem + 2.2vw, 3.1rem);
  --text-3xl: clamp(2.25rem, 1rem + 3.8vw, 4.5rem);
  --text-hero: clamp(2.6rem, 0.5rem + 6.2vw, 6.2rem);

  /* Spacing — 4px base, generous */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-7: 1.75rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;
  --space-32: 8rem;
  --space-40: 10rem;
  --space-48: 12rem;

  /* Surfaces — bone & ivory */
  --color-bg: #ffffff;
  --color-surface: #fafaf7;
  --color-surface-2: #ffffff;
  --color-surface-offset: #ede5d4;
  --color-surface-offset-2: #e3d8c1;
  --color-divider: #e0d4bd;
  --color-border: #c9b896;
  --color-hairline: rgba(45, 35, 25, 0.08);

  /* Ink — deep espresso */
  --color-text: #221c14;
  --color-text-muted: #6b5d4a;
  --color-text-faint: #9c8b73;
  --color-text-inverse: #fbf7ee;

  /* Primary — antique gold (deeper, more restrained) */
  --color-primary: #9a7530;
  --color-primary-hover: #7d5e26;
  --color-primary-active: #634a1c;
  --color-primary-highlight: #ede2c5;

  /* Accent — soft heritage rose (used very sparingly) */
  --color-rose: #b48089;
  --color-rose-hover: #9d6770;
  --color-rose-highlight: #ecdadd;

  /* Legacy aliases */
  --color-gold: #9a7530;
  --color-gold-hover: #7d5e26;
  --color-gold-highlight: #ede2c5;

  /* Sage */
  --color-sage: #7a8a6c;

  /* Radius — minimal */
  --radius-sm: 0;
  --radius-md: 2px;
  --radius-lg: 4px;
  --radius-xl: 8px;
  --radius-full: 9999px;

  /* Transitions */
  --transition-interactive: 420ms cubic-bezier(0.22, 1, 0.36, 1);

  /* Shadows — barely there */
  --shadow-sm: 0 1px 1px rgba(45, 35, 25, 0.03);
  --shadow-md: 0 8px 28px rgba(45, 35, 25, 0.06);
  --shadow-lg: 0 30px 70px rgba(45, 35, 25, 0.10);

  /* Widths */
  --content-narrow: 620px;
  --content-default: 1180px;
  --content-wide: 1340px;

  /* Fonts — restrained, classical */
  --font-display: "Cormorant Garamond", "EB Garamond", "Garamond", Georgia, serif;
  --font-serif: "Cormorant Garamond", "EB Garamond", Georgia, serif;
  --font-script: "Allura", "Pinyon Script", "Petit Formal Script", cursive;
  --font-body: "Outfit", "Inter", system-ui, -apple-system, sans-serif;
}

[data-theme="dark"] {
  --color-bg: #16110a;
  --color-surface: #1d170f;
  --color-surface-2: #251e14;
  --color-surface-offset: #2a2218;
  --color-surface-offset-2: #352b1e;
  --color-divider: #3a3024;
  --color-border: #4a3e2d;
  --color-hairline: rgba(220, 200, 160, 0.10);

  --color-text: #ede4d0;
  --color-text-muted: #b3a487;
  --color-text-faint: #7a6c52;
  --color-text-inverse: #16110a;

  --color-primary: #c9a05a;
  --color-primary-hover: #d7b06d;
  --color-primary-active: #e5c184;
  --color-primary-highlight: #3a2c14;

  --color-rose: #c98793;
  --color-rose-hover: #d99ba6;
  --color-rose-highlight: #3a2228;

  --color-gold: #c9a05a;
  --color-gold-hover: #d7b06d;
  --color-gold-highlight: #3a2c14;

  --shadow-sm: 0 1px 1px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 28px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 30px 70px rgba(0, 0, 0, 0.6);
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  min-height: 100dvh;
  line-height: 1.7;
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: 300;
  color: var(--color-text);
  background-color: var(--color-bg);
}

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

ul[role="list"],
ol[role="list"] {
  list-style: none;
}

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

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: 300;
  line-height: 1.08;
  letter-spacing: 0.005em;
  text-wrap: balance;
  color: var(--color-text);
}

p,
li,
figcaption {
  text-wrap: pretty;
}

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

button {
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
}

::selection {
  background: var(--color-primary-highlight);
  color: var(--color-text);
}

:focus-visible {
  outline: 1px solid var(--color-primary);
  outline-offset: 3px;
}

a,
button,
[role="button"],
input,
textarea,
select {
  transition:
    color var(--transition-interactive),
    background var(--transition-interactive),
    border-color var(--transition-interactive),
    box-shadow var(--transition-interactive),
    transform var(--transition-interactive);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

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