:root {
  --paper: #f3ecdd;
  --raised: #e9e0cd;
  --sepia: #4a3622;
  --muted: #7a6650;
  --gold: #84540f;
  --line: rgba(74, 54, 34, .18);
  --frame: #2c2118;
  --shadow: rgba(74, 54, 34, .55);
  --serif: "EB Garamond", Georgia, "Times New Roman", serif;
  --sans: Inter, system-ui, -apple-system, sans-serif;
}
/* The Odyssey's blue and white, from its app palette */
html[data-epic="odyssey"] {
  --paper: #f8fafd;
  --raised: #e6eff9;
  --sepia: #0f2742;
  --muted: #4a6380;
  --gold: #0d5eaf;
  --line: rgba(13, 94, 175, .2);
  --frame: #0f2742;
  --shadow: rgba(15, 39, 66, .45);
}
/* The Ramayan's forest and marigold, from its app palette */
html[data-epic="ramayan"] {
  --paper: #faf6ec;
  --raised: #eef3e6;
  --sepia: #1f3b2c;
  --muted: #5c6b5f;
  --gold: #2e6b45;
  --line: rgba(46, 107, 69, .2);
  --frame: #1f3b2c;
  --shadow: rgba(31, 59, 44, .45);
}
/* Each epic's sections show only in its own view; the Mahabharat's show when no other epic is chosen. */
html:not([data-epic="odyssey"]) [data-for="odyssey"] { display: none !important; }
html:not([data-epic="ramayan"]) [data-for="ramayan"] { display: none !important; }
html[data-epic="odyssey"] [data-for="mahabharat"], html[data-epic="ramayan"] [data-for="mahabharat"] { display: none !important; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--sepia); font: 19px/1.6 var(--serif); transition: background-color .4s, color .4s; }
a { color: var(--gold); }
img, video { display: block; max-width: 100%; }
h1, h2, h3 { font-weight: 400; line-height: 1.08; margin: 0; text-wrap: balance; }

.wrap { max-width: 1120px; margin: 0 auto; padding-inline: max(20px, env(safe-area-inset-left, 0px)) max(20px, env(safe-area-inset-right, 0px)); }
.bar { display: flex; align-items: center; justify-content: space-between; padding-block: 18px; font: 500 14px/1 var(--sans); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--sepia); text-decoration: none; font: 400 22px/1 var(--serif); }
.brand img { width: 34px; height: 34px; }
.bar nav { display: flex; gap: 20px; }
.bar nav a { color: var(--muted); text-decoration: none; }

/* The opening */
.hero { min-height: calc(100svh - 70px); display: grid; align-content: center; justify-items: center; text-align: center; gap: 24px; padding-block: 40px 90px; }
.hero h1 { font-size: clamp(46px, 8.5vw, 92px); max-width: 13em; }
.hero p { font-size: clamp(21px, 2.5vw, 26px); max-width: 32em; margin: 0; color: var(--muted); }
.hero .thought { color: var(--sepia); font-style: italic; }
.down { font: 500 13px/1 var(--sans); letter-spacing: .04em; color: var(--muted); text-decoration: none; margin-top: 12px; display: grid; gap: 8px; justify-items: center; }
.down svg { animation: nudge 1.8s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateY(6px); } }

/* The tour: pinned while the page scrolls */
.tour { position: relative; height: calc(var(--count) * 100svh); }
.stage { position: sticky; top: 0; height: 100svh; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: clamp(32px, 7vw, 110px); max-width: 1120px; margin: 0 auto; padding-inline: max(20px, env(safe-area-inset-left, 0px)) max(20px, env(safe-area-inset-right, 0px)); }
.copy { position: relative; min-height: 340px; }
.epics { position: absolute; z-index: 2; top: 28px; left: max(20px, env(safe-area-inset-left, 0px)); display: flex; flex-wrap: wrap; gap: 8px; }
.epics button { padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--raised); color: var(--muted); font: 500 14px/1 var(--sans); cursor: pointer; transition: background-color .3s, color .3s; }
.epics button[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: #fff; }
.panel { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; opacity: 0; transform: translateY(14px); transition: opacity .35s, transform .35s; pointer-events: none; }
.panel.on { opacity: 1; transform: none; pointer-events: auto; }
.count { font: 500 13px/1 var(--sans); letter-spacing: .04em; color: var(--gold); margin-bottom: 16px; }
.panel h2 { font-size: clamp(38px, 5vw, 62px); color: var(--sepia); }
.panel p { margin: 18px 0 0; font-size: clamp(21px, 2vw, 24px); line-height: 1.45; max-width: 25em; color: var(--muted); }
.intro .label { font: 500 13px/1 var(--sans); letter-spacing: .04em; color: var(--gold); margin-bottom: 16px; }

/* The tour scrolls down, so its marker is a vertical column and the cue points down */
.stage { padding-right: max(56px, env(safe-area-inset-right, 0px)); }
.progress { position: absolute; right: max(20px, env(safe-area-inset-right, 0px)); top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; align-items: center; gap: 4px; }
.progress button { width: 16px; height: 24px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; justify-items: center; }
.progress button::after { content: ""; width: 3px; height: 100%; border-radius: 2px; background: var(--line); }
.progress button.on::after { background: var(--gold); }
.hint { position: absolute; left: 0; right: 0; bottom: 22px; display: grid; gap: 6px; justify-items: center; font: 500 13px/1 var(--sans); letter-spacing: .04em; color: var(--muted); pointer-events: none; transition: opacity .3s; }
.hint svg { animation: nudge 1.8s ease-in-out infinite; }
.hint.gone { opacity: 0; }

.phone { position: relative; width: min(330px, calc((100svh - 72px) / 2.12)); aspect-ratio: 1284 / 2778; padding: 10px; box-sizing: content-box; border-radius: 52px; background: var(--frame); box-shadow: 0 30px 60px -22px var(--shadow); transition: background-color .4s; }
.screen { position: relative; width: 100%; height: 100%; border-radius: 42px; overflow: hidden; background: var(--paper); }
.screen img, .screen video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .35s; }
.screen .on { opacity: 1; }
.sound { position: absolute; left: 50%; top: 18%; transform: translateX(-50%); padding: 10px 16px; border: 0; border-radius: 999px; background: var(--gold); color: #fff; font: 500 13px/1 var(--sans); cursor: pointer; white-space: nowrap; display: none; }
.sound.show { display: block; }

/* Get the app */
.get { text-align: center; padding-block: 110px 80px; display: grid; gap: 20px; justify-items: center; }
.get h2 { font-size: clamp(38px, 6vw, 64px); }
.get p { margin: 0; color: var(--muted); max-width: 32em; font-size: 22px; }
.stores { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 10px; }
.store { min-width: 230px; padding: 15px 26px; border-radius: 14px; border: 1px solid var(--sepia); color: var(--sepia); text-decoration: none; font: 500 16px/1.25 var(--sans); }
.store small { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }
.store.live { background: var(--sepia); color: var(--paper); }
.store.live small { color: inherit; opacity: .8; }
.store.live:hover { background: var(--gold); border-color: var(--gold); }

/* Tell someone */
.tell { text-align: center; padding-block: 10px 90px; display: grid; justify-items: center; gap: 14px; }
.tell h2 { font-size: clamp(32px, 4.5vw, 46px); }
.tell p { margin: 0; color: var(--muted); max-width: 30em; }
.tell.inline { text-align: left; justify-items: start; padding-block: 30px 0; }
.tell.inline h2 { font-size: 30px; }
.share { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 6px; }
.share a, .share button { padding: 11px 20px; border-radius: 999px; border: 1px solid var(--line); background: var(--raised); color: var(--sepia); font: 500 15px/1.2 var(--sans); text-decoration: none; cursor: pointer; }
.share .share-native { background: var(--gold); border-color: var(--gold); color: #fff; }
.share-note { font: 400 14px/1.4 var(--sans); min-height: 1.4em; }

/* The other apps in the series */
.series { border-top: 1px solid var(--line); padding-block: 70px 80px; }
.series h2 { font-size: clamp(30px, 4.5vw, 46px); text-align: center; text-wrap: balance; }
.apps { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px 40px; margin-top: 36px; }
.app { display: grid; justify-items: center; gap: 6px; width: 140px; text-decoration: none; color: var(--sepia); font: 500 16px/1.25 var(--sans); text-align: center; }
.app img { width: 96px; height: 96px; border-radius: 22px; box-shadow: 0 4px 14px var(--line); margin-bottom: 6px; transition: transform .2s; }
.app:hover img { transform: translateY(-3px); }
.app small { font-size: 12px; font-weight: 400; color: var(--muted); }

/* What comes next */
.next { border-top: 1px solid var(--line); padding-block: 80px 90px; }
.next h2 { font-size: clamp(34px, 5vw, 52px); text-align: center; }
.next > .wrap > p { text-align: center; color: var(--muted); max-width: 32em; margin: 16px auto 44px; font-size: 22px; }
.shelf { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; max-width: 640px; margin-inline: auto; }
.spine { padding: 26px 22px 30px; min-height: 230px; border: 1px solid var(--line); border-radius: 8px; background: var(--raised); display: flex; flex-direction: column; justify-content: flex-start; gap: 8px; }
.spine h3 { font-size: 30px; }
.spine p { margin: 0; font-size: 18px; line-height: 1.35; color: var(--muted); }
.spine .due { text-decoration: none; margin-bottom: auto; align-self: flex-start; padding: 6px 12px; border-radius: 999px; background: var(--gold); color: #fff; font: 500 12px/1 var(--sans); letter-spacing: .03em; white-space: nowrap; }
.spine .mark { width: 64px; height: 64px; border-radius: 15px; margin-bottom: 10px; }
html[data-epic="odyssey"] .spine.odyssey { border-color: var(--gold); }
html[data-epic="ramayan"] .spine.ramayan { border-color: var(--gold); }

/* Two tracks: the complete epics and the short epics */
.tracks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; padding-block: 0 90px; }
.track { display: flex; flex-direction: column; gap: 10px; padding: 30px 28px 28px; border-radius: 14px; text-decoration: none; min-width: 0; transition: transform .2s; }
.track:hover { transform: translateY(-3px); }
.track.complete { background: var(--raised); border: 1px solid var(--line); color: var(--sepia); }
.track.short { background: var(--ink); color: var(--ink-text); }
.track .marks { display: flex; gap: 8px; margin-bottom: 8px; }
.track .marks img { width: 44px; height: 44px; border-radius: 10px; }
.track .kind { font: 500 13px/1.3 var(--sans); letter-spacing: .04em; color: var(--gold); }
.track.short .kind { color: var(--ink-gold); }
.track strong { font: 400 clamp(32px, 4vw, 42px)/1.05 var(--serif); }
.track .what { font-size: 20px; line-height: 1.4; color: var(--muted); }
.track.short .what { color: var(--ink-muted); }
.track .go { margin-top: auto; padding-top: 10px; font: 500 15px/1 var(--sans); color: var(--gold); }
.track.short .go { color: var(--ink-gold); }
.track .go::after { content: " \2193"; }

.track-head { text-align: center; display: grid; justify-items: center; gap: 14px; padding-block: 40px 0; border-top: 1px solid var(--line); }
.track-head .label, .monthly .label { font: 500 13px/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--gold); padding-top: 50px; }
.track-head h2, .monthly h2 { font-size: clamp(44px, 7vw, 76px); }
.track-head p { margin: 0; max-width: 30em; color: var(--muted); font-size: 22px; }

/* The short epics: their own night-blue band, the same in every epic's view */
:root { --ink: #16181f; --ink-raised: #20232c; --ink-text: #f3ecdd; --ink-muted: #b5ab9a; --ink-gold: #e2a72e; --ink-line: rgba(243, 236, 221, .16); }
.monthly { background: var(--ink); color: var(--ink-text); padding-block: 40px 100px; }
.monthly .wrap { max-width: 860px; }
.monthly .label { color: var(--ink-gold); text-align: center; }
.monthly h2 { text-align: center; margin-top: 14px; }
.monthly .lead { text-align: center; color: var(--ink-muted); max-width: 30em; margin: 18px auto 60px; font-size: 22px; }
.calendar { list-style: none; margin: 0; padding: 0; position: relative; --fill: 1; }
.calendar::before, .calendar::after { content: ""; position: absolute; left: 150px; top: 10px; bottom: 10px; width: 2px; background: var(--ink-line); }
.calendar::after { background: var(--ink-gold); bottom: auto; height: calc((100% - 20px) * var(--fill)); }
.month { display: grid; grid-template-columns: 150px minmax(0, 1fr); padding-block: 0 44px; position: relative; }
.month::before { content: ""; position: absolute; left: 144px; top: 8px; width: 14px; height: 14px; border-radius: 50%; background: var(--ink); border: 2px solid var(--ink-line); z-index: 1; transition: background-color .3s, border-color .3s; }
.month.lit::before, .calendar:not(.live) .month::before { background: var(--ink-gold); border-color: var(--ink-gold); }
.when { font: 500 16px/1.2 var(--sans); color: var(--ink-text); padding-right: 28px; text-align: right; }
.when small { display: block; font-weight: 400; font-size: 13px; color: var(--ink-muted); margin-top: 4px; }
.entries { display: grid; gap: 22px; padding-left: 34px; }
.entry { display: grid; grid-template-columns: 56px minmax(0, 1fr); gap: 18px; align-items: start; }
.entry .mark { width: 56px; height: 56px; border-radius: 13px; }
.entry h3 { font-size: 30px; }
.entry .from { display: block; font: 500 12px/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-gold); margin-top: 6px; }
.entry p { margin: 8px 0 0; color: var(--ink-muted); font-size: 19px; line-height: 1.4; }
.calendar.live .month .entries { opacity: .35; transform: translateY(10px); transition: opacity .45s, transform .45s; }
.calendar.live .month.lit .entries { opacity: 1; transform: none; }
.month.launch .entries { padding-bottom: 6px; }
.monthly .terms { margin: 20px auto 0; max-width: 34em; text-align: center; font: 400 15px/1.5 var(--sans); color: var(--ink-muted); }

@media (max-width: 760px) {
  .tracks { grid-template-columns: minmax(0, 1fr); padding-block: 0 60px; }
  .track { padding: 24px 22px; }
  .track .what { font-size: 18px; }
  .track-head p, .monthly .lead { font-size: 19px; }
  .calendar::before, .calendar::after { left: 86px; }
  .month { grid-template-columns: 86px minmax(0, 1fr); padding-bottom: 34px; }
  .month::before { left: 80px; }
  .when { font-size: 14px; padding-right: 18px; }
  .when small { font-size: 12px; }
  .entries { padding-left: 22px; }
  .entry { grid-template-columns: 44px minmax(0, 1fr); gap: 14px; }
  .entry .mark { width: 44px; height: 44px; border-radius: 10px; }
  .entry h3 { font-size: 24px; }
  .entry p { font-size: 17px; }
}
@media (min-width: 1000px) {
  .track .what { font-size: 22px; }
  .entry h3 { font-size: 34px; }
  .entry p { font-size: 21px; }
}

footer { border-top: 1px solid var(--line); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 22px; justify-content: space-between; padding-block: 26px; font: 400 14px/1.4 var(--sans); color: var(--muted); }
footer nav { display: flex; flex-wrap: wrap; gap: 20px; }
footer a { color: var(--muted); }

.stores.small .store { min-width: 190px; padding: 12px 20px; font-size: 15px; }
.science-link { font: 500 15px/1.4 var(--sans); }

/* Laptops and up: larger reading sizes */
@media (min-width: 1000px) {
  body { font-size: 22px; }
  .hero p { font-size: 28px; }
  .panel p { font-size: 26px; }
  .count, .intro .label { font-size: 15px; }
  .get p, .next > .wrap > p { font-size: 25px; }
  .spine h3 { font-size: 34px; }
  .spine p { font-size: 20px; }
  .bar { font-size: 16px; }
  .brand { font-size: 25px; }
  .store { font-size: 18px; }
  .store small { font-size: 13px; }
  footer .wrap { font-size: 16px; }
  .page { max-width: 760px; }
  .page h1 { font-size: 64px; }
  .page h2 { font-size: 17px; }
  .page .lead { font-size: 26px; }
  .hint { font-size: 15px; }
}

/* Inner pages */
.page { max-width: 660px; margin: 0 auto; padding: 30px 20px 70px; padding-inline: max(20px, env(safe-area-inset-left, 0px)) max(20px, env(safe-area-inset-right, 0px)); }
.page h1 { font-size: clamp(40px, 8vw, 54px); margin-bottom: 12px; }
.page h2 { font: 500 15px/1.4 var(--sans); color: var(--gold); margin: 32px 0 6px; }
.page .lead { font-size: 22px; color: var(--muted); margin-top: 0; }
.page ol { padding-left: 1.2em; }
.page li { margin-bottom: 8px; }
.sources { font-size: .85em; color: var(--muted); }

/* Phones: the screen on top, the words beneath it */
@media (max-width: 760px) {
  .bar nav { display: none; }
  .stage { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); align-items: start; justify-items: center; gap: 12px; padding-block: 66px 52px; }
  .epics { left: 0; right: 0; top: 16px; justify-content: center; gap: 6px; }
  /* Three epics on one row at phone width */
  .epics button { padding: 8px 12px; font-size: 13px; }
  .phone { order: -1; width: min(50vw, calc((100svh - 356px) / 2.16)); padding: 6px; border-radius: 34px; }
  .screen { border-radius: 28px; }
  .copy { width: 100%; min-height: 210px; height: 100%; text-align: center; }
  .panel { justify-content: flex-start; align-items: center; }
  .count { margin-bottom: 8px; }
  .panel h2 { font-size: 31px; }
  .panel p { font-size: 18px; margin-top: 8px; }
  .copy { padding-inline: 22px; box-sizing: border-box; }
  .stage { padding-right: max(20px, env(safe-area-inset-right, 0px)); }
  .progress { right: 4px; }
  .progress button { height: 18px; }
  .hint { bottom: 12px; }
  .sound { padding: 7px 11px; font-size: 11px; }
  .apps { gap: 20px 8px; }
  .app { width: 100px; font-size: 13px; white-space: nowrap; }
  .app img { width: 72px; height: 72px; border-radius: 16px; }
  .spine { min-height: 180px; }
  .spine h3 { font-size: 25px; }
  .spine .due { padding: 5px 8px; font-size: 10px; letter-spacing: 0; }
}

/* Without the script, or asked for less motion, the tour reads as a plain list */
html:not(.js) .tour, html.calm .tour { height: auto; }
html:not(.js) .stage, html.calm .stage { position: static; height: auto; display: block; overflow: visible; padding-block: 30px; }
html:not(.js) .copy, html.calm .copy { min-height: 0; height: auto; display: grid; gap: 36px; }
html:not(.js) .panel, html.calm .panel { position: static; opacity: 1; transform: none; }
html:not(.js) .epics, html.calm .epics { position: static; margin-bottom: 30px; }
html:not(.js) .epics { display: none; }
html:not(.js) .phone, html:not(.js) .progress, html.calm .phone, html.calm .progress, html:not(.js) .hint, html.calm .hint { display: none; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .down svg, .hint svg { animation: none; } }
