/* Freedom fighter pages (scripts/heroes/build.mjs). Reuses tokens from /styles.css; per-page --accent / --soft. */

.h-page { background: var(--cream); color: var(--text-warm); }
.h-progress { position: fixed; inset: 0 0 auto; height: 4px; z-index: 60; }
.h-progress span { display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, #FF9933 0 33%, #fff 33% 66%, #138808 66%); box-shadow: 0 0 8px rgba(0,0,0,.2); }

/* ---------- Hero ---------- */
.h-hero { position: relative; overflow: hidden; isolation: isolate; text-align: center; color: #fff;
  min-height: 92vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 80px 20px 96px;
  background: radial-gradient(ellipse at 50% 20%, color-mix(in srgb, var(--accent) 70%, #fff 0%) 0%, transparent 60%),
    linear-gradient(160deg, color-mix(in srgb, var(--accent) 85%, #000) 0%, #120A05 100%); }
.h-hero::after { content: ''; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(circle at 50% 110%, rgba(255,153,51,.35), transparent 55%); animation: glow 6s ease-in-out infinite alternate; }
@keyframes glow { from { opacity: .55; } to { opacity: 1; } }

.h-tiranga { position: absolute; inset: auto 0 0; height: 12px; display: flex; z-index: 1; }
.h-tiranga i { flex: 1; background-size: 200% 100%; animation: ribbon 4s linear infinite; }
.h-tiranga i:nth-child(1) { background-image: linear-gradient(90deg, #FF9933, #FFB766, #FF9933); }
.h-tiranga i:nth-child(2) { background-image: linear-gradient(90deg, #fff, #f1f1f1, #fff); }
.h-tiranga i:nth-child(3) { background-image: linear-gradient(90deg, #138808, #2FA324, #138808); }
@keyframes ribbon { to { background-position: -200% 0; } }

.h-watermark { position: absolute; z-index: -1; top: 50%; left: 50%; transform: translate(-50%, -50%);
  font-family: 'Tiro Devanagari Hindi', serif; font-size: clamp(5rem, 22vw, 16rem); line-height: 1; white-space: nowrap;
  color: rgba(255,255,255,.05); animation: drift 18s ease-in-out infinite alternate; pointer-events: none; }
@keyframes drift { from { transform: translate(-54%, -50%); } to { transform: translate(-46%, -52%); } }

.h-crumb { position: absolute; top: 20px; left: 0; right: 0; font-size: .85rem; color: rgba(255,255,255,.7); }
.h-crumb a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

.h-emblem { position: relative; width: 132px; height: 132px; display: grid; place-items: center; margin-bottom: 18px;
  animation: rise .9s cubic-bezier(.2,.8,.2,1) both; }
.h-emblem > span { font-size: 3.4rem; position: relative; z-index: 1; filter: drop-shadow(0 6px 16px rgba(0,0,0,.45)); }
.h-chakra { position: absolute; inset: 0; color: rgba(255,255,255,.28); animation: spin 30s linear infinite; }
.h-emblem::before { content: ''; position: absolute; inset: 14px; border-radius: 50%; background: radial-gradient(circle, rgba(255,153,51,.35), transparent 70%);
  animation: pulse 3s ease-in-out infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { transform: scale(1.18); opacity: .6; } }
@keyframes rise { from { opacity: 0; transform: translateY(24px) scale(.96); } }

.h-known { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  padding: 7px 16px; border-radius: 999px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25);
  animation: rise .8s .2s both; }
.h-name { font-family: var(--serif); font-weight: 700; font-size: clamp(2.6rem, 8vw, 5.2rem); line-height: 1.02; margin: 18px 0 8px;
  max-width: 900px; text-shadow: 0 4px 30px rgba(0,0,0,.4); }
.h-name span { display: inline-block; opacity: 0; transform: translateY(.5em) rotate(4deg);
  animation: letter .7s cubic-bezier(.2,.8,.2,1) forwards; animation-delay: calc(.35s + var(--i) * 35ms); }
@keyframes letter { to { opacity: 1; transform: none; } }
.h-hindi { font-family: 'Tiro Devanagari Hindi', serif; font-size: clamp(1.4rem, 4vw, 2rem); color: #FFCF8A; animation: rise .8s 1s both; }
.h-meta { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin: 16px 0 26px; animation: rise .8s 1.1s both; }
.h-meta span { background: rgba(0,0,0,.25); padding: 7px 14px; border-radius: 999px; font-size: .9rem; }

.h-quote { max-width: 720px; margin: 0 auto; }
.h-quote p { font-family: var(--serif); font-style: italic; font-size: clamp(1.4rem, 3.6vw, 2.1rem); line-height: 1.3; }
.h-quote p .w { opacity: 0; filter: blur(6px); display: inline-block; transition: opacity .5s, filter .5s; }
.h-quote p .w.on { opacity: 1; filter: none; }
.h-quote p::before { content: '“'; color: #FF9933; } .h-quote p::after { content: '”'; color: #FF9933; }
.h-quote cite { display: block; margin-top: 10px; font-style: normal; font-size: .88rem; color: rgba(255,255,255,.65); }
.h-scroll { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); color: #fff; font-size: 1.4rem;
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,.4); display: grid; place-items: center;
  text-decoration: none; animation: bob 2s ease-in-out infinite; }
@keyframes bob { 50% { transform: translate(-50%, 8px); } }

/* Marigold petals (spawned by heroes.js) */
.h-petals { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.h-petals i { position: absolute; top: -40px; width: 14px; height: 10px; border-radius: 60% 0 60% 0;
  background: radial-gradient(circle at 30% 30%, #FFC94A, #F08A00); opacity: .85;
  animation: fall linear infinite; }
@keyframes fall { to { transform: translate(var(--x, 60px), 110vh) rotate(720deg); } }

/* ---------- Body ---------- */
.h-main { max-width: 760px; margin: 0 auto; padding: 56px 20px 40px; }
.h-main h2 { font-family: var(--serif); font-size: clamp(1.6rem, 4vw, 2.1rem); line-height: 1.2; margin: 0 0 18px; }
.h-main p { font-size: 1.08rem; line-height: 1.8; }
.h-lead { font-size: 1.3rem !important; line-height: 1.7 !important; font-weight: 500; }
.h-lead::first-letter { font-family: var(--serif); font-size: 3.6em; float: left; line-height: .8; margin: 6px 10px 0 0; color: var(--accent); }

.h-card { border-radius: 24px; padding: 26px 24px 10px; margin: 36px 0; }
.h-card h2 { font-family: var(--sans); font-size: 1.15rem; font-weight: 700; }
.h-short { background: var(--soft); border: 2px dashed color-mix(in srgb, var(--accent) 45%, transparent); }
.h-short ul { list-style: none; padding: 0; margin: 0; }
.h-short li { position: relative; padding-left: 34px; margin-bottom: 14px; font-size: 1.05rem; line-height: 1.6; }
.h-short li::before { content: '✓'; position: absolute; left: 0; top: 1px; width: 24px; height: 24px; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: .8rem; font-weight: 700; display: grid; place-items: center; }

.h-facts { margin: 48px 0; }
.h-facts ol { list-style: none; counter-reset: fact; padding: 0; margin: 0; display: grid; gap: 14px; }
.h-facts li { counter-increment: fact; position: relative; background: #fff; border-radius: 20px; padding: 20px 20px 20px 84px;
  font-size: 1.06rem; line-height: 1.6; box-shadow: 0 1px 0 var(--border), 0 10px 30px -18px color-mix(in srgb, var(--accent) 60%, transparent); }
.h-facts li::before { content: counter(fact, decimal-leading-zero); position: absolute; left: 20px; top: 50%; transform: translateY(-50%);
  font-family: var(--serif); font-weight: 700; font-size: 2.4rem; color: var(--accent); opacity: .85; }

.h-rethink { position: relative; margin: 56px -20px; padding: 56px 32px 40px; text-align: center; color: #fff; overflow: hidden;
  background: linear-gradient(140deg, color-mix(in srgb, var(--accent) 80%, #000), #120A05); border-radius: 28px; }
.h-rethink p { font-family: var(--serif); font-size: clamp(1.45rem, 3.8vw, 2rem) !important; line-height: 1.4 !important; max-width: 600px; margin: 0 auto; }
.h-rethink small { display: inline-block; margin-top: 18px; font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: #FFCF8A; }
.h-rethink-mark { position: absolute; top: -30px; left: 16px; font-family: var(--serif); font-size: 10rem; color: rgba(255,153,51,.25); line-height: 1; }

.h-timeline { position: relative; margin: 56px 0; }
.h-line { position: absolute; left: 30px; top: 86px; bottom: 0; width: 3px; background: var(--border); border-radius: 3px; }
.h-line-fill { display: block; width: 100%; height: 0; background: linear-gradient(#FF9933, var(--accent)); border-radius: 3px; }
.h-timeline ol { list-style: none; padding: 0; margin: 0; }
.h-timeline li { position: relative; padding: 0 0 26px 76px; }
.h-timeline li::before { content: ''; position: absolute; left: 22px; top: 6px; width: 19px; height: 19px; border-radius: 50%;
  background: #fff; border: 4px solid var(--accent); box-shadow: 0 0 0 6px var(--cream); }
.h-timeline b { display: inline-block; font-family: var(--serif); font-size: 1.5rem; color: var(--accent); margin-bottom: 2px; }
.h-timeline p { margin: 0; }

.h-tell { background: linear-gradient(160deg, #1C1438, #2D1B4E); color: #F4ECFF; position: relative; overflow: hidden; }
.h-tell::before { content: '✦ · ✧ · ✦'; position: absolute; right: 18px; top: 16px; color: rgba(255,255,255,.35); letter-spacing: .3em; }
.h-tell h2 { color: #FFE3A3; }
.h-tell p { color: #F4ECFF; }

.h-values { margin: 52px 0; }
.h-values > div { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.h-values article { background: #fff; border-radius: 22px; padding: 22px; text-align: center; border: 1px solid var(--border);
  transition: transform .3s, box-shadow .3s; }
.h-values article:hover { transform: translateY(-6px); box-shadow: 0 16px 32px -20px var(--accent); }
.h-values article > span { font-size: 2.2rem; display: block; }
.h-values h3 { font-family: var(--serif); font-size: 1.35rem; margin: 6px 0; color: var(--accent); }
.h-values p { font-size: .98rem !important; line-height: 1.6 !important; margin: 0; }

.h-remember { text-align: center; margin: 48px 0; }
.h-light { cursor: pointer; border: 0; background: #1A0F05; color: #FFE3A3; border-radius: 999px; padding: 14px 26px 14px 18px;
  font: 600 1.05rem var(--sans); display: inline-flex; align-items: center; gap: 12px; transition: transform .2s, box-shadow .3s; }
.h-light:hover { transform: scale(1.04); }
.h-light .diya { position: relative; font-size: 1.8rem; }
.h-light .flame { position: absolute; left: 50%; top: -12px; width: 10px; height: 16px; margin-left: -5px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: radial-gradient(circle at 50% 70%, #fff6c2, #FFB000 50%, transparent 72%); opacity: 0; transform: scale(.3); transition: .4s; }
.h-light.lit { box-shadow: 0 0 40px 6px rgba(255,176,0,.45); }
.h-light.lit .flame { opacity: 1; transform: none; animation: flicker 1.4s ease-in-out infinite; }
@keyframes flicker { 0%,100% { transform: scale(1) rotate(-2deg); } 50% { transform: scale(1.12, .92) rotate(3deg); } }
.h-light-done { margin-top: 12px; font-weight: 600; color: var(--accent); }

.h-cta { position: relative; text-align: center; color: #fff; margin: 56px -20px 32px; padding: 52px 28px 40px; border-radius: 30px; overflow: hidden;
  background: radial-gradient(circle at 80% 0%, rgba(223,176,32,.4), transparent 45%), linear-gradient(150deg, var(--emerald-dark), var(--emerald-deep)); }
.h-cta h2 { color: #fff; }
.h-cta p { color: rgba(255,255,255,.88); max-width: 540px; margin: 0 auto 22px; }
.h-cta-diya { position: relative; display: inline-block; font-size: 2.8rem; margin-bottom: 6px; }
.h-cta-diya .flame { position: absolute; left: 50%; top: -14px; width: 12px; height: 20px; margin-left: -6px; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
  background: radial-gradient(circle at 50% 70%, #fff6c2, #FFB000 50%, transparent 72%); animation: flicker 1.4s ease-in-out infinite; }
.h-stores { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.h-store { display: inline-block; background: var(--gold-bright); color: var(--emerald-deep); font-weight: 700; padding: 13px 22px;
  border-radius: 999px; text-decoration: none; transition: transform .2s, background .2s; }
.h-store:hover { background: #fff; transform: translateY(-2px); }

.h-next { display: flex; align-items: center; justify-content: space-between; gap: 14px; text-decoration: none; color: #fff;
  background: linear-gradient(120deg, color-mix(in srgb, var(--accent) 85%, #000), #2B1608); border-radius: 22px; padding: 20px 22px; margin: 24px 0; }
.h-next small { display: block; font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; opacity: .7; }
.h-next span { font-family: var(--serif); font-size: 1.4rem; font-weight: 700; }
.h-next b { font-size: 1.6rem; transition: transform .2s; } .h-next:hover b { transform: translateX(6px); }

.h-more h2 { font-size: 1.3rem !important; }
.h-more div { display: flex; flex-wrap: wrap; gap: 8px; }
.h-more a { display: inline-flex; gap: 6px; align-items: center; background: #fff; border: 1px solid var(--border); color: var(--text-warm);
  border-radius: 999px; padding: 8px 14px; font-size: .92rem; text-decoration: none; }
.h-more a:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Index ---------- */
.h-hero-index { min-height: 86vh; background: radial-gradient(ellipse at 50% 0%, #1F6B47 0%, transparent 60%), linear-gradient(170deg, #062A1A, #120A05); }
.h-flag { display: grid; grid-template-rows: repeat(3, 1fr); width: 150px; height: 100px; margin-bottom: 24px; border-radius: 6px; overflow: hidden;
  box-shadow: 0 20px 40px -10px rgba(0,0,0,.5); animation: wave 3.2s ease-in-out infinite; transform-origin: left center; }
.h-flag i { display: grid; place-items: center; }
.h-flag i:nth-child(1) { background: #FF9933; } .h-flag i:nth-child(2) { background: #fff; } .h-flag i:nth-child(3) { background: #138808; }
.h-flag .h-chakra { position: static; width: 28px; height: 28px; color: #000080; animation-duration: 12s; }
@keyframes wave { 0%,100% { transform: perspective(400px) rotateY(0) skewY(0); } 50% { transform: perspective(400px) rotateY(-14deg) skewY(-2deg); } }
.h-lead-hero { max-width: 620px; font-size: 1.15rem; line-height: 1.7; color: rgba(255,255,255,.85); animation: rise .8s 1.2s both; }
.h-main-wide { max-width: 1120px; }
.h-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 20px; }
.h-tile { position: relative; overflow: hidden; display: flex; flex-direction: column; text-decoration: none; color: var(--text-warm);
  background: #fff; border-radius: 26px; padding: 24px; min-height: 330px; border: 1px solid var(--border);
  transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s; transform-style: preserve-3d; }
.h-tile::before { content: ''; position: absolute; inset: 0 0 auto; height: 120px; z-index: 0;
  background: linear-gradient(140deg, var(--accent), color-mix(in srgb, var(--accent) 60%, #000)); }
.h-tile > * { position: relative; z-index: 1; }
.h-tile:hover { box-shadow: 0 30px 50px -28px var(--accent); }
.h-tile-emblem { font-size: 2.8rem; filter: drop-shadow(0 6px 10px rgba(0,0,0,.35)); }
.h-tile-hindi { position: absolute !important; right: 18px; top: 26px; font-family: 'Tiro Devanagari Hindi', serif; font-size: 1.4rem; color: rgba(255,255,255,.75); }
.h-tile h2 { font-family: var(--serif); font-size: 1.6rem; line-height: 1.15; margin: 52px 0 4px; }
.h-tile-known { font-weight: 600; color: var(--accent); font-size: .92rem; margin: 0; }
.h-tile-years { font-size: .85rem; color: var(--muted); margin: 2px 0 12px; }
.h-tile-fact { font-size: .95rem; line-height: 1.55; background: var(--soft); border-radius: 14px; padding: 12px; margin: 0 0 14px; flex: 1; }
.h-tile-go { font-weight: 700; color: var(--accent); }

/* ---------- Scroll reveal ---------- */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s cubic-bezier(.2,.8,.2,1), transform .8s cubic-bezier(.2,.8,.2,1);
  transition-delay: calc(var(--d, 0) * 90ms); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Phone ---------- */
.h-bar { display: none; }
@media (max-width: 760px) {
  .h-hero { min-height: 88vh; padding-top: 72px; }
  .h-bar:not([hidden]) { display: flex; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 50; align-items: center; justify-content: space-between;
    gap: 10px; background: var(--emerald-deep); color: #fff; padding: 10px 10px 10px 16px; border-radius: 999px; box-shadow: 0 8px 24px rgba(5,46,28,.35); font-size: .88rem; }
  .h-bar .h-store { padding: 9px 16px; flex: 0 0 auto; }
  .h-rethink, .h-cta { margin-left: 0; margin-right: 0; }
  .h-facts li { padding-left: 70px; } .h-facts li::before { font-size: 2rem; left: 16px; }
  footer { padding-bottom: 88px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .h-name span, .h-quote p .w { opacity: 1 !important; filter: none !important; transform: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
