/* Fonts are hosted on this site (no requests to Google). */
@font-face {
  font-family: "Public Sans";
  src: url("/fonts/public-sans-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("/fonts/newsreader-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800; font-style: normal; font-display: swap;
}

:root {
  --ink: #0f2036;
  --ink-soft: #1b3350;
  --night: #0b1726;
  --night-2: #12263c;
  --tint: #eef2f7;
  --white: #ffffff;
  --text: #1d2b3a;
  --muted: #55657a;
  --line: #d8dfe7;
  --amber: #e3a82b;
  --amber-hover: #f0ba44;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --gutter: clamp(20px, 5vw, 64px);
  --max: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--white);
}
img, iframe, svg { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.12; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
[hidden] { display: none !important; }

.wrap { width: min(100%, var(--max)); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 28px;
  font: 600 1rem/1 var(--sans);
  border: 2px solid transparent; border-radius: 6px;
  text-decoration: none; cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn-primary { background: var(--amber); color: var(--ink); }
.btn-primary:hover { background: var(--amber-hover); }
.btn-outline { background: transparent; color: var(--white); border-color: rgba(255,255,255,.55); }
.btn-outline:hover { border-color: var(--white); background: rgba(255,255,255,.08); }
.btn-dark { background: var(--ink); color: var(--white); }
.btn-dark:hover { background: var(--ink-soft); }
.btn-ghost { background: transparent; color: var(--white); border-color: rgba(255,255,255,.35); }
.btn-ghost:hover:not(:disabled) { border-color: var(--white); background: rgba(255,255,255,.08); }
.btn-ghost:disabled { opacity: .35; cursor: default; }
.btn-sm { min-height: 42px; padding: 0 18px; font-size: .95rem; }
form.inline { display: inline; margin: 0; }
.link-btn { white-space: nowrap; background: none; border: 0; padding: 4px 0; font: inherit; font-size: .95rem; color: rgba(255,255,255,.75); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.link-btn:hover { color: var(--white); }

/* ---------- top bar (navy, same as the hero; the logo sits on a white tab) ---------- */
.bar { background: var(--ink); }
.course-page .bar { background: var(--night); border-bottom: 1px solid rgba(255,255,255,.1); }
.bar-inner { display: flex; align-items: center; justify-content: space-between; padding-block: 14px; gap: 16px; }
.logo { display: block; line-height: 0; background: var(--white); border-radius: 10px; padding: 8px 16px; box-shadow: 0 1px 0 rgba(255,255,255,.12); }
.logo img { height: 60px; width: auto; mix-blend-mode: multiply; }
.bar .login-link { font-size: .95rem; font-weight: 600; color: var(--white); text-underline-offset: 4px; text-decoration-color: rgba(255,255,255,.45); }
.bar .login-link:hover { color: var(--amber); text-decoration-color: var(--amber); }

/* ---------- hero ---------- */
.hero { background: var(--ink); color: var(--white); position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: url("/images/contours.svg") right -8% bottom -30% / min(900px, 90%) no-repeat;
  opacity: .5;
}
.hero-body { position: relative; padding-block: clamp(56px, 10vw, 120px) clamp(64px, 10vw, 116px); }
.hero h1 { font-size: clamp(2.5rem, 6.4vw, 4.75rem); max-width: 15ch; font-weight: 450; }
.hero .lede { margin-top: 28px; max-width: 34em; font-size: clamp(1.1rem, 1.7vw, 1.3rem); line-height: 1.55; color: rgba(255,255,255,.82); }
.hero .actions { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- sections (white, tinted, white, navy) ---------- */
.section { padding-block: clamp(64px, 9vw, 112px); }
.section h2 { font-size: clamp(2rem, 4vw, 3rem); }
.section-head { text-align: center; margin-bottom: clamp(32px, 5vw, 56px); }

.video-frame {
  width: min(100%, 960px); margin-inline: auto;
  aspect-ratio: 16 / 9; background: var(--ink);
  border-radius: 10px; overflow: hidden;
  box-shadow: 0 1px 0 var(--line), 0 24px 48px -28px rgba(15,32,54,.45);
}
.video-frame { position: relative; }
.video-frame iframe { width: 100%; height: 100%; border: 0; }

/* teaser: picture with a play button until the video is started */
.teaser-poster {
  position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; padding: 0; border: 0; cursor: pointer;
  background: linear-gradient(135deg, var(--ink-soft), var(--ink)); display: grid; place-items: center; color: var(--white);
}
.teaser-poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.teaser-poster .play {
  position: relative; width: 84px; height: 84px; border-radius: 50%; background: var(--amber);
  box-shadow: 0 10px 30px rgba(0,0,0,.4); transition: transform .2s ease;
}
.teaser-poster .play::after {
  content: ""; position: absolute; left: 50%; top: 50%; transform: translate(-38%, -50%);
  border-style: solid; border-width: 15px 0 15px 25px; border-color: transparent transparent transparent var(--ink);
}
.teaser-poster:hover .play, .teaser-poster:focus-visible .play { transform: scale(1.07); }
.teaser-poster:focus-visible { outline: 3px solid var(--amber); outline-offset: -6px; }
.teaser-poster .loading-label {
  position: absolute; left: 0; right: 0; bottom: 18px; text-align: center; font-weight: 600; font-size: .95rem;
  text-shadow: 0 1px 6px rgba(0,0,0,.7);
}
.teaser-poster.is-loading .play { animation: teaser-pulse 1.1s ease-in-out infinite; }
@keyframes teaser-pulse { 50% { transform: scale(.9); opacity: .75; } }
@media (prefers-reduced-motion: reduce) { .teaser-poster.is-loading .play { animation: none; } }
@media (max-width: 600px) { .teaser-poster .play { width: 64px; height: 64px; } .teaser-poster .play::after { border-width: 11px 0 11px 19px; } }

.details { background: var(--tint); }
.columns { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(24px, 4vw, 48px); }
.column img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; background: #dfe6ee; }
.column h3 { margin-top: 24px; font-size: 1.5rem; }
.column p { margin-top: 12px; color: var(--muted); }

.instructor-grid { display: grid; grid-template-columns: minmax(240px, 380px) 1fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.instructor-grid img { width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; object-position: center 15%; border-radius: 8px; background: #dfe6ee; }
.instructor-grid h2 { margin-bottom: 20px; }
.instructor-grid p { font-size: 1.15rem; max-width: 34em; }
.instructor-grid p + p { margin-top: 1em; }

.enroll { background: var(--ink); color: var(--white); text-align: center; }
.enroll h2 { max-width: 20ch; margin-inline: auto; }
.enroll .lede { margin: 20px auto 0; max-width: 32em; color: rgba(255,255,255,.82); }
.enroll .price { margin-top: 32px; font-family: var(--serif); font-size: 2.75rem; line-height: 1; }
.enroll .price small { display: block; margin-top: 8px; font: 400 .95rem/1.4 var(--sans); color: rgba(255,255,255,.7); }
.enroll .actions { margin-top: 28px; }
.enroll .terms-line { margin: 20px auto 0; max-width: 36em; font-size: .85rem; line-height: 1.5; color: rgba(255,255,255,.7); }
.enroll .return { margin-top: 20px; font-size: .95rem; color: rgba(255,255,255,.75); }
.enroll a { text-underline-offset: 4px; }

/* ---------- FAQ ---------- */
.faq { background: var(--tint); }
.faq-list { max-width: 780px; margin-inline: auto; border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary {
  list-style: none; cursor: pointer; position: relative;
  padding: 22px 48px 22px 0; font: 500 1.3rem/1.3 var(--serif); color: var(--ink);
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  font: 400 1.75rem/1 var(--sans); color: var(--muted); transition: transform .2s ease;
}
.faq-list details[open] summary::after { content: "\2212"; }
.faq-list summary:hover { color: var(--ink-soft); }
.faq-list details p { padding: 0 48px 24px 0; color: var(--text); max-width: 42em; }
.faq-list details p a { text-underline-offset: 3px; }

/* ---------- footer ---------- */
.site-footer { background: var(--white); padding-block: 48px 56px; text-align: center; }
.disclaimer { max-width: 46em; margin-inline: auto; font-size: .8125rem; line-height: 1.55; color: var(--muted); }
.footer-logo { margin: 32px auto 0; height: 64px; width: auto; }
.footer-meta { margin-top: 18px; font-size: .95rem; color: var(--muted); }
.footer-meta p + p { margin-top: 4px; }
.footer-meta a { text-underline-offset: 3px; }
.footer-links { margin-top: 12px; display: flex; justify-content: center; gap: 10px; }
.copyright { margin-top: 18px; font-size: .85rem; color: var(--muted); }

/* ---------- login + legal pages ---------- */
.simple-page { min-height: 100vh; display: flex; flex-direction: column; background: var(--tint); }
.simple-page main { flex: 1; }
.card { width: min(100%, 520px); margin: clamp(32px, 7vw, 72px) auto; background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: clamp(24px, 5vw, 40px); }
.card h1 { font-size: 2rem; }
.card p { margin-top: 12px; color: var(--muted); }
.card form { margin-top: 24px; display: grid; gap: 12px; }
.card label { font-weight: 600; font-size: .95rem; color: var(--text); }
.card input[type="email"] { width: 100%; min-height: 52px; padding: 0 14px; font: inherit; border: 1px solid #aab6c3; border-radius: 6px; background: var(--white); color: var(--text); }
.card input[type="email"]:focus-visible { outline: 3px solid var(--amber); outline-offset: 1px; border-color: var(--ink); }
.notice { margin-top: 20px; padding: 14px 16px; border-radius: 6px; font-size: .95rem; }
.notice.ok { background: #e8f1ea; color: #1f4a2a; }
.notice.err { background: #f8e7e4; color: #6d2118; }
.notice a { text-underline-offset: 3px; }

.card.policy { width: min(100%, 760px); }
.policy h2 { font-size: 1.35rem; margin-top: 28px; }
.policy p, .policy li { color: var(--text); }
.policy ul { margin: 12px 0 0; padding-left: 1.2em; display: grid; gap: 8px; }
.policy .policy-date { color: var(--muted); margin-top: 6px; }

/* ---------- course viewer (dark "viewing room") ---------- */
.course-page { background: var(--night); color: var(--white); min-height: 100vh; }
.course-head { padding-block: clamp(32px, 6vw, 64px) 0; }
.course-head h1 { font-size: clamp(2rem, 4.5vw, 3.25rem); }
.course-head p { margin-top: 12px; color: rgba(255,255,255,.78); max-width: 42em; }
.course-head .contact a, .course-notes a { text-underline-offset: 3px; }

.overall { margin-top: 28px; max-width: 760px; }
.overall-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.overall-label { font-weight: 600; }
.meter { margin-top: 12px; height: 10px; border-radius: 999px; background: rgba(255,255,255,.14); overflow: hidden; }
.meter-fill { height: 100%; width: 0; background: var(--amber); border-radius: 999px; transition: width .6s ease; }

.stage-wrap { padding-top: clamp(24px, 4vw, 40px); }
.stage {
  display: grid; grid-template-rows: 0fr; opacity: 0; visibility: hidden;
  transition: grid-template-rows .6s cubic-bezier(.22,.7,.2,1), opacity .45s ease, visibility 0s .6s;
}
.stage[data-open="true"] { grid-template-rows: 1fr; opacity: 1; visibility: visible; transition-delay: 0s; }
.stage-inner { min-height: 0; overflow: hidden; width: 100%; }
.stage-bar { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding-bottom: 14px; }
.stage-title { font-size: clamp(1.25rem, 2.6vw, 1.75rem); }
.stage-title:focus { outline: none; }
.stage .video-frame { position: relative; width: 100%; background-color: var(--ink); background-size: cover; background-position: center; box-shadow: 0 24px 60px -24px rgba(0,0,0,.7); }
.stage .video-frame iframe { position: absolute; inset: 0; opacity: 0; transition: opacity .5s ease .15s; }
.stage .video-frame.ready iframe { opacity: 1; }
.stage .video-frame .loading-note {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  padding: 16px; text-align: center; color: var(--white); font-weight: 600; font-size: .95rem;
  background: rgba(11,23,38,.45); text-shadow: 0 1px 6px rgba(0,0,0,.7);
}
.stage .video-frame.ready .loading-note { display: none; }
.loading-note .spin {
  width: 44px; height: 44px; border-radius: 50%; border: 4px solid rgba(255,255,255,.3); border-top-color: var(--amber);
  animation: loading-spin .9s linear infinite;
}
@keyframes loading-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .loading-note .spin { animation: none; } }
.stage-actions { display: flex; justify-content: space-between; gap: 12px; padding-top: 16px; padding-bottom: clamp(24px, 4vw, 40px); }
.stage-actions .attention { box-shadow: 0 0 0 4px rgba(227,168,43,.35); }

.modules, .resources { padding-top: clamp(28px, 5vw, 48px); }
.modules h2, .resources h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin-bottom: 20px; }
.module-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.module-card { display: flex; }
.module-btn {
  display: flex; flex-direction: column; width: 100%; padding: 0; text-align: left; font: inherit; color: inherit; cursor: pointer;
  background: var(--night-2); border: 1px solid rgba(255,255,255,.12); border-radius: 10px; overflow: hidden;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.module-btn:hover { transform: translateY(-3px); border-color: rgba(227,168,43,.7); box-shadow: 0 18px 36px -22px rgba(0,0,0,.8); }
.is-playing .module-btn { border-color: var(--amber); box-shadow: 0 0 0 2px rgba(227,168,43,.35); }
.thumb {
  position: relative; display: block; aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--ink-soft), var(--ink)) center / cover no-repeat;
}
.thumb .num { position: absolute; inset: 0; display: grid; place-items: center; font: 500 clamp(2.5rem, 8vw, 4rem)/1 var(--serif); color: rgba(255,255,255,.28); }
.thumb.has-image .num { display: none; }
.thumb .play { position: absolute; right: 12px; bottom: 12px; width: 40px; height: 40px; border-radius: 50%; background: rgba(15,32,54,.8); border: 1px solid rgba(255,255,255,.5); }
.thumb .play::after { content: ""; position: absolute; inset: 0; margin: auto; width: 14px; height: 16px; background: var(--white); clip-path: polygon(15% 0, 100% 50%, 15% 100%); transform: translateX(1px); }
.module-body { display: block; padding: 14px 16px 16px; flex: 1; }
.module-kicker { display: block; font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--amber); }
.module-title { display: block; margin-top: 4px; font: 500 1.25rem/1.2 var(--serif); }
.module-meta { display: flex; gap: 12px; margin-top: 10px; font-size: .9rem; color: rgba(255,255,255,.72); flex-wrap: wrap; }
.module-meta .state.done { color: #8fd19e; font-weight: 600; }
.mini-meter { display: block; height: 4px; background: rgba(255,255,255,.12); }
.mini-fill { display: block; height: 100%; width: 0; background: var(--amber); transition: width .5s ease; }
.course-status { margin-top: 16px; color: rgba(255,255,255,.78); }

.resource-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; max-width: 520px; }
.resource { display: flex; align-items: center; gap: 14px; padding: 14px 16px; text-decoration: none; background: var(--night-2); border: 1px solid rgba(255,255,255,.12); border-radius: 10px; transition: border-color .2s ease, transform .2s ease; }
.resource:hover { border-color: rgba(227,168,43,.7); transform: translateY(-2px); }
.pdf-badge { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 8px; background: var(--ink); color: var(--amber); font-size: .75rem; font-weight: 700; letter-spacing: .04em; }

.course-notes { padding-block: clamp(36px, 6vw, 64px) clamp(48px, 7vw, 88px); display: grid; gap: 12px; font-size: .95rem; color: rgba(255,255,255,.7); }
.course-notes p { max-width: 46em; }
.personal-link { color: var(--amber); }

@media (prefers-reduced-motion: reduce) {
  .stage, .stage .video-frame iframe, .module-btn, .meter-fill, .mini-fill, .resource { transition: none; }
}

/* ---------- small screens ---------- */
@media (max-width: 860px) {
  .columns { grid-template-columns: 1fr; max-width: 520px; margin-inline: auto; }
  .instructor-grid { grid-template-columns: 1fr; }
  .instructor-grid img { max-width: 380px; }
}
@media (max-width: 600px) {
  .logo { padding: 6px 12px; border-radius: 8px; }
  .logo img { height: 44px; }
  .stage-wrap { padding-inline: 0; }
  .stage-bar, .stage-actions { padding-inline: var(--gutter); }
  .stage .video-frame { border-radius: 0; }
  .stage-actions { flex-direction: column; }
  .stage-actions .btn { width: 100%; }
  .module-grid { grid-template-columns: 1fr; gap: 14px; }
  .module-btn .thumb .play { width: 36px; height: 36px; right: 10px; bottom: 10px; }
  .module-title { font-size: 1.1rem; }
  .overall-top .btn { width: 100%; }
}
@media (max-width: 520px) {
  .hero .actions .btn { width: 100%; }
  .enroll .actions .btn, .enroll .actions form { width: 100%; }
  form.inline .btn { width: 100%; }
}
