/* ChaturVima website. One visual world, by choice: a night scene that turns to day.
   A classical serif carries what endures; a plain grotesque carries labels and detail.
   Layout: one continuous thread. The home page is one fixed scene with one line of words at a time;
   each module page is a dark opening with the same scene, then a single reading column on paper. */
:root {
  --night: #0b0f1e;      /* the dark before any lamp is lit */
  --paper: #f4efe4;      /* daylight, where the story ends and the reading begins */
  --rice:  #f3ead8;      /* the kolam line, as rice flour */
  --ink:   #1c2340;      /* the same line, by day */
  --flame: #ffb347;      /* lamp light; also the one action colour */
  --leaf:  #4f9a5d;      /* steady state; marks what to repair and protect */
  --brand: #3f55e6;      /* the ChaturVima blue, as on the platform */
  --ember: #a2561c;      /* small labels on paper */
  --display: "Newsreader", "Iowan Old Style", Georgia, serif;
  --body: "Manrope", "Segoe UI", system-ui, sans-serif;
  --word: "Plus Jakarta Sans", "Manrope", "Segoe UI", system-ui, sans-serif;   /* the wordmark, as on the platform */
  --fg: var(--rice); --fg-soft: rgba(243, 234, 216, .7); --edge: rgba(243, 234, 216, .22); --mark: #aab4ff;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--night); }
body { font-family: var(--body); color: var(--fg); overflow-x: hidden; font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
body.dawn { --fg: var(--ink); --fg-soft: rgba(28, 35, 64, .72); --edge: rgba(28, 35, 64, .2); --mark: var(--brand); }
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 clamp(18px, 5vw, 48px); }
.label { font-size: 12.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; margin: 0; }

/* ---------- header: the mark and name from the platform, with Powered by Datacharya below */
.top { position: fixed; top: 0; left: 0; right: 0; z-index: 8; display: flex; justify-content: space-between; align-items: center; gap: 18px;
  padding: 12px clamp(16px, 4vw, 44px); color: var(--fg); transition: color .8s, background .4s; }
.logo { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; line-height: 1; flex: none; }
.logo img { height: 44px; width: auto; }
.logo .lk { display: flex; flex-direction: column; gap: 5px; }
.logo b { font-family: var(--word); font-weight: 800; font-size: 22px; letter-spacing: .08em; color: var(--mark); transition: color .8s; }
.logo small { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--fg-soft); transition: color .8s; }
.links { display: flex; gap: clamp(10px, 1.6vw, 22px); font-size: 14px; font-weight: 600; }
.links a { text-decoration: none; padding: 6px 2px; border-bottom: 2px solid transparent; white-space: nowrap; }
.links a:hover, .links a:focus-visible, .links a[aria-current="page"] { border-bottom-color: var(--flame); outline: none; }
.acts { display: flex; align-items: center; gap: 10px; flex: none; }
.pill { font-size: 14px; font-weight: 600; text-decoration: none; border: 1px solid var(--edge); border-radius: 999px; padding: 8px 16px; white-space: nowrap; transition: border-color .8s, background .2s; }
.pill:hover, .pill:focus-visible { background: rgba(255, 179, 71, .16); border-color: var(--flame); outline: none; }
.menu { position: relative; display: none; }
.menu summary { list-style: none; cursor: pointer; }
.menu summary::-webkit-details-marker { display: none; }
.menu .sheet { position: absolute; right: 0; top: calc(100% + 10px); min-width: 250px; background: var(--night); color: var(--rice); border: 1px solid rgba(243, 234, 216, .22);
  border-radius: 10px; padding: 8px; display: flex; flex-direction: column; box-shadow: 0 18px 40px rgba(0, 0, 0, .35); }
.menu .sheet a { text-decoration: none; padding: 10px 12px; border-radius: 6px; font-size: 15px; display: flex; gap: 12px; align-items: baseline; }
.menu .sheet a span { color: rgba(243, 234, 216, .62); font-size: 13px; }
.menu .sheet a:hover, .menu .sheet a:focus-visible { background: rgba(255, 179, 71, .14); outline: none; }
@media (max-width: 1140px) { .links { display: none; } .menu { display: block; } }
@media (max-width: 560px) { .logo img { height: 36px; } .logo b { font-size: 17px; } .logo small { font-size: 9px; letter-spacing: .09em; } .acts .signin { display: none; } }

body:not([data-route="home"]) .top { position: sticky; background: var(--night); border-bottom: 1px solid rgba(243, 234, 216, .12); }
body.past .top { background: var(--paper); border-bottom: 1px solid var(--edge); }

/* ---------- home: the opening story */
body:not([data-route="home"]) .home-fixed { display: none !important; }
canvas#scene { position: fixed; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; }
#track { position: relative; height: 1150vh; }              /* nine screens of scrolling, 120vh each, with room to rest at the end */
#words { position: fixed; z-index: 4; left: clamp(16px, 6vw, 88px); top: 50%; transform: translateY(-50%); width: min(40vw, 500px); display: grid; color: var(--fg); transition: color .8s; }
.w { grid-area: 1 / 1; align-self: center; opacity: 0; visibility: hidden; transition: opacity .45s ease, visibility 0s linear .45s; }
.w.on { opacity: 1; visibility: visible; transition: opacity .45s ease .2s, visibility 0s; }
.w .label { color: var(--flame); margin-bottom: 18px; }
body.dawn .w .label { color: var(--ember); }
.w h1, .w h2 { font-family: var(--display); font-weight: 400; font-size: clamp(32px, 4.5vw, 62px); line-height: 1.07; margin: 0; text-wrap: balance; letter-spacing: -.012em; }
.w em, .hero em { font-style: italic; }
.w p.support { font-size: clamp(15px, 1.25vw, 18px); line-height: 1.55; color: var(--fg-soft); margin: 22px 0 0; max-width: 34ch; transition: color .8s; }
.more { display: inline-block; margin-top: 20px; font-size: 14px; font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--edge); padding-bottom: 3px; }
.more:hover, .more:focus-visible { border-bottom-color: var(--flame); outline: none; }
.go { display: flex; margin-top: 28px; gap: 12px 16px; flex-wrap: wrap; align-items: center; }
.go.flush { margin: 0; }
.btn { display: inline-block; font: 600 15px var(--body); color: #1c1407; background: var(--flame); border-radius: 999px; padding: 13px 24px; text-decoration: none; }
.btn:hover, .btn:focus-visible { background: #ffc671; outline: 2px solid currentColor; outline-offset: 2px; }
.btn.ghost { background: transparent; color: inherit; border: 1px solid var(--edge); }
.btn.ghost:hover, .btn.ghost:focus-visible { background: rgba(255, 179, 71, .16); border-color: var(--flame); }

nav#thread { position: fixed; z-index: 5; right: clamp(10px, 2.2vw, 28px); top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 13px; }
nav#thread button { all: unset; cursor: pointer; display: flex; align-items: center; justify-content: flex-end; gap: 10px; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--fg-soft); transition: color .8s; }
nav#thread button span { opacity: 0; transition: opacity .2s; }
nav#thread button i { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid currentColor; display: block; transition: background .3s, transform .3s; }
nav#thread button[aria-current="true"] { color: var(--fg); }
nav#thread button[aria-current="true"] i { background: var(--flame); border-color: var(--flame); transform: scale(1.35); }
nav#thread button:hover span, nav#thread button:focus-visible span, nav#thread button[aria-current="true"] span { opacity: 1; }
nav#thread button:focus-visible i { outline: 2px solid var(--flame); outline-offset: 3px; }
#hint { position: fixed; z-index: 4; left: clamp(16px, 6vw, 88px); bottom: 26px; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--fg-soft); transition: opacity .5s, color .8s; }
#tag { position: fixed; z-index: 4; right: clamp(16px, 4vw, 44px); bottom: 22px; font-size: 11.5px; letter-spacing: .08em; color: var(--fg-soft); transition: color .8s; }

/* ---------- reading sections, on paper */
.sheet-paper { position: relative; z-index: 6; background: var(--paper); color: var(--ink); --fg: var(--ink); --fg-soft: rgba(28, 35, 64, .72); --edge: rgba(28, 35, 64, .2); color-scheme: light; }
.sec { padding: clamp(56px, 9vw, 104px) 0; border-top: 1px solid var(--edge); }
.sec:first-child { border-top: 0; }
.sec .label { color: var(--ember); margin-bottom: 14px; }
.sec h2 { font-family: var(--display); font-weight: 400; font-size: clamp(30px, 3.6vw, 46px); line-height: 1.1; letter-spacing: -.01em; margin: 0 0 14px; text-wrap: balance; }
.sec p.lead { font-size: 18px; color: var(--fg-soft); max-width: 60ch; margin: 0; }

/* four stages on one line: a journey, not four boxes */
.stages { list-style: none; margin: 44px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 28px; border-top: 1px solid var(--ink); }
.stages li { position: relative; padding-top: 26px; }
.stages li::before { content: ""; position: absolute; top: -6px; left: 0; width: 11px; height: 11px; border-radius: 50%; background: var(--flame); border: 1.5px solid var(--ink); }
.stages small { display: block; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ember); }
.stages b { display: block; font-family: var(--display); font-weight: 500; font-size: 25px; line-height: 1.2; margin: 4px 0 8px; }
.stages span { font-size: 15.5px; color: var(--fg-soft); }

.values { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(28px, 6vw, 72px); align-items: center; }
.values figure { margin: 0; }
.values img { width: 100%; border-radius: 6px; }
.values figcaption { font-size: 13px; color: var(--fg-soft); margin-top: 10px; }

.routes { margin-top: 40px; display: grid; grid-template-columns: repeat(3, 1fr); }
.routes > div { padding: 4px 28px 4px 28px; border-left: 1px solid var(--edge); display: flex; flex-direction: column; gap: 10px; }
.routes > div:first-child { padding-left: 0; border-left: 0; }
.routes b { font-family: var(--display); font-weight: 500; font-size: 25px; }
.routes p { margin: 0; font-size: 15.5px; color: var(--fg-soft); flex: 1; }
.routes a { align-self: flex-start; font-size: 14.5px; font-weight: 700; text-decoration: none; border-bottom: 2px solid var(--flame); padding-bottom: 2px; margin-top: 6px; }
.routes a:hover, .routes a:focus-visible { color: var(--brand); outline: none; }

.plain { list-style: none; margin: 34px 0 0; padding: 0; columns: 2; column-gap: 56px; max-width: 900px; }
.plain li { break-inside: avoid; padding: 13px 0 13px 24px; border-top: 1px solid var(--edge); position: relative; font-size: 16px; }
.plain li::before { content: ""; position: absolute; left: 2px; top: 23px; width: 8px; height: 8px; border-radius: 50%; background: var(--leaf); }
.sec .after-note { margin-top: 22px; font-size: 14.5px; color: var(--fg-soft); }
.sec .after-note a { font-weight: 600; }

/* ---------- module pages */
.hero { position: relative; background: var(--night); color: var(--rice); min-height: min(76vh, 640px); display: flex; align-items: center; overflow: hidden; }
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero .wrap { position: relative; width: 100%; max-width: 1240px; }
.hero-words { width: min(46%, 520px); padding: 56px 0; }
.hero .label { color: var(--flame); margin-bottom: 18px; }
.hero h1 { font-family: var(--display); font-weight: 400; font-size: clamp(34px, 4.6vw, 62px); line-height: 1.07; letter-spacing: -.012em; margin: 0; text-wrap: balance; }
.hero p.support { font-size: 18px; color: rgba(243, 234, 216, .72); margin: 22px 0 0; max-width: 34ch; }
.hero .note { position: absolute; right: clamp(18px, 5vw, 48px); bottom: 14px; font-size: 11.5px; letter-spacing: .08em; color: rgba(243, 234, 216, .5); }

.pair { display: grid; grid-template-columns: 1fr 1fr; }
.pair > div { padding: 8px clamp(18px, 4vw, 48px) 8px 0; }
.pair > div + div { border-left: 1px solid var(--edge); padding-left: clamp(18px, 4vw, 48px); padding-right: 0; }
.pair .label { color: var(--ember); margin-bottom: 12px; }
.pair p.line { font-family: var(--display); font-size: clamp(22px, 2.5vw, 30px); line-height: 1.25; margin: 0; text-wrap: balance; }

/* six blocks on one thread: each a lamp on the line */
.blocks { list-style: none; margin: 0; padding: 0 0 0 34px; border-left: 1px solid var(--ink); max-width: 800px; counter-reset: b; }
.blocks li { position: relative; padding: 0 0 46px; counter-increment: b; }
.blocks li:last-child { padding-bottom: 6px; }
.blocks li::before { content: ""; position: absolute; left: -40.5px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--flame); border: 1.5px solid var(--ink); }
.blocks .label { color: var(--ember); margin-bottom: 8px; }
.blocks .label::before { content: counter(b) "  "; color: var(--fg-soft); white-space: pre; }
.blocks p.main { font-family: var(--display); font-size: clamp(22px, 2.5vw, 29px); line-height: 1.25; margin: 0; text-wrap: balance; }
.blocks p.detail { font-size: 16.5px; color: var(--fg-soft); margin: 10px 0 0; max-width: 62ch; }
.onward { display: flex; justify-content: space-between; align-items: center; gap: 24px 40px; flex-wrap: wrap; }
.onward .next { text-decoration: none; text-align: right; margin-left: auto; }
.onward .next small { display: block; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ember); }
.onward .next b { font-family: var(--display); font-weight: 400; font-size: clamp(20px, 2.2vw, 26px); border-bottom: 2px solid var(--flame); }
.onward .next:hover b, .onward .next:focus-visible b { color: var(--brand); }
.onward .next:focus-visible { outline: none; }
.sheet-paper .btn.ghost { border-color: var(--edge); }

/* ---------- footer */
.foot { position: relative; z-index: 6; background: var(--night); color: var(--rice); --fg: var(--rice); --fg-soft: rgba(243, 234, 216, .68); --edge: rgba(243, 234, 216, .2); --mark: #aab4ff; padding: 56px 0 34px; font-size: 14.5px; }
.foot .cols { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 3fr) minmax(0, 3fr); gap: 36px 48px; }
.foot .logo img { height: 52px; }
.foot .logo b { font-size: 24px; }
.foot .logo small { font-size: 11.5px; }
.foot p { margin: 16px 0 0; color: var(--fg-soft); max-width: 46ch; }
.foot h3 { font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--flame); margin: 4px 0 12px; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.foot ul a { text-decoration: none; color: var(--fg-soft); }
.foot ul a:hover, .foot ul a:focus-visible { color: var(--rice); text-decoration: underline; outline: none; }
.foot p.rights { max-width: none; margin: 36px 0 0; padding: 16px 18px; border: 1px solid var(--edge); border-radius: 8px; font-size: 13.5px; line-height: 1.6; }
.foot p.rights b { color: var(--rice); font-weight: 600; }
.foot .base { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--edge); display: flex; justify-content: space-between; gap: 10px 30px; flex-wrap: wrap; font-size: 13px; color: var(--fg-soft); }

@media (max-width: 760px) {
  body { font-size: 16px; }
  #words { top: auto; bottom: 60px; transform: none; width: auto; right: 44px; }
  .w { align-self: end; }
  .w h1, .w h2 { font-size: clamp(27px, 7.6vw, 38px); }
  .w p.support { margin-top: 12px; }
  .more { margin-top: 12px; }
  .go { margin-top: 16px; }
  nav#thread button span { display: none; }
  #hint { display: none; }
  #tag { left: 16px; right: auto; bottom: 14px; }
  .stages { grid-template-columns: 1fr; border-top: 0; border-left: 1px solid var(--ink); padding-left: 26px; gap: 26px; }
  .stages li { padding-top: 0; }
  .stages li::before { top: 6px; left: -32.5px; }
  .values, .routes, .pair { grid-template-columns: 1fr; }
  .routes > div, .routes > div:first-child { border-left: 0; padding: 22px 0; border-top: 1px solid var(--edge); }
  .routes > div:first-child { border-top: 0; padding-top: 0; }
  .pair > div + div { border-left: 0; border-top: 1px solid var(--edge); padding: 24px 0 0; margin-top: 24px; }
  .pair > div { padding-right: 0; }
  .plain { columns: 1; }
  .hero { align-items: flex-end; min-height: 0; }
  .hero-words { width: 100%; padding: 300px 0 44px; }
  .blocks { padding-left: 26px; }
  .blocks li::before { left: -32.5px; }
  .onward .next { text-align: left; margin-left: 0; }
  .foot .cols { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .w, .top, #words { transition: none; } }
