/* Mom Academy — warm editorial */

:root {
  --bg: #f6f1e8;
  --bg-2: #efe7d6;
  --paper: #fbf7ee;
  --ink: #1f1a14;
  --ink-2: #4a4138;
  --ink-3: #8a8276;
  --line: #e2d8c4;
  --line-strong: #c8bca0;
  --coral: #d4665a;
  --coral-deep: #b04b40;
  --sage: #7d8c6a;
  --sage-deep: #5a6a4a;
  --rose: #f0d4cc;
  --butter: #f4e4b8;

  --serif: 'Newsreader', 'Georgia', serif;
  --sans: 'Geist', 'Inter', system-ui, sans-serif;
  --mono: 'Geist Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "cv11";
}

a { color: inherit; }

/* ───────── Top bar ───────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 32px;
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar .brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.topbar .brand .seal {
  width: 28px; height: 28px;
  border-radius: 999px;
  background: var(--coral);
  color: var(--paper);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: 16px;
  align-self: center;
  box-shadow: 0 1px 0 rgba(0,0,0,0.08);
}
.topbar .brand .wordmark {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.topbar .brand .wordmark em {
  font-style: italic;
  color: var(--coral);
}
.topbar nav {
  display: flex;
  gap: 4px;
  align-items: center;
}
.topbar nav button {
  appearance: none;
  background: none;
  border: none;
  color: var(--ink-2);
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 8px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: all .18s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}
.topbar nav button:hover { color: var(--ink); background: rgba(0,0,0,0.04); }
.topbar nav button.active {
  background: var(--ink);
  color: var(--paper);
}
.topbar nav button .num {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  opacity: 0.55;
  font-size: 13px;
}
.topbar nav button.active .num { opacity: 0.7; }

.topbar .signed {
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  color: var(--ink-3);
}

/* ───────── Page shell ───────── */
.page {
  max-width: 1320px;
  margin: 0 auto;
  padding: 56px 56px 120px;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--ink-3);
  display: inline-block;
}

h1.page-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(48px, 6vw, 84px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 16px 0 0;
  text-wrap: pretty;
}
h1.page-title em {
  font-style: italic;
  color: var(--coral);
}

.lede {
  font-family: var(--serif);
  font-size: 22px;
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 56ch;
  margin: 24px 0 0;
  text-wrap: pretty;
}

/* ───────── Welcome ───────── */
.welcome {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 64px;
  align-items: center;
  min-height: 70vh;
  position: relative;
}
.welcome::before {
  content: "EST. MAY 10 · 2026";
  position: absolute;
  top: -12px; right: 0;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  color: var(--ink-3);
}
.welcome .left h1 { margin-top: 12px; }
.welcome .left .lede { margin-top: 28px; }

.welcome .meta {
  display: flex;
  gap: 36px;
  margin-top: 44px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}
.welcome .meta .cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.welcome .meta .cell .k {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.welcome .meta .cell .v {
  font-family: var(--serif);
  font-size: 17px;
  font-style: italic;
  color: var(--ink);
}

.start-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--ink);
  color: var(--paper);
  border: none;
  border-radius: 999px;
  padding: 14px 22px 14px 24px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  margin-top: 36px;
  transition: transform .18s ease, background .18s ease;
}
.start-btn:hover { background: var(--coral); transform: translateY(-1px); }
.start-btn .arrow {
  width: 22px; height: 22px;
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-style: italic;
  transition: background .18s ease, color .18s ease;
}
.start-btn:hover .arrow { background: var(--ink); color: var(--paper); }

/* card on the right */
.card-letter {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 36px 38px 32px;
  position: relative;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.6) inset,
    0 22px 50px -28px rgba(40,28,16,0.25),
    0 4px 14px -8px rgba(40,28,16,0.12);
  transform: rotate(0.6deg);
}
.card-letter::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px dashed var(--line-strong);
  border-radius: 12px;
  pointer-events: none;
  opacity: 0.7;
}
.card-letter .stamp {
  position: absolute;
  top: -18px; right: 28px;
  width: 56px; height: 70px;
  background: var(--rose);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  transform: rotate(6deg);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  font-family: var(--serif);
  color: var(--coral-deep);
  box-shadow: 0 6px 18px -8px rgba(40,28,16,0.3);
}
.card-letter .stamp .num {
  font-size: 22px; font-style: italic; line-height: 1;
}
.card-letter .stamp .lab {
  font-family: var(--mono); font-size: 7.5px; letter-spacing: 0.18em;
  text-transform: uppercase; margin-top: 2px;
}
.card-letter .greeting {
  font-family: var(--serif); font-style: italic;
  font-size: 28px; color: var(--coral);
  margin: 0 0 14px;
}
.card-letter p {
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.55;
  margin: 0 0 14px;
  color: var(--ink-2);
  text-wrap: pretty;
}
.card-letter .signoff {
  font-family: var(--serif); font-style: italic;
  font-size: 22px; color: var(--ink);
  margin-top: 20px;
}
.card-letter .photoslot {
  margin-top: 22px;
  height: 160px;
  border: 1px dashed var(--line-strong);
  border-radius: 10px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px;
  background:
    repeating-linear-gradient(135deg,
      transparent 0, transparent 14px,
      rgba(180,160,120,0.07) 14px, rgba(180,160,120,0.07) 28px);
  color: var(--ink-3);
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase;
}
.card-letter .photoslot .em {
  font-family: var(--serif); font-style: italic; font-size: 13px;
  text-transform: none; letter-spacing: 0;
}

/* ───────── Curriculum (chapter list on home) ───────── */
.curriculum {
  margin-top: 96px;
  padding-top: 36px;
  border-top: 1px solid var(--line);
}
.curriculum h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 36px;
  letter-spacing: -0.01em;
  margin: 8px 0 28px;
}
.chapter-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.chapter {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px 22px 24px;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
  transition: all .2s ease;
  display: flex; flex-direction: column;
  min-height: 220px;
}
.chapter:hover {
  transform: translateY(-2px);
  border-color: var(--coral);
  box-shadow: 0 16px 40px -22px rgba(40,28,16,0.25);
}
.chapter .num {
  font-family: var(--serif); font-style: italic;
  font-size: 38px; color: var(--coral);
  line-height: 1;
}
.chapter .name {
  font-family: var(--serif);
  font-size: 22px;
  margin-top: 14px;
  letter-spacing: -0.01em;
  line-height: 1.15;
}
.chapter .desc {
  font-size: 13px;
  color: var(--ink-3);
  line-height: 1.5;
  margin-top: 8px;
  flex: 1;
}
.chapter .duration {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: 16px;
}

/* ───────── Lesson layout (tutorial + mock side by side) ───────── */
.page.lesson-page { max-width: 1480px; padding: 40px 40px 100px; }
.lesson {
  display: grid;
  grid-template-columns: 1fr 600px;
  gap: 56px;
  align-items: start;
}
.mock-scaler {
  transform-origin: top left;
  display: block;
}
.mock {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-height: 600px;
  position: relative;
  overflow: visible;
}
.lesson-head {
  margin-bottom: 36px;
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 36px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 28px;
}
.lesson-head .left .num {
  font-family: var(--serif); font-style: italic;
  color: var(--coral); font-size: 22px;
}
.lesson-head h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 4.4vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 6px 0 0;
}
.lesson-head h1 em { font-style: italic; color: var(--coral); }
.lesson-head .sub {
  font-family: var(--serif);
  font-size: 18px;
  color: var(--ink-2);
  margin-top: 14px;
  max-width: 60ch;
  line-height: 1.5;
}
.lesson-head .right {
  text-align: right;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
  padding-top: 8px;
}
.lesson-head .right .v {
  display: block;
  margin-top: 6px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 17px;
  color: var(--ink);
  text-transform: none;
  letter-spacing: 0;
}

/* Steps panel */
.steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: sticky;
  top: 88px;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  padding-right: 4px;
}
.steps::-webkit-scrollbar { width: 6px; }
.steps::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 999px; }
.step {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 20px;
  cursor: pointer;
  transition: all .2s ease;
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 14px;
  align-items: start;
  text-align: left;
  font-family: inherit;
  color: inherit;
}
.step:hover { border-color: var(--line-strong); }
.step.active {
  border-color: var(--coral);
  background: #fff;
  box-shadow: 0 14px 36px -22px rgba(40,28,16,0.25);
}
.step.done {
  background: transparent;
  border-color: var(--line);
}
.step .marker {
  width: 28px; height: 28px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-style: italic; font-size: 14px;
  color: var(--ink-3);
}
.step.active .marker {
  background: var(--coral); border-color: var(--coral); color: var(--paper);
}
.step.done .marker {
  background: var(--ink); border-color: var(--ink); color: var(--paper);
}
.step .body .title {
  font-family: var(--serif);
  font-size: 18px;
  letter-spacing: -0.005em;
}
.step .body .desc {
  font-size: 13px;
  color: var(--ink-3);
  line-height: 1.55;
  margin-top: 4px;
}
.step .body .desc kbd {
  font-family: var(--mono);
  font-size: 11.5px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 6px;
  color: var(--ink);
}
.step.active .body .desc { color: var(--ink-2); }

.step-nav {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}
.step-nav button {
  flex: 1;
  appearance: none;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  transition: all .18s ease;
}
.step-nav button:hover { border-color: var(--line-strong); }
.step-nav button.primary {
  background: var(--ink); color: var(--paper); border-color: var(--ink);
}
.step-nav button.primary:hover { background: var(--coral); border-color: var(--coral); }
.step-nav button:disabled { opacity: 0.4; cursor: not-allowed; }

/* Mock area (right side) */
.mock-frame-shadow {
  position: relative;
}

/* Tooltip / call-out for tutorial */
.tutorial-tip {
  position: absolute;
  background: var(--ink);
  color: var(--paper);
  border-radius: 12px;
  padding: 14px 16px;
  max-width: 240px;
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.45;
  z-index: 80;
  box-shadow: 0 18px 40px -18px rgba(0,0,0,0.5);
  animation: tipIn .35s cubic-bezier(.2,.8,.2,1);
}
.tutorial-tip .tt-num {
  font-family: var(--serif); font-style: italic;
  color: var(--coral);
  font-size: 12px;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}
.tutorial-tip::after {
  content: "";
  position: absolute;
  width: 14px; height: 14px;
  background: var(--ink);
  transform: rotate(45deg);
}
.tutorial-tip[data-arrow="left"]::after { left: -5px; top: 22px; }
.tutorial-tip[data-arrow="right"]::after { right: -5px; top: 22px; }
.tutorial-tip[data-arrow="top"]::after { top: -5px; left: 22px; }
.tutorial-tip[data-arrow="bottom"]::after { bottom: -5px; left: 22px; }

@keyframes tipIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.spotlight {
  position: absolute;
  border: 2px solid var(--coral);
  border-radius: 14px;
  pointer-events: none;
  z-index: 70;
  animation: pulse 1.6s ease-in-out infinite;
  box-shadow: 0 0 0 6px rgba(212,102,90,0.18), 0 0 0 12px rgba(212,102,90,0.08);
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 6px rgba(212,102,90,0.18), 0 0 0 12px rgba(212,102,90,0.08); }
  50% { box-shadow: 0 0 0 8px rgba(212,102,90,0.28), 0 0 0 18px rgba(212,102,90,0.05); }
}

/* ─────── Generic helpers ─────── */
.btn-pill {
  appearance: none; border: 1px solid var(--line);
  background: var(--paper); border-radius: 999px;
  padding: 8px 14px; font-family: var(--sans);
  font-size: 13px; cursor: pointer; color: var(--ink);
}
.btn-pill:hover { border-color: var(--line-strong); }

/* ─────── Photo placeholder (used inside mocks) ─────── */
.placeholder-img {
  background:
    repeating-linear-gradient(135deg,
      rgba(0,0,0,0.04) 0, rgba(0,0,0,0.04) 8px,
      rgba(0,0,0,0.07) 8px, rgba(0,0,0,0.07) 16px);
  display: flex; align-items: center; justify-content: center;
  color: rgba(0,0,0,0.5);
  font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.12em; text-transform: uppercase;
  text-align: center;
}

/* fade in routes */
.page-fade {
  animation: fadeUp .45s cubic-bezier(.2,.8,.2,1);
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* badge */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--mono); font-size: 10.5px;
  letter-spacing: 0.16em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px;
  background: var(--rose); color: var(--coral-deep);
  border: 1px solid color-mix(in oklab, var(--coral) 25%, transparent);
}

@media (max-width: 760px) {
  .lesson { grid-template-columns: 1fr; }
  .steps { position: static; }
}
@media (max-width: 1100px) {
  .welcome { grid-template-columns: 1fr; }
  .chapter-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .page { padding: 32px 20px 80px; }
  .chapter-grid { grid-template-columns: 1fr; }
  .topbar { padding: 14px 16px; flex-wrap: wrap; gap: 8px; }
  .topbar .signed { display: none; }
  .topbar nav { order: 3; width: 100%; overflow-x: auto; }
}
.mock { overflow: visible; }

/* ───────── Mobile splash ───────── */
#mobile-splash { display: none; }

@media (max-width: 900px) {
  html, body { overflow: hidden; }
  #app { display: none; }
  #mobile-splash {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    height: 100dvh;
    padding: 24px 16px;
    background:
      radial-gradient(ellipse at top, color-mix(in oklab, var(--coral) 14%, transparent), transparent 60%),
      var(--bg);
  }
  .ms-card {
    width: 100%;
    max-width: 420px;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 32px 24px 28px;
    box-shadow: 0 1px 0 rgba(0,0,0,0.04), 0 24px 48px -24px rgba(31,26,20,0.18);
    text-align: left;
  }
  .ms-seal {
    width: 44px; height: 44px;
    border-radius: 999px;
    background: var(--coral);
    color: var(--paper);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--serif); font-style: italic; font-weight: 500;
    font-size: 26px;
    margin-bottom: 20px;
  }
  .ms-eyebrow {
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-3);
    margin-bottom: 12px;
  }
  .ms-title {
    font-family: var(--serif);
    font-weight: 500;
    font-size: clamp(20px, 6.4vw, 32px);
    line-height: 1.05;
    letter-spacing: -0.015em;
    white-space: nowrap;
    margin: 0 0 14px;
    color: var(--ink);
  }
  .ms-title em {
    font-style: italic;
    color: var(--coral);
  }
  .ms-title .ms-dot {
    color: var(--coral);
  }
  .ms-lede {
    font-size: 15px;
    line-height: 1.55;
    color: var(--ink-2);
    margin: 0 0 24px;
  }
  .ms-lede em {
    font-style: italic;
    color: var(--ink);
  }
  .ms-meta {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 14px 0;
    margin-bottom: 22px;
  }
  .ms-meta > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0 6px;
  }
  .ms-meta > div + div { border-left: 1px solid var(--line); }
  .ms-meta span:first-child {
    font-family: var(--mono);
    font-size: 9.5px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-3);
  }
  .ms-meta span:last-child {
    font-family: var(--serif);
    font-size: 16px;
    color: var(--ink);
  }
  .ms-sign {
    font-family: var(--serif);
    font-style: italic;
    font-size: 15px;
    color: var(--ink-2);
  }
}
