/* Tokens: type, colour, space, shape, motion. Components read these and nothing else.
   Direction: the brief asked for ivory, deep botanical green and one blush accent with a light
   serif, so those stand even though cream plus serif is a common default. What keeps it from
   being generic is the structure: full green fields, a configurator stage, real photographs of
   the maker's pieces and the real 3D scans of them. */

@font-face {
  font-family: "Cormorant Garamond";
  src: url("../fonts/cormorant-garamond-normal.woff2") format("woff2");
  font-weight: 300 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("../fonts/cormorant-garamond-italic.woff2") format("woff2");
  font-weight: 300 500;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("../fonts/hanken-grotesk-normal.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* type */
  --font-display: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --font-text: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --text--1: 0.875rem;
  --text-0: 1.0625rem;
  --text-1: clamp(1.1875rem, 1.1rem + 0.4vw, 1.375rem);
  --text-2: clamp(1.5rem, 1.3rem + 0.9vw, 2rem);
  --text-3: clamp(2.25rem, 1.7rem + 2.6vw, 3.75rem);
  --text-4: clamp(3.1rem, 1.5rem + 7.2vw, 6.5rem);
  --leading-body: 1.55;
  --leading-tight: 1.02;

  /* colour, light surfaces */
  --color-surface: #f6f2e8;
  --color-surface-2: #eee8d9;
  --color-surface-3: #e2dac7;
  --color-text: #15241d;
  --color-text-muted: #4a5a50;
  --color-border: rgba(21, 36, 29, 0.18);
  --color-border-strong: rgba(21, 36, 29, 0.55);
  --color-green: #1b3328;
  --color-green-deep: #0f1d17;
  --color-green-mid: #2c5242;
  --color-sage: #a8bba9;
  --color-blush: #e9b9b4;
  --color-blush-soft: #f3d9d5;
  --color-blush-ink: #8c3f45;
  --color-ivory: #f6f2e8;
  --color-paper: #e2dac7;
  --color-on-blush: #2a1a1a;
  --color-stage-1: #c3d0c1;
  --color-stage-2: #9fb2a2;
  --color-stage-3: #7c9582;
  --color-stage-ink: #1b3328;
  --color-hero-1: #2f5a47;
  --color-hero-2: #1b3328;
  --color-hero-3: #0f1d17;
  --color-hero-bg: #14261e;
  --color-walnut: #1a0f08;
  --color-eyebrow: #8c3f45;
  --color-on-dark: #d6ded3;
  --color-on-dark-faint: #c5cfc4;
  --color-accent: var(--color-green);
  --color-accent-ink: #f6f2e8;
  --color-focus: #b4505a;
  --color-error: #9d2a31;
  --color-success: #2c5242;

  /* space, 4px base */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;
  --space-8: 4.5rem;
  --space-9: clamp(4.5rem, 3rem + 7vw, 9rem);
  --gutter: clamp(1rem, 0.4rem + 3vw, 3.5rem);
  --header-h: 3.75rem;

  /* shape: three radii by hierarchy */
  --radius-s: 6px;
  --radius-m: 16px;
  --radius-l: 28px;
  --radius-full: 999px;

  /* motion */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-1: 140ms;
  --dur-2: 320ms;
  --dur-3: 700ms;

  /* layers */
  --z-stage-ui: 5;
  --z-header: 40;
  --z-toast: 60;
}

/* Dark fields: the same names, new values, so a component never needs a dark variant. */
[data-tone="dark"] {
  --color-surface: #14261e;
  --color-surface-2: #1b3328;
  --color-surface-3: #27483a;
  --color-text: #f6f2e8;
  --color-text-muted: #c5cfc4;
  --color-border: rgba(246, 242, 232, 0.22);
  --color-border-strong: rgba(246, 242, 232, 0.6);
  --color-accent: var(--color-blush);
  --color-accent-ink: #14261e;
  --color-focus: #f3d9d5;
  --color-eyebrow: #e9b9b4;
}

[data-tone="blush"] {
  --color-surface: #f3d9d5;
  --color-surface-2: #ecc8c3;
  --color-surface-3: #e5b9b4;
  --color-text: #2a1a1a;
  --color-text-muted: #5a3d3d;
  --color-border: rgba(42, 26, 26, 0.2);
  --color-border-strong: rgba(42, 26, 26, 0.6);
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --dur-1: 1ms;
    --dur-2: 1ms;
    --dur-3: 1ms;
  }
}
