/* Kartavya portal: a portal-style homepage (search-first hero, stat strip, service panel,
   category cards, banner carousel, navy finder band, spotlight, explore, accent band, dark footer) */

:root {
  --navy: #0d2836;
  --navy-2: #143a4d;
  --deep: #1e4d63;
  --accent: #b4501a;          /* Kartavya orange, darkened so white text passes AA */
  --accent-2: #c65d1e;
  --accent-soft: #fbeee3;
  --teal: #1f7a6f;
  --bg: #f4f6f8;
  --surface: #ffffff;
  --text: #1b2630;
  --muted: #53606c;
  --line: #e1e6ea;
  --focus: #0b6bcb;
  --shadow: 0 6px 22px rgba(13, 40, 54, .10);
  --shadow-s: 0 2px 8px rgba(13, 40, 54, .08);
  --w: 1180px;
  --r: 12px;
}
:root[data-theme="dark"] {
  --bg: #0a1319;
  --surface: #122029;
  --text: #e8eff3;
  --muted: #9fb1bc;
  --line: #223441;
  --accent-soft: #2a1b12;
  --focus: #f2c879;
  --shadow: 0 6px 22px rgba(0, 0, 0, .45);
  --shadow-s: 0 2px 8px rgba(0, 0, 0, .4);
}
html { font-size: 16px; scroll-behavior: smooth; scroll-padding-top: 84px; }
html[data-fs="-1"] { font-size: 14px; }
html[data-fs="1"] { font-size: 18px; }
html[data-fs="2"] { font-size: 20px; }

*, *::before, *::after { box-sizing: border-box; }
body.portal {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: "Noto Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.55; -webkit-font-smoothing: antialiased;
}
:where(.portal) img { max-width: 100%; height: auto; }
:where(.portal) a { color: inherit; }
:where(.portal) :is(h1, h2, h3, p, ul, ol, figure, blockquote) { margin: 0; padding: 0; }
:where(.portal) :is(ul, ol) { list-style: none; }
:where(.portal) button { font: inherit; color: inherit; cursor: pointer; }
.portal [hidden] { display: none !important; }
.portal :focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 200; background: #fff; color: #000; padding: 10px 16px; border-radius: 8px; font-weight: 600; transition: top .2s; }
.skip:focus { top: 12px; }

.wrap { width: min(100% - 48px, var(--w)); margin-inline: auto; }
.ic { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ic.xl { width: 54px; height: 54px; stroke-width: 1.4; }
.ic.xxl { width: 96px; height: 96px; stroke-width: 1.2; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 26px; border-radius: 9px; border: 1.5px solid transparent; font-weight: 600; font-size: 1rem; text-decoration: none; white-space: nowrap; transition: transform .15s, background .2s, box-shadow .2s; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #9d4415; box-shadow: 0 6px 16px rgba(180, 80, 26, .35); }
.btn-white { background: #fff; color: #17232c; }
.btn-white:hover { box-shadow: 0 6px 16px rgba(0, 0, 0, .2); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { min-height: 38px; padding: 0 20px; border-radius: 999px; font-size: .9rem; }

/* ---------- section titles (short accent underline, like a portal heading) ---------- */
.u-title { font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2rem); font-weight: 700; line-height: 1.2; position: relative; padding-bottom: 12px; margin-bottom: 8px; }
.u-title::after { content: ""; position: absolute; left: 0; bottom: 0; width: 56px; height: 3px; border-radius: 3px; background: var(--accent); }
.u-title.center::after { left: 50%; transform: translateX(-50%); }
.u-title.center { text-align: center; }
.u-title.u-light { color: #fff; }
.u-title.u-light::after { background: #fff; }
.lead { color: var(--muted); font-size: 1rem; }
.lead.center { text-align: center; }
.lead.light { color: rgba(255, 255, 255, .85); }
.center { text-align: center; }

/* ---------- tools (text size, theme, menu) ---------- */
.tools { display: flex; align-items: center; gap: 4px; }
.tool { display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 8px; border: 0; border-radius: 8px; background: transparent; font-weight: 700; font-size: .95rem; color: inherit; transition: background .2s; }
.tool:hover { background: rgba(127, 140, 150, .18); }
.tool-sep { width: 1px; height: 22px; background: currentColor; opacity: .35; margin: 0 4px; }

/* ---------- hero ---------- */
.hero { position: relative; color: #fff; padding: 14px 0 150px; background:
    radial-gradient(900px 480px at 78% 12%, rgba(95, 227, 211, .14), transparent 60%),
    radial-gradient(700px 420px at 12% 90%, rgba(198, 93, 30, .20), transparent 60%),
    linear-gradient(165deg, #0b2230 0%, #123649 55%, #1b4a5f 100%); }
.hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(rgba(255, 255, 255, .06) 1px, transparent 1.2px) 0 0 / 22px 22px; pointer-events: none; }
.hero-art { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.hero-art i { position: absolute; left: 50%; top: 48%; width: 760px; height: 760px; margin: -380px 0 0 -380px; border-radius: 50%; border: 1px solid rgba(201, 225, 232, .22); animation: ringpulse 9s ease-out infinite; animation-delay: var(--d, 0s); }
.hero-art b { position: absolute; left: 50%; top: 48%; width: 900px; height: 900px; margin: -450px 0 0 -450px; border-radius: 50%; background: conic-gradient(from 0deg, rgba(201, 225, 232, .0) 0deg, rgba(201, 225, 232, .13) 40deg, rgba(201, 225, 232, 0) 70deg); -webkit-mask: radial-gradient(circle, #000 20%, transparent 68%); mask: radial-gradient(circle, #000 20%, transparent 68%); animation: sweep 14s linear infinite; }
@keyframes ringpulse { 0% { transform: scale(.3); opacity: 0; } 18% { opacity: .9; } 100% { transform: scale(1); opacity: 0; } }
@keyframes sweep { to { transform: rotate(360deg); } }
.hero.off .hero-art i, .hero.off .hero-art b { animation-play-state: paused; }
.hero-core { display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: 6px; }
.hero h1 { margin-top: 22px; max-width: 24ch; font-size: clamp(2rem, 1.2rem + 3vw, 3.4rem); font-weight: 800; line-height: 1.12; letter-spacing: -.01em; text-wrap: balance; }
.hero-sub { margin-top: 12px; font-size: clamp(1rem, .9rem + .4vw, 1.2rem); color: rgba(255, 255, 255, .88); }

/* ---------- search: a pill with a drifting gradient edge, rotating hint, category chips and popular searches ---------- */
.search { position: relative; width: min(100%, 720px); margin-top: 30px; text-align: left; }
.s-field { position: relative; display: flex; align-items: center; gap: 6px; padding: 6px 6px 6px 18px; border: 2px solid transparent; border-radius: 999px; color: #1b2630;
  background: linear-gradient(#fff, #fff) padding-box, linear-gradient(90deg, #f2c879, #c65d1e, #2a9d8f, #7fafc2, #f2c879) border-box; background-size: auto, 300% 100%;
  box-shadow: 0 10px 34px rgba(0, 0, 0, .28); animation: sedge 7s linear infinite; transition: box-shadow .25s, transform .25s; }
@keyframes sedge { to { background-position: 0 0, 300% 0; } }
.s-field:focus-within { box-shadow: 0 0 0 5px rgba(242, 200, 121, .45), 0 14px 40px rgba(0, 0, 0, .32); transform: translateY(-1px); }
.s-ic { color: #5c6b77; }
.s-field input[type="search"] { flex: 1; min-width: 0; height: 52px; padding: 0 6px; border: 0; background: transparent; font: inherit; font-size: 1.05rem; color: inherit; outline: 0; }
.s-field input::-webkit-search-cancel-button { display: none; }
.s-hint { position: absolute; left: 56px; right: 150px; top: 50%; transform: translateY(-50%); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: #6c7a85; pointer-events: none; font-size: 1.05rem; }
.s-hint.swap { animation: hintin .5s ease both; }
@keyframes hintin { from { opacity: 0; transform: translateY(-20%); } to { opacity: 1; transform: translateY(-50%); } }
.s-hint b { color: #b4501a; font-weight: 600; }
.s-field input:focus ~ .s-hint, .s-field input:not(:placeholder-shown) ~ .s-hint { opacity: 0; animation: none; }
.s-kbd { display: grid; place-items: center; min-width: 26px; height: 26px; padding: 0 7px; border: 1px solid #cdd5db; border-bottom-width: 2px; border-radius: 6px; font: 600 .8rem "Noto Sans", sans-serif; color: #6c7a85; background: #f4f6f8; }
.s-field:focus-within .s-kbd, .s-field:has(input:not(:placeholder-shown)) .s-kbd { display: none; }
.s-go { display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 22px; border: 0; border-radius: 999px; background: linear-gradient(135deg, #c65d1e, #a4450f); color: #fff; font-weight: 700; font-size: 1rem; transition: transform .15s, box-shadow .2s; }
.s-go:hover { transform: translateX(2px); box-shadow: 0 6px 18px rgba(180, 80, 26, .45); }
.s-go .ic { width: 20px; height: 20px; transition: transform .2s; }
.s-go:hover .ic { transform: translateX(3px); }
.s-pop { position: absolute; z-index: 40; left: 12px; right: 12px; top: calc(100% + 10px); background: var(--surface); color: var(--text); border-radius: 18px; box-shadow: 0 20px 50px rgba(0, 0, 0, .32); overflow: hidden; animation: popin .2s ease both; }
@keyframes popin { from { opacity: 0; transform: translateY(-6px); } }
.s-cats { display: flex; gap: 8px; flex-wrap: wrap; padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--bg); }
.s-cats button { padding: 6px 14px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--surface); font-size: .85rem; font-weight: 600; color: var(--text); transition: background .15s, border-color .15s, color .15s; }
.s-cats button:hover { border-color: var(--accent); }
.s-cats button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.s-label { padding: 12px 18px 4px; font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--muted); }
.s-list { max-height: min(52vh, 380px); overflow-y: auto; padding-bottom: 6px; }
.s-list li { display: block; }
.s-list a { display: grid; grid-template-columns: 38px 1fr auto; gap: 12px; align-items: center; padding: 10px 18px; text-decoration: none; }
.s-list a:hover, .s-list li[aria-selected="true"] a { background: var(--accent-soft); }
.s-list a::after { content: "92"; color: var(--muted); opacity: 0; transform: translateX(-4px); transition: opacity .15s, transform .15s; }
.s-list a:hover::after, .s-list li[aria-selected="true"] a::after { opacity: 1; transform: none; }
.s-list .s-ic2 { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--accent); color: #fff; }
.s-list b { display: block; font-size: .95rem; }
.s-list small { display: block; color: var(--muted); font-size: .8rem; line-height: 1.35; }
.s-list .s-none { padding: 14px 18px; color: var(--muted); font-size: .92rem; }
.search-sm { margin: 0; width: min(100%, 520px); }
.search-sm .s-field { padding: 4px 4px 4px 14px; box-shadow: none; background: linear-gradient(var(--bg), var(--bg)) padding-box, linear-gradient(90deg, var(--line), var(--line)) border-box; animation: none; color: var(--text); }
.search-sm .s-field:focus-within { background: linear-gradient(var(--bg), var(--bg)) padding-box, linear-gradient(90deg, #f2c879, #c65d1e, #2a9d8f) border-box; box-shadow: 0 0 0 4px rgba(242, 200, 121, .35); transform: none; }
.search-sm .s-ic { color: var(--muted); width: 20px; height: 20px; }
.search-sm .s-field input[type="search"] { height: 38px; font-size: .95rem; }
.search-sm .s-hint { left: 44px; right: 120px; font-size: .95rem; color: var(--muted); }
.search-sm .s-hint b { color: var(--accent); }
.search-sm .s-kbd { background: var(--surface); border-color: var(--line); color: var(--muted); }
.search-sm .s-go { height: 38px; padding: 0 16px; font-size: .9rem; }
:root[data-theme="dark"] .search-sm .s-hint b { color: #f0a870; }

.trend { margin-top: 22px; display: flex; gap: 12px; align-items: center; justify-content: center; flex-wrap: wrap; font-size: .88rem; max-width: 960px; }
.trend > span { font-weight: 600; color: rgba(255, 255, 255, .92); }
.trend ul { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.trend a { display: inline-block; padding: 6px 13px; border: 1px solid rgba(255, 255, 255, .38); border-radius: 6px; background: rgba(255, 255, 255, .06); text-decoration: none; transition: background .2s, border-color .2s; }
.trend a:hover { background: rgba(255, 255, 255, .18); border-color: #fff; }

/* ---------- note + stats (overlap the hero) ---------- */
.over { position: relative; z-index: 2; margin-top: -92px; }
.note { display: flex; align-items: center; gap: 22px; max-width: 980px; margin: 0 auto 0; padding: 20px 28px 20px 18px; background: var(--surface); border-radius: 18px; box-shadow: var(--shadow); }
.note-av { flex: none; display: grid; place-items: center; width: 92px; height: 92px; border-radius: 50%; background: linear-gradient(145deg, #2a6f86, #143a4d); color: #fff; font-weight: 800; font-size: 1.7rem; letter-spacing: .02em; box-shadow: 0 0 0 5px var(--surface), var(--shadow-s); margin-top: -46px; margin-left: 4px; }
.note blockquote { font-size: .98rem; color: var(--text); line-height: 1.55; }
.note .qm { color: var(--accent); font-weight: 800; font-size: 1.4em; line-height: 0; vertical-align: -.25em; margin: 0 3px; }
.note figcaption { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; font-size: .84rem; }
.note figcaption span { color: var(--muted); }
.note figcaption a { color: var(--accent); font-weight: 600; text-decoration: none; }
.note figcaption a:hover { text-decoration: underline; }
:root[data-theme="dark"] .note figcaption a, :root[data-theme="dark"] .note .qm { color: #f0a870; }

.stats { display: grid; grid-template-columns: repeat(6, 1fr); margin-top: 26px; padding: 18px 8px; background: var(--surface); border-radius: 16px; box-shadow: var(--shadow); }
.stats li { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 4px 10px; border-left: 1px solid var(--line); }
.stats li:first-child { border-left: 0; }
.stats .ic { width: 42px; height: 42px; stroke-width: 1.4; color: var(--accent); }
:root[data-theme="dark"] .stats .ic { color: #f0a870; }
.stats b { display: block; font-size: 1.5rem; line-height: 1.1; font-weight: 700; }
.stats span { display: block; font-size: .74rem; color: var(--muted); line-height: 1.25; }

/* ---------- feature carousel ---------- */

.track { position: relative; padding: 18px 0 14px 16px; background: var(--bg); min-width: 0; display: flex; flex-direction: column; }
.track-view { overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; flex: 1; padding: 6px 16px 10px 0; scroll-behavior: smooth; }
.track-view::-webkit-scrollbar { display: none; }
.track-list { display: flex; gap: 16px; height: 100%; }
.a-or { background: linear-gradient(140deg, #d86a25, #8d3c10); }
.a-tl { background: linear-gradient(140deg, #2a9d8f, #14564e); }
.a-bl { background: linear-gradient(140deg, #3f7a92, #1b4358); }
.a-in { background: linear-gradient(140deg, #5b57c4, #2c2a76); }
@keyframes ringout { 0% { transform: scale(.35); opacity: .9; } 100% { transform: scale(1.1); opacity: 0; } }
.cardli { flex: 0 0 min(300px, 78%); scroll-snap-align: start; }
.cardli > .card { height: 100%; }
.track-ctl { display: flex; align-items: center; justify-content: space-between; padding: 6px 16px 0 0; }
.dots { display: flex; gap: 7px; }
.dots button { width: 22px; height: 6px; border: 0; padding: 0; border-radius: 4px; background: #c4ccd2; transition: background .2s, width .2s; }
.dots button[aria-current="true"] { background: var(--accent); width: 34px; }
.dots-light button { background: rgba(255, 255, 255, .45); }
.dots-light button[aria-current="true"] { background: #fff; }
.pp { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--surface); color: var(--text); }
.pp .ic { width: 16px; height: 16px; stroke-width: 2.4; }
.pp[aria-pressed="true"] .ic { fill: currentColor; }
.pp-light { background: rgba(255, 255, 255, .92); color: #111; border-color: transparent; }

/* ---------- information categories ---------- */
.cats { padding: 26px 0 62px; }
.cat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 28px; }
.cat { position: relative; display: flex; gap: 16px; height: 100%; padding: 24px 22px 26px; background: var(--surface); border-radius: 4px; box-shadow: var(--shadow-s); text-decoration: none; overflow: hidden; transition: transform .2s, box-shadow .2s; }
.cat::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .3s; }
.cat:hover, .cat:focus-visible { transform: translateY(-3px); box-shadow: var(--shadow); }
.cat:hover::after, .cat:focus-visible::after { transform: scaleX(1); }
.cat-ic { flex: none; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 8px; background: var(--accent); color: #fff; }
.cat-ic .ic { width: 30px; height: 30px; stroke-width: 1.5; }
.cat h3 { font-size: 1.04rem; line-height: 1.3; margin-bottom: 6px; }
.cat p { font-size: .88rem; color: var(--muted); line-height: 1.5; }

/* ---------- banner carousel ---------- */
.banner { background: var(--navy); }
.slider { position: relative; }
.slides { position: relative; }
.slide { display: none; }
.slide.on { display: block; animation: slidein .6s ease; }
@keyframes slidein { from { opacity: 0; } to { opacity: 1; } }
.banner .slide.on { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); align-items: center; min-height: 380px; width: min(100% - 48px, var(--w)); margin-inline: auto; gap: 24px; padding: 40px 64px; color: #fff; }
.banner .slider { background: radial-gradient(700px 360px at 85% 30%, rgba(95, 227, 211, .16), transparent 60%), linear-gradient(120deg, #0d2836, #174559); }
.banner .slide-copy { max-width: 520px; }
.eyebrow { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: #f2c879; margin-bottom: 10px; }
.banner h2 { font-size: clamp(1.7rem, 1.1rem + 2vw, 2.6rem); line-height: 1.15; font-weight: 800; margin-bottom: 14px; text-wrap: balance; }
.banner .slide-copy > p:not(.eyebrow) { color: rgba(255, 255, 255, .86); margin-bottom: 22px; }
.slide-art { position: relative; display: grid; place-items: center; min-height: 260px; color: #fff; }
.slide-art > i, .scene > i { position: absolute; left: 50%; top: 50%; width: 300px; height: 300px; margin: -150px 0 0 -150px; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, .3); animation: ringout 5.4s ease-out infinite; }
.slide-art > i:nth-of-type(2), .scene > i:nth-of-type(2) { animation-delay: -1.8s; }
.slide-art > i:nth-of-type(3), .scene > i:nth-of-type(3) { animation-delay: -3.6s; }
.slide-art .ic, .scene .ic { position: relative; z-index: 1; padding: 26px; box-sizing: content-box; width: 96px; height: 96px; border-radius: 50%; background: rgba(255, 255, 255, .1); border: 1.5px solid rgba(255, 255, 255, .45); backdrop-filter: blur(2px); }
.s-home .ic { color: #f2c879; }
.s-layers .ic { color: #ffb27a; }
.hub { position: relative; z-index: 1; display: grid; place-items: center; width: 168px; height: 168px; border-radius: 44px; background: linear-gradient(145deg, #3a4446, #0c1113); box-shadow: 0 24px 50px rgba(0, 0, 0, .45), inset 0 0 0 2px rgba(255, 255, 255, .12); }
.hub em { width: 64px; height: 64px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #6fe0d1, #2a9d8f 55%, #14564e); box-shadow: 0 0 28px rgba(95, 227, 211, .55); animation: hubglow 3.4s ease-in-out infinite; }
@keyframes hubglow { 50% { box-shadow: 0 0 46px rgba(95, 227, 211, .85); } }
.arrow { position: absolute; top: 50%; z-index: 3; display: grid; place-items: center; width: 42px; height: 42px; margin-top: -21px; border-radius: 50%; border: 0; background: #fff; color: var(--accent); box-shadow: 0 4px 14px rgba(0, 0, 0, .28); transition: transform .2s; }
.arrow:hover { transform: scale(1.08); }
.arrow.prev { left: 14px; }
.arrow.next { right: 14px; }
.slider-ctl { position: absolute; right: 20px; bottom: 16px; z-index: 3; display: flex; align-items: center; gap: 14px; }
.banner .slider-ctl { right: 84px; }
@media (min-width: 901px) {
  .banner .arrow.prev { left: max(14px, calc(50% - 620px)); }
  .banner .arrow.next { right: max(64px, calc(50% - 620px)); }
}
.banner-cap { padding: 12px 24px 14px; text-align: center; color: #fff; font-size: .92rem; }

/* ---------- finder band (navy) ---------- */
.finder { background: var(--navy); color: #fff; padding: 46px 0 52px; }
.finder-in { display: flex; flex-direction: column; align-items: center; text-align: center; }
.finder .u-title { margin-bottom: 22px; }
.dsearch { position: relative; width: min(100%, 640px); }
.dsearch input { width: 100%; height: 52px; padding: 0 56px 0 20px; border: 0; border-radius: 10px; background: #fff; color: #1b2630; font: inherit; }
.dsearch input::placeholder { color: #6c7a85; }
.dsearch input::-webkit-search-cancel-button { display: none; }
.dsearch button { position: absolute; right: 6px; top: 6px; width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: #1b2630; }
.dsearch button:hover { background: #eef1f3; }
.dev-res { width: min(100%, 640px); margin-top: 14px; text-align: left; background: var(--surface); color: var(--text); border-radius: 12px; box-shadow: 0 12px 30px rgba(0, 0, 0, .3); overflow: hidden; }
.dev-res li { display: flex; gap: 14px; justify-content: space-between; align-items: center; padding: 12px 18px; border-top: 1px solid var(--line); }
.dev-res li:first-child { border-top: 0; }
.dev-res b { display: block; font-size: .95rem; }
.dev-res small { color: var(--muted); font-size: .82rem; line-height: 1.35; display: block; }
.dev-res .in-kits { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.dev-res .in-kits span { padding: 3px 10px; border-radius: 999px; font-size: .76rem; font-weight: 700; background: var(--accent-soft); color: var(--accent); white-space: nowrap; }
:root[data-theme="dark"] .dev-res .in-kits span { color: #f0a870; }
.dev-res .in-kits span.no { background: transparent; color: var(--muted); font-weight: 500; }
.dev-res .none { display: block; color: var(--muted); font-size: .92rem; }
.or { margin: 26px 0 8px; font-size: 1.4rem; font-weight: 800; color: rgba(255, 255, 255, .45); letter-spacing: .1em; }
.finder h3 { font-size: clamp(1.1rem, 1rem + .6vw, 1.4rem); margin-bottom: 14px; }
.powered { margin-top: 18px; font-size: .82rem; color: rgba(255, 255, 255, .72); max-width: 52ch; }

/* ---------- how it works + spotlight ---------- */
.two { padding: 56px 0 50px; }
.two-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 42px; }
.two .lead { margin-bottom: 18px; }
.spot { display: flex; flex-direction: column; gap: 14px; }
.spot a { display: grid; grid-template-columns: 150px 1fr; align-items: stretch; background: var(--surface); border: 1px solid var(--line); text-decoration: none; transition: box-shadow .2s, transform .2s; }
.spot a:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.spot-art { display: grid; place-items: center; color: #fff; min-height: 118px; }
.spot-art .ic { width: 42px; height: 42px; stroke-width: 1.4; }
.spot a > div { padding: 12px 16px; }
.spot small { display: block; font-size: .78rem; color: var(--muted); margin-bottom: 2px; font-weight: 600; letter-spacing: .04em; }
.spot h3 { font-size: 1rem; line-height: 1.3; margin-bottom: 4px; }
.spot p { font-size: .84rem; color: var(--muted); line-height: 1.45; }

/* ---------- quick links ---------- */
.quick { position: relative; padding: 46px 0 56px; background: var(--surface); overflow: hidden; }
.quick::before { content: ""; position: absolute; inset: auto 0 0 0; height: 150px; opacity: .6; pointer-events: none;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='360' height='150' viewBox='0 0 360 150' fill='none' stroke='%23c9d2d9' stroke-width='1.4'><path d='M0 149V110l24-22 24 22v39M60 149V96h40v53M74 96V80h12v16M110 149v-46l22-20 22 20v46M164 149V92h36v57M176 92V74l6-10 6 10v18M214 149v-40l26-24 26 24v40M280 149V100h30v49M318 149v-34l20-18 22 18v34'/></svg>") repeat-x bottom / 360px 150px; }
:root[data-theme="dark"] .quick::before { opacity: .22; }
.quick-grid { position: relative; display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; margin-top: 28px; }
.quick-grid a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; min-height: 124px; padding: 14px 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; box-shadow: var(--shadow-s); text-decoration: none; font-weight: 600; font-size: .92rem; text-align: center; transition: transform .2s, box-shadow .2s, border-color .2s; }
.quick-grid a:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--accent); }
.quick-grid .ic { width: 34px; height: 34px; stroke-width: 1.4; color: var(--accent); }
:root[data-theme="dark"] .quick-grid .ic { color: #f0a870; }

/* ---------- explore (deep split) ---------- */
.ex-cap { position: absolute; left: 20px; bottom: 16px; z-index: 3; font-weight: 600; color: #fff; text-shadow: 0 1px 8px rgba(0, 0, 0, .6); }
.ex-panel { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 28px; background: linear-gradient(160deg, #1e4d63, #123649); }
.ex-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; width: 100%; max-width: 420px; }
.ex-tiles a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 118px; padding: 12px; border: 1px solid rgba(255, 255, 255, .28); border-radius: 8px; background: rgba(255, 255, 255, .12); color: #fff; text-decoration: none; font-weight: 600; text-align: center; transition: background .2s, transform .2s; }
.ex-tiles a:hover { background: rgba(255, 255, 255, .24); transform: translateY(-2px); }
.ex-tiles .ic { width: 38px; height: 38px; stroke-width: 1.4; }

/* ---------- team ---------- */
.team { padding: 20px 0 66px; background: var(--surface); padding-top: 56px; }
.team .lead { margin-top: 4px; }
.team-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 30px; }
.pcard { height: 100%; padding: 26px 24px 28px; background: var(--bg); border-radius: 6px; border-top: 4px solid var(--accent); }
.av { display: grid; place-items: center; width: 62px; height: 62px; border-radius: 50%; background: var(--navy-2); color: #fff; font-weight: 800; letter-spacing: .03em; margin-bottom: 14px; }
.pcard h3 { font-size: 1.12rem; }
.pcard .role { color: var(--muted); font-size: .88rem; margin-bottom: 10px; }
.chip { display: inline-block; padding: 3px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: .78rem; margin-bottom: 12px; }
:root[data-theme="dark"] .chip { color: #f0a870; }
.pcard p:last-child { font-size: .9rem; color: var(--muted); line-height: 1.55; }

/* ---------- involve (accent band) ---------- */
.involve { background: var(--accent); color: #fff; padding: 56px 0 60px; }
.involve .lead { margin: 4px 0 30px; }
.inv-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin-bottom: 32px; }
.inv-grid a { display: flex; flex-direction: column; height: 100%; background: rgba(255, 255, 255, .96); color: #17232c; border-radius: 8px; overflow: hidden; text-decoration: none; transition: transform .2s, box-shadow .2s; }
.inv-grid a:hover { transform: translateY(-3px); box-shadow: 0 12px 26px rgba(0, 0, 0, .28); }
.inv-art { display: grid; place-items: center; height: 120px; color: #fff; }
.inv-tag { align-self: flex-start; margin: 12px 14px 0; padding: 2px 10px; border-radius: 3px; background: var(--accent); color: #fff; font-size: .74rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.inv-grid h3 { padding: 8px 14px 18px; font-size: .98rem; line-height: 1.35; }

/* ---------- footer ---------- */
.foot { background: #070d11; color: #cbd5e0; padding: 46px 0 40px; }
.foot-top { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding-bottom: 28px; border-bottom: 1px solid #25323b; }
.foot-top p { max-width: 46ch; font-size: .92rem; }
.foot-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; padding-top: 30px; }
.foot h2 { font-size: .98rem; color: #edf2f7; margin-bottom: 12px; font-weight: 700; }
.foot li { margin-bottom: 8px; }
.foot a { text-decoration: none; font-size: .92rem; }
.foot a:hover { color: #fff; text-decoration: underline; }
.foot-tools { display: flex; gap: 8px; }
.foot-tools .tool { border: 1px solid #364854; color: #edf2f7; }


/* ---------- full menu ---------- */
.menu { position: fixed; inset: 0; z-index: 150; background: rgba(7, 18, 25, .97); color: #fff; overflow-y: auto; animation: slidein .25s ease; }
.menu-in { width: min(100% - 48px, var(--w)); margin-inline: auto; padding: 18px 0 48px; }
.menu-top { display: flex; align-items: center; justify-content: space-between; padding-bottom: 20px; border-bottom: 1px solid rgba(255, 255, 255, .18); }
.menu-top .tool { color: #fff; border: 1px solid rgba(255, 255, 255, .35); }
.menu-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 30px; padding-top: 34px; }
.menu h2 { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: #f2c879; margin-bottom: 14px; }
.menu li { margin-bottom: 4px; }
.menu a { display: block; padding: 8px 0; font-size: 1.08rem; text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.menu a:hover { color: #f2c879; }
.menu :focus-visible { outline-color: #f2c879; }

/* ---------- right rail, back to top, toast ---------- */
.rail { position: fixed; z-index: 80; right: 0; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; background: #fff; border-radius: 10px 0 0 10px; box-shadow: -2px 4px 18px rgba(0, 0, 0, .18); overflow: hidden; }
:root[data-theme="dark"] .rail { background: #1a2b36; }
.rail-b { position: relative; display: flex; align-items: center; justify-content: center; width: 46px; height: 46px; padding: 0; border: 0; background: transparent; color: #3b4852; text-decoration: none; transition: width .25s, background .2s, color .2s; overflow: hidden; white-space: nowrap; }
:root[data-theme="dark"] .rail-b { color: #cbd5e0; }
.rail-b + .rail-b { border-top: 1px solid rgba(127, 140, 150, .25); }
.rail-b span { max-width: 0; opacity: 0; font-size: .85rem; font-weight: 600; transition: max-width .25s, opacity .2s, margin .25s; }
.rail-b:hover, .rail-b:focus-visible { width: 168px; background: var(--accent); color: #fff; justify-content: flex-start; padding-left: 11px; }
.rail-b:hover span, .rail-b:focus-visible span { max-width: 120px; opacity: 1; margin-left: 10px; }
.totop { position: fixed; z-index: 80; right: 18px; bottom: 22px; display: grid; place-items: center; width: 46px; height: 46px; border: 0; border-radius: 50%; background: var(--navy-2); color: #fff; box-shadow: 0 6px 18px rgba(0, 0, 0, .3); opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .25s, transform .25s; }
.totop.show { opacity: 1; transform: none; pointer-events: auto; }
.toast { position: fixed; z-index: 220; left: 50%; bottom: 28px; transform: translateX(-50%); padding: 11px 20px; border-radius: 999px; background: #17232c; color: #fff; font-size: .92rem; box-shadow: 0 8px 24px rgba(0, 0, 0, .3); }

/* ---------- finder dialog ---------- */
.dlg { width: min(94vw, 560px); max-height: 92vh; padding: 28px 28px 26px; border: 0; border-radius: 16px; background: var(--surface); color: var(--text); box-shadow: 0 24px 70px rgba(0, 0, 0, .45); overflow-y: auto; }
.dlg::backdrop { background: rgba(7, 18, 25, .66); }
.dlg-x { position: absolute; right: 12px; top: 12px; margin: 0; }
.dlg h2 { font-size: 1.5rem; margin-bottom: 6px; }
.dlg-lead { color: var(--muted); font-size: .94rem; margin-bottom: 14px; }
.dlg fieldset { border: 0; margin: 0 0 14px; padding: 0; }
.dlg legend { font-weight: 700; font-size: .95rem; margin-bottom: 8px; padding: 0; }
.dlg label { display: block; margin-bottom: 6px; }
.dlg label input { position: absolute; opacity: 0; }
.dlg label span { display: block; padding: 10px 14px; border: 1.5px solid var(--line); border-radius: 10px; font-size: .92rem; cursor: pointer; transition: border-color .15s, background .15s; }
.dlg label span:hover { border-color: var(--accent); }
.dlg label input:checked + span { border-color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.dlg label input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.dlg-err { color: #b3261e; font-weight: 600; font-size: .9rem; margin-bottom: 10px; }
:root[data-theme="dark"] .dlg-err { color: #ff9a92; }
.eyebrow-d { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: var(--accent); margin-bottom: 4px; }
:root[data-theme="dark"] .eyebrow-d { color: #f0a870; }
.res-count { font-weight: 700; color: var(--muted); margin-bottom: 10px; }
.res-list { margin: 12px 0 18px; display: grid; gap: 6px; font-size: .92rem; }
.res-list li { position: relative; padding-left: 26px; }
.res-list li::before { content: ""; position: absolute; left: 0; top: .35em; width: 16px; height: 16px; border-radius: 50%; background: var(--accent) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'><path d='M6 12.500l4 4L18 8'/></svg>") center / 12px no-repeat; }
.dlg-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.dlg-note { margin-top: 14px; font-size: .8rem; color: var(--muted); }

/* ---------- reveal ---------- */
.rv-ready [data-r] { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.rv-ready [data-r].r-in { opacity: 1; transform: none; }
.cat-grid > li:nth-child(3n+2) { transition-delay: .08s; }
.cat-grid > li:nth-child(3n) { transition-delay: .16s; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .stats { grid-template-columns: repeat(3, 1fr); row-gap: 16px; }
  .stats li:nth-child(4) { border-left: 0; }
  .quick-grid { grid-template-columns: repeat(3, 1fr); }
  .inv-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .menu-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .banner .slide.on { grid-template-columns: 1fr; padding: 34px 56px 64px; min-height: 0; text-align: center; }
  .banner .slide-copy { margin-inline: auto; }
  .slide-art { min-height: 180px; order: -1; }
  .slide-art > i { width: 220px; height: 220px; margin: -110px 0 0 -110px; }
  .two-in { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: 1fr; }
  .foot-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rail { display: none; }
}
@media (max-width: 720px) {
  .wrap { width: min(100% - 32px, var(--w)); }
  .hero { padding-bottom: 130px; }
  .hero h1 { margin-top: 16px; }
  .s-kbd { display: none; }
  .s-go span { display: none; }
  .s-go { padding: 0 16px; }
  .s-hint { right: 70px; }
  .search-sm .s-hint { right: 52px; }
  .s-pop { left: 0; right: 0; }
  .note { flex-direction: column; text-align: center; padding: 0 20px 22px; gap: 14px; }
  .note-av { margin: -46px 0 0; }
  .note figcaption { justify-content: center; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stats li { border-left: 0; justify-content: flex-start; padding: 6px 12px; }
  .stats li:nth-child(even) { border-left: 1px solid var(--line); }
  .cat-grid { grid-template-columns: 1fr; }
  .banner .slide.on { padding: 26px 20px 66px; }
  .arrow { top: 120px; width: 36px; height: 36px; margin-top: 0; }
  .arrow.prev { left: 8px; } .arrow.next { right: 8px; }
  .spot a { grid-template-columns: 96px 1fr; }
  .quick-grid { grid-template-columns: repeat(2, 1fr); }
  .inv-grid { grid-template-columns: 1fr; }
  .menu-grid { grid-template-columns: 1fr; }
  .dev-res li { flex-direction: column; align-items: flex-start; }
  .dev-res .in-kits { justify-content: flex-start; }
  .dlg { padding: 24px 18px 22px; }
}
@media (max-width: 440px) {
  .foot-cols { grid-template-columns: 1fr; }
  .trend { font-size: .82rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .portal *, .portal *::before, .portal *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .rv-ready [data-r] { opacity: 1; transform: none; }
}

/* ================= motion layer ================= */
.progress { position: fixed; z-index: 120; inset: 0 0 auto 0; height: 3px; pointer-events: none; }
.progress i { display: block; height: 100%; width: 100%; transform-origin: left; transform: scaleX(0); background: linear-gradient(90deg, #f2c879, #c65d1e, #2a9d8f); }

/* hero entrance */
.hw { display: inline-block; animation: hword .7s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(.25s + var(--i) * .07s); }
@keyframes hword { from { opacity: 0; transform: translateY(.5em); } }
@keyframes fadedown { from { opacity: 0; transform: translateY(-14px); } }
.hero-sub { animation: hword .8s ease .9s both; }
.hero .search { animation: hword .8s ease 1.05s both; }
.trend li { animation: hword .6s ease both; animation-delay: calc(1.3s + var(--i, 0) * .08s); }

/* generic staggered reveal (delay set from JS) */
.rv-ready [data-r] { transition-delay: var(--rd, 0s); }
.rv-ready .cat-grid > li[data-r], .rv-ready .team-grid > li[data-r] { transform: translateY(26px) scale(.97); }
.rv-ready .cat-grid > li[data-r].r-in, .rv-ready .team-grid > li[data-r].r-in { transform: none; }

/* headline underline draws itself */
.rv-ready [data-r] .u-title::after, .rv-ready .u-title[data-r]::after { width: 0; transition: width .7s ease .3s; }
.rv-ready [data-r].r-in .u-title::after, .rv-ready .u-title[data-r].r-in::after { width: 56px; }

/* stats + kit tiles */
.stats .ic { transition: transform .3s; }
.stats li:hover .ic { transform: scale(1.15) rotate(-6deg); }
.r-in.stats li .ic { animation: pop .6s cubic-bezier(.3, 1.6, .5, 1) both; animation-delay: calc(.15s * var(--n, 1)); }
@keyframes pop { from { opacity: 0; transform: scale(.4) rotate(-20deg); } }
@keyframes sheen { 0%, 55% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
@keyframes tilein { from { opacity: 0; transform: translateY(18px) scale(.94); } }

/* category cards */
.cat::before { content: ""; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 40%, rgba(180, 80, 26, .09) 50%, transparent 60%); transform: translateX(-110%); transition: transform .7s ease; pointer-events: none; }
.cat:hover::before { transform: translateX(110%); }
.cat-ic { position: relative; transition: transform .35s cubic-bezier(.3, 1.5, .5, 1); }
.cat-ic::after { content: ""; position: absolute; inset: 0; border-radius: 8px; border: 2px solid var(--accent); opacity: 0; }
.cat:hover .cat-ic { transform: rotate(-8deg) scale(1.1); }
.cat:hover .cat-ic::after { animation: ping 1s ease-out infinite; }
@keyframes ping { from { opacity: .7; transform: scale(1); } to { opacity: 0; transform: scale(1.7); } }

/* banner: text staggers in on every slide change, artwork floats */
.banner .slide.on .slide-copy > * { animation: hword .7s cubic-bezier(.2, .7, .2, 1) both; }
.banner .slide.on .slide-copy > :nth-child(1) { animation-delay: .05s; }
.banner .slide.on .slide-copy > :nth-child(2) { animation-delay: .15s; }
.banner .slide.on .slide-copy > :nth-child(3) { animation-delay: .27s; }
.banner .slide.on .slide-copy > :nth-child(4) { animation-delay: .4s; }
.slide.on .slide-art > .ic, .slide.on .slide-art > .hub, .scene > .ic, .scene > .hub { animation: pop .8s cubic-bezier(.3, 1.4, .5, 1) both, floaty 6s ease-in-out .8s infinite; }
@keyframes floaty { 50% { transform: translateY(-12px); } }

/* finder band */
.finder .btn-white { animation: glowpulse 2.6s ease-in-out infinite; }
@keyframes glowpulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .45); } 50% { box-shadow: 0 0 0 12px rgba(255, 255, 255, 0); } }
.or { animation: orpulse 3s ease-in-out infinite; }
@keyframes orpulse { 50% { opacity: .55; letter-spacing: .2em; } }
.dev-res li { animation: tilein .4s ease both; animation-delay: calc(var(--k, 0) * .07s); }
.finder .dsearch input:focus { box-shadow: 0 0 0 5px rgba(242, 200, 121, .45); outline: 0; }

/* how it works + spotlight */
@keyframes nudge { 50% { transform: translateX(4px); } }
.spot-art { overflow: hidden; position: relative; }
.spot-art .ic { position: relative; z-index: 1; transition: transform .4s cubic-bezier(.3, 1.5, .5, 1); }
.spot a:hover .spot-art .ic { transform: scale(1.25) rotate(-8deg); }
.spot-art::after { content: ""; position: absolute; inset: -40%; background: conic-gradient(from 0deg, transparent, rgba(255, 255, 255, .16), transparent 30%); animation: sweep 9s linear infinite; }

/* quick links, explore, team, involve */
.quick::before { animation: drift 40s linear infinite; }
@keyframes drift { to { background-position: -360px bottom; } }
.quick-grid a .ic { transition: transform .3s cubic-bezier(.3, 1.6, .5, 1); }
.quick-grid a:hover .ic { transform: translateY(-5px) scale(1.15); }
.ex-tiles a .ic { transition: transform .3s cubic-bezier(.3, 1.6, .5, 1); }
.ex-tiles a:hover .ic { transform: scale(1.2) rotate(-6deg); }
.av { position: relative; transition: transform .3s; }
.av::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid var(--accent); opacity: 0; animation: avring 3.6s ease-out infinite; }
.team-grid > li:nth-child(2) .av::after { animation-delay: 1.2s; }
.team-grid > li:nth-child(3) .av::after { animation-delay: 2.4s; }
@keyframes avring { 0% { opacity: .7; transform: scale(.9); } 70%, 100% { opacity: 0; transform: scale(1.35); } }
.pcard { transition: transform .3s, box-shadow .3s; }
.pcard:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.pcard:hover .av { transform: scale(1.08); }
.involve .btn-white { animation: glowpulse 2.8s ease-in-out infinite; }

/* footer links, back to top */
.foot li a { background: linear-gradient(currentColor, currentColor) left bottom / 0 1px no-repeat; transition: background-size .3s, color .2s; text-decoration: none !important; padding-bottom: 2px; }
.foot li a:hover { background-size: 100% 1px; }
.totop.show { animation: tbounce 3s ease-in-out infinite; }
@keyframes tbounce { 50% { transform: translateY(-4px); } }

@media (prefers-reduced-motion: reduce) { .hw, .trend li { animation: none !important; } .spot-art::after { display: none; } }
