/* =============================================================================
 * Cura - base tokens, reset, typography, utility classes
 *
 * Visual family: RoxyKovu summer palette (dark navy-teal + sand cream) with
 * a sage-forest accent sampled from Catherine's CURA logo, so Cura reads as
 * a sibling of roxykovu.com rather than a separate aesthetic universe.
 *
 *   Page bg:   linear-gradient deep teal
 *   Text:      sand cream
 *   Primary:   sage forest (logo green family)
 *   Secondary: sea foam (RoxyKovu summer foam)
 *   Warm:      sandy gold (warm CTA / highlight)
 *
 * Type: CalSans for display + Rubik for body, self-hosted from
 *       /assets/external/fonts/. Identical to RoxyKovu chrome.
 * ============================================================================= */

/* Caveat: hand-lettered display font, evokes Ghibli title cards.
   Loaded from Google Fonts (small file, reliable CDN, full unicode subset). */
@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@400;500;600;700&display=swap');

/* CalSans + Rubik: retained as fallbacks under the display + body stacks
   so the rest of the typographic system stays consistent. */
@font-face {
  font-family: "CalSans";
  src: url("/assets/external/fonts/CalSans-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Rubik";
  src: url("/assets/external/fonts/Rubik-400.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

:root {
  /* ── Palette primitives (sampled from RoxyKovu summer + CURA logo) ── */
  --cura-shore:    #06151c;  /* deepest navy-teal */
  --cura-tide:     #0a2230;  /* mid navy-teal */
  --cura-sea:      #0f3040;  /* upper navy-teal */
  --cura-foam:     #5dccc5;  /* sea foam (RoxyKovu primary) */
  --cura-deep-sea: #24a59d;  /* deep sea */
  --cura-sage:     #88b07e;  /* sage / dune grass - LOGO GREEN family */
  --cura-leaf:     #5a8c6b;  /* deeper logo-leaf green */
  --cura-steel:    #5076a8;  /* logo steel blue */
  --cura-sand:     #fae7bf;  /* sand cream */
  --cura-gold:     #f0c060;  /* sandy gold */
  --cura-coral:    #e4a367;  /* warm coral */
  --cura-ink:      #08181f;  /* near-black */

  /* ── Semantic tokens (reference these from feature CSS) ── */

  /* Page + surfaces */
  --page-bg:               linear-gradient(180deg, #06151c 0%, #0a2230 45%, #0f3040 100%);
  --surface-1:             rgba(14, 31, 36, 0.96);
  --surface-2:             rgba(22, 48, 58, 0.85);
  --surface-3:             rgba(18, 48, 58, 0.4);
  --surface-card:          rgba(14, 31, 36, 0.82);
  --surface-card-hover:    rgba(22, 48, 58, 0.92);
  --surface-deep:          rgba(8, 22, 30, 0.95);
  --surface-glass:         rgba(22, 48, 58, 0.55);
  --surface-glass-strong:  rgba(14, 31, 36, 0.97);
  --border-glass:          rgba(248, 232, 207, 0.10);
  --border-glass-strong:   rgba(248, 232, 207, 0.18);

  /* Shadows */
  --shadow-card:           0 6px 14px rgba(2, 14, 22, 0.40);
  --shadow-lift:           0 12px 28px rgba(2, 14, 22, 0.50);
  --shadow-hover:          0 16px 36px rgba(2, 14, 22, 0.55);
  --shadow-glow:           0 0 0 1px rgba(136, 176, 126, 0.32), 0 12px 32px rgba(136, 176, 126, 0.22);

  /* Text */
  --text-strong:           #fae7bf;
  --text-soft:             rgba(248, 232, 207, 0.78);
  --text-muted:            rgba(228, 220, 200, 0.55);
  --text-faint:            rgba(248, 232, 207, 0.10);
  --ink:                   #08181f;

  /* Accents */
  --accent-primary:        var(--cura-sage);
  --accent-primary-hover:  var(--cura-leaf);
  --accent-secondary:      var(--cura-foam);
  --accent-warm:           var(--cura-coral);
  --accent-gold:           var(--cura-gold);
  --accent-steel:          var(--cura-steel);
  --accent-tint:           rgba(136, 176, 126, 0.12);
  --accent-glow:           rgba(136, 176, 126, 0.32);
  --accent-glow-strong:    rgba(136, 176, 126, 0.55);
  --eden-emerald:          #22C55E; /* reserved: use only on the EDEN product card for family continuity */

  /* Type */
  --font-display: "Caveat", "CalSans", "Rubik", system-ui, sans-serif;  /* Ghibli hand-lettered for headlines */
  --font-sans:    "CalSans", "Rubik", system-ui, sans-serif;             /* modern sans for sub-headlines + buttons */
  --font-body:    "Rubik", "Helvetica Neue", system-ui, -apple-system, sans-serif;

  --fs-h1:        clamp(2.2rem, 4.4vw + 0.8rem, 4.4rem);
  --fs-h2:        clamp(1.8rem, 2.6vw + 0.6rem, 2.85rem);
  --fs-h3:        clamp(1.25rem, 0.9vw + 0.9rem, 1.55rem);
  --fs-h4:        1.1rem;
  --fs-body:      1.02rem;
  --fs-small:     0.92rem;
  --fs-eyebrow:   0.75rem;

  /* Spacing */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 4.5rem;
  --space-7: 7rem;

  /* Geometry */
  --radius-sm:   8px;
  --radius:      18px;
  --radius-lg:   24px;
  --radius-pill: 999px;
  --container:   1240px;
  --container-narrow: 880px;

  /* Motion */
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --t-fast:      180ms;
  --t-base:      320ms;
  --t-slow:      600ms;
}

/* ── Reset ─────────────────────────────────────────────────────────── */

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

html, body { margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

body {
  background: var(--page-bg);
  color: var(--text-strong);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 300;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

img, svg, video { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; color: inherit; }

a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color var(--t-fast) var(--ease-out);
}
a:hover, a:focus-visible {
  color: var(--accent-secondary);
}

:focus-visible {
  outline: 2px solid var(--accent-glow-strong);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

::selection { background: var(--accent-primary); color: var(--ink); }

/* ── Typography ───────────────────────────────────────────────────── */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;            /* Caveat needs a heavier weight to read well at large sizes */
  color: var(--text-strong);
  letter-spacing: 0;           /* hand-lettered fonts read worse with negative tracking */
  line-height: 1.05;
  margin: 0;
}
/* Caveat sits visually smaller than CalSans at the same px size, so the
   scale is bumped slightly across the board and h1 gets extra weight. */
h1 { font-size: calc(var(--fs-h1) * 1.25); line-height: 0.95; font-weight: 700; }
h2 { font-size: calc(var(--fs-h2) * 1.15); line-height: 1.0; }
h3 { font-size: var(--fs-h3); font-family: var(--font-sans); font-weight: 400; letter-spacing: 0.01em; }
h4 { font-size: var(--fs-h4); font-family: var(--font-sans); font-weight: 400; }

p { margin: 0 0 1em; max-width: 68ch; color: var(--text-soft); }

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--fs-eyebrow);
  font-weight: 400;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: var(--accent-primary);
  margin: 0 0 1rem;
}

.accent { color: var(--accent-primary); }
.accent-warm { color: var(--accent-warm); }

/* ── Layout ───────────────────────────────────────────────────────── */

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 40px);
}
.container-narrow {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 40px);
}

.section {
  padding: clamp(64px, 8vw, 112px) 0;
  position: relative;
}

/* ── Buttons ──────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55em;
  padding: 0.95rem 1.7rem;
  font-family: var(--font-sans);   /* Buttons stay CalSans - Caveat at button sizes is unreadable */
  font-weight: 400;
  font-size: 1rem;
  letter-spacing: 0.005em;
  border: 1px solid transparent;
  border-radius: var(--radius-pill);
  cursor: pointer;
  text-decoration: none;
  transition:
    background-color var(--t-fast) var(--ease-out),
    border-color var(--t-fast) var(--ease-out),
    color var(--t-fast) var(--ease-out),
    transform var(--t-fast) var(--ease-out),
    box-shadow var(--t-base) var(--ease-out);
  will-change: transform;
}
.btn:hover  { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--accent-primary);
  color: var(--ink);
  box-shadow: 0 8px 22px rgba(136, 176, 126, 0.30);
}
.btn-primary:hover {
  background: var(--accent-primary-hover);
  color: var(--ink);
  box-shadow: 0 12px 30px rgba(136, 176, 126, 0.40);
}

.btn-secondary {
  background: transparent;
  color: var(--text-strong);
  border-color: var(--border-glass-strong);
  backdrop-filter: blur(8px);
}
.btn-secondary:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  background: var(--accent-tint);
}

.btn-ghost {
  background: transparent;
  color: var(--accent-primary);
  padding: 0.55rem 0;
  border-radius: 0;
}
.btn-ghost::after { content: " →"; transition: transform var(--t-fast) var(--ease-out); display: inline-block; margin-left: 0.4em; }
.btn-ghost:hover { color: var(--accent-secondary); }
.btn-ghost:hover::after { transform: translateX(4px); }

/* ── Card primitive ───────────────────────────────────────────────── */

.card {
  background: var(--surface-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius);
  padding: clamp(20px, 3vw, 32px);
  transition:
    transform var(--t-base) var(--ease-out),
    background var(--t-base) var(--ease-out),
    border-color var(--t-base) var(--ease-out),
    box-shadow var(--t-base) var(--ease-out);
  will-change: transform;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.card:hover {
  transform: translateY(-4px);
  background: var(--surface-card-hover);
  border-color: var(--border-glass-strong);
  box-shadow: var(--shadow-lift);
}

/* ── Scroll-reveal ────────────────────────────────────────────────── */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity var(--t-slow) var(--ease-out),
    transform var(--t-slow) var(--ease-out);
  will-change: opacity, transform;
}
.reveal.revealed { opacity: 1; transform: translateY(0); }
.reveal--delay-1 { transition-delay:  80ms; }
.reveal--delay-2 { transition-delay: 160ms; }
.reveal--delay-3 { transition-delay: 240ms; }
.reveal--delay-4 { transition-delay: 320ms; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ── sr-only ──────────────────────────────────────────────────────── */

.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;
}
