/* anshulsaxena.com — Virya lotus brand. Sora + Tiro Devanagari only.
   Tokens from the Virya logo kit. Saffron is for dark grounds only: on ivory/sand it fails
   contrast (1.6–1.9:1), so light sections use ember-deep (#C8431F, 4.6:1 on ivory) or ink. */
:root {
  --night: #14173A;
  --night-2: #1E2250;
  --ivory: #FBF6EC;
  --sand: #EDE3CF;
  --saffron: #F2A93B;
  --gold: #FFD36A;
  --ember: #E4572E;
  --ember-deep: #C8431F;
  --ink: #14173A;
  --ink-soft: #4A4F6E;
  --on-night: #FBF6EC;
  --on-night-soft: rgba(251, 246, 236, .74);
  --line: rgba(20, 23, 58, .08);
  --radius: 22px;
  --wrap: 1120px;
  --flame: linear-gradient(0deg, #E4572E 0%, #F2A93B 55%, #FFD36A 100%);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: Sora, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; }
a { color: inherit; }
.deva { font-family: 'Tiro Devanagari Hindi', 'Noto Sans Devanagari', serif; font-weight: 400; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.icon { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon--sm { width: 15px; height: 15px; stroke-width: 1.75; }
:focus-visible { outline: 2px solid var(--ember-deep); outline-offset: 3px; border-radius: 6px; }
.on-night :focus-visible { outline-color: var(--saffron); }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  padding: 10px 16px; border-radius: 10px;
  background: var(--night); color: var(--on-night); font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 28px; }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 246, 236, .92);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  max-width: 1180px; margin: 0 auto; padding: 10px 28px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px;
  text-decoration: none; font-weight: 700; font-size: 1.1rem; letter-spacing: -.02em;
}
.brand__mark { width: 26px; height: 26px; }
.nav__links { display: flex; align-items: center; gap: 6px; list-style: none; margin: 0; padding: 0; }
.nav__links a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px;
  color: var(--ink-soft); text-decoration: none; font-size: .95rem; font-weight: 500;
  border-radius: 10px; transition: color .16s ease, background .16s ease;
}
.nav__links a:hover { color: var(--ink); background: rgba(20, 23, 58, .05); }
.nav__links a[aria-current="true"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--ink); border-radius: 0; }
.nav__links .nav__cta {
  margin-left: 8px; padding: 0 18px; border-radius: 999px;
  background: var(--night); color: var(--on-night);
}
.nav__links .nav__cta:hover { background: var(--night-2); color: var(--on-night); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 22px; border-radius: 999px; border: 1px solid transparent;
  font-family: inherit; font-weight: 600; font-size: .92rem; text-decoration: none;
  transition: transform .16s ease, background .16s ease, color .16s ease, border-color .16s ease;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn .icon { width: 16px; height: 16px; }
.btn--ink { background: var(--night); color: var(--on-night); }
.btn--ink:hover { background: var(--night-2); }
.btn--line { background: transparent; color: var(--ink); border-color: rgba(20, 23, 58, .28); }
.btn--line:hover { background: rgba(20, 23, 58, .05); border-color: var(--ink); }
.btn--saffron { background: var(--saffron); color: var(--night); }
.btn--saffron:hover { background: var(--gold); }
.btn--ivory { background: var(--ivory); color: var(--night); }
.btn--ivory:hover { background: var(--sand); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Type ---------- */
.label {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px;
  font-size: .8rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
}
.label--ember { color: var(--ember-deep); }
.label--soft { color: var(--ink-soft); }
.label--saffron { color: var(--saffron); }
.h2 {
  margin: 0 0 22px; font-weight: 600; font-size: clamp(2.1rem, 5vw, 3.3rem);
  line-height: 1.05; letter-spacing: -.035em;
}
.lead { max-width: 56ch; margin: 0 0 32px; font-size: clamp(1rem, 1.35vw, 1.08rem); line-height: 1.7; color: var(--ink-soft); }
.on-night { background: var(--night); color: var(--on-night); }
.on-night .lead { color: var(--on-night-soft); }

.section { padding: clamp(72px, 10vw, 112px) 0; }

/* ---------- Hero ---------- */
.hero { padding: clamp(40px, 7vw, 80px) 0 clamp(64px, 9vw, 100px); }
.meaning {
  max-width: 760px; margin: 0 auto 28px; text-align: center;
  font-size: 15px; line-height: 1.6; color: var(--night-2);
}
.meaning strong { color: var(--ink); }
.meaning .deva, .meaning em { color: var(--ember-deep); }
.meaning em { font-style: normal; font-weight: 600; letter-spacing: .08em; font-size: 13px; }

.card {
  display: grid; grid-template-columns: minmax(240px, .9fr) 1.35fr; gap: clamp(36px, 5vw, 64px);
  padding: clamp(32px, 4.5vw, 52px) clamp(28px, 4vw, 48px);
  background: var(--sand); border-radius: 28px; box-shadow: 0 24px 70px rgba(20, 23, 58, .08);
}
.card__left { display: flex; flex-direction: column; align-items: flex-start; }
.name { margin: 0 0 16px; font-weight: 700; font-size: clamp(2.6rem, 5.5vw, 3.6rem); line-height: .98; letter-spacing: -.045em; }
.name span { display: block; }
.role {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 22px;
  font-weight: 600; font-size: 1.02rem; line-height: 1.35; color: var(--ink);
}
.role::before { content: ""; width: 18px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, #E4572E, #F2A93B); }
.meta { display: flex; flex-direction: column; gap: 8px; margin: 0 0 28px; padding: 0; list-style: none; color: var(--ink-soft); font-size: .92rem; }
.meta li { display: inline-flex; align-items: center; gap: 8px; }
.summary { margin: 0 0 32px; font-size: 1.02rem; line-height: 1.72; color: var(--ink-soft); }
.writing { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.writing a {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
  height: 100%; min-height: 64px; padding: 14px 16px;
  background: rgba(251, 246, 236, .6); border: 1px solid transparent; border-radius: 14px;
  font-size: .92rem; font-weight: 500; line-height: 1.4; text-decoration: none;
  transition: background .16s ease, border-color .16s ease, transform .16s ease;
}
.writing a:hover { background: var(--ivory); border-color: rgba(20, 23, 58, .14); transform: translateY(-1px); }
.writing .icon { width: 15px; height: 15px; margin-top: 3px; color: var(--ember-deep); }

/* Hero lotus: sways on a loop, off under reduced motion */
.lotus { height: 80px; width: auto; margin-bottom: 22px; overflow: visible; animation: lotusFloat 4s ease-in-out infinite; }
.lotus .p { transform-box: fill-box; transform-origin: 50% 100%; }
.lotus .p1 { animation: petal 1s cubic-bezier(.2,.8,.2,1) .45s both, swayL 3.2s ease-in-out 1.5s infinite; }
.lotus .p2 { animation: petal 1s cubic-bezier(.2,.8,.2,1) .25s both, swayL2 3.2s ease-in-out 1.5s infinite; }
.lotus .p3 { animation: petal 1s cubic-bezier(.2,.8,.2,1) .05s both, rise 3.2s ease-in-out 1.5s infinite; }
.lotus .p4 { animation: petal 1s cubic-bezier(.2,.8,.2,1) .25s both, swayR2 3.2s ease-in-out 1.5s infinite; }
.lotus .p5 { animation: petal 1s cubic-bezier(.2,.8,.2,1) .45s both, swayR 3.2s ease-in-out 1.5s infinite; }
.lotus .s { transform-box: fill-box; transform-origin: 50% 50%; animation: sparkIn .5s ease-out 1.1s both, spark 1.6s ease-in-out 1.6s infinite; }
.lotus .h { transform-box: fill-box; transform-origin: 50% 50%; opacity: 0; animation: halo 1.6s ease-out 1.6s infinite; }
@keyframes petal { from { transform: scale(.2, 0); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes swayL { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-12deg); } }
@keyframes swayL2 { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-6deg); } }
@keyframes swayR { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(12deg); } }
@keyframes swayR2 { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(6deg); } }
@keyframes rise { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(1.1); } }
@keyframes sparkIn { from { transform: scale(0); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes spark { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.9); opacity: .6; } }
@keyframes halo { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(5); opacity: 0; } }
@keyframes lotusFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* ---------- Games ---------- */
.games { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin: 44px 0 0; padding: 0; list-style: none; }
.game {
  display: flex; flex-direction: column; align-items: flex-start; height: 100%;
  padding: 30px 28px 28px; background: var(--night-2);
  border: 1px solid rgba(251, 246, 236, .06); border-radius: var(--radius);
}
.game__icon { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 22px; border-radius: 12px; background: rgba(242, 169, 59, .12); color: var(--saffron); }
.game h3 { margin: 0 0 10px; font-weight: 600; font-size: clamp(1.4rem, 2.4vw, 1.8rem); line-height: 1.12; letter-spacing: -.03em; }
.game__kicker { font-size: .72em; font-weight: 600; letter-spacing: .14em; color: var(--saffron); display: block; margin-bottom: 4px; }
.game__tag { margin: 0 0 14px; color: var(--saffron); font-weight: 500; font-size: .98rem; }
.game__desc { flex: 1; margin: 0 0 28px; font-size: .95rem; line-height: 1.65; color: var(--on-night-soft); }

/* ---------- Policy ---------- */
.split { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(36px, 6vw, 72px); align-items: center; }
.stats { display: flex; flex-wrap: wrap; gap: 20px 40px; margin: 0 0 36px; padding: 0; list-style: none; }
.stat__num { display: block; font-weight: 700; font-size: clamp(2.4rem, 5vw, 3.4rem); line-height: 1; letter-spacing: -.04em; }
.stat__label { display: block; margin-top: 10px; font-size: .9rem; }
.stats--ember .stat__num { color: var(--ember-deep); }
.stats--ember .stat__label { color: var(--ink-soft); }
.stats--saffron .stat__num { color: var(--saffron); }
.stats--saffron .stat__label { color: var(--on-night-soft); }
.features { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; }
.feature {
  display: flex; align-items: flex-start; gap: 16px; padding: 20px 22px;
  background: #fff; border-radius: 18px; box-shadow: 0 10px 30px rgba(20, 23, 58, .04);
  font-size: .98rem; line-height: 1.5; font-weight: 500;
}
.feature__icon { display: grid; place-items: center; flex-shrink: 0; width: 42px; height: 42px; border-radius: 12px; background: rgba(242, 169, 59, .16); color: var(--ember-deep); }

/* ---------- Grid Index ---------- */
.pillars { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; counter-reset: pillar; }
.pillars li {
  counter-increment: pillar; display: flex; flex-direction: column; gap: 6px;
  padding: 18px 18px 20px; min-height: 96px;
  background: var(--night-2); border: 1px solid rgba(251, 246, 236, .07); border-radius: 16px;
  font-size: .95rem; font-weight: 500; line-height: 1.35;
}
.pillars li::before { content: counter(pillar, decimal-leading-zero); font-size: .78rem; font-weight: 700; letter-spacing: .12em; color: var(--saffron); }
.pillars__caption { margin: 14px 0 0; font-size: .85rem; color: var(--on-night-soft); }

/* ---------- Footer ---------- */
.footer { padding: 48px 0 36px; font-size: .92rem; border-top: 1px solid rgba(251, 246, 236, .08); }
.footer__top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; padding-bottom: 24px; border-bottom: 1px solid rgba(251, 246, 236, .12); }
.footer .brand { font-size: 1.05rem; font-weight: 600; }
.footer__links { display: flex; flex-wrap: wrap; gap: 4px 8px; margin: 0; padding: 0; list-style: none; }
.footer__links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; color: var(--on-night-soft); text-decoration: none; border-radius: 8px; }
.footer__links a:hover { color: var(--saffron); }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin: 22px 0 0; color: rgba(251, 246, 236, .6); font-size: .84rem; }
.footer__bottom .tagline { letter-spacing: .14em; font-weight: 600; font-size: .75rem; color: var(--saffron); }

/* ---------- Simple pages (privacy, 404) ---------- */
.page { max-width: 46rem; padding: clamp(48px, 8vw, 80px) 28px clamp(64px, 9vw, 96px); margin: 0 auto; }
.page h1 { margin: 0 0 20px; font-size: clamp(2rem, 5vw, 2.6rem); font-weight: 700; letter-spacing: -.035em; line-height: 1.1; }
.page p { margin: 0 0 1.25rem; line-height: 1.7; color: var(--ink-soft); }
.page p strong { color: var(--ink); }
.page a { color: var(--ember-deep); text-underline-offset: 3px; }
.page a.btn { text-decoration: none; }
.page .btn--ink { color: var(--on-night); }
.page .btn--line { color: var(--ink); }
.notfound { text-align: center; }
.notfound .lotus-static { width: 72px; height: auto; margin: 0 auto 28px; }
.notfound .btn-row { justify-content: center; margin-top: 12px; }
.notfound .code { font-size: .8rem; font-weight: 600; letter-spacing: .2em; color: var(--ember-deep); margin-bottom: 8px; }

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
  .card, .split { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  html { scroll-padding-top: 112px; }
  .wrap, .page { padding-left: 20px; padding-right: 20px; }
  /* No hamburger: brand on row one, all four destinations visible on row two */
  .nav { flex-direction: column; align-items: stretch; gap: 0; padding: 4px 12px 0; }
  .brand { padding: 0 8px; }
  .nav__links { justify-content: space-between; gap: 0; overflow-x: auto; scrollbar-width: none; }
  .nav__links::-webkit-scrollbar { display: none; }
  .nav__links a { padding: 0 10px; font-size: .9rem; white-space: nowrap; }
  .nav__links .nav__cta { margin-left: 4px; padding: 0 16px; }
  .card { padding: 28px 22px; border-radius: 22px; }
  .writing, .games, .pillars { grid-template-columns: 1fr; }
  .games { gap: 16px; margin-top: 32px; }
  .game { padding: 24px 22px; }
  .game__icon { margin-bottom: 16px; }
  .game__desc { margin-bottom: 22px; }
  .pillars { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pillars li { min-height: 0; padding: 14px; font-size: .88rem; }
}
@media (prefers-reduced-motion: reduce) {
  .lotus, .lotus .p, .lotus .s, .lotus .h { animation: none; }
  .btn, .writing a, .nav__links a { transition: none; }
}

/* Phone: fit all four nav items without scrolling; keep the stats on one row */
@media (max-width: 720px) {
  .nav__links a { padding: 0 8px; }
  .stats { gap: 16px 28px; }
  .stat__num { font-size: 2.2rem; }
}
@media (max-width: 400px) {
  .hide-sm { display: none; }
}

.games-hint { display: none; margin: 18px 0 0; font-size: .85rem; color: var(--on-night-soft); }
/* Phone: games become a swipeable row instead of a 6-card stack (no JS; scroll-snap).
   The next card peeks in from the right so it is obvious the row scrolls. */
@media (max-width: 720px) {
  .games {
    display: flex; gap: 12px; margin-left: -20px; margin-right: -20px; padding: 4px 20px 16px;
    overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-left: 20px;
    overscroll-behavior-x: contain; scrollbar-width: none;
  }
  .games::-webkit-scrollbar { display: none; }
  .games > li { position: relative; flex: 0 0 84%; scroll-snap-align: start; }
  .games-hint { display: block; }
}

/* Notice shown when an email link is clicked (see site.js). */
.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 50; max-width: calc(100% - 32px); margin: 0;
  padding: 12px 18px; border-radius: 12px; background: var(--night); color: var(--on-night);
  font-size: .95rem; box-shadow: 0 8px 24px rgba(20, 23, 58, .25);
  transform: translate(-50%, 16px); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.toast--on { opacity: 1; transform: translate(-50%, 0); }
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }
