/**
 * Fascia Lab — global design tokens
 * Link from all fascialab.co pages. Do not hardcode palette values in components.
 */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@300;400;500&family=DM+Sans:wght@400;500&family=DM+Serif+Display:ital@0;1&display=swap');

:root {
  /* ── Semantic palette ── */
  --bg-primary: #F2EFE6;       /* Bone */
  --text-primary: #1A1A18;     /* Ink */
  --text-secondary: #8E8B82;    /* Slate — brand; large type / UI labels */
  --text-mid: #6E6B62;          /* Body secondary — WCAG AA on Bone */
  --accent-primary: #C8B89A;   /* Warm sand — buttons, fills */
  --accent-secondary: #3D5A52; /* Deep teal — dark panels */
  --surface: #ECEAE2;
  --border: #D4C4A8;           /* Sand */
  --bg-inverse: #1A1A18;
  --text-inverse: #F2EFE6;

  /* Headings — cappuccino / espresso (readable on Bone) */
  --heading: #3A3229;          /* Espresso — main titles */
  --heading-accent: #6F4F38;   /* Cappuccino — italic emphasis, labels */
  --heading-strong: #4A382C;   /* Mocha — subheads, logo */

  /* ── Derived tones (gradients, hovers) ── */
  --bg-primary-mid: #EBE7DC;
  --bg-primary-light: #F7F5EE;
  --accent-primary-dark: #4A382C; /* Mocha — hovers on warm buttons */
  --accent-secondary-dark: #2F4540;
  --text-soft: #706D65;         /* Captions — WCAG AA on Bone */
  --on-accent: #1A1A18;
  --elevated: #FFFDF9;

  /* RGB for alpha shadows / overlays */
  --ink-rgb: 26, 26, 24;
  --deep-rgb: 61, 90, 82;
  --warm-rgb: 200, 184, 154;

  /* ── Legacy aliases (existing component CSS) ── */
  --ice: var(--bg-primary);
  --ice-mid: var(--bg-primary-mid);
  --ice-deep: var(--border);
  --blue: var(--accent-primary);
  --blue-dark: var(--heading-strong);
  --blue-deep: var(--accent-secondary);
  --text: var(--text-primary);
  --white: var(--surface);
  --line: rgba(212, 196, 168, 0.45);

  --green: var(--accent-secondary);
  --green-bg: #E8EFEC;

  /* Buttons — teal gradient (previous blue-era style, on-brand) */
  --btn-primary-top: #58897E;
  --btn-primary-text: #F2EFE6;
  --trigger-point: #3A3229;

  /* ── Typography ── */
  --font-heading: 'Cormorant Garamond', Georgia, serif;
  --font-logo: 'DM Serif Display', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;

  /* ── Layout & elevation ── */
  --nav-h: 72px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 2px 8px rgba(var(--ink-rgb), 0.06);
  --shadow-md: 0 8px 32px rgba(var(--ink-rgb), 0.08);
  --shadow-lg: 0 20px 60px rgba(var(--ink-rgb), 0.12);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Base document */
body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
}

::selection {
  background: rgba(var(--deep-rgb), 0.18);
  color: var(--accent-secondary);
}

/* Primary CTAs — teal gradient, bone-white text (readable) */
.nav-cta,
.btn-primary {
  color: var(--btn-primary-text) !important;
  background: linear-gradient(
    180deg,
    var(--btn-primary-top) 0%,
    var(--accent-secondary) 55%,
    var(--accent-secondary-dark) 100%
  ) !important;
  border: none;
  box-shadow: 0 4px 20px rgba(var(--deep-rgb), 0.32);
}

.nav-cta:hover,
.btn-primary:hover {
  background: var(--accent-secondary-dark) !important;
  color: var(--btn-primary-text) !important;
}

/* Dark CTA band — deep teal, inverse text */
.cta-banner {
  background: linear-gradient(
    135deg,
    var(--accent-secondary) 0%,
    var(--accent-secondary-dark) 100%
  ) !important;
  color: var(--text-inverse);
}

.cta-banner-rich {
  padding: 64px 80px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  flex-wrap: wrap;
}

.cta-eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 12px;
}

.cta-title {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 3vw, 2rem);
  color: white;
  line-height: 1.2;
  font-weight: 400;
  max-width: 28rem;
}

.cta-paths {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 32rem;
}

.cta-paths li {
  font-size: 14px;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.5;
  padding-left: 14px;
  border-left: 2px solid rgba(255, 255, 255, 0.25);
}

.cta-paths strong {
  font-weight: 500;
  color: rgba(255, 255, 255, 0.95);
}

.cta-meta {
  font-size: 13px;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 14px;
}

.cta-banner-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-shrink: 0;
  min-width: min(100%, 240px);
}

.cta-btn {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.06em;
  padding: 16px 28px;
  border-radius: 6px;
  text-decoration: none;
  text-align: center;
  white-space: nowrap;
  transition: background 0.2s, border-color 0.2s;
  display: inline-block;
}

.cta-btn-primary {
  color: var(--heading);
  background: white;
}

.cta-btn-primary:hover {
  background: var(--ice);
}

.cta-btn-secondary {
  color: white;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.cta-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.2);
}

.cta-btn-link {
  font-size: 12px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.65);
  padding: 8px 4px;
  letter-spacing: 0.04em;
}

.cta-btn-link:hover {
  color: white;
}

.nav-promo {
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--text-soft);
  margin-right: 12px;
  white-space: nowrap;
}

.nav-promo a {
  color: var(--accent-secondary);
  text-decoration: none;
  font-weight: 500;
}

.nav-promo a:hover {
  text-decoration: underline;
}

.nav-start {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
  min-width: 0;
}

@media (max-width: 768px) {
  .cta-banner-rich {
    padding: 48px 24px;
  }

  .nav-promo {
    display: none;
  }

  .cta-banner-actions {
    width: 100%;
  }

  .cta-btn {
    width: 100%;
  }
}

/* Titles — strong cappuccino tones (not pale sand) */
.hero-title,
.section-title,
.page-title,
.session-header-title,
.seminar-title,
.about-name,
.intro-path-title,
.intro-subscribe-next h3,
.stat-num,
.pricing-card-title {
  color: var(--heading);
}

/* Logo — DM Serif (previous bold style) + deep teal-green */
.nav-logo,
.footer-logo,
.logo-name {
  font-family: var(--font-logo);
  font-size: 21px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--accent-secondary);
}

.nav-logo span,
.footer-logo span,
.logo-name span {
  font-family: var(--font-logo);
  font-style: italic;
  color: var(--accent-secondary);
  opacity: 0.82;
}

/* Hero target diagram — long, deep float toward bottom of hero */
.hero-visual {
  animation: hero-target-float 20s ease-in-out infinite;
}

@keyframes hero-target-float {
  0%, 100% { transform: translateY(-48px); }
  50% { transform: translateY(155px); }
}

.hero-diagram .fascia-ring {
  fill: none;
  stroke: var(--border);
}

.hero-diagram .fascia-ring--soft {
  stroke: var(--accent-primary);
  opacity: 0.45;
}

.hero-diagram .fascia-ring--deep {
  stroke: var(--accent-secondary);
  opacity: 0.5;
}

.hero-diagram .fascia-core {
  fill: var(--bg-primary-mid);
  stroke: var(--accent-secondary);
  stroke-width: 2;
}

.hero-diagram .fascia-line {
  stroke: var(--border);
}

.hero-diagram .fascia-line--diag {
  stroke: var(--bg-primary-mid);
}

.hero-diagram .trigger-point {
  fill: var(--trigger-point);
}

.hero-diagram .trigger-point--small {
  opacity: 0.8;
}

.hero-diagram .trigger-point--medium {
  opacity: 0.9;
}

.hero-diagram .trigger-point--large {
  opacity: 1;
}

.hero-diagram .core-glow {
  fill: var(--trigger-point);
  opacity: 0.15;
}

/* Ambient trigger points — drift around target, fade in/out */
.hero-diagram .trigger-point--ambient {
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  will-change: transform, opacity;
}

.hero-diagram .trigger-point--ambient-1 {
  animation: trigger-ambient-1 22s ease-in-out infinite;
}

.hero-diagram .trigger-point--ambient-2 {
  animation: trigger-ambient-2 18s ease-in-out infinite;
  animation-delay: -6s;
}

.hero-diagram .trigger-point--ambient-3 {
  animation: trigger-ambient-3 26s ease-in-out infinite;
  animation-delay: -12s;
}

/* Furthest reach: bottom-left; paths orbit centre (190, 190) */
@keyframes trigger-ambient-1 {
  0%, 100% {
    transform: translate(0, -125px);
    opacity: 0;
  }
  14% {
    opacity: 0.75;
  }
  38% {
    transform: translate(-162px, 162px);
    opacity: 0.95;
  }
  58% {
    transform: translate(-70px, 95px);
    opacity: 0.55;
  }
  82% {
    transform: translate(95px, -55px);
    opacity: 0.7;
  }
  94% {
    opacity: 0;
  }
}

@keyframes trigger-ambient-2 {
  0%, 100% {
    transform: translate(130px, -90px);
    opacity: 0;
  }
  20% {
    opacity: 0.85;
  }
  45% {
    transform: translate(-145px, 145px);
    opacity: 0.9;
  }
  65% {
    transform: translate(-20px, -110px);
    opacity: 0.5;
  }
  88% {
    transform: translate(110px, 70px);
    opacity: 0.65;
  }
  96% {
    opacity: 0;
  }
}

@keyframes trigger-ambient-3 {
  0%, 100% {
    transform: translate(-100px, 130px);
    opacity: 0;
  }
  18% {
    transform: translate(-155px, 155px);
    opacity: 0.9;
  }
  40% {
    transform: translate(60px, 100px);
    opacity: 0.45;
  }
  62% {
    transform: translate(140px, -30px);
    opacity: 0.8;
  }
  85% {
    transform: translate(-40px, -120px);
    opacity: 0.35;
  }
  95% {
    opacity: 0;
  }
}

.hero-diagram .diagram-label {
  fill: var(--heading-accent);
  font-family: var(--font-heading);
  font-style: italic;
}

.hero-diagram .diagram-label--sub {
  fill: var(--text-mid);
  font-family: var(--font-body);
}

@media (prefers-reduced-motion: reduce) {
  .hero-visual,
  .hero-diagram,
  .hero-visual::after,
  .hero-diagram .trigger-point--ambient {
    animation: none !important;
  }

  .hero-diagram .trigger-point--ambient {
    opacity: 0.65;
    transform: translate(-162px, 162px);
  }

  .hero-diagram .trigger-point--ambient-2 {
    transform: translate(95px, -55px);
  }

  .hero-diagram .trigger-point--ambient-3 {
    transform: translate(-70px, 95px);
  }
}

.hero-title em,
.section-title em,
.page-title em,
.session-header-title em,
.app-content .section-title em,
.intro-title em {
  color: var(--heading-accent);
}

.hero-label,
.page-label,
.section-label,
.seminar-label,
.intro-label,
.intro-paths-label,
.intro-subscribe-next-label {
  color: var(--heading-accent);
}

.hero-label::before,
.section-label::before,
.page-label::before,
.page-label::after {
  background: var(--heading-accent);
}

/* Secondary buttons — teal text on light frosted bg */
.btn-secondary {
  color: var(--accent-secondary) !important;
  background: rgba(255, 253, 249, 0.88) !important;
  border-color: var(--border) !important;
}

.btn-secondary:hover {
  color: var(--accent-secondary-dark) !important;
  border-color: var(--accent-secondary) !important;
  background: var(--elevated) !important;
}
