/* ============================================================
   TH**K — TERI MKC
   Design language: Indian street poster meets riso print.
   Chunky ink keylines, hard un-blurred shadows, halftone dots,
   tiranga accents, and paan-stain maroon as the colour of shame.
   ============================================================ */

/* ---------- 1. Tokens ---------- */
:root {
  --ink:        #0E0D0B;
  --ink-2:      #1A1815;
  --ink-3:      #2A2621;
  --paper:      #FFF8EC;
  --paper-2:    #F5E9D2;
  --muted:      #6B6156;

  --saffron:    #FF6B1A;
  --saffron-lt: #FF8A3D;
  --green:      #0E9F5A;
  --green-dk:   #0B7A42;
  --paan:       #A61B2B;   /* the stain */
  --paan-lt:    #E2455A;
  --gold:       #FFC53D;

  --shadow:     6px 6px 0 var(--ink);
  --shadow-lg:  10px 10px 0 var(--ink);
  --keyline:    3px solid var(--ink);

  --font-display: 'Anton', 'Oswald', Impact, 'Arial Narrow Bold', sans-serif;
  --font-body:    'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-hindi:   'Baloo 2', 'Nirmala UI', 'Segoe UI', sans-serif;

  --wrap: 1180px;
  --r: 4px;
}

/* ---------- 2. Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--paper);
  background-color: var(--ink);
  /* Halftone field — the print texture the whole site sits on */
  background-image:
    radial-gradient(circle at 1.5px 1.5px, rgba(255,107,26,.10) 1.1px, transparent 1.2px);
  background-size: 22px 22px;
  overflow-x: hidden;
}

img, svg { max-width: 100%; display: block; }
a { color: var(--gold); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: .95;
  letter-spacing: .5px;
  margin: 0 0 .5em;
  text-transform: uppercase;
}
h1 { font-size: clamp(2.6rem, 8vw, 5.6rem); }
h2 { font-size: clamp(2rem, 5vw, 3.4rem); }
h3 { font-size: clamp(1.3rem, 2.6vw, 1.85rem); }
p  { margin: 0 0 1.1em; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; position: relative; }
.center { text-align: center; }
.hindi { font-family: var(--font-hindi); font-weight: 700; }
.stack > * + * { margin-top: 1rem; }
.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;
}
.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 200;
  background: var(--gold); color: var(--ink); padding: .7rem 1.2rem;
  font-weight: 800; border-radius: var(--r); transition: top .15s;
}
.skip-link:focus { top: 1rem; }

/* ---------- 3. Paper / ink surface inversions ---------- */
.on-paper { background: var(--paper); color: var(--ink); }
.on-paper a { color: var(--paan); }
.on-paper h1, .on-paper h2, .on-paper h3 { color: var(--ink); }

/* ---------- 4. Brand lockup ---------- */
.lockup { display: flex; align-items: center; gap: .8rem; text-decoration: none; }
.lockup__mark { width: 46px; height: 46px; flex: none; }
.lockup__text { display: flex; flex-direction: column; line-height: 1; }
.lockup__name {
  font-family: var(--font-display);
  font-size: 1.6rem; letter-spacing: 1.5px; color: var(--paper);
  display: flex; align-items: baseline; gap: 1px;
}
.lockup__drops { display: inline-flex; gap: 2px; transform: translateY(-2px); }
.lockup__drops i {
  width: 8px; height: 11px; background: var(--paan-lt); display: block;
  border-radius: 50% 50% 50% 50% / 68% 68% 32% 32%;
  transform: rotate(180deg);
}
.lockup__sub {
  font-family: var(--font-display); font-size: .66rem; letter-spacing: 4px;
  color: var(--gold); margin-top: 3px;
}
.on-paper .lockup__name { color: var(--ink); }

/* ---------- 5. Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(14,13,11,.93);
  backdrop-filter: blur(10px);
  border-bottom: var(--keyline);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; padding: .7rem 0; gap: 1rem; }
.nav__links { display: flex; align-items: center; gap: .35rem; }
.nav__links a {
  font-family: var(--font-display); font-size: .95rem; letter-spacing: 1px;
  text-transform: uppercase; color: var(--paper); text-decoration: none;
  padding: .5rem .7rem; border-radius: var(--r); white-space: nowrap;
  transition: background .15s, color .15s;
}
.nav__links a:hover { background: var(--ink-3); color: var(--gold); }
.nav__links a[aria-current="page"] { background: var(--saffron); color: var(--ink); }
.nav__toggle {
  display: none; background: var(--ink-3); border: 2px solid var(--paper);
  color: var(--paper); font-size: 1.4rem; line-height: 1; cursor: pointer;
  padding: .45rem .7rem; border-radius: var(--r);
}
@media (max-width: 940px) {
  .nav__toggle { display: block; }
  .nav__links {
    position: absolute; inset: 100% 0 auto 0; flex-direction: column;
    align-items: stretch; background: var(--ink-2); padding: .8rem;
    border-bottom: var(--keyline); gap: .2rem;
  }
  .nav__links:not(.is-open) { display: none; }
  .nav__links a { padding: .85rem 1rem; font-size: 1.1rem; }
}

/* ---------- 6. Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  font-family: var(--font-display); font-size: 1.05rem; letter-spacing: 1.2px;
  text-transform: uppercase; text-decoration: none; cursor: pointer;
  padding: .95rem 1.7rem; border: var(--keyline); border-radius: var(--r);
  background: var(--gold); color: var(--ink);
  box-shadow: var(--shadow);
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover  { transform: translate(-2px,-2px); box-shadow: 8px 8px 0 var(--ink); }
.btn:active { transform: translate(3px,3px);  box-shadow: 2px 2px 0 var(--ink); }
.btn--primary { background: var(--saffron); color: var(--ink); }
.btn--danger  { background: var(--paan); color: var(--paper); }
.btn--green   { background: var(--green); color: var(--paper); }
.btn--ghost   { background: transparent; color: var(--paper); box-shadow: none; border-color: var(--paper); }
.btn--ghost:hover { background: var(--paper); color: var(--ink); }
.btn--sm { font-size: .85rem; padding: .6rem 1.05rem; box-shadow: 4px 4px 0 var(--ink); }
.btn--lg { font-size: 1.35rem; padding: 1.15rem 2.3rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none !important; }
.btn-row { display: flex; flex-wrap: wrap; gap: 1rem; }

/* ---------- 7. Cards, tags, callouts ---------- */
.card {
  background: var(--paper); color: var(--ink);
  border: var(--keyline); border-radius: var(--r);
  box-shadow: var(--shadow); padding: 1.6rem;
}
.card--ink { background: var(--ink-2); color: var(--paper); border-color: var(--paper); box-shadow: 6px 6px 0 var(--saffron); }
.card h3 { margin-bottom: .45rem; }

.tag {
  display: inline-block; font-family: var(--font-display); font-size: .78rem;
  letter-spacing: 2px; text-transform: uppercase; padding: .3rem .7rem;
  border: 2px solid currentColor; border-radius: 100px;
}
.tag--saffron { color: var(--saffron); }
.tag--paan { color: var(--paan); }
.tag--green { color: var(--green); }

.eyebrow {
  font-family: var(--font-display); letter-spacing: 5px; text-transform: uppercase;
  font-size: .85rem; color: var(--saffron); margin-bottom: 1rem;
}

.callout {
  border-left: 8px solid var(--saffron); background: var(--ink-2);
  padding: 1.2rem 1.4rem; border-radius: var(--r);
}
.callout--paan { border-left-color: var(--paan); }
.callout--green { border-left-color: var(--green); }
.on-paper .callout { background: var(--paper-2); }

/* ---------- 8. Tiranga rule & marquee ---------- */
.tiranga-bar {
  height: 7px;
  background: linear-gradient(90deg,
    var(--saffron) 0 33.33%, var(--paper) 33.33% 66.66%, var(--green) 66.66% 100%);
}

.marquee {
  overflow: hidden; border-block: var(--keyline);
  background: var(--paan); padding: .6rem 0;
}
.marquee__track {
  display: flex; width: max-content; gap: 2.5rem;
  animation: tk-scroll 38s linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee span {
  font-family: var(--font-display); font-size: 1.15rem; letter-spacing: 2.5px;
  text-transform: uppercase; color: var(--paper); white-space: nowrap;
}
@keyframes tk-scroll { to { transform: translateX(-50%); } }

/* ---------- 9. Hero ---------- */
.hero { position: relative; padding: clamp(3rem, 7vw, 6rem) 0 clamp(3rem, 6vw, 5rem); overflow: hidden; }
.hero__grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 3rem; align-items: center; }
@media (max-width: 900px) { .hero__grid { grid-template-columns: 1fr; gap: 2.2rem; } }

.hero__title { margin-bottom: .35em; }
.hero__title .drop-word { color: var(--paan-lt); }
.hero__lede { font-size: clamp(1.05rem, 2vw, 1.3rem); max-width: 54ch; color: #E8DCC8; }

.hero__mark {
  width: min(360px, 78vw); margin-inline: auto;
  filter: drop-shadow(12px 12px 0 rgba(0,0,0,.45));
  animation: tk-bob 5.5s ease-in-out infinite;
}
@keyframes tk-bob { 0%,100% { transform: translateY(0) rotate(-2deg);} 50% { transform: translateY(-14px) rotate(2deg);} }

/* Decorative splats floating behind the hero */
.splat { position: absolute; border-radius: 50%; background: var(--paan); opacity: .13; pointer-events: none; filter: blur(1px); }

/* ---------- 10. Live counter ---------- */
.counter {
  border: var(--keyline); border-color: var(--saffron); border-radius: var(--r);
  background: linear-gradient(180deg, var(--ink-2), var(--ink));
  padding: 1.6rem; text-align: center;
}
.counter__num {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 9vw, 5rem); line-height: 1;
  color: var(--gold); font-variant-numeric: tabular-nums;
  letter-spacing: 2px; word-break: break-all;
}
.counter__label { font-size: .95rem; color: #CFC3AE; margin-top: .5rem; }
.counter__note { font-size: .8rem; color: var(--muted); margin-top: .8rem; }

/* ---------- 11. Stat grid ---------- */
.grid { display: grid; gap: 1.5rem; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

/* Asymmetric two-column split. Needs an explicit breakpoint — auto-fit can't
   express uneven columns, and left uncollapsed on a phone it crushes the
   leaderboard bars to a few pixels wide. */
.split {
  display: grid; gap: 3rem; align-items: start;
  grid-template-columns: 1.1fr .9fr;
}
@media (max-width: 880px) {
  .split { grid-template-columns: 1fr; gap: 2.4rem; }
}

.stat { text-align: center; }
.stat__num {
  font-family: var(--font-display); font-size: clamp(2.4rem, 6vw, 3.6rem);
  line-height: 1; color: var(--paan);
}
.card--ink .stat__num { color: var(--gold); }
.stat__label { font-size: .95rem; font-weight: 600; }
.stat__src { font-size: .74rem; color: var(--muted); margin-top: .55rem; }

/* ---------- 12. Quote cards (Thook Gyaan) ---------- */
.quote-card {
  background: var(--paper); color: var(--ink);
  border: var(--keyline); border-radius: var(--r);
  box-shadow: var(--shadow); padding: 1.9rem 1.6rem 1.4rem;
  display: flex; flex-direction: column; gap: .9rem;
  position: relative; overflow: hidden;
  break-inside: avoid;
}
.quote-card::before {
  content: '"'; position: absolute; top: -34px; right: 10px;
  font-family: var(--font-display); font-size: 9rem; color: var(--saffron);
  opacity: .16; line-height: 1;
}
.quote-card__text {
  font-family: var(--font-display); font-size: 1.5rem; line-height: 1.12;
  text-transform: none; letter-spacing: .2px; position: relative; z-index: 1;
}
.quote-card__by { font-size: .88rem; font-weight: 700; color: var(--paan); font-style: italic; }
.quote-card__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: .8rem; }
.quote-card--hero { background: var(--gold); }
.quote-card--hero .quote-card__text { font-size: clamp(1.7rem, 4.4vw, 2.9rem); }

.masonry { columns: 3 300px; column-gap: 1.5rem; }
.masonry > * { margin-bottom: 1.5rem; }
.masonry > *:nth-child(4n+1) { rotate: -.7deg; }
.masonry > *:nth-child(4n+3) { rotate: .8deg; }

/* ---------- 13. Forms ---------- */
.field { margin-bottom: 1.5rem; }
.field > label, .fieldset__legend {
  display: block; font-family: var(--font-display); font-size: 1rem;
  letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: .5rem; color: var(--gold);
}
.field__hint { font-size: .84rem; color: #B5A894; margin: -.25rem 0 .55rem; }
.on-paper .field__hint { color: var(--muted); }

input[type="text"], input[type="file"], input[type="date"], select, textarea {
  width: 100%; font-family: var(--font-body); font-size: 1rem;
  padding: .85rem 1rem; color: var(--ink); background: var(--paper);
  border: var(--keyline); border-radius: var(--r);
}
textarea { min-height: 110px; resize: vertical; }
input[type="range"] { width: 100%; accent-color: var(--paan-lt); height: 34px; }

.chip-row { display: flex; flex-wrap: wrap; gap: .6rem; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; width: 0; height: 0; }
.chip span {
  display: block; cursor: pointer; padding: .65rem 1.05rem;
  border: 2px solid var(--paper); border-radius: 100px;
  font-size: .93rem; font-weight: 600; transition: .15s;
}
.chip input:checked + span { background: var(--saffron); border-color: var(--saffron); color: var(--ink); }
.chip input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 3px; }

.severity-out {
  font-family: var(--font-display); font-size: 1.5rem; color: var(--paan-lt);
  text-align: center; min-height: 1.6em;
}

.preview {
  margin-top: .8rem; border: var(--keyline); border-radius: var(--r);
  max-height: 280px; object-fit: cover; width: 100%;
}
.preview[hidden] { display: none; }

/* ---------- 14. Wall of stains ---------- */
.wall-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 1.3rem; }
.report-card {
  background: var(--ink-2); border: 2px solid var(--ink-3); border-radius: var(--r);
  padding: 1.1rem 1.2rem; display: flex; flex-direction: column; gap: .55rem;
}
.report-card__top { display: flex; justify-content: space-between; align-items: start; gap: .8rem; }
.report-card__city { font-family: var(--font-display); font-size: 1.3rem; color: var(--paper); }
.report-card__meta { font-size: .78rem; color: var(--muted); }
.report-card__sev { font-size: 1.1rem; letter-spacing: 2px; }
.report-card__note { font-size: .92rem; color: #CFC3AE; font-style: italic; }
.report-card img { border-radius: var(--r); max-height: 170px; object-fit: cover; width: 100%; }

.leader { display: flex; flex-direction: column; gap: .7rem; }
.leader__row { display: grid; grid-template-columns: 2rem 9rem 1fr auto; gap: .9rem; align-items: center; }
@media (max-width: 620px) { .leader__row { grid-template-columns: 1.6rem 6rem 1fr auto; gap: .5rem; font-size: .9rem; } }
.leader__rank { font-family: var(--font-display); color: var(--muted); }
.leader__city { font-weight: 700; }
.leader__bar { height: 18px; background: var(--ink-3); border-radius: 100px; overflow: hidden; }
.leader__fill {
  height: 100%; border-radius: 100px;
  background: linear-gradient(90deg, var(--saffron), var(--paan));
  width: 0; transition: width .9s cubic-bezier(.2,.8,.2,1);
}
.leader__val { font-family: var(--font-display); color: var(--gold); font-variant-numeric: tabular-nums; }

/* Abstract city constellation — deliberately NOT a map with borders */
.constellation { width: 100%; height: auto; }
.constellation circle { transition: r .5s ease, opacity .5s ease; }

/* ---------- 15. Pledge ---------- */
.pledge-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .9rem; }
.pledge-list li {
  display: flex; gap: .9rem; align-items: start;
  background: var(--ink-2); border-left: 6px solid var(--green);
  padding: 1rem 1.2rem; border-radius: var(--r);
}
.pledge-list .num {
  font-family: var(--font-display); color: var(--green); font-size: 1.5rem; line-height: 1; flex: none;
}
.badge-canvas { border: var(--keyline); border-radius: var(--r); box-shadow: var(--shadow); width: 100%; height: auto; background: var(--ink); }

/* ---------- 16. Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 1.5rem; translate: -50% 0; z-index: 300;
  background: var(--green); color: #fff; border: var(--keyline);
  box-shadow: var(--shadow); border-radius: var(--r);
  padding: .9rem 1.4rem; font-weight: 700; max-width: min(92vw, 460px);
  opacity: 0; pointer-events: none; transition: opacity .25s, translate .25s;
}
.toast.is-on { opacity: 1; translate: -50% -6px; }
.toast--bad { background: var(--paan); }

/* ---------- 17. Footer ---------- */
.footer { border-top: var(--keyline); background: var(--ink-2); padding: 3rem 0 2rem; font-size: .92rem; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2.2rem; margin-bottom: 2rem; }
@media (max-width: 780px) { .footer__grid { grid-template-columns: 1fr; } }
.footer h4 { font-size: 1rem; letter-spacing: 2px; color: var(--saffron); }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; }
.footer a { color: #CFC3AE; text-decoration: none; }
.footer a:hover { color: var(--gold); text-decoration: underline; }
.footer__legal { border-top: 1px solid var(--ink-3); padding-top: 1.4rem; color: var(--muted); font-size: .82rem; }

/* ---------- 18. Install (PWA) prompt ---------- */
.install-bar {
  position: fixed; inset: auto 1rem 1rem auto; z-index: 250;
  display: none; align-items: center; gap: .9rem;
  background: var(--gold); color: var(--ink); border: var(--keyline);
  box-shadow: var(--shadow); border-radius: var(--r); padding: .8rem 1rem;
}
.install-bar.is-on { display: flex; }

/* ---------- 19. Print ---------- */
@media print {
  .nav, .footer, .install-bar, .marquee, .btn { display: none !important; }
  body { background: #fff; color: #000; }
  .quote-card { box-shadow: none; break-inside: avoid; }
}
