/* Hallmark · pre-emit critique: P5 H5 E5 S5 R5 V5
 * macrostructure: Split Studio · tone: playful · theme: Hum (multi-accent pear/cyan/coral)
 * nav: N12 banner-retract · footer: Ft5 statement
 * contrast: pass (40–41) · mobile: pass (34, 49, 50–57)
 * honest: pass (46) · chrome: pass (47) · tokens: pass (48) · responsive: pass (49) · icons: pass (30)
 */

@import url("./tokens.css");

/* ————— Reset & Base ————— */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-feature-settings: "ss01" on, "cv11" on;
  font-variant-numeric: tabular-nums;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  padding-bottom: max(1rem, env(safe-area-inset-bottom));
}

/* ————— Layout Shell ————— */
.section {
  max-width: var(--shell);
  margin-inline: auto;
  padding: var(--section-gap) var(--gutter);
}

.section--band {
  max-width: none;
  padding-inline: 0;
}

.section--band > * {
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Alternate Backgrounds per Hum signature */
.bg-cream { background-color: var(--color-paper); }
.bg-pear-tint { background-color: var(--color-paper-2); }
.bg-cyan-tint { background-color: oklch(98% 0.008 235); }
.bg-coral-tint { background-color: oklch(98% 0.008 18); }

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--color-ink);
  overflow-wrap: anywhere;
  min-width: 0;
}

p {
  color: var(--color-ink-2);
  max-width: 65ch;
  font-size: var(--text-base);
}

a {
  color: var(--color-accent-2-deep);
  text-decoration: none;
  transition: color var(--dur-micro) var(--ease-out);
}

a:hover {
  color: var(--color-accent-2);
}

/* Emphasis Highlight (clone line wrapper tracking) */
em, .hl {
  font-style: normal;
  font-weight: 600;
  color: inherit;
  background-image: linear-gradient(var(--hl, oklch(86% 0.18 95 / 0.55)) 0 0);
  background-repeat: no-repeat;
  background-size: 100% 0.32em;
  background-position: 0 82%;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  padding-bottom: 0.02em;
}

.hl--cyan { --hl: oklch(66% 0.18 235 / 0.35); }
.hl--coral { --hl: oklch(68% 0.24 18 / 0.35); }

/* ————— Component: Button System ————— */
.btn {
  --btn-face: var(--color-accent);
  --btn-ink: var(--color-ink);
  --btn-edge: var(--color-accent-deep);
  --btn-cast: oklch(76% 0.20 95 / 0.45);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  padding: 0.8rem 1.4rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-sm);
  border: 0;
  border-radius: var(--radius-pill);
  color: var(--btn-ink);
  background: var(--btn-face);
  cursor: pointer;
  position: relative;
  isolation: isolate;
  box-shadow: 0 4px 0 0 var(--btn-edge), 0 6px 12px -3px var(--btn-cast);
  transform: translateY(0);
  transition: transform 140ms cubic-bezier(0.2,0.7,0.3,1), box-shadow 140ms cubic-bezier(0.2,0.7,0.3,1), background-color 160ms;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 0 0 var(--btn-edge), 0 12px 22px -4px var(--btn-cast);
}

.btn:active {
  transform: translateY(3px);
  box-shadow: 0 1px 0 0 var(--btn-edge), 0 2px 6px -2px var(--btn-cast);
  transition-duration: 70ms;
}

.btn:focus-visible {
  outline: 3px solid color-mix(in oklch, var(--btn-edge) 70%, var(--color-focus));
  outline-offset: 3px;
}

.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
  transform: none;
  box-shadow: 0 4px 0 0 var(--btn-edge);
}

/* Button modifiers */
.btn--cyan {
  --btn-face: var(--color-accent-2);
  --btn-edge: var(--color-accent-2-deep);
  --btn-cast: oklch(66% 0.18 235 / 0.35);
  color: var(--color-paper);
}

.btn--coral {
  --btn-face: var(--color-accent-3);
  --btn-edge: var(--color-accent-3-deep);
  --btn-cast: oklch(68% 0.24 18 / 0.35);
  color: var(--color-paper);
}

.btn--soft {
  background: var(--color-paper-2);
  --btn-edge: var(--color-rule);
  --btn-cast: transparent;
  border: 1px solid var(--color-rule);
  box-shadow: 0 2px 4px oklch(20% 0.012 250 / 0.05);
}

.btn--soft:hover {
  background: var(--color-paper-3);
  box-shadow: 0 4px 8px oklch(20% 0.012 250 / 0.08);
}

.btn--soft:active {
  box-shadow: 0 1px 2px oklch(20% 0.012 250 / 0.03);
}

/* ————— Nav N12: Announcement Banner + Retracting ————— */
.header-nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: var(--z-sticky);
  transform: translateY(0);
  transition: transform var(--dur-med) var(--ease-out);
}

.header-nav.is-compact {
  transform: translateY(calc(var(--banner-h) * -1));
}

.header-nav.is-dismissed .nav__banner {
  display: none;
}

.nav__banner {
  height: var(--banner-h);
  background: linear-gradient(100deg, var(--color-accent-3), var(--color-accent-3-deep));
  color: var(--color-paper);
  display: flex;
  align-items: center;
  justify-content: center;
  padding-inline: var(--gutter);
  font-size: var(--text-sm);
  position: relative;
}

.nav__banner-text {
  color: var(--color-paper);
  font-weight: 500;
  text-align: center;
  max-width: none;
}

.nav__banner-text a {
  color: var(--color-accent);
  text-decoration: underline;
  font-weight: 700;
}

.nav__banner-x {
  position: absolute;
  right: var(--gutter);
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3xs);
}

.nav__banner-x svg {
  stroke: var(--color-paper);
  width: 18px;
  height: 18px;
}

.nav__bar {
  background: oklch(97% 0.012 95 / 0.85);
  backdrop-filter: blur(12px) saturate(190%);
  border-bottom: var(--rule-hair) solid var(--color-rule);
  height: var(--bar-h);
  display: flex;
  align-items: center;
}

.nav__bar-inner {
  max-width: var(--shell);
  width: 100%;
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav__brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-lg);
  color: var(--color-ink);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

/* Mascot brand mark */
.nav__brand-mascot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: var(--color-accent);
  border: 2px solid var(--color-ink);
  position: relative;
  animation: mascot-rest 4s infinite var(--ease-in-out);
}

@keyframes mascot-rest {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08) rotate(5deg); }
}

.nav__links {
  display: flex;
  gap: var(--space-lg);
}

.nav__link {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--color-ink-2);
  white-space: nowrap;
}

.nav__link:hover {
  color: var(--color-ink);
}

/* ————— Hero: H2 Split Diptych + H9 Mascot Centerpiece ————— */
.hero {
  padding-top: calc(var(--banner-h) + var(--bar-h) + 4rem);
  min-height: auto;
}

.hero-split {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: var(--space-2xl);
  align-items: center;
}

.hero__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-lg);
}

.hero__title {
  font-size: var(--text-display);
  line-height: 1.05;
}

.hero__subtitle {
  font-size: var(--text-md);
  line-height: 1.4;
}

.hero__ctas {
  display: flex;
  gap: var(--space-md);
}

.hero__centerpiece {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* Hum mascot character moment */
.mascot-frame {
  width: 100%;
  aspect-ratio: 1;
  max-width: 320px;
  background-color: var(--color-accent);
  border: var(--rule-hair) solid var(--color-ink);
  border-radius: var(--radius-card);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 16px 32px -12px var(--shadow-card-cast);
  transition: transform var(--dur-med) var(--ease-spring), box-shadow var(--dur-med);
}

.mascot-frame:hover {
  transform: translateY(-6px) rotate(2deg);
  box-shadow: 0 24px 40px -16px var(--shadow-card-cast);
}

.mascot-body {
  width: 120px;
  height: 120px;
  background-color: var(--color-paper);
  border: 3px solid var(--color-ink);
  border-radius: 40px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform var(--dur-short) var(--ease-spring);
}

.mascot-body:hover {
  transform: scale(1.05);
}

/* Interactive eyes */
.mascot-eyes {
  display: flex;
  gap: var(--space-md);
}

.mascot-eye {
  width: 18px;
  height: 18px;
  background-color: var(--color-ink);
  border-radius: 50%;
  position: relative;
  overflow: hidden;
}

.mascot-eye::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 5px;
  height: 5px;
  background-color: var(--color-paper);
  border-radius: 50%;
}

.mascot-mouth {
  width: 32px;
  height: 16px;
  border-bottom: 3px solid var(--color-ink);
  border-radius: 0 0 16px 16px;
  position: absolute;
  bottom: 25px;
  transition: height 120ms;
}

.mascot-body:hover .mascot-mouth {
  height: 24px;
}

.mascot-ear {
  width: 30px;
  height: 30px;
  background-color: var(--color-paper);
  border: 3px solid var(--color-ink);
  border-radius: 50%;
  position: absolute;
  top: -10px;
}

.mascot-ear--left { left: 15px; }
.mascot-ear--right { right: 15px; }

/* Pulse-line at rest */
.mascot-indicator {
  position: absolute;
  bottom: -3.5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  opacity: 0.85;
}

.mascot-indicator-dot {
  width: 8px;
  height: 8px;
  background-color: var(--color-accent-3);
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 0.4; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.2); }
}

.mascot-indicator-text {
  font-family: var(--font-label);
  font-size: var(--text-xs);
  color: var(--color-ink-2);
}

/* ————— Steps: F4 Step Sequence ————— */
.steps-container {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.steps-header {
  max-width: 32rem;
}

.steps-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-xl);
  position: relative;
}

.steps-list::after {
  content: '';
  position: absolute;
  top: 1.5rem;
  left: var(--gutter);
  right: var(--gutter);
  height: 2px;
  background: var(--color-rule);
  z-index: 1;
}

.step-item {
  position: relative;
  z-index: 2;
  background: var(--color-paper);
  padding: var(--space-lg);
  border-radius: var(--radius-card);
  border: var(--rule-hair) solid var(--color-rule);
  box-shadow: 0 4px 12px -8px var(--shadow-card-cast);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  transition: transform var(--dur-short) var(--ease-spring), box-shadow var(--dur-short);
}

.step-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px -12px var(--shadow-card-cast);
}

.step-stage {
  font-family: var(--font-label);
  font-size: var(--text-xs);
  color: var(--color-paper);
  background-color: var(--color-ink);
  padding: var(--space-3xs) var(--space-xs);
  border-radius: var(--radius-pill);
  align-self: flex-start;
}

.step-item:nth-child(2) .step-stage { background-color: var(--color-accent-2-deep); }
.step-item:nth-child(3) .step-stage { background-color: var(--color-accent-3-deep); }

.step-item h3 {
  font-size: var(--text-lg);
}

/* ————— Poli: Color-Shift Card Grid ————— */
.poli-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
}

.poli-card {
  border-radius: var(--radius-card);
  border: var(--rule-hair) solid var(--color-rule);
  padding: var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  transition: transform 220ms var(--ease-spring), box-shadow 220ms, background-color 220ms;
}

/* Opacity tint rules per card */
.poli-card--pear {
  background-color: oklch(from var(--color-accent) l c h / 0.06);
}
.poli-card--pear:hover {
  background-color: oklch(from var(--color-accent) l c h / 0.12);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px -16px oklch(90% 0.18 95 / 0.6);
}

.poli-card--cyan {
  background-color: oklch(from var(--color-accent-2) l c h / 0.06);
}
.poli-card--cyan:hover {
  background-color: oklch(from var(--color-accent-2) l c h / 0.12);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px -16px oklch(66% 0.18 235 / 0.25);
}

.poli-card--coral {
  background-color: oklch(from var(--color-accent-3) l c h / 0.06);
}
.poli-card--coral:hover {
  background-color: oklch(from var(--color-accent-3) l c h / 0.12);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px -16px oklch(68% 0.24 18 / 0.25);
}

.poli-card h3 {
  font-size: var(--text-lg);
}

.poli-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-input);
  background-color: var(--color-paper);
  border: var(--rule-hair) solid var(--color-ink);
  display: flex;
  align-items: center;
  justify-content: center;
}

.poli-icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--color-ink);
}

/* ————— Dokter: Split Studio Layout + F3 Spec Sheet ————— */
.doc-section {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: var(--space-2xl);
  align-items: flex-start;
}

.doc-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.doc-info h2 {
  font-size: var(--text-2xl);
}

/* F3 Tabular spec sheet for schedules */
.spec-sheet-container {
  overflow-x: auto;
  border-radius: var(--radius-card);
  border: var(--rule-hair) solid var(--color-rule);
  background: var(--color-paper);
}

.spec-sheet {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.spec-sheet th, .spec-sheet td {
  padding: var(--space-md) var(--space-lg);
  border-bottom: var(--rule-hair) solid var(--color-rule);
  font-size: var(--text-sm);
}

.spec-sheet tr:last-child th,
.spec-sheet tr:last-child td {
  border-bottom: none;
}

.spec-sheet th {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--color-ink);
}

.spec-sheet td.day-badge span {
  display: inline-block;
  padding: var(--space-3xs) var(--space-xs);
  background-color: var(--color-paper-2);
  border-radius: var(--radius-pill);
  font-weight: 500;
}

/* ————— Testimoni: T3 Single Huge Quote ————— */
.testi-section {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xl);
  max-width: 50rem;
  margin-inline: auto;
}

.testi-quote {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--color-ink);
}

.testi-attribution {
  font-family: var(--font-label);
  font-size: var(--text-xs);
  text-transform: uppercase;
  color: var(--color-ink-2);
  letter-spacing: 0.1em;
}

/* ————— Stats: T4 Numbered Stat Strip ————— */
.stats-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-xl);
  text-align: center;
  border-top: var(--rule-hair) solid var(--color-rule);
  border-bottom: var(--rule-hair) solid var(--color-rule);
  padding-block: var(--space-xl);
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.stat-number {
  font-family: var(--font-display);
  font-size: var(--text-stat);
  font-weight: 700;
  color: var(--color-accent-3-deep);
  line-height: 1;
}

.stat-label {
  font-family: var(--font-label);
  font-size: var(--text-xs);
  color: var(--color-ink-2);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ————— Booking: C2 Inline Form as CTA ————— */
.booking-card {
  background-color: var(--color-paper-2);
  border-radius: var(--radius-card);
  padding: var(--space-2xl) var(--space-xl);
  border: var(--rule-hair) solid var(--color-rule);
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: var(--space-xl);
  align-items: center;
  position: relative;
  overflow: hidden;
}

.booking-text h2 {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-xs);
}

/* Form structure */
.booking-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.booking-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.booking-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
}

.booking-field label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-xs);
  color: var(--color-ink);
}

.booking-field input, .booking-field select {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  padding: var(--space-sm);
  border-radius: var(--radius-input);
  border: var(--rule-hair) solid var(--color-rule);
  background-color: var(--color-paper);
  color: var(--color-ink);
  outline: none;
  transition: border-color var(--dur-micro) var(--ease-out);
}

.booking-field input:focus, .booking-field select:focus {
  border-color: var(--color-focus);
}

/* ————— FAQ: Conversational ————— */
.faq-section {
  max-width: 42rem;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.faq-header {
  text-align: center;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.faq-item {
  border-radius: var(--radius-card);
  border: var(--rule-hair) solid var(--color-rule);
  background-color: var(--color-paper);
  transition: transform var(--dur-short) var(--ease-spring);
}

.faq-item:hover {
  transform: translateY(-2px);
}

.faq-trigger {
  width: 100%;
  background: transparent;
  border: none;
  padding: var(--space-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  text-align: left;
}

.faq-trigger h3 {
  font-size: var(--text-base);
  font-weight: 600;
}

.faq-icon {
  width: 20px;
  height: 20px;
  stroke: var(--color-ink);
  transition: transform var(--dur-short) var(--ease-out);
}

.faq-item.is-open .faq-icon {
  transform: rotate(180deg);
}

.faq-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--dur-med) var(--ease-in-out);
  overflow: hidden;
}

.faq-item.is-open .faq-panel {
  grid-template-rows: 1fr;
}

.faq-content {
  min-height: 0;
}

.faq-content p {
  padding: 0 var(--space-lg) var(--space-lg);
  font-size: var(--text-sm);
  line-height: 1.5;
}

/* ————— Footer: Ft5 Statement ————— */
.foot-stmt {
  padding: var(--space-3xl) var(--gutter) var(--space-xl);
  display: grid;
  gap: var(--space-lg);
}

.foot-stmt__line {
  font-family: var(--font-display);
  font-size: var(--text-display);
  line-height: 1.05;
  letter-spacing: -0.02em;
  max-width: 24ch;
  margin: 0;
  color: var(--color-ink);
}

.foot-stmt__meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-block-start: var(--space-lg);
  border-top: var(--rule-hair) solid var(--color-rule);
}

.foot-stmt__wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-md);
  color: var(--color-ink);
}

.foot-stmt__credits {
  font-family: var(--font-label);
  font-size: var(--text-xs);
  color: var(--color-ink-2);
  opacity: 0.75;
}

/* ————— Mobile Responsiveness overrides ————— */
@media (max-width: 60rem) {
  :root {
    --banner-h: 52px;
    --bar-h: 56px;
    --section-gap: 4rem;
  }

  .hero-split {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
    text-align: center;
  }

  .hero__content {
    align-items: center;
  }

  .mascot-frame {
    max-width: 240px;
    margin-inline: auto;
  }

  .steps-list::after {
    display: none;
  }

  .doc-section {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .booking-card {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
    padding: var(--space-xl) var(--space-md);
  }

  .foot-stmt__meta {
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
    text-align: center;
  }
}

@media (max-width: 40rem) {
  .nav__links {
    display: none;
  }

  .hero__ctas {
    flex-direction: column;
    width: 100%;
  }

  .btn {
    width: 100%;
  }

  .booking-form-row {
    grid-template-columns: 1fr;
  }

  .steps-list {
    grid-template-columns: 1fr;
  }
}

/* ————— Star-burst animations ————— */
.star-burst {
  position: absolute;
  width: 24px;
  height: 24px;
  background:
    linear-gradient(90deg, transparent 47%, var(--color-accent-3) 47% 53%, transparent 53%),
    linear-gradient(0deg,  transparent 47%, var(--color-accent-3) 47% 53%, transparent 53%);
  animation: star-burst 420ms ease-out forwards;
  pointer-events: none;
}

@keyframes star-burst {
  0%   { transform: scale(0) rotate(0deg);   opacity: 1; }
  60%  { transform: scale(1.2) rotate(35deg); opacity: 0.9; }
  100% { transform: scale(1.4) rotate(45deg); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 150ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 150ms !important;
  }
  .mascot-brand-mascot, .mascot-frame, .mascot-body {
    animation: none !important;
    transform: none !important;
  }
  .star-burst {
    display: none !important;
  }
}
