/* Design tokens, base and component styles (from the Asterisk Collective design system) */
/* ============================================================
   FONTS — Asterisk Collective / Kelsey Bones
   All three are free, open-licence Google Fonts.
   Display: UnifrakturMaguntia · Body/UI: Space Grotesk · Mono: Space Mono
   NOTE: loaded from Google Fonts CDN. To self-host, drop woff2 files
   in assets/fonts/ and replace these @imports with @font-face rules.
   ============================================================ */



/* ============================================================
   COLOUR SYSTEM — Asterisk Collective / Kelsey Bones
   Six-colour palette. Base values + semantic aliases.
   ============================================================ */

:root {
  /* ---- Base palette (the six brand colours) ---- */
  --hot-fuchsia: #FF4D8B;   /* Primary action, hero accent, links */
  --electric-violet: #C370F6; /* Secondary, moody accent, mark arms */
  --zesty-lime: #AFD609;    /* Highlight, availability, success */
  --fiji-blue: #4C99D1;     /* Tertiary accent, info chips */
  --void-black: #1A1A1F;    /* Dark surface, ink on light. Never pure #000 */
  --parchment: #F0EDE6;     /* Light surface, breathing space */

  /* ---- Tints / shades (derived, for hover & depth) ---- */
  --fuchsia-hover: #FF6BA0;
  --fuchsia-press: #E63D78;
  --violet-hover: #D08EF8;
  --violet-press: #A857E0;
  --lime-hover: #C2EB1F;
  --lime-press: #97BC00;
  --blue-hover: #66ABDD;
  --blue-press: #3C82B7;

  /* Void black steps (for layered dark surfaces) */
  --ink-900: #121216;
  --ink-800: #1A1A1F;
  --ink-700: #24242B;
  --ink-600: #303039;
  --ink-500: #3D3D48;

  /* Parchment steps (for layered light surfaces) */
  --parchment-100: #F7F5F0;
  --parchment-200: #F0EDE6;
  --parchment-300: #E5E1D6;
  --parchment-400: #D6D1C2;

  /* ---- Semantic aliases — DARK theme (Asterisk Collective) ---- */
  --bg: var(--void-black);
  --surface: var(--ink-700);
  --surface-raised: var(--ink-600);
  --border: rgba(240, 237, 230, 0.14);
  --border-strong: rgba(240, 237, 230, 0.28);

  --text: var(--parchment);
  --text-muted: rgba(240, 237, 230, 0.62);
  --text-faint: rgba(240, 237, 230, 0.38);
  --text-on-accent: var(--void-black);

  --accent: var(--hot-fuchsia);
  --accent-hover: var(--fuchsia-hover);
  --accent-press: var(--fuchsia-press);
  --secondary: var(--electric-violet);
  --available: var(--zesty-lime);
  --info: var(--fiji-blue);

  --link: var(--hot-fuchsia);
  --focus-ring: var(--electric-violet);
}

/* ---- Semantic aliases — LIGHT theme (Kelsey Bones) ---- */
[data-theme="kelsey"],
.theme-kelsey {
  --bg: var(--parchment);
  --surface: var(--parchment-100);
  --surface-raised: #FFFFFF;
  --border: rgba(26, 26, 31, 0.14);
  --border-strong: rgba(26, 26, 31, 0.30);

  --text: var(--void-black);
  --text-muted: rgba(26, 26, 31, 0.62);
  --text-faint: rgba(26, 26, 31, 0.40);
  --text-on-accent: var(--parchment);

  --accent: var(--hot-fuchsia);
  --accent-hover: var(--fuchsia-press);
  --accent-press: var(--fuchsia-press);
  --link: var(--fuchsia-press);
  --focus-ring: var(--electric-violet);
}

/* ============================================================
   TYPOGRAPHY — Asterisk Collective / Kelsey Bones
   Display (UnifrakturMaguntia) for hero moments only.
   Space Grotesk carries all UI/body. Space Mono for data.
   ============================================================ */

:root {
  /* ---- Families ---- */
  --font-display: 'UnifrakturMaguntia', 'UnifrakturCook', serif;
  --font-sans: 'Space Grotesk', system-ui, -apple-system, sans-serif;
  --font-mono: 'Space Mono', ui-monospace, 'SF Mono', monospace;

  /* ---- Weights ---- */
  --fw-light: 300;    /* @kind font */
  --fw-regular: 400;  /* @kind font */
  --fw-medium: 500;   /* @kind font */
  --fw-semibold: 600; /* @kind font */
  --fw-bold: 700;     /* @kind font */

  /* ---- Type scale (from style guide) ---- */
  --fs-hero: 76px;     /* UnifrakturMaguntia 52–96px — studio name, page titles */
  --fs-display: 52px;
  --fs-h1: 38px;       /* Space Grotesk 500, 32–42px */
  --fs-h2: 26px;       /* Space Grotesk 500, 22–28px */
  --fs-h3: 20px;
  --fs-body-lg: 18px;
  --fs-body: 16px;     /* Space Grotesk 300, 14–16px */
  --fs-body-sm: 14px;
  --fs-label: 12px;    /* Space Grotesk 400, 10–12px — tags, eyebrows */
  --fs-caption: 11px;
  --fs-mono: 12px;     /* Space Mono 400 — code, hex, data */

  /* ---- Line heights ---- */
  --lh-tight: 1.02;   /* @kind font */
  --lh-snug: 1.18;    /* @kind font */
  --lh-normal: 1.5;   /* @kind font */
  --lh-relaxed: 1.65; /* @kind font */

  /* ---- Letter spacing ---- */
  --ls-display: -0.01em;  /* @kind font */
  --ls-heading: -0.015em; /* @kind font */
  --ls-body: 0;           /* @kind font */
  --ls-label: 0.14em;     /* @kind font */
  --ls-mono: 0.02em;      /* @kind font */

  /* ---- Semantic roles ---- */
  --text-hero-family: var(--font-display);
  --text-hero-size: var(--fs-hero);
  --text-heading-family: var(--font-sans);
  --text-heading-weight: var(--fw-medium);
  --text-body-family: var(--font-sans);
  --text-body-weight: var(--fw-light);
  --text-label-weight: var(--fw-regular);
}

/* ============================================================
   SPACING, RADII, SHADOWS, MOTION, LAYOUT
   ============================================================ */

:root {
  /* ---- Spacing scale (4px base) ---- */
  --space-0: 0;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
  --space-10: 128px;

  /* ---- Corner radii ---- */
  /* Brand leans crisp + slightly editorial: small radii, never pill on cards */
  --radius-none: 0;
  --radius-xs: 3px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-pill: 999px;

  /* ---- Borders ---- */
  --border-width: 1px;
  --border-width-strong: 2px;

  /* ---- Shadows ---- */
  /* Dark theme uses glow + deep drop; light theme uses soft ink shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, 0.55);
  --shadow-glow-fuchsia: 0 0 0 1px rgba(255, 77, 139, 0.5), 0 8px 30px rgba(255, 77, 139, 0.28);
  --shadow-glow-violet: 0 0 0 1px rgba(195, 112, 246, 0.5), 0 8px 30px rgba(195, 112, 246, 0.28);

  /* Light theme shadows (warmer, softer ink) */
  --shadow-sm-light: 0 1px 2px rgba(26, 26, 31, 0.08);
  --shadow-md-light: 0 8px 24px rgba(26, 26, 31, 0.10);
  --shadow-lg-light: 0 20px 50px rgba(26, 26, 31, 0.14);

  /* ---- Motion ---- */
  /* Crisp, considered — no bounce. Quick fades + small translate. */
  --ease-standard: cubic-bezier(0.2, 0, 0, 1);  /* @kind other */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);    /* @kind other */
  --ease-in: cubic-bezier(0.4, 0, 1, 1);        /* @kind other */
  --dur-fast: 120ms;  /* @kind other */
  --dur-base: 200ms;  /* @kind other */
  --dur-slow: 360ms;  /* @kind other */

  /* ---- Layout ---- */
  --container-sm: 640px;
  --container-md: 880px;
  --container-lg: 1120px;
  --container-xl: 1320px;
  --gutter: var(--space-5);
}

/* ============================================================
   BASE / RESET — light element defaults using the tokens.
   Keep minimal; components carry their own styling.
   ============================================================ */

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: var(--fw-light);
  font-size: var(--fs-body);
  line-height: var(--lh-normal);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Eyebrow / label utility — tracked uppercase Space Grotesk */
.eyebrow {
  font-family: var(--font-sans);
  font-weight: var(--fw-regular);
  font-size: var(--fs-label);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Hero display utility — UnifrakturMaguntia */
.display {
  font-family: var(--font-display);
  font-weight: var(--fw-regular);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-display);
}

::selection {
  background: var(--hot-fuchsia);
  color: var(--void-black);
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }

:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

/* Components */
.ac-badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-sans); font-weight: var(--fw-medium);
  font-size: 11px; letter-spacing: 0.04em; line-height: 1;
  padding: 5px 10px; border-radius: var(--radius-pill);
  border: 1px solid transparent; white-space: nowrap;
}
.ac-badge__dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.ac-badge--available { background: rgba(175,214,9,0.16); color: var(--zesty-lime); border-color: rgba(175,214,9,0.4); }
.ac-badge--info { background: rgba(76,153,209,0.16); color: var(--fiji-blue); border-color: rgba(76,153,209,0.4); }
.ac-badge--accent { background: rgba(255,77,139,0.16); color: var(--hot-fuchsia); border-color: rgba(255,77,139,0.4); }
.ac-badge--violet { background: rgba(195,112,246,0.16); color: var(--electric-violet); border-color: rgba(195,112,246,0.4); }
.ac-badge--neutral { background: var(--border); color: var(--text-muted); border-color: var(--border-strong); }
.ac-badge--solid { border: 0; }
.ac-badge--solid.ac-badge--available { background: var(--zesty-lime); color: var(--void-black); }
.ac-badge--solid.ac-badge--accent { background: var(--hot-fuchsia); color: var(--void-black); }
.ac-badge--solid.ac-badge--violet { background: var(--electric-violet); color: var(--void-black); }

.ac-btn {
  --_bg: var(--accent);
  --_fg: var(--text-on-accent);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-sans); font-weight: var(--fw-medium);
  border: 1px solid transparent; border-radius: var(--radius-sm);
  cursor: pointer; white-space: nowrap; text-decoration: none;
  background: var(--_bg); color: var(--_fg);
  transition: background var(--dur-fast) var(--ease-standard),
              transform var(--dur-fast) var(--ease-standard),
              box-shadow var(--dur-base) var(--ease-standard),
              border-color var(--dur-fast) var(--ease-standard);
}
.ac-btn:hover { background: var(--accent-hover); }
.ac-btn:active { transform: translateY(1px); }
.ac-btn:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
.ac-btn[disabled] { opacity: 0.4; cursor: not-allowed; pointer-events: none; }

.ac-btn--sm { font-size: 13px; padding: 6px 12px; }
.ac-btn--md { font-size: 14px; padding: 9px 18px; }
.ac-btn--lg { font-size: 16px; padding: 13px 26px; }

.ac-btn--secondary { --_bg: var(--secondary); --_fg: var(--void-black); }
.ac-btn--secondary:hover { background: var(--violet-hover); }

.ac-btn--outline { background: transparent; color: var(--text); border-color: var(--border-strong); }
.ac-btn--outline:hover { background: transparent; border-color: var(--accent); color: var(--accent); }

.ac-btn--ghost { background: transparent; color: var(--text); }
.ac-btn--ghost:hover { background: var(--border); }

.ac-btn--glow { box-shadow: var(--shadow-glow-fuchsia); }
.ac-btn--glow:hover { box-shadow: var(--shadow-glow-fuchsia); }

.ac-tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: var(--ls-mono);
  padding: 4px 9px; border-radius: var(--radius-xs);
  background: transparent; color: var(--text-muted);
  border: 1px solid var(--border-strong);
  transition: border-color var(--dur-fast) var(--ease-standard), color var(--dur-fast) var(--ease-standard);
  cursor: default; text-decoration: none;
}
.ac-tag--interactive { cursor: pointer; }
.ac-tag--interactive:hover { border-color: var(--accent); color: var(--accent); }
.ac-tag__x { font-family: var(--font-sans); font-size: 13px; line-height: 1; opacity: 0.7; cursor: pointer; }
.ac-tag__x:hover { opacity: 1; color: var(--accent); }


.sr-only { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior:auto !important; transition-duration:0.01ms !important; animation-duration:0.01ms !important; } }
