/* ============================================================
   HPY Design System — Endeavors CE
   Based on HPY brand tokens (Dark mode)
   ============================================================ */

:root {
  /* Numbers (spacing primitives) */
  --n-0:   0px;
  --n-4:   4px;
  --n-8:   8px;
  --n-12: 12px;
  --n-16: 16px;
  --n-20: 20px;
  --n-24: 24px;
  --n-32: 32px;
  --n-44: 44px;
  --n-64: 64px;
  --n-96: 96px;

  /* Vertical / Horizontal spacing — semantic */
  --space-xs: var(--n-4);
  --space-s:  var(--n-8);
  --space-m:  var(--n-12);
  --space-l:  var(--n-16);
  --space-2xl: var(--n-20);
  --space-3xl: var(--n-24);
  --space-4xl: var(--n-32);
  --space-max: var(--n-44);

  /* Padding */
  --pad-1-4: var(--n-4);
  --pad-2-4: var(--n-8);
  --pad-3-4: var(--n-12);
  --pad-4-4: var(--n-16);
  --pad-3-2: var(--n-24);
  --pad-4-2: var(--n-32);

  /* Radius */
  --radius-sharp:    4px;
  --radius-subtle:   8px;
  --radius-soft:    16px;
  --radius-rounded: 24px;
  --radius-pill:    32px;
  --radius-circle: 128px;

  /* Sizes */
  --size-small:  24px;
  --size-medium: 40px;
  --size-large:  56px;

  /* HPY palette — dark mode, warm wellness accent */
  --bg-canvas:    #0E0F0C;   /* near-black, slight warm */
  --bg-elevated:  #16180F;
  --bg-card:      #1B1E14;
  --bg-card-hover:#222614;

  --border-subtle: #2A2E1F;
  --border-strong: #3A3F2A;

  --text-primary:    #F4F4EC;
  --text-secondary:  #C5C7B4;
  --text-tertiary:   #8A8C7A;
  --text-inverted:   #0E0F0C;

  --accent:          #FF8B7A;  /* signature HPY salmon/pink — warm, alive */
  --accent-hover:    #FFA89A;
  --accent-soft:     #3A1F1B;
  --accent-glow:     rgba(255, 139, 122, 0.20);

  /* Category accents */
  --cat-addiction:    #E89B6C;
  --cat-telehealth:   #7CB7E8;
  --cat-ethics:       #C8B66C;
  --cat-domestic:     #E37D7D;
  --cat-childabuse:   #D49AC2;
  --cat-suicide:      #B98AE3;
  --cat-cultural:     #8CD3C7;
  --cat-treatment:    #A2C870;
  --cat-boundaries:   #E8A87C;
  --cat-supervision:  #9AB5E8;
  --cat-family:       #E89AAE;

  /* Typography */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;

  /* Shadows */
  --shadow-card: 0 1px 2px rgba(0,0,0,0.4), 0 8px 24px rgba(0,0,0,0.25);
  --shadow-glow: 0 0 0 4px var(--accent-glow);
}

/* ============================================================
   Base
   ============================================================ */

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  background: var(--bg-canvas);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

img { max-width: 100%; display: block; }

/* ============================================================
   Layout
   ============================================================ */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--pad-3-2);
}

.container-narrow {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 var(--pad-3-2);
}

section { padding: var(--n-64) 0; }

/* ============================================================
   Nav
   ============================================================ */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(14, 15, 12, 0.85);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border-subtle);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-l) var(--pad-3-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3xl);
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: var(--space-m);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}
.nav-brand .logo-mark {
  width: 28px; height: 28px;
  border-radius: var(--radius-subtle);
  background: var(--accent);
  display: grid; place-items: center;
  color: var(--text-inverted);
  font-weight: 800; font-size: 14px;
  letter-spacing: -0.02em;
}
.nav-links {
  display: flex;
  gap: var(--space-4xl);
  align-items: center;
}
.nav-links a {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
}
.nav-links a:hover { color: var(--text-primary); }
.nav-cta { display: flex; gap: var(--space-m); align-items: center; }

/* ============================================================
   Buttons
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-s);
  height: var(--size-medium);
  padding: 0 var(--pad-3-2);
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.005em;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 120ms ease, background 120ms ease, border-color 120ms ease, color 120ms ease;
  white-space: nowrap;
  text-decoration: none;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--accent);
  color: var(--text-inverted);
}
.btn-primary:hover { background: var(--accent-hover); color: var(--text-inverted); }

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border-strong);
}
.btn-secondary:hover { background: var(--bg-card); border-color: var(--text-tertiary); }

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

.btn-large {
  height: var(--size-large);
  padding: 0 var(--pad-4-2);
  font-size: 15px;
}

.btn-block { width: 100%; }

/* ============================================================
   Hero
   ============================================================ */

.hero {
  padding: var(--n-96) 0 var(--n-64);
  background:
    radial-gradient(ellipse at 20% -10%, var(--accent-glow), transparent 50%),
    radial-gradient(ellipse at 80% 0%, rgba(124, 183, 232, 0.08), transparent 50%),
    var(--bg-canvas);
  border-bottom: 1px solid var(--border-subtle);
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-s);
  padding: var(--pad-1-4) var(--pad-3-4);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: var(--space-3xl);
}
.hero-eyebrow .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-glow);
}
.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(40px, 6vw, 68px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  max-width: 900px;
  margin-bottom: var(--space-3xl);
}
.hero h1 em {
  font-style: normal;
  color: var(--accent);
}
.hero-sub {
  font-size: 19px;
  line-height: 1.5;
  color: var(--text-secondary);
  max-width: 640px;
  margin-bottom: var(--space-max);
}
.hero-actions {
  display: flex;
  gap: var(--space-m);
  flex-wrap: wrap;
}

/* Partnership row */
.partner-row {
  margin-top: var(--n-64);
  padding-top: var(--space-3xl);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: var(--space-l);
  flex-wrap: wrap;
  color: var(--text-tertiary);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.partner-row strong {
  color: var(--text-secondary);
  letter-spacing: -0.01em;
  text-transform: none;
  font-size: 15px;
  font-weight: 600;
}

/* ============================================================
   Section headers
   ============================================================ */

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: var(--space-3xl);
  margin-bottom: var(--space-4xl);
  flex-wrap: wrap;
}
.section-head h2 {
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--text-primary);
}
.section-head p {
  color: var(--text-secondary);
  max-width: 480px;
  font-size: 15px;
}

/* ============================================================
   Filters
   ============================================================ */

.filters {
  display: flex;
  gap: var(--space-s);
  flex-wrap: wrap;
  margin-bottom: var(--space-4xl);
  padding-bottom: var(--space-3xl);
  border-bottom: 1px solid var(--border-subtle);
}
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-s);
  padding: var(--pad-2-4) var(--pad-3-2);
  background: transparent;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 120ms ease;
}
.filter-chip:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
}
.filter-chip.active {
  background: var(--accent);
  color: var(--text-inverted);
  border-color: var(--accent);
}
.filter-chip .count {
  opacity: 0.65;
  font-weight: 400;
}

/* ============================================================
   Course grid (Maven-inspired card)
   ============================================================ */

.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-3xl);
}

.course-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-soft);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
  text-decoration: none;
  color: inherit;
}
.course-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  background: var(--bg-card-hover);
}

.course-cover {
  aspect-ratio: 16 / 9;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.course-cover::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 50%, rgba(0,0,0,0.45) 100%);
}
.course-cover .icon-wrap {
  width: 64px; height: 64px;
  border-radius: var(--radius-soft);
  background: rgba(14, 15, 12, 0.5);
  display: grid; place-items: center;
  color: var(--text-primary);
  position: relative;
  z-index: 1;
  backdrop-filter: blur(8px);
}
.course-cover svg { width: 32px; height: 32px; }

.course-body {
  padding: var(--pad-3-2);
  display: flex;
  flex-direction: column;
  gap: var(--space-m);
  flex: 1;
}
.course-meta-row {
  display: flex;
  align-items: center;
  gap: var(--space-s);
  flex-wrap: wrap;
}
.tag {
  display: inline-flex;
  align-items: center;
  padding: var(--pad-1-4) var(--pad-2-4);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sharp);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.tag-format { color: var(--accent); border-color: var(--accent-soft); background: rgba(255,139,122,0.06); }
.tag-hours { color: var(--text-primary); }

.course-card h3 {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--text-primary);
}
.course-card .instructor {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-top: auto;
  padding-top: var(--space-m);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: var(--space-s);
}
.instructor .avatar {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid; place-items: center;
  font-size: 11px;
  font-weight: 700;
}

/* ============================================================
   Course detail page
   ============================================================ */

.detail-hero {
  padding: var(--n-64) 0 var(--space-4xl);
  border-bottom: 1px solid var(--border-subtle);
}
.detail-grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: var(--space-max);
  align-items: start;
}
@media (max-width: 900px) {
  .detail-grid { grid-template-columns: 1fr; }
}

.detail-eyebrow {
  display: flex;
  gap: var(--space-s);
  align-items: center;
  margin-bottom: var(--space-3xl);
  font-size: 13px;
  color: var(--text-tertiary);
}
.detail-eyebrow a { color: var(--text-tertiary); }
.detail-eyebrow a:hover { color: var(--text-primary); }

.detail-title {
  font-size: clamp(32px, 4.5vw, 52px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.1;
  margin-bottom: var(--space-3xl);
}
.detail-sub {
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.55;
  max-width: 620px;
}

.detail-cover {
  margin-top: var(--space-4xl);
  aspect-ratio: 21/9;
  border-radius: var(--radius-soft);
  border: 1px solid var(--border-subtle);
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.detail-cover .icon-wrap {
  width: 96px; height: 96px;
  border-radius: var(--radius-soft);
  background: rgba(14, 15, 12, 0.55);
  display: grid; place-items: center;
  backdrop-filter: blur(8px);
  position: relative;
  z-index: 1;
}
.detail-cover svg { width: 48px; height: 48px; }

/* Sticky enroll card */
.enroll-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-soft);
  padding: var(--pad-4-2);
  position: sticky;
  top: 96px;
}
.enroll-card .price {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-xs);
}
.enroll-card .price-note {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-bottom: var(--space-3xl);
}
.enroll-card .meta-list {
  display: grid;
  gap: var(--space-m);
  padding: var(--space-3xl) 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: var(--space-3xl);
}
.enroll-card .meta-list dt {
  font-size: 12px;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-xs);
}
.enroll-card .meta-list dd {
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 500;
}
.enroll-card .actions {
  display: grid;
  gap: var(--space-m);
}

/* Detail body */
.detail-body {
  padding: var(--space-max) 0;
}
.detail-body h2 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: var(--space-l);
  margin-top: var(--space-max);
}
.detail-body h2:first-child { margin-top: 0; }
.detail-body p {
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.65;
  margin-bottom: var(--space-l);
  max-width: 680px;
}
.detail-body ul {
  list-style: none;
  padding: 0;
  display: grid;
  gap: var(--space-m);
  margin-bottom: var(--space-l);
}
.detail-body ul li {
  color: var(--text-secondary);
  display: flex;
  gap: var(--space-m);
  align-items: flex-start;
}
.detail-body ul li::before {
  content: "";
  width: 6px; height: 6px;
  margin-top: 10px;
  background: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
}

.state-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-s);
}
.state-chip {
  padding: var(--pad-1-4) var(--pad-3-4);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sharp);
  font-size: 13px;
  color: var(--text-secondary);
}

/* ============================================================
   Forms (signup)
   ============================================================ */

.form-shell {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-soft);
  padding: var(--pad-4-2);
  margin-top: var(--space-4xl);
}
.form-row {
  margin-bottom: var(--space-3xl);
}
.form-row label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: var(--space-s);
}
.form-row input {
  width: 100%;
  height: var(--size-large);
  padding: 0 var(--pad-3-2);
  background: var(--bg-canvas);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-subtle);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 15px;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.form-row input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--shadow-glow);
}
.form-row .hint {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-top: var(--space-s);
}

.disclosure {
  padding: var(--pad-3-2);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-subtle);
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: var(--space-3xl);
  display: flex;
  gap: var(--space-m);
  align-items: flex-start;
}
.disclosure svg {
  width: 18px; height: 18px;
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 2px;
}

.order-summary {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-soft);
  padding: var(--pad-3-2);
  margin-bottom: var(--space-3xl);
}
.order-summary .label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  margin-bottom: var(--space-s);
}
.order-summary .course-title-mini {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-s);
}
.order-summary .meta-mini {
  display: flex;
  gap: var(--space-m);
  font-size: 13px;
  color: var(--text-secondary);
  flex-wrap: wrap;
}

/* ============================================================
   Confirmation
   ============================================================ */

.confirm-hero {
  text-align: center;
  padding: var(--n-96) 0 var(--space-max);
}
.confirm-check {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--text-inverted);
  display: grid; place-items: center;
  margin: 0 auto var(--space-3xl);
}
.confirm-check svg { width: 36px; height: 36px; }
.confirm-hero h1 {
  font-size: clamp(32px, 4vw, 44px);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-l);
}
.confirm-hero p {
  color: var(--text-secondary);
  font-size: 17px;
  max-width: 520px;
  margin: 0 auto;
}

.timeline {
  margin: var(--space-max) 0;
  display: grid;
  gap: var(--space-3xl);
}
.timeline-step {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: var(--space-l);
  padding: var(--pad-3-2);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-soft);
}
.timeline-num {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid; place-items: center;
  font-weight: 700;
  font-size: 14px;
}
.timeline-content h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}
.timeline-content p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.confirm-actions {
  display: flex;
  gap: var(--space-m);
  justify-content: center;
  flex-wrap: wrap;
  margin-top: var(--space-max);
}

/* ============================================================
   Footer
   ============================================================ */

.footer {
  border-top: 1px solid var(--border-subtle);
  padding: var(--n-64) 0 var(--space-4xl);
  margin-top: var(--n-96);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3xl);
  color: var(--text-tertiary);
  font-size: 13px;
}
.footer-links {
  display: flex;
  gap: var(--space-3xl);
}
.footer-links a {
  color: var(--text-tertiary);
}
.footer-links a:hover { color: var(--text-primary); }

/* ============================================================
   Utilities
   ============================================================ */

.spacer-s { height: var(--space-l); }
.spacer-m { height: var(--space-3xl); }
.spacer-l { height: var(--space-max); }

.muted { color: var(--text-tertiary); }
.small { font-size: 13px; }

@media (max-width: 640px) {
  .nav-links { display: none; }
  .hero { padding: var(--space-max) 0; }
  .course-grid { grid-template-columns: 1fr; }
  section { padding: var(--space-max) 0; }
}
