/* Srinikesh Fireworks: shared styles (every page) */
@font-face { font-family: "Inter Tight"; src: url("../vendor/fonts/inter-tight-latin.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Noto Sans Tamil"; src: url("../vendor/fonts/noto-sans-tamil.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; unicode-range: U+0964-0965, U+0B82-0BFA, U+200C-200D, U+20B9, U+25CC; }
@font-face { font-family: "JetBrains Mono"; src: url("../vendor/fonts/jetbrains-mono-latin.woff2") format("woff2"); font-weight: 100 800; font-style: normal; font-display: swap; unicode-range: U+0000-00FF, U+2000-206F, U+2212; }

:root {
  --bg: #000;
  --surface: #17171a;
  --raise: #1f1f23;
  --line: rgba(255, 255, 255, .13);
  --text: #f5f5f7;
  --muted: #b3b3b8;
  --dim: #8e8e94;
  --gold: #f5c451;
  --red: #ff5a52;
  --green: #5fe08a;
  --blue: #5eb0ff;
  --accent: var(--gold);
  --sans: "Inter Tight", "Noto Sans Tamil", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --nav-h: 52px;
  --bar-h: 0px;
  --wrap: 1240px;
  color-scheme: dark;
}
@view-transition { navigation: auto; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 90px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 17px/1.55 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; padding-bottom: var(--bar-h); }
html:lang(ta) body { line-height: 1.8; }
h1, h2, h3, p, ul, ol, dl, dd, figure, fieldset { margin: 0; padding: 0; }
ul, ol { list-style: none; }
fieldset { border: 0; min-width: 0; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
img, svg, canvas { display: block; max-width: 100%; }
[hidden] { display: none !important; }
s { text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
main:focus { outline: none; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.no-js .js-only { display: none !important; }
.skip { position: fixed; left: 12px; top: -80px; z-index: 200; background: var(--text); color: #000; padding: 10px 16px; border-radius: 999px; font-weight: 600; }
.skip:focus { top: 12px; }
.wrap { width: min(var(--wrap), 100% - 40px); margin-inline: auto; }
.i18n-wait body { visibility: hidden; }

/* ---------- type */
.display { font-size: clamp(72px, 17vw, 160px); line-height: .92; letter-spacing: -.045em; font-weight: 700; }
.headline { font-size: clamp(40px, 7.4vw, 104px); line-height: 1; letter-spacing: -.04em; font-weight: 700; text-wrap: balance; }
.lead { font-size: clamp(18px, 1.5vw, 21px); color: var(--muted); max-width: 62ch; }
.eyebrow { display: block; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); font-weight: 500; }
.fine { font-size: 13px; color: var(--dim); }
.link { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.link:hover { text-decoration-thickness: 2px; }
html:lang(ta) .display { font-size: clamp(56px, 12vw, 132px); line-height: 1.25; letter-spacing: 0; }
html:lang(ta) .headline { font-size: clamp(30px, 5vw, 68px); line-height: 1.35; letter-spacing: 0; }
html:lang(ta) .eyebrow { letter-spacing: 0; }
h1, h2, h3, p, li, a, span, strong, dt, dd, button, label { overflow-wrap: break-word; }

/* ---------- buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 20px; border-radius: 999px; font-weight: 600; font-size: 15px; line-height: 1.2; text-align: center; border: 1px solid transparent; transition: background-color .3s var(--ease), border-color .3s var(--ease), color .3s var(--ease), transform .3s var(--ease); }
.btn-primary { background: var(--accent); color: #000; }
.btn-primary:hover { background: #ffd874; }
.btn-ghost { border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: rgba(255, 255, 255, .4); }
.btn-wide { width: 100%; }
.btn[disabled] { opacity: .55; cursor: default; }
.ico { width: 22px; height: 22px; flex: none; }
.x { width: 44px; height: 44px; border-radius: 50%; font-size: 26px; line-height: 1; color: var(--muted); display: grid; place-items: center; }
.x:hover { color: var(--text); background: rgba(255, 255, 255, .08); }
.badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #000; font: 700 12px/1 var(--mono); }
.badge[data-zero] { background: rgba(255, 255, 255, .16); color: var(--text); }

/* ---------- top nav */
.nav { position: fixed; inset: 12px 0 auto; z-index: 60; display: flex; justify-content: center; padding-inline: 12px; pointer-events: none; transition: transform .7s var(--ease); }
.nav.is-hidden { transform: translateY(-160%); }
.nav-bar { pointer-events: auto; position: relative; display: flex; align-items: center; gap: 8px; width: min(1000px, 100%); height: var(--nav-h); padding: 0 8px 0 20px; border-radius: 999px; background: rgba(24, 24, 27, .72); -webkit-backdrop-filter: saturate(160%) blur(22px); backdrop-filter: saturate(160%) blur(22px); border: 1px solid rgba(255, 255, 255, .1); overflow: hidden; transition: height .6s var(--ease), width .6s var(--ease); }
.nav.is-small .nav-bar { height: 44px; width: min(940px, 100%); }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; letter-spacing: -.03em; font-size: 17px; margin-right: auto; padding: 8px 4px; white-space: nowrap; }
.emblem { display: block; aspect-ratio: 1; background: var(--gold); -webkit-mask: url("logo-mark.svg") center / contain no-repeat; mask: url("logo-mark.svg") center / contain no-repeat; }
.emblem-nav { width: 28px; flex: none; }
.nav-links { position: relative; display: flex; align-items: center; }
.nav-links a { position: relative; z-index: 1; padding: 7px 14px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--muted); white-space: nowrap; transition: color .4s var(--ease); }
.nav-links a:hover, .nav-links a.is-active { color: var(--text); }
.glide { position: absolute; left: 0; top: 0; width: 0; height: 0; border-radius: 999px; background: rgba(255, 255, 255, .14); opacity: 0; pointer-events: none; }
.glide.is-ready { opacity: 1; transition: transform .6s var(--ease), width .6s var(--ease), height .6s var(--ease), opacity .3s; }
.nav-tools { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.lang { display: flex; padding: 3px; border-radius: 999px; background: rgba(255, 255, 255, .08); }
.lang button { min-height: 30px; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--muted); line-height: 1.3; }
.lang button[aria-pressed="true"] { background: rgba(255, 255, 255, .18); color: var(--text); }
.est-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 6px 8px 6px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; background: rgba(255, 255, 255, .1); white-space: nowrap; }
.est-btn:hover { background: rgba(255, 255, 255, .18); }
.menu-btn { display: none; min-height: 36px; padding: 6px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; background: rgba(255, 255, 255, .1); }
.nav-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); transition: background-color .8s var(--ease); }

/* ---------- overlays: menu sheet, drawers */
.backdrop { position: fixed; inset: 0; z-index: 80; background: rgba(0, 0, 0, .6); opacity: 0; transition: opacity .4s var(--ease); }
.backdrop.is-open { opacity: 1; }
.sheet, .drawer { position: fixed; z-index: 90; background: #131315; border: 1px solid var(--line); transition: transform .6s var(--ease), opacity .4s var(--ease); }
.menu-sheet { inset: 12px 12px auto; border-radius: 26px; padding: 14px 14px 22px; transform: translateY(-16px); opacity: 0; }
.menu-sheet.is-open { transform: none; opacity: 1; }
.menu-sheet .x { margin-left: auto; }
.menu-links a { display: block; padding: 12px 10px; font-size: 26px; font-weight: 600; letter-spacing: -.03em; border-bottom: 1px solid var(--line); }
html:lang(ta) .menu-links a { font-size: 21px; letter-spacing: 0; }
.menu-links a:last-child { border-bottom: 0; }
.drawer { top: 0; right: 0; bottom: 0; width: min(440px, 100%); display: flex; flex-direction: column; transform: translateX(100%); border-width: 0 0 0 1px; }
.drawer.is-open { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 12px 10px 22px; }
.drawer-head h2 { font-size: 22px; letter-spacing: -.02em; }
html:lang(ta) .drawer-head h2 { letter-spacing: 0; font-size: 19px; }
.drawer-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 4px 22px 16px; }
.drawer-foot { padding: 14px 22px calc(18px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: #131315; }
.notice { font-size: 14px; color: var(--text); background: rgba(245, 196, 81, .1); border: 1px solid rgba(245, 196, 81, .35); border-radius: 12px; padding: 10px 14px; margin-bottom: 12px; }
.cart-empty { color: var(--muted); padding: 18px 0; }
.cart-empty a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- estimate lines + totals (panel and estimate page) */
.lines li { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: center; }
.line-name { font-weight: 600; font-size: 15px; line-height: 1.3; }
.line-meta { grid-column: 1; font: 12px/1.4 var(--mono); color: var(--dim); }
.line-total { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.line-controls { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.line-remove { font-size: 13px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; min-height: 36px; padding: 0 4px; }
.line-remove:hover { color: var(--text); }
.totals { margin: 14px 0; display: grid; gap: 6px; font-variant-numeric: tabular-nums; }
.tot { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.tot dt { color: var(--muted); font-size: 14px; }
.tot-market dd { color: var(--dim); }
.tot-actual dt { color: var(--text); font-weight: 600; font-size: 16px; }
.tot-actual strong { font-size: 24px; letter-spacing: -.02em; }
.tot-save dd { color: var(--accent); font-weight: 600; }

/* ---------- stepper */
.stepper { display: inline-grid; grid-template-columns: 36px minmax(36px, 52px) 36px; align-items: center; height: 40px; border: 1px solid var(--line); border-radius: 999px; }
.stepper button { height: 38px; font-size: 18px; color: var(--muted); border-radius: 999px; }
.stepper button:hover { color: var(--text); }
.stepper input { width: 100%; height: 38px; background: none; border: 0; text-align: center; font: 600 15px/1 var(--mono); -moz-appearance: textfield; appearance: textfield; padding: 0; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ---------- image slots */
.slot { position: relative; display: grid; place-content: center; justify-items: center; gap: 8px; overflow: hidden; background: #111113; border: 1px solid rgba(255, 255, 255, .09); border-radius: 16px; color: var(--dim); aspect-ratio: 4 / 3; text-align: center; }
.slot-ico { width: 22px; height: 22px; background: currentColor; opacity: .7; -webkit-mask: var(--cam) center / contain no-repeat; mask: var(--cam) center / contain no-repeat; --cam: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.500' stroke-linejoin='round'%3E%3Cpath d='M3.500 8.500a2 2 0 0 1 2-2h2l1.500-2h6l1.500 2h2a2 2 0 0 1 2 2v8.500a2 2 0 0 1-2 2h-13a2 2 0 0 1-2-2z'/%3E%3Ccircle cx='12' cy='12.500' r='3.500'/%3E%3C/svg%3E"); }
.slot-cap { font-size: 12px; line-height: 1.3; padding: 0 8px; }
.slot.has-img { display: block; }
.slot img { width: 100%; height: 100%; object-fit: cover; }
.js .slot img { opacity: 0; transition: opacity .8s var(--ease); }
.js .slot img.is-loaded { opacity: 1; }
.slot.has-img .slot-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 12px 8px; color: var(--text); background: linear-gradient(transparent, rgba(0, 0, 0, .7)); text-align: left; }
.slot-cover { aspect-ratio: 16 / 10; }
.slot-hero { aspect-ratio: 21 / 8; border-radius: 24px; }
.slot-thumb { aspect-ratio: 1; width: 76px; flex: none; border-radius: 14px; }
.slot-thumb .slot-cap { display: none; }
.slot-portrait { aspect-ratio: 4 / 5; }
.slot-wide { aspect-ratio: 3 / 2; }
.slot-gallery { aspect-ratio: 1; width: 180px; flex: none; }

/* ---------- category tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: 28px 20px; }
.tile { display: block; }
.tile .slot { transition: border-color .5s var(--ease), transform .8s var(--ease); }
.tile:hover .slot { border-color: rgba(255, 255, 255, .35); }
.tile-text { display: block; padding: 12px 2px 0; }
.tile-name { display: block; font-size: 18px; font-weight: 600; letter-spacing: -.02em; line-height: 1.25; margin: 0; }
html:lang(ta) .tile-name { letter-spacing: 0; font-size: 16px; line-height: 1.5; }
.count { display: block; font: 12px/1.6 var(--mono); color: var(--dim); }
html:lang(ta) .count { font-family: var(--sans); font-size: 13px; }
.tiles-big { grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); }
.tile-plain { padding: 26px 22px 22px; border-top: 1px solid var(--line); min-height: 150px; transition: border-color .5s var(--ease); }
.tile-plain:hover { border-color: var(--accent); }
.tile-plain .tile-name { font-size: clamp(24px, 2.4vw, 32px); letter-spacing: -.03em; margin-bottom: 8px; }
html:lang(ta) .tile-plain .tile-name { font-size: 22px; letter-spacing: 0; }
.tile-note { display: block; margin-top: 10px; font-size: 14px; color: var(--muted); }

/* ---------- segmented control with gliding pill */
.seg { position: relative; display: inline-flex; max-width: 100%; padding: 4px; border-radius: 999px; background: rgba(255, 255, 255, .07); overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { position: relative; z-index: 1; flex: none; min-height: 38px; padding: 6px 16px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--muted); white-space: nowrap; transition: color .4s var(--ease); }
.seg button:hover, .seg button.is-active { color: var(--text); }
.seg .glide { background: rgba(255, 255, 255, .16); }
.no-js .seg button.is-active { background: rgba(255, 255, 255, .16); }

/* ---------- toasts */
.toasts { position: fixed; left: 50%; bottom: calc(var(--bar-h) + 18px); z-index: 120; transform: translateX(-50%); display: grid; gap: 8px; width: min(420px, 100% - 24px); pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 10px 10px 18px; border-radius: 999px; background: rgba(40, 40, 44, .96); border: 1px solid var(--line); font-size: 14px; line-height: 1.3; opacity: 0; transform: translateY(10px); transition: opacity .4s var(--ease), transform .6s var(--ease); }
.toast.is-in { opacity: 1; transform: none; }
.toast button { flex: none; min-height: 34px; padding: 4px 14px; border-radius: 999px; font-weight: 600; color: var(--accent); background: rgba(255, 255, 255, .08); }

/* ---------- footer */
.footer { padding: 56px 20px 40px; margin-top: 96px; border-top: 1px solid rgba(255, 255, 255, .08); text-align: center; color: var(--dim); font-size: 13px; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 6px; margin-bottom: 14px; }
.footer-links a { padding: 8px 10px; color: var(--muted); }
.footer-links a:hover { color: var(--text); }

/* ---------- mobile bottom bar */
.bottom-bar { display: none; }
@media (max-width: 820px) {
  :root { --bar-h: calc(62px + env(safe-area-inset-bottom)); }
  .nav-links, .est-btn { display: none; }
  .menu-btn { display: inline-flex; align-items: center; }
  .nav-bar { padding-left: 16px; }
  .bottom-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; display: grid; grid-template-columns: repeat(4, 1fr); height: var(--bar-h); padding-bottom: env(safe-area-inset-bottom); background: rgba(18, 18, 20, .86); -webkit-backdrop-filter: saturate(160%) blur(22px); backdrop-filter: saturate(160%) blur(22px); border-top: 1px solid rgba(255, 255, 255, .1); }
  .bottom-bar a { position: relative; display: grid; place-content: center; justify-items: center; gap: 3px; font-size: 11px; font-weight: 600; color: var(--text); line-height: 1.2; text-align: center; padding: 0 2px; }
  .bottom-bar .badge { position: absolute; top: 6px; left: calc(50% + 6px); }
  .kb-open .bottom-bar { display: none; }
  .kb-open { --bar-h: 0px; }
  .drawer { top: auto; left: 0; width: 100%; max-height: 88dvh; border-width: 1px 0 0; border-radius: 24px 24px 0 0; transform: translateY(100%); }
  .slot-hero { aspect-ratio: 16 / 9; }
  .footer { margin-top: 64px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; scroll-behavior: auto !important; }
  @view-transition { navigation: none; }
}
html.locked { overflow: hidden; }
@media (max-width: 820px) { .locked .toasts { bottom: auto; top: 14px; } }

/* ---------- moving, twinkling star field behind every page (three layers at different speeds) */
.starfield { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.starfield i { position: absolute; left: 0; right: 0; top: -900px; bottom: 0; background: url("stars.svg") 0 0 / 900px 900px; will-change: transform, opacity; }
.starfield i:nth-child(1) { animation: star-drift 200s linear infinite; opacity: .7; }
.starfield i:nth-child(2) { top: -600px; background-size: 600px 600px; background-position: 210px 140px; animation: star-drift-2 130s linear infinite, star-twinkle 3.6s ease-in-out infinite alternate; }
.starfield i:nth-child(3) { top: -1300px; background-size: 1300px 1300px; background-position: 420px 300px; animation: star-drift-3 90s linear infinite, star-twinkle 2.3s ease-in-out -1.2s infinite alternate; }
@keyframes star-drift { to { transform: translate3d(0, 900px, 0); } }
@keyframes star-drift-2 { to { transform: translate3d(0, 600px, 0); } }
@keyframes star-drift-3 { to { transform: translate3d(0, 1300px, 0); } }
@keyframes star-twinkle { from { opacity: .15; } to { opacity: .95; } }
@media (prefers-reduced-motion: reduce) { .starfield i { animation: none !important; } }
@media (max-width: 820px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 12px; }
  .tiles-big { grid-template-columns: 1fr; }
  .tile-name { font-size: 15px; }
}

/* the moving star layers rest while the opening scene is on screen (they are hidden behind it anyway) */
.story-on .starfield i { animation-play-state: paused; }
@media (max-width: 820px) { .brand { font-size: 14px; gap: 6px; } .emblem-nav { width: 22px; } }
@media (max-width: 400px) { .emblem-nav { display: none; } }
