/* ==========================================================================
   CREDOARK — DESIGN TOKENS
   Mineral & Ember. One palette, one type system, one motion language.
   ========================================================================== */

@font-face {
  font-family: 'Oswald';
  src: url('/assets/fonts/oswald.woff2') format('woff2');
  font-weight: 200 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Instrument Serif';
  src: url('/assets/fonts/instrument-serif.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Instrument Serif';
  src: url('/assets/fonts/instrument-serif-italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'Manrope';
  src: url('/assets/fonts/manrope.woff2') format('woff2');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('/assets/fonts/inter.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* — Colour ------------------------------------------------------------- */
  --mineral: #0a2c23;
  --mineral-deep: #051b15;
  --mineral-soft: #123a2f;
  --mineral-mid: #1a4639;
  --porcelain: #f4eee5;
  --porcelain-bright: #faf7f0;
  --porcelain-warm: #e7e0d2;
  --porcelain-dim: #d9d2c4;
  --ember: #f27618;
  --ember-deep: #c95a0c;
  --ember-soft: #f7a15c;
  --pistachio: #c5d5b5;
  --pistachio-deep: #9fb48c;
  --pistachio-soft: #dbe5cf;
  --ink: #071f19;
  --ink-soft: rgba(7, 31, 25, 0.66);
  --ink-faint: rgba(7, 31, 25, 0.42);
  --on-dark: rgba(244, 238, 229, 0.74);
  --on-dark-faint: rgba(244, 238, 229, 0.44);
  --line: rgba(7, 31, 25, 0.16);
  --line-soft: rgba(7, 31, 25, 0.09);
  --line-light: rgba(244, 238, 229, 0.18);
  --line-light-soft: rgba(244, 238, 229, 0.09);

  /* — Type --------------------------------------------------------------- */
  --font-display: 'Oswald', 'Arial Narrow', 'Helvetica Neue', sans-serif;
  --font-serif: 'Instrument Serif', 'Times New Roman', Georgia, serif;
  --font-body: 'Manrope', 'Helvetica Neue', Arial, sans-serif;
  --font-ui: 'Inter', 'Helvetica Neue', Arial, sans-serif;

  --fs-hero: clamp(4.4rem, 12.4vw, 12.5rem);
  --fs-display: clamp(3rem, 7.4vw, 7.4rem);
  --fs-h2: clamp(2.35rem, 5.2vw, 4.8rem);
  --fs-h3: clamp(1.4rem, 2.4vw, 2.1rem);
  --fs-lead: clamp(1.15rem, 1.7vw, 1.55rem);
  --fs-body: clamp(0.98rem, 1.02vw, 1.1rem);
  --fs-small: 0.875rem;
  --fs-label: 0.6875rem;
  --fs-micro: 0.625rem;

  --lh-display: 0.92;
  --lh-heading: 1;
  --lh-body: 1.65;

  /* — Space & layout ----------------------------------------------------- */
  --max: 1600px;
  --gutter: clamp(1.25rem, 4vw, 4.5rem);
  --section-y: clamp(5.5rem, 11vw, 11rem);
  --section-y-sm: clamp(3.5rem, 7vw, 7rem);
  --gap: clamp(1rem, 2vw, 2rem);
  --gap-lg: clamp(2rem, 4vw, 4.5rem);
  --radius: 24px;
  --radius-sm: 12px;
  --radius-pill: 999px;
  --header-top: clamp(0.65rem, 1.8vh, 1.25rem);

  /* — Motion ------------------------------------------------------------- */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-soft: cubic-bezier(0.2, 0.8, 0.2, 1);
  --dur-micro: 200ms;
  --dur-ui: 420ms;
  --dur-reveal: 900ms;
  --dur-menu: 700ms;
  --dur-page: 620ms;

  /* — Layers ------------------------------------------------------------- */
  --z-header: 80;
  --z-menu: 100;
  --z-cursor: 140;
  --z-wipe: 200;
  --z-skip: 300;

  color-scheme: light;
}

/* Surface contexts ------------------------------------------------------- */
.surface-light,
.page-light {
  --bg: var(--porcelain);
  --fg: var(--ink);
  --muted: var(--ink-soft);
  --faint: var(--ink-faint);
  --line: rgba(7, 31, 25, 0.16);
  --line-soft: rgba(7, 31, 25, 0.09);
  --accent: var(--ember-deep);
  background: var(--bg);
  color: var(--fg);
}

.surface-dark,
.page-dark {
  --bg: var(--mineral);
  --fg: var(--porcelain);
  --muted: var(--on-dark);
  --faint: var(--on-dark-faint);
  --line: var(--line-light);
  --line-soft: var(--line-light-soft);
  --accent: var(--ember);
  background: var(--bg);
  color: var(--fg);
  color-scheme: dark;
}

.surface-pistachio {
  --bg: var(--pistachio);
  --fg: var(--ink);
  --muted: rgba(7, 31, 25, 0.68);
  --faint: rgba(7, 31, 25, 0.46);
  --line: rgba(7, 31, 25, 0.18);
  --line-soft: rgba(7, 31, 25, 0.1);
  --accent: var(--ember-deep);
  background: var(--bg);
  color: var(--fg);
}

.surface-ember {
  --bg: var(--ember);
  --fg: var(--mineral);
  --muted: rgba(20, 44, 43, 0.72);
  --faint: rgba(20, 44, 43, 0.5);
  --line: rgba(20, 44, 43, 0.22);
  --line-soft: rgba(20, 44, 43, 0.12);
  --accent: var(--mineral);
  background: var(--bg);
  color: var(--fg);
}
