/* Hallmark · shape: custom, the app's own day scene then one screen per tab · genre: editorial · theme: brand
 * paper: #F9EDDD · accent: #F2701F · display: Noto Serif Tamil · body: Anek Tamil · hero: head and store buttons left, the sun on its arc over the time strip right, hills across the foot · nav: wordmark left, language pill and privacy right · footer: one teal band, links in a row · signature: drag the orange strip and the sun crosses the sky into night
 * axes: light/roman-serif/warm · posture: brand-inherited · contrast: pass · fold: pass · v2.0.0 */
/* Hallmark · pre-emit critique: P4 H4 E4 S5 R4 V4 · weakest: R, the dotted paper and dotted rays are both kept because both are the app's own marks; the star field and lamp were cut */
/* Hallmark · waive 80 · two wave bands, header.hero and section.get, no figures or objects · the hills and dunes are the scene the Naal app itself opens on, redrawn from its code */
/* Hallmark · waive 44c · hills band 192px tall closes the first screen under the copy · the hero is the app's opening scene, sun above and hills at the foot */
/* Hallmark · waive 79 · the space under the store buttons holds the teal hills, drawn full width · the hills are the horizon the sun sets behind */
/* Hallmark · dismissed 25 · each promise line is one short sentence under a single large word, set as a caption */
/* Hallmark · dismissed 23 · the orange sun and time strip are the app's own controls, shown once in the hero */
/* Hallmark · dismissed 41 · teal on orange carries only the 48px clock and the 20px bold day label, both large text above 3:1 */
@import url("./tokens.css");
@import url("./base.css");

/* ---------- page ---------- */
body {
  transition: background-color var(--dur-long) var(--ease-out), color var(--dur-long) var(--ease-out);
  background-image: radial-gradient(var(--color-dot) 1px, transparent 1.6px);
  background-size: 16px 16px;
  line-height: 1.6;
}
h1, h2, h3 { line-height: 1.25; color: var(--color-ink); }
h1 { font-size: clamp(2.5rem, 4.6vw + 0.75rem, 5rem); max-width: 13ch; }
h2 { font-size: clamp(1.75rem, 2.2vw + 0.9rem, 3rem); max-width: 22ch; }
.lead { color: var(--color-ink-2); }
section { padding-block: var(--section-gap-s); }
.note { color: var(--color-muted); font-size: var(--text-sm); }

html[data-lang="en"] .ta, html[data-lang="ta"] .en { display: none; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  background-color: var(--color-paper);
  background-image: radial-gradient(var(--color-dot) 1px, transparent 1.6px);
  background-size: 16px 16px;
  color: var(--color-ink);
  padding-bottom: 192px; min-height: min(100svh, 880px); display: grid; grid-template-rows: auto 1fr;
  transition: background-color var(--dur-long) var(--ease-out), color var(--dur-long) var(--ease-out);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); padding-block: var(--space-lg); }
.wordmark { font-family: var(--font-display); font-weight: 800; font-size: var(--text-2xl); line-height: 1.2; text-decoration: none; color: var(--color-ink); }
.nav-right { display: flex; align-items: center; gap: var(--space-lg); }
.nav-right a { font-size: var(--text-sm); color: var(--color-ink); }
.langs { display: inline-flex; padding: var(--space-2xs); border-radius: var(--radius-pill); background: var(--color-raised); box-shadow: inset 0 0 0 1px var(--color-rule); }
.langs button {
  border: 0; background: transparent; color: var(--color-ink); cursor: pointer;
  padding: var(--space-2xs) var(--space-md); min-height: 36px; border-radius: var(--radius-pill); font-weight: 700; font-size: var(--text-sm);
  transition: background-color var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out);
}
.langs button:hover { background: color-mix(in oklab, var(--color-ink) 10%, transparent); }
.langs button:active { background: color-mix(in oklab, var(--color-ink) 18%, transparent); }
.langs button[aria-pressed="true"] { background: var(--color-ink); color: var(--color-paper); }
.langs button:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; transition: none; }

.hero-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: var(--space-2xl); align-items: center; padding-top: var(--space-xl); }
.hero-copy { display: grid; gap: var(--space-lg); justify-items: start; }
.stores { display: flex; flex-wrap: wrap; gap: var(--space-md); margin-top: var(--space-xs); }
.store {
  display: inline-flex; align-items: center; gap: var(--space-sm); min-height: 60px;
  padding: var(--space-xs) var(--space-lg); border-radius: var(--radius-pill);
  background: var(--color-ink); color: var(--color-paper); text-decoration: none;
  box-shadow: 0 14px 28px -16px var(--color-shadow);
  transition: transform var(--dur-short) var(--ease-out), background-color var(--dur-long) var(--ease-out), color var(--dur-long) var(--ease-out);
}
.store svg { width: 26px; height: 26px; flex: none; fill: currentColor; }
.store span { display: grid; line-height: 1.15; text-align: left; }
.store small { font-size: var(--text-xs); opacity: 0.85; }
.store b { font-size: var(--text-lg); font-weight: 700; }
.store:hover { transform: translateY(-2px); }
.store:active { transform: translateY(0) scale(0.98); }
.store:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; transition: none; }
.store[aria-disabled="true"] { cursor: default; }
.store[aria-disabled="true"]:hover, .store[aria-disabled="true"]:active { transform: none; }

.scene { display: grid; gap: var(--space-md); position: relative; z-index: var(--z-raised); }
.sky { position: relative; height: 340px; container-type: size; --sx: 0.375; --sy: 0.17; --glow: 1; }
.orb {
  position: absolute; left: 0; top: 0; width: 148px; aspect-ratio: 1;
  transform: translate(calc(var(--sx) * (100cqw - 100%)), calc(var(--sy) * (100cqh - 100%)));
  opacity: var(--glow);
}
.orb::before {
  content: ""; position: absolute; inset: -58%; border-radius: 50%;
  background: repeating-conic-gradient(var(--color-accent-light) 0 2.2deg, transparent 2.2deg 20deg);
  -webkit-mask-image: repeating-radial-gradient(circle, var(--color-mask) 0 3px, transparent 3px 9px), radial-gradient(circle, transparent 36%, var(--color-mask) 37%, transparent 70%);
  mask-image: repeating-radial-gradient(circle, var(--color-mask) 0 3px, transparent 3px 9px), radial-gradient(circle, transparent 36%, var(--color-mask) 37%, transparent 70%);
  -webkit-mask-composite: source-in; mask-composite: intersect;
}
.orb::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: linear-gradient(180deg, var(--color-accent-light), var(--color-accent));
  box-shadow: 0 0 60px 10px color-mix(in oklab, var(--color-accent-light) 35%, transparent);
}
:root[data-night] .shot { border-color: var(--color-rule); }
:root[data-night] .orb::before { display: none; }
:root[data-night] .orb::after {
  background: var(--color-light);
  box-shadow: inset -26px 8px 0 0 var(--color-light-2), 0 0 50px 6px color-mix(in oklab, var(--color-light) 22%, transparent);
}

.strip {
  border-radius: var(--radius-card); padding: var(--space-md) var(--space-lg); color: var(--color-night);
  background: linear-gradient(100deg, var(--color-accent-light), var(--color-accent));
  box-shadow: 0 18px 32px -20px var(--color-shadow);
}
.strip-top { display: flex; align-items: baseline; justify-content: space-between; }
.clock {
  font-weight: 800; font-size: 3.5rem; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: 0.04em;
  -webkit-mask-image: radial-gradient(circle, var(--color-mask) 2.1px, transparent 2.5px); mask-image: radial-gradient(circle, var(--color-mask) 2.1px, transparent 2.5px);
  -webkit-mask-size: 6px 6px; mask-size: 6px 6px;
}
.daypart { font-weight: 700; font-size: var(--text-lg); }
.strip input[type="range"] {
  -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 32px; margin: var(--space-2xs) 0 0; background: transparent; cursor: grab; --p: 43.75%;
}
.strip input[type="range"]:active { cursor: grabbing; }
.strip input[type="range"]::-webkit-slider-runnable-track {
  height: 4px; border-radius: 2px;
  background: linear-gradient(to right, var(--color-night) 0 var(--p), transparent var(--p)), repeating-linear-gradient(to right, color-mix(in oklab, var(--color-night) 45%, transparent) 0 1.5px, transparent 1.5px 12px);
}
.strip input[type="range"]::-moz-range-track {
  height: 4px; border-radius: 2px;
  background: linear-gradient(to right, var(--color-night) 0 var(--p), transparent var(--p)), repeating-linear-gradient(to right, color-mix(in oklab, var(--color-night) 45%, transparent) 0 1.5px, transparent 1.5px 12px);
}
.strip input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 20px; height: 20px; margin-top: calc(var(--space-xs) * -1); border-radius: 50%;
  background: var(--color-light); border: 5px solid var(--color-night);
}
.strip input[type="range"]::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: var(--color-light); border: 5px solid var(--color-night); }
.strip input[type="range"]:hover::-webkit-slider-thumb { background: var(--color-accent-light); }
.strip input[type="range"]:hover::-moz-range-thumb { background: var(--color-accent-light); }
.strip input[type="range"]:focus-visible { outline: 2px solid var(--color-night); outline-offset: 4px; border-radius: 8px; }
.track { position: relative; }
.pulse {
  position: absolute; top: 10px; left: calc(var(--f, 0.4375) * (100% - 20px)); width: 20px; height: 20px;
  border-radius: 50%; border: 2px solid var(--color-night); pointer-events: none;
  animation: ping 1600ms var(--ease-out) infinite;
}
@keyframes ping { from { opacity: 0.9; transform: scale(1); } to { opacity: 0; transform: scale(3.2); } }
.hint { display: flex; align-items: center; justify-content: center; gap: var(--space-sm); font-weight: 700; font-size: var(--text-md); color: var(--color-ink); text-align: left; }
.hint svg { flex: none; width: 40px; height: 20px; fill: var(--color-accent); stroke: var(--color-accent-deep); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; animation: nudge 1600ms var(--ease-in-out) infinite; }
.hint svg path { fill: none; }
@keyframes nudge { 0%, 100% { transform: translateX(-5px); } 50% { transform: translateX(5px); } }
.touched .pulse { display: none; }
.touched .hint svg { animation: none; }

.hills { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: 170px; }
.hills .back { fill: var(--color-sand); }
.hills .front { fill: var(--color-hill); }
.hills .ridge { fill: none; stroke: var(--color-light-2); stroke-width: 5; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.hills .ground { fill: var(--color-paper); }

/* ---------- screens ---------- */
.shot { display: block; width: 100%; max-width: 300px; border-radius: 38px; overflow: hidden; background: var(--color-raised); border: var(--space-2xs) solid var(--color-ink); box-shadow: 0 30px 50px -28px var(--color-shadow);
  transition: border-color var(--dur-long) var(--ease-out); }
.shot img { width: 100%; }
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-2xl); align-items: center; }
.split.flip { grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); }
.split.wide { grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); }
.copy { display: grid; gap: var(--space-lg); justify-items: start; }

.limbs { list-style: none; margin: var(--space-md) 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-lg) var(--space-2xl); width: 100%; }
.limbs li { display: grid; gap: var(--space-3xs); }
.limbs b { font-family: var(--font-display); font-weight: 700; font-size: var(--text-xl); line-height: 1.35; overflow-wrap: break-word; min-width: 0; }
.limbs span { color: var(--color-muted); font-size: var(--text-sm); }

.pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2xl); align-items: start; }
.pair .shot:last-child { margin-top: var(--space-2xl); }

/* ---------- kural ---------- */
.kural { background: var(--color-night); color: var(--color-light); padding-block: var(--section-gap); }
.kural h2 { color: var(--color-light); font-size: var(--text-title); font-family: var(--font-body); font-weight: 700; max-width: none; }
.kural blockquote { margin: var(--space-xl) 0 0; padding: 0; }
.kural .verse { font-family: var(--font-display); font-weight: 700; font-size: clamp(1.375rem, 2.6vw + 0.4rem, 2.75rem); line-height: 1.5; overflow-wrap: break-word; }
.kural .verse span { display: block; }
.kural .meaning { margin-top: var(--space-xl); font-size: var(--text-xl); max-width: 60ch; color: var(--color-light); }
.kural .note { margin-top: var(--space-lg); color: var(--color-light-2); max-width: 52ch; }
.kural .bar { width: 96px; height: 5px; border-radius: 3px; background: var(--color-accent); margin-top: var(--space-xl); }

/* ---------- rasi ---------- */
.rasis { list-style: none; margin: var(--space-md) 0 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--space-lg) var(--space-md); width: 100%; }
.rasis li { display: grid; gap: var(--space-xs); justify-items: center; text-align: center; font-size: var(--text-sm); font-weight: 700; }
.rasis img { width: 100%; max-width: 92px; border-radius: 50%; background: var(--color-light); padding: 12%; box-shadow: inset 0 0 0 1px var(--color-rule); }

/* ---------- promises ---------- */
.promises { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-2xl); margin-top: var(--space-2xl); }
.promise { display: grid; gap: var(--space-sm); align-content: start; }
.promise b { font-family: var(--font-display); font-weight: 800; font-size: clamp(2rem, 2.6vw + 0.75rem, 3.5rem); line-height: 1.3; color: var(--color-accent-deep); overflow-wrap: break-word; min-width: 0; }
.promise p { font-size: var(--text-lead); color: var(--color-ink-2); max-width: 30ch; }

/* ---------- world ---------- */
.towns { list-style: none; margin: var(--space-xl) 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-xs) var(--space-lg); font-family: var(--font-display); font-weight: 700; font-size: clamp(1.25rem, 2.2vw + 0.75rem, 2.75rem); line-height: 1.45; }
.towns li:nth-child(3n + 1) { color: var(--color-accent-deep); }

/* ---------- get + footer ---------- */
.get { position: relative; padding-bottom: 0; }
.get .copy { padding-bottom: var(--space-2xl); }
.dunes { display: block; width: 100%; height: 150px; }
.dunes .sand { fill: var(--color-sand); }
.dunes .glow { fill: var(--color-accent-light); }
.dunes .sea { fill: var(--color-night); }
.foot { background: var(--color-night); color: var(--color-light); padding-block: var(--space-xl) var(--space-2xl); }
.foot .container { display: flex; flex-wrap: wrap; gap: var(--space-md) var(--space-xl); align-items: baseline; justify-content: space-between; }
.foot .wordmark { color: var(--color-light); }
.foot ul { list-style: none; display: flex; flex-wrap: wrap; gap: var(--space-sm) var(--space-lg); margin: 0; padding: 0; font-size: var(--text-sm); }
.foot a { color: var(--color-light); }
.foot a:focus-visible, .foot .wordmark:focus-visible { outline: 2px solid var(--color-light); outline-offset: 3px; }
.foot p { color: var(--color-light-2); font-size: var(--text-sm); flex-basis: 100%; }

/* ---------- motion: things rise into place as they are scrolled to ---------- */
/* The .js class is set by the script, so with scripting off everything is simply visible. */
.js .reveal {
  opacity: 0; transform: translate3d(0, 36px, 0);
  transition: opacity 900ms var(--ease-out), transform 1100ms var(--ease-out);
  transition-delay: calc(var(--i, 0) * 70ms);
}
.js .reveal.shot { transform: translate3d(0, 64px, 0) scale(0.94); transition-duration: 1000ms, 1300ms; }
.js .reveal.bar { transform: scaleX(0); transform-origin: left center; }
.js .reveal.in { opacity: 1; transform: none; }
@keyframes rise { from { opacity: 0; transform: translate3d(0, 28px, 0); } to { opacity: 1; transform: none; } }
@keyframes swell { from { transform: translate3d(0, 40%, 0); } to { transform: none; } }
.js .hero-copy > *, .js .scene > * { animation: rise 1000ms var(--ease-out) both; animation-delay: calc(var(--i, 0) * 110ms + 80ms); }
.js .hills { animation: swell 1400ms var(--ease-out) both; }

/* ---------- small screens ---------- */
@media (max-width: 60rem) {
  .hero { padding-bottom: 152px; min-height: 0; }
  .hero-grid, .split, .split.flip, .split.wide, .promises { grid-template-columns: minmax(0, 1fr); }
  .hero-grid { gap: var(--space-xl); }
  .hills { height: 130px; }
  .split .shot { margin-inline: auto; }
  .split.flip .copy { order: -1; }
  .rasis { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
@media (max-width: 40rem) {
  .nav-right a { display: none; }
  .sky { height: 210px; }
  .orb { width: 112px; }
  .clock { font-size: 3rem; }
  .rasis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .store { flex: 1 1 100%; justify-content: center; }
  .stores { width: 100%; }
  .dunes { height: 100px; }
}
@media (prefers-reduced-motion: reduce) {
  body, .hero, .store, .langs button { transition: none; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .js .hero-copy > *, .js .scene > *, .js .hills { animation: none; }
  .pulse { display: none; }
  .hint svg { animation: none; }
}
.split.wide .shot { justify-self: end; }
h2 + .lead { margin-top: var(--space-md); }
.copy h2 + .lead { margin-top: 0; }
