/* Light Wave Mechanics — revision C, "One wave".
   One stylesheet for the current homepage. Night carries wonder and the
   decision; one paper section carries the actual course pages. */

@font-face {
  font-family: Caslon;
  src: url("fonts/libre-caslon-display.3eea6d76341a.woff2") format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: Outfit;
  src: url("fonts/outfit-variable.ed629d88c2db.woff2") format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: Cinzel;
  src: url("../assets/fonts/cinzel-variable.ttf") format('truetype');
  font-weight: 400 900;
  font-display: swap;
}

:root {
  --night: #0b1028;
  --night-deep: #070b1d;
  --night-raise: #121936;
  --ivory: #f4eedf;
  --text: #d6d3e6;
  --text-soft: #a6a3c1;
  --gold: #ecc97c;
  --gold-bright: #f7dea4;
  --gold-soft: #cdb57a;
  --rule: #ffffff21;
  --paper: #f2ebdb;
  --ink: #1a1930;
  --ink-soft: #504d66;
  --rule-ink: #1a193024;
  --gutter: clamp(20px, 5vw, 64px);
  --display: Caslon, 'Iowan Old Style', Georgia, serif;
  --sans: Outfit, 'Segoe UI', Arial, sans-serif;
  --label: Cinzel, Georgia, serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--night);
  color: var(--text);
  font: 400 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
cite { font-style: italic; }
:focus-visible { outline: 2px solid var(--gold-bright); outline-offset: 3px; }
[id] { scroll-margin-top: 24px; }

.wrap { width: 100%; max-width: calc(1200px + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }

.skip-link {
  position: fixed; z-index: 100; top: 8px; left: 8px;
  padding: 12px 18px; background: var(--ivory); color: var(--ink);
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

h1, h2 { font-family: var(--display); font-weight: 400; color: var(--ivory); letter-spacing: -0.012em; text-wrap: balance; }
h2 { font-size: clamp(32px, 3.7vw, 54px); line-height: 1.06; }
.lead { font-size: clamp(18px, 1.5vw, 21px); line-height: 1.6; color: var(--text); text-wrap: pretty; }
.section { padding-block: clamp(60px, 8.5vw, 120px); }
.section-head { max-width: 780px; margin-bottom: clamp(40px, 5vw, 72px); }
.section-head h2 + .lead { margin-top: clamp(18px, 2vw, 28px); }
.credit { font-size: 13px; line-height: 1.55; color: var(--text-soft); }

/* Actions */
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 54px; padding: 14px 28px;
  background: var(--gold); color: var(--night-deep);
  font: 600 16px/1.2 var(--sans); letter-spacing: 0.005em; text-decoration: none;
  border-radius: 3px; transition: background-color 0.15s ease;
}
.button:hover { background: var(--gold-bright); }
.text-link { color: var(--ivory); font-weight: 500; font-size: 16px; text-underline-offset: 6px; text-decoration-thickness: 1px; }
.text-link:hover { color: var(--gold-bright); }

/* Header */
.site-header { background: var(--night-deep); border-bottom: 1px solid var(--rule); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 76px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ivory); text-decoration: none; font-size: 12px; line-height: 1.3; }
.brand strong { font-weight: 500; font-size: 14px; }
.site-header nav { display: flex; gap: clamp(18px, 2.6vw, 40px); font-size: 14px; }
.site-header nav a { color: var(--text); text-decoration: none; padding-block: 8px; }
.site-header nav a:hover { color: var(--ivory); text-decoration: underline; text-underline-offset: 6px; }
.header-enroll {
  padding: 10px 20px; border: 1px solid var(--gold); border-radius: 3px;
  color: var(--gold-bright); font-weight: 500; font-size: 14px; text-decoration: none;
}
.header-enroll:hover { background: var(--gold); color: var(--night-deep); }

/* Opening */
.hero {
  display: flex; align-items: stretch; overflow: hidden;
  background: radial-gradient(ellipse at 18% 110%, #16346a55, transparent 55%), var(--night);
}
.hero-copy {
  order: 1; flex: 0 0 46%;
  display: flex; flex-direction: column; justify-content: center;
  padding: clamp(56px, 6.5vw, 100px) clamp(24px, 3vw, 48px) clamp(56px, 6.5vw, 100px) max(var(--gutter), calc(50% - 600px));
}
.hero-art { order: 2; flex: 1 1 54%; position: relative; min-height: 520px; }
.hero-art img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 16%);
  mask-image: linear-gradient(to right, transparent 0, #000 16%);
}
.course-name { font: 500 13px/1.5 var(--label); letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); }
.course-name span { display: block; margin-top: 2px; font: 400 13px/1.5 var(--sans); letter-spacing: 0.02em; text-transform: none; color: var(--text-soft); }
.hero h1 { margin-top: clamp(22px, 2.6vw, 36px); font-size: clamp(40px, 5vw, 72px); line-height: 1; }
.hero-deck { margin-top: clamp(22px, 2.4vw, 32px); max-width: 33em; font-size: clamp(17px, 1.35vw, 19.5px); line-height: 1.62; text-wrap: pretty; }
.deck-short { display: none; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 30px; margin-top: clamp(28px, 3vw, 40px); }
.hero-facts { margin-top: 26px; font-size: 14px; line-height: 1.6; color: var(--text-soft); text-wrap: balance; }
.hero-facts span { margin-inline: 4px; }

/* Tim */
.tim { border-top: 1px solid var(--rule); }
.tim-feature { display: grid; grid-template-columns: minmax(0, 1.85fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.clip video { width: 100%; background: #05081a; border-radius: 4px; }
.clip-main video { aspect-ratio: 1280 / 840; }
.clip-second video { aspect-ratio: 16 / 9; }
.clip video::cue { font-family: Outfit, Arial, sans-serif; font-size: clamp(14px, 1.5vw, 20px); color: #fff; background: #080b19e6; }
.clip figcaption { margin-top: 18px; }
.clip h3 { font: 500 21px/1.3 var(--sans); color: var(--ivory); }
.clip-meta { margin-top: 4px; font-size: 13.5px; color: var(--text-soft); }
.clip figcaption > p:not(.clip-meta) { margin-top: 10px; font-size: 16px; max-width: 36em; }
.transcript { margin-top: 14px; font-size: 15px; }
.transcript summary { display: inline-block; cursor: pointer; padding-block: 8px; color: var(--gold-bright); text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.transcript p { margin-top: 10px; max-width: 40em; color: var(--text); line-height: 1.7; }
.tim-aside blockquote p { font: 400 clamp(27px, 2.5vw, 35px)/1.18 var(--display); color: var(--gold-bright); letter-spacing: -0.01em; text-wrap: balance; }
.tim-aside blockquote cite { display: block; margin-top: 16px; font: 400 13.5px/1.4 var(--sans); color: var(--text-soft); }
.tim-aside > p { margin-top: clamp(28px, 3vw, 40px); padding-top: clamp(24px, 3vw, 32px); border-top: 1px solid var(--rule); font-size: 16px; }
.clip-second { margin-top: clamp(28px, 3vw, 40px); padding-top: clamp(28px, 3vw, 36px); border-top: 1px solid var(--rule); }
.clip-second h3 { font-size: 18.5px; }
.clip-second figcaption > p:not(.clip-meta) { font-size: 15px; }

/* Inside the course — the paper section */
.inside { background: var(--paper); color: var(--ink); }
.inside h2 { color: var(--ink); }
.inside .lead { color: var(--ink-soft); }
.pages { display: grid; grid-template-columns: minmax(0, 0.84fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px) clamp(32px, 5vw, 80px); align-items: start; }
.page-written { grid-row: span 2; }
.page a { position: relative; display: block; background: #fff; border: 1px solid var(--rule-ink); box-shadow: 0 26px 48px -28px #1a193080, 0 2px 4px #1a193014; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.page a:hover { transform: translateY(-3px); box-shadow: 0 34px 56px -28px #1a193099, 0 2px 4px #1a193014; }
.page img { width: 100%; }
.page-open { position: absolute; right: 12px; bottom: 12px; padding: 7px 12px; background: var(--ink); color: var(--paper); font-size: 12.5px; line-height: 1.2; border-radius: 2px; }
.page figcaption { margin-top: 18px; max-width: 34em; }
.course-preview-label { display: block; font-size: 13px; color: var(--ink-soft); }
.page h3 { margin-top: 3px; font: 600 20px/1.3 var(--sans); color: var(--ink); }
.page figcaption p { margin-top: 6px; font-size: 16px; line-height: 1.6; color: var(--ink-soft); }
.inside-foot { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 64px); align-items: end; margin-top: clamp(40px, 5vw, 64px); padding-top: clamp(28px, 3vw, 40px); border-top: 1px solid var(--rule-ink); }
.format { font-size: clamp(18px, 1.5vw, 21px); line-height: 1.55; color: var(--ink); max-width: 34em; text-wrap: pretty; }
.inside .credit { color: var(--ink-soft); }

/* The fourteen lessons */
.arc { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(28px, 5vw, 80px); align-items: start; padding-block: clamp(36px, 4.5vw, 64px); border-top: 1px solid var(--rule); }
.arc-art { display: grid; gap: 16px; position: sticky; top: 24px; }
.arc-art img { width: 100%; border-radius: 4px; }
.arc-body h3 { font: 400 clamp(27px, 2.5vw, 35px)/1.12 var(--display); color: var(--ivory); letter-spacing: -0.01em; }
.arc-body h3 span { display: block; margin-bottom: 10px; font: 500 13px/1.4 var(--label); letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); }
.lesson-list { margin-top: clamp(14px, 2vw, 24px); }
.lesson-list li { display: grid; grid-template-columns: 46px minmax(0, 1fr); align-items: baseline; padding-block: 15px; border-top: 1px solid var(--rule); }
.lesson-list li:first-child { border-top: 0; }
.num { font: 500 19px/1.3 var(--label); color: var(--gold-soft); }
.lesson-list strong { font-weight: 500; font-size: 18.5px; line-height: 1.35; color: var(--ivory); }
.lesson-list p { margin-top: 3px; font-size: 15.5px; line-height: 1.55; color: var(--text-soft); }
.webb { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 18px; align-items: center; margin-top: 22px; padding-top: 22px; border-top: 1px solid var(--rule); }
.webb img { width: 76px; height: 76px; object-fit: cover; border-radius: 4px; }
.webb figcaption { font-size: 14.5px; line-height: 1.55; color: var(--text); }
.webb figcaption span { display: block; margin-top: 4px; font-size: 12.5px; color: var(--text-soft); }
.lessons .credit { padding-top: 24px; border-top: 1px solid var(--rule); }

/* Who it suits */
.fit { background: var(--night-deep); border-block: 1px solid var(--rule); }
.fit-layout { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(36px, 6vw, 96px); align-items: start; }
.fit h2 + .lead { margin-top: clamp(18px, 2vw, 28px); }
.fit-notes > div { padding-block: 24px; border-top: 1px solid var(--rule); }
.fit-notes > div:last-child { padding-bottom: 0; }
.fit-notes h3 { font: 500 19px/1.3 var(--sans); color: var(--ivory); }
.fit-notes p { margin-top: 8px; font-size: 16px; }

/* Enrollment */
.enroll { background: radial-gradient(ellipse at 78% 0%, #55338a42, transparent 58%), radial-gradient(ellipse at 10% 100%, #14336752, transparent 55%), var(--night); }
.enroll-card { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: center; max-width: 1080px; margin-inline: auto; padding: clamp(28px, 5vw, 68px); background: #111836f2; border: 1px solid #ecc97c5c; border-radius: 6px; }
.enroll-card h2 { font-size: clamp(30px, 3.2vw, 44px); }
.price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; margin-top: 20px; }
.price strong { font: 400 clamp(56px, 6vw, 76px)/1 var(--display); color: var(--ivory); }
.price small { font: 400 18px/1 var(--sans); color: var(--text-soft); margin-left: 4px; }
.price span { font-size: 16px; color: var(--text); }
.enroll-card .button { margin-top: 26px; min-width: min(100%, 300px); }
.terms { margin-top: 20px; max-width: 34em; font-size: 14.5px; line-height: 1.6; color: var(--text-soft); }
.terms a, .already a, .questions-list a, .site-footer a { text-underline-offset: 4px; text-decoration-thickness: 1px; }
.terms a { color: var(--gold-bright); }
.enroll-list { padding-left: clamp(0px, 4vw, 56px); border-left: 1px solid var(--rule); }
.enroll-list li { position: relative; padding: 14px 0 14px 26px; border-top: 1px solid var(--rule); font-size: 16.5px; line-height: 1.5; color: var(--ivory); }
.enroll-list li:first-child { border-top: 0; }
.enroll-list li::before { content: ''; position: absolute; left: 0; top: 1.55em; width: 12px; height: 1px; background: var(--gold); }
.already { margin-top: 24px; text-align: center; font-size: 14.5px; color: var(--text-soft); }
.already a { color: var(--ivory); margin-left: 6px; }

/* Questions */
.questions-layout { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(24px, 5vw, 80px); align-items: start; }
.questions-list details { border-top: 1px solid var(--rule); }
.questions-list details:last-child { border-bottom: 1px solid var(--rule); }
.questions-list summary { display: flex; justify-content: space-between; align-items: baseline; gap: 20px; padding-block: 21px; cursor: pointer; list-style: none; font-size: 18.5px; font-weight: 500; line-height: 1.4; color: var(--ivory); }
.questions-list summary::-webkit-details-marker { display: none; }
.questions-list summary::after { content: '+'; flex: none; font-size: 22px; font-weight: 300; line-height: 1; color: var(--gold); }
.questions-list details[open] summary::after { content: '\2212'; }
.questions-list details p { max-width: 40em; padding-bottom: 24px; font-size: 16.5px; }
.questions-list a { color: var(--gold-bright); }

/* Close */
.closing { padding-block: clamp(80px, 11vw, 150px); text-align: center; border-top: 1px solid var(--rule); background: radial-gradient(ellipse at 50% 120%, #55338a4d, transparent 62%), var(--night-deep); }
.closing h2 { font-size: clamp(36px, 5vw, 68px); line-height: 1.02; }
.closing p { margin-top: 16px; font-size: clamp(17px, 1.5vw, 20px); color: var(--text); }
.closing .button { margin-top: 34px; }

/* Footer */
.site-footer { padding-block: 44px 52px; background: var(--night-deep); border-top: 1px solid var(--rule); font-size: 14px; }
.footer-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 32px; padding-bottom: 28px; }
.footer-top p { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.footer-top p a { display: inline-block; padding-block: 6px; }
.credits { max-width: 62em; padding-top: 24px; border-top: 1px solid var(--rule); font-size: 12.5px; line-height: 1.65; color: var(--text-soft); }

/* Phone enrollment bar: shown only while no other enroll action is on screen */
.enroll-bar { display: none; }
.enroll-bar[hidden] { display: none !important; }

/* Image viewer, in this page's palette */
.sample-viewer { border-color: var(--gold); background: var(--night); color: var(--ivory); font-family: var(--sans); }
.sample-viewer__source { color: var(--gold); letter-spacing: 0.02em; text-transform: none; font-size: 13px; }
.sample-viewer__header h2 { font-family: var(--sans); letter-spacing: 0; color: var(--ivory); }
.sample-viewer__close { border-color: var(--gold); color: var(--ivory); min-height: 44px; }
.sample-viewer__close:hover { background: var(--gold); color: var(--night-deep); }
.sample-viewer__close:focus-visible, .sample-viewer__image-scroll:focus-visible { outline-color: var(--gold-bright); }
.sample-viewer__image-scroll { background: #fff; }
.sample-viewer__description { color: var(--text); }

/* Tablet */
@media (max-width: 1020px) {
  .tim-feature { grid-template-columns: minmax(0, 1fr); }
  .tim-aside { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 48px); align-items: start; }
  .tim-aside > p { margin-top: 0; padding-top: 0; border-top: 0; }
  .clip-second { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 48px); align-items: start; margin-top: 0; }
  .clip-second figcaption { margin-top: 0; }
  .site-header nav { display: none; }
}

@media (max-width: 860px) {
  .hero { flex-direction: column; }
  .hero-art { order: 1; flex: none; min-height: 0; aspect-ratio: 16 / 9; }
  .hero-art img {
    -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 72%, transparent 100%);
  }
  .hero-copy { order: 2; flex: none; padding: 8px var(--gutter) clamp(48px, 9vw, 72px); }
  .hero h1 { margin-top: 4px; }
  /* The poster directly above already letters the course name. */
  .course-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .pages { grid-template-columns: minmax(0, 1fr); }
  .page-written { grid-row: auto; max-width: 560px; }
  .inside-foot, .fit-layout, .questions-layout, .enroll-card { grid-template-columns: minmax(0, 1fr); }
  .enroll-list { padding-left: 0; border-left: 0; padding-top: 8px; border-top: 1px solid var(--rule); }
  .arc { grid-template-columns: minmax(0, 1fr); }
  .arc-art { position: static; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); grid-auto-flow: column; }
}

/* Phone */
@media (max-width: 640px) {
  body { font-size: 16.5px; padding-bottom: 76px; }
  .header-inner { min-height: 64px; }
  .brand img { width: 34px; height: 34px; }
  .header-enroll { padding: 9px 16px; }
  .deck-long { display: none; }
  .deck-short { display: inline; }
  .hero h1 { font-size: clamp(36px, 10.6vw, 46px); }
  .hero-actions { flex-direction: column; align-items: stretch; gap: 14px; margin-top: 24px; }
  .hero-actions .text-link { align-self: flex-start; padding-block: 10px; }
  .hero-facts { margin-top: 14px; font-size: 13.5px; }
  .hero-facts span { margin-inline: 2px; }
  .tim-aside { grid-template-columns: minmax(0, 1fr); }
  .tim-aside > p { padding-top: 24px; border-top: 1px solid var(--rule); }
  .clip-second { display: block; padding-top: 28px; }
  .clip-second figcaption { margin-top: 18px; }
  .arc-art img + img { display: none; }
  /* Full-bleed media on a phone */
  .clip video, .arc-art { margin-inline: calc(-1 * var(--gutter)); width: calc(100% + 2 * var(--gutter)); max-width: none; }
  .clip video, .arc-art img { border-radius: 0; }
  .arc-art { grid-auto-flow: row; grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .arc { gap: 24px; padding-block: 32px; }
  .lesson-list li { grid-template-columns: 38px minmax(0, 1fr); padding-block: 13px; }
  .page-written { max-width: none; }
  .enroll-card { padding: 28px 22px; }
  .enroll-card .button { width: 100%; }
  .closing .button { width: 100%; max-width: 360px; }
  .footer-top { flex-direction: column; align-items: flex-start; }

  .enroll-bar {
    position: fixed; z-index: 40; left: 0; right: 0; bottom: 0;
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom, 0px));
    background: var(--night-deep); border-top: 1px solid #ffffff33;
    transition: transform 0.22s ease;
  }
  .enroll-bar p { font-size: 14px; line-height: 1.3; color: var(--text); }
  .enroll-bar strong { display: block; font-size: 16px; font-weight: 500; color: var(--ivory); }
  .enroll-bar .button { min-height: 48px; padding: 12px 30px; }
  .js .enroll-bar:not(.is-visible) { transform: translateY(110%); visibility: hidden; transition: transform 0.22s ease, visibility 0s 0.22s; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
