/* ==========================================================================
   Serenity Brands LLC — homepage / course catalog landing (page-specific styles).
   Tokens come from design-tokens.css.
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background-color: var(--bg-page);
  background-image: radial-gradient(rgba(13, 10, 8, 0.055) 1px, transparent 1px);
  background-size: 22px 22px;
  color: var(--fg-primary);
  font-family: var(--font-sans);
  font-feature-settings: var(--otf-body);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Gradient orbs — fixed behind all content */
.glow-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(42% 52% at 4%  6%,  rgba(28, 206, 86, 0.20), transparent 70%),
    radial-gradient(38% 48% at 90% 4%,  rgba(67, 8, 159, 0.15), transparent 70%),
    radial-gradient(34% 42% at 50% 98%, rgba(248, 204, 101, 0.18), transparent 70%);
  filter: blur(14px);
}

/* Grain texture — fixed above all content, non-interactive */
.grain-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.042;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.72' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 220px 220px;
  background-repeat: repeat;
}

/* Staggered load-in */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
.anim {
  opacity: 0;
  animation: fadeUp 0.65s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.d0  { animation-delay:   0ms; }
.d1  { animation-delay: 100ms; }
.d2  { animation-delay: 200ms; }
.d3  { animation-delay: 340ms; }
.d4  { animation-delay: 500ms; }
@media (prefers-reduced-motion: reduce) {
  .anim { animation: none; opacity: 1; }
}

/* Pulsing live dot */
@keyframes pulse {
  0%, 100% { opacity: 1;   transform: scale(1);    }
  50%       { opacity: 0.4; transform: scale(0.82); }
}

/* Container */
.wrap {
  max-width: var(--container, 1180px);
  margin: 0 auto;
  padding: 0 32px;
}

/* ── Nav ──────────────────────────────────────────────── */
.nav {
  position: relative;
  z-index: 10;
  padding: 28px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.wordmark {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--fg-primary);
  text-decoration: none;
  font-feature-settings: var(--otf-display);
}
.wordmark-dot { color: var(--matcha-600); }
.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--fg-secondary);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  transition: color 0.15s ease, background 0.15s ease;
}
.nav-link:hover { color: var(--fg-primary); background: var(--border-light); }

/* ── Hero ─────────────────────────────────────────────── */
.hero {
  position: relative;
  z-index: 1;
  padding: 76px 0 68px;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.3px;
  text-transform: uppercase;
  color: var(--matcha-600);
  margin-bottom: 24px;
}
.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--matcha-600);
  animation: pulse 2.2s ease-in-out infinite;
}
.hero-h1 {
  font-size: clamp(48px, 7vw, 82px);
  font-weight: 700;
  letter-spacing: -3.5px;
  line-height: 0.97;
  margin: 0 0 28px;
  max-width: 14ch;
  font-feature-settings: var(--otf-display);
}
.hero-sub {
  font-size: 19px;
  line-height: 1.6;
  color: var(--fg-secondary);
  max-width: 46ch;
  margin: 0 0 40px;
}
.hero-ctas {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ── Buttons ──────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition:
    transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),
    background-color 0.15s ease,
    box-shadow 0.2s ease,
    color 0.15s ease,
    border-color 0.15s ease;
}
.btn:active { transform: translateY(1px) scale(0.98) !important; }

.btn-primary {
  background: var(--fg-primary);
  color: #fff;
  box-shadow: var(--shadow-clay);
}
.btn-primary:hover {
  background: var(--matcha-800);
  transform: translateY(-2px);
  box-shadow: 0 6px 24px rgba(2, 73, 42, 0.24);
}
.btn-primary .arrow { transition: transform 0.18s ease; }
.btn-primary:hover .arrow { transform: translateX(4px); }

.btn-ghost {
  background: transparent;
  color: var(--fg-secondary);
  border: 1px solid var(--border-default);
}
.btn-ghost:hover {
  border-color: var(--fg-primary);
  color: var(--fg-primary);
  transform: translateY(-1px);
}

/* ── Course section ───────────────────────────────────── */
.course-section {
  position: relative;
  z-index: 1;
  padding-bottom: 72px;
}
.section-eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.3px;
  text-transform: uppercase;
  color: var(--fg-tertiary);
  margin: 0 0 18px;
}

/* Feature card — asymmetric 60/40 split */
.course-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-section);
  padding: 52px 56px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 56px;
  align-items: center;
  box-shadow:
    0 1px 2px rgba(13, 10, 8, 0.05),
    0 4px 20px rgba(13, 10, 8, 0.04);
  transition:
    box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.course-card:hover {
  box-shadow:
    0 2px 4px rgba(13, 10, 8, 0.07),
    0 16px 48px rgba(13, 10, 8, 0.08);
  transform: translateY(-4px);
}

/* Left side */
.course-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--matcha-800);
  margin-bottom: 18px;
}
.course-chip-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--matcha-600);
}
.course-title {
  font-size: clamp(26px, 3vw, 36px);
  font-weight: 700;
  letter-spacing: -1.5px;
  line-height: 1.08;
  margin: 0 0 16px;
  font-feature-settings: var(--otf-display);
}
.course-blurb {
  font-size: 16px;
  line-height: 1.7;
  color: var(--fg-secondary);
  margin: 0 0 28px;
  max-width: 44ch;
}
.meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.price-tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 14px;
  background: var(--fg-primary);
  color: #fff;
  border-radius: var(--radius-pill);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.4px;
}
.meta-tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  background: var(--bg-surface-deep);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-secondary);
}
.meta-tag.free {
  background: var(--matcha-tint);
  border-color: var(--matcha-300);
  color: var(--matcha-800);
}
.card-ctas {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Right side — course map */
.course-map {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.course-map::before {
  content: '';
  position: absolute;
  left: 24px;
  top: 28px;
  bottom: 28px;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(
    to bottom,
    #3bd3fd 0%,
    #f8cc65 50%,
    #c1b0ff 100%
  );
  opacity: 0.55;
  z-index: 0;
}
.map-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  transition:
    transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.25s ease;
}
.map-row.chat   { background: linear-gradient(135deg, rgba(59, 211, 253, 0.10), rgba(59, 211, 253, 0.02)); border-color: rgba(59, 211, 253, 0.28); }
.map-row.cowork { background: linear-gradient(135deg, rgba(248, 204, 101, 0.16), rgba(248, 204, 101, 0.03)); border-color: rgba(248, 204, 101, 0.40); }
.map-row.code   { background: linear-gradient(135deg, rgba(193, 176, 255, 0.18), rgba(193, 176, 255, 0.03)); border-color: rgba(193, 176, 255, 0.45); }
.map-row:hover {
  transform: translateX(2px);
  box-shadow: 0 4px 14px rgba(13, 10, 8, 0.06);
}
.map-num {
  position: absolute;
  top: 10px;
  right: 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.8px;
  color: var(--fg-tertiary);
  opacity: 0.5;
  font-variant-numeric: tabular-nums;
}
.map-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 2px rgba(13, 10, 8, 0.06), 0 0 0 3px var(--bg-surface);
}
.map-icon svg { width: 17px; height: 17px; stroke-width: 1.75; }
.map-icon.chat   { background: rgba(59, 211, 253, 0.20); color: #0b7aa0; }
.map-icon.cowork { background: rgba(248, 204, 101, 0.32); color: #9d6a09; }
.map-icon.code   { background: rgba(193, 176, 255, 0.32); color: #43089f; }
.map-text { min-width: 0; }
.map-label {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--fg-primary);
  margin: 0 0 2px;
  display: flex;
  align-items: center;
  gap: 7px;
}
.free-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  background: var(--matcha-tint);
  color: var(--matcha-800);
}
.map-sub {
  font-size: 12.5px;
  color: var(--fg-secondary);
  margin: 0;
}

/* ── Callout strip ────────────────────────────────────── */
.callout-section {
  position: relative;
  z-index: 1;
  padding-bottom: 88px;
}
.callout-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--border-default);
}
.callout {
  padding: 36px 28px;
  border-left: 1px solid var(--border-light);
}
.callout:first-child {
  border-left: none;
  padding-left: 0;
}
.callout-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-card);
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--matcha-600);
}
.callout-icon svg { width: 16px; height: 16px; }
.callout-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.3px;
  margin: 0 0 8px;
}
.callout-desc {
  font-size: 14px;
  line-height: 1.65;
  color: var(--fg-secondary);
  margin: 0;
  max-width: 26ch;
}

/* ── Footer ───────────────────────────────────────────── */
.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border-light);
  padding: 28px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-links {
  display: flex;
  align-items: center;
  gap: 2px;
}
.footer-links a {
  font-size: 13px;
  color: var(--fg-tertiary);
  text-decoration: none;
  padding: 4px 10px;
  border-radius: 6px;
  transition: color 0.15s ease, background 0.15s ease;
}
.footer-links a:hover { color: var(--fg-primary); background: var(--border-light); }
.footer-copy {
  font-size: 13px;
  color: var(--fg-tertiary);
}

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 960px) {
  .course-card {
    grid-template-columns: 1fr;
    padding: 40px 36px;
    gap: 40px;
  }
  .course-blurb { max-width: none; }
}
@media (max-width: 720px) {
  .callout-grid { grid-template-columns: 1fr; }
  .callout {
    border-left: none;
    padding: 28px 0;
  }
  .callout:not(:first-child) { border-top: 1px solid var(--border-light); }
  .callout-desc { max-width: none; }
}
@media (max-width: 600px) {
  .wrap { padding: 0 20px; }
  .hero { padding: 56px 0 52px; }
  .hero-h1 { letter-spacing: -2.5px; }
  .course-section { padding-bottom: 52px; }
  .callout-section { padding-bottom: 64px; }
  .course-card { padding: 30px 24px; }
}
