/* =========================================================
   Fatherhood LMS — styles
   Mobile-first. Shares the landing-page design language:
   Cormorant Garamond / Source Serif 4 / JetBrains Mono,
   copper · sand · ink · paper.
   ========================================================= */

:root {
  --ink: #1a1410;
  --ink-soft: #2a2218;
  --copper: #b8612e;
  --copper-deep: #8f4520;
  --sand: #d4a574;
  --cream: #f5ede0;
  --paper: #faf6ee;
  --muted: #6b5b4a;
  --rule: #d9cdb8;
  --rule-soft: #e8dfcb;
  --green: #5b7a4b;
  --green-deep: #3f5836;

  --serif-display: "Cormorant Garamond", Georgia, serif;
  --serif-body: "Source Serif 4", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;

  --maxw: 1280px;
  --pad: clamp(20px, 5vw, 64px);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--serif-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--copper-deep); }

.skip-link {
  position: absolute; left: 0; top: -44px;
  background: var(--ink); color: var(--cream);
  padding: 10px 16px; font-family: var(--mono);
  font-size: 0.75rem; letter-spacing: 0.16em; text-transform: uppercase;
  text-decoration: none; z-index: 999; transition: top 0.15s ease;
}
.skip-link:focus { top: 0; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-inline: var(--pad); }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.78rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--copper); font-weight: 500; margin: 0;
}
em.copper { color: var(--copper); font-style: italic; }

/* ---------------------------------------------------------
   TOP BAR
   --------------------------------------------------------- */
.lms-top {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 246, 238, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.lms-top-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; height: 68px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand-mark {
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--copper); flex: none;
}
.brand-text { font-family: var(--serif-display); font-size: 1.35rem; font-weight: 500; line-height: 1; }
.brand-text em { font-style: italic; color: var(--copper); }
.brand-sub {
  font-family: var(--mono); font-size: 0.62rem; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--muted); display: block; margin-top: 3px;
}

.top-right { display: flex; align-items: center; gap: 14px; }

.lang-toggle { display: inline-flex; border: 1px solid var(--ink); border-radius: 999px; overflow: hidden; }
.lang-toggle button {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em;
  border: 0; background: transparent; color: var(--ink);
  padding: 7px 12px; cursor: pointer;
}
.lang-toggle button.active { background: var(--ink); color: var(--cream); }

.linkbtn {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted); background: none;
  border: 0; cursor: pointer; text-decoration: none;
}
.linkbtn:hover { color: var(--copper); }

/* ---------------------------------------------------------
   BUTTONS
   --------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.08em;
  text-transform: uppercase; text-decoration: none; cursor: pointer;
  border: 1px solid transparent; border-radius: 999px;
  padding: 14px 26px; transition: transform 0.12s ease, background 0.2s ease, color 0.2s ease;
}
.btn .arrow { transition: transform 0.18s ease; }
.btn:hover .arrow { transform: translateX(4px); }
.btn-primary { background: var(--copper); color: #fff; }
.btn-primary:hover { background: var(--copper-deep); }
.btn-ink { background: var(--ink); color: var(--cream); }
.btn-ink:hover { background: #000; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--cream); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------------------------------------------------------
   SCREEN SWITCHING
   --------------------------------------------------------- */
.screen { display: none; }
.screen.active { display: block; }

/* ---------------------------------------------------------
   GATE (registration)
   --------------------------------------------------------- */
.gate { min-height: calc(100vh - 68px); display: grid; grid-template-columns: 1fr; }
.gate-grid {
  display: grid; grid-template-columns: 1fr; gap: 0;
  width: 100%; max-width: var(--maxw); margin: 0 auto;
}
.gate-intro { padding: clamp(40px, 7vw, 88px) var(--pad) clamp(20px, 3vw, 40px); }
.gate-intro h1 {
  font-family: var(--serif-display); font-weight: 400;
  font-size: clamp(2.6rem, 7vw, 4.4rem); line-height: 1.0;
  letter-spacing: -0.02em; margin: 18px 0 22px;
}
.gate-intro h1 em { font-style: italic; color: var(--copper); }
.gate-lede {
  font-size: clamp(1.05rem, 2.2vw, 1.3rem); line-height: 1.5;
  color: var(--ink-soft); max-width: 42ch; margin: 0;
}
.gate-form-wrap { padding: clamp(20px, 3vw, 40px) var(--pad) clamp(48px, 7vw, 88px); }
.gate-form {
  background: #fff; border: 1px solid var(--rule);
  border-radius: 4px; padding: clamp(24px, 4vw, 40px);
  max-width: 520px;
}
.field { margin-bottom: 20px; }
.field label {
  display: block; font-family: var(--mono); font-size: 0.72rem;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
  margin-bottom: 8px;
}
.field label .opt { color: var(--rule); text-transform: none; letter-spacing: 0; }
.field input {
  width: 100%; font-family: var(--serif-body); font-size: 1.05rem;
  color: var(--ink); background: var(--paper);
  border: 1px solid var(--rule); border-radius: 3px;
  padding: 13px 14px; transition: border-color 0.15s ease;
}
.field input:focus { outline: none; border-color: var(--copper); }
.field.invalid input { border-color: #b3402e; background: #fdf3f1; }
.field .err {
  display: none; color: #b3402e; font-size: 0.82rem; margin-top: 6px;
  font-family: var(--serif-body);
}
.field.invalid .err { display: block; }
.gate-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.gate-submit { margin-top: 8px; width: 100%; justify-content: center; }
.gate-privacy {
  font-size: 0.82rem; color: var(--muted); margin: 16px 0 0;
  display: flex; gap: 8px; align-items: flex-start;
}
.gate-privacy .lock { color: var(--copper); flex: none; }

/* ---------------------------------------------------------
   DASHBOARD
   --------------------------------------------------------- */
.dash-head { padding: clamp(36px, 6vw, 72px) 0 clamp(24px, 3vw, 36px); }
.dash-head h1 {
  font-family: var(--serif-display); font-weight: 400;
  font-size: clamp(2.2rem, 5.5vw, 3.6rem); line-height: 1.02;
  letter-spacing: -0.015em; margin: 14px 0 16px; max-width: 18ch;
}
.dash-head h1 em { font-style: italic; color: var(--copper); }
.dash-lede { font-size: 1.08rem; color: var(--ink-soft); max-width: 56ch; margin: 0; }

/* progress bar */
.progress-strip {
  display: flex; align-items: center; gap: 20px;
  margin-top: 32px; flex-wrap: wrap;
}
.progress-meter { flex: 1 1 280px; min-width: 220px; }
.progress-track {
  height: 8px; background: var(--rule-soft); border-radius: 999px; overflow: hidden;
}
.progress-fill {
  height: 100%; width: 0%; background: var(--copper);
  border-radius: 999px; transition: width 0.5s cubic-bezier(0.2,0.7,0.2,1);
}
.progress-label {
  font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.08em;
  color: var(--muted); margin-top: 10px;
}
.progress-label strong { color: var(--ink); font-size: 1rem; }
.continue-btn { flex: none; }

/* session grid */
.session-grid {
  display: grid; grid-template-columns: 1fr; gap: 1px;
  background: var(--rule); border: 1px solid var(--rule);
  margin: clamp(28px, 4vw, 44px) 0 clamp(48px, 8vw, 96px);
}
.scard {
  background: var(--paper); border: 0; text-align: left;
  font-family: inherit; color: inherit; cursor: pointer;
  padding: clamp(20px, 2.4vw, 28px);
  display: grid; grid-template-columns: auto 1fr auto; gap: 18px;
  align-items: center; position: relative;
  transition: background 0.18s ease;
}
.scard:hover { background: #fff; }
.scard:focus-visible { outline: 2px solid var(--copper); outline-offset: -2px; }
.scard[disabled] { cursor: default; opacity: 0.62; }
.scard[disabled]:hover { background: var(--paper); }

.scard-num {
  font-family: var(--serif-display); font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 500; line-height: 1; color: var(--sand);
  width: 2.4ch; text-align: center; flex: none;
}
.scard.is-complete .scard-num { color: var(--copper); }

.scard-main { min-width: 0; }
.scard-kicker {
  font-family: var(--mono); font-size: 0.68rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 6px;
}
.scard-title {
  font-family: var(--serif-display); font-weight: 500;
  font-size: clamp(1.3rem, 2.6vw, 1.75rem); line-height: 1.1;
  letter-spacing: -0.005em; margin: 0;
}
.scard-scripture { font-style: italic; color: var(--muted); font-size: 0.95rem; margin-top: 4px; }

.scard-status { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; flex: none; }
.scard-ring { --p: 0; width: 46px; height: 46px; flex: none; position: relative; }
.scard-ring svg { transform: rotate(-90deg); display: block; }
.scard-ring .bg { stroke: var(--rule-soft); }
.scard-ring .fg { stroke: var(--copper); stroke-linecap: round; transition: stroke-dashoffset 0.5s ease; }
.scard-ring .tick {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 0.62rem; color: var(--muted);
}
.scard.is-complete .scard-ring .check {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: var(--copper);
}
.scard-cta {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--copper); white-space: nowrap;
}
.scard.is-complete .scard-cta { color: var(--green-deep); }
.scard.is-soon .scard-cta { color: var(--muted); }

/* ---------------------------------------------------------
   PLAYER
   --------------------------------------------------------- */
.player-wrap { padding-block: clamp(20px, 3vw, 32px) clamp(48px, 8vw, 96px); }
.player-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 22px;
}
.player-back {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--muted);
  background: none; border: 0; cursor: pointer;
}
.player-back:hover { color: var(--copper); }
.player-state {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.08em;
  color: var(--muted); display: inline-flex; align-items: center; gap: 8px;
}
.player-state .badge-done { color: var(--green-deep); }

.player-headline { margin-bottom: 18px; }
.player-kicker {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--copper); margin-bottom: 8px;
}
.player-title {
  font-family: var(--serif-display); font-weight: 400;
  font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.02;
  letter-spacing: -0.015em; margin: 0;
}
.player-scripture { font-style: italic; color: var(--muted); margin-top: 8px; font-size: 1.05rem; }

.video-frame {
  position: relative; background: #000; border-radius: 5px; overflow: hidden;
  aspect-ratio: 16 / 9;
}
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-soon {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px; text-align: center;
  color: var(--cream); padding: 24px; background: var(--ink);
}
.video-soon h3 { font-family: var(--serif-display); font-size: 2rem; font-weight: 400; margin: 0; }
.video-soon p { color: rgba(245,237,224,0.7); margin: 0; max-width: 36ch; }

.player-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-top: 24px; flex-wrap: wrap;
}
.player-nav { display: flex; gap: 12px; }

/* watched bar under video */
.watch-meter { margin-top: 16px; }
.watch-track { height: 6px; background: var(--rule-soft); border-radius: 999px; overflow: hidden; }
.watch-fill { height: 100%; width: 0%; background: var(--copper); transition: width 0.4s ease; }
.watch-text { font-family: var(--mono); font-size: 0.72rem; color: var(--muted); margin-top: 8px; letter-spacing: 0.06em; }

/* ---------------------------------------------------------
   COMPLETION
   --------------------------------------------------------- */
.done-wrap {
  min-height: calc(100vh - 68px);
  display: flex; align-items: center; justify-content: center;
  background: var(--ink); color: var(--cream); text-align: center;
  padding: clamp(48px, 10vw, 120px) var(--pad);
}
.done-inner { max-width: 720px; }
.done-eyebrow { color: var(--sand); }
.done-wrap h1 {
  font-family: var(--serif-display); font-weight: 400;
  font-size: clamp(2.4rem, 7vw, 4.6rem); line-height: 1.0;
  letter-spacing: -0.02em; margin: 18px 0 24px; color: var(--cream);
}
.done-wrap p { font-size: clamp(1.1rem, 2.4vw, 1.4rem); color: rgba(245,237,224,0.82); margin: 0 auto 36px; max-width: 48ch; }
.done-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.done-seal {
  width: 92px; height: 92px; margin: 0 auto 8px; border-radius: 50%;
  border: 2px solid var(--sand); display: flex; align-items: center; justify-content: center;
  color: var(--sand);
}

/* toast */
.toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: var(--cream);
  font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.08em;
  padding: 12px 20px; border-radius: 999px; opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease; z-index: 200;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* footer */
.lms-foot {
  border-top: 1px solid var(--rule); padding: 28px 0;
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.08em;
  color: var(--muted); text-align: center;
}

/* ---------------------------------------------------------
   RESPONSIVE
   --------------------------------------------------------- */
@media (min-width: 720px) {
  .gate-grid { grid-template-columns: 1.05fr 0.95fr; align-items: center; }
  .gate-intro { padding-block: clamp(56px, 8vw, 96px); }
  .gate-form-wrap { display: flex; justify-content: flex-end; }
}
@media (max-width: 540px) {
  .gate-row { grid-template-columns: 1fr; gap: 0; }
  .scard { grid-template-columns: auto 1fr; }
  .scard-status { grid-column: 2; flex-direction: row; align-items: center; justify-content: space-between; width: 100%; }
  .brand-sub { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
