/* Krill's site: the extension's own colours (src/panel.css) and its Rajdhani headings. */
@font-face { font-family: 'Rajdhani'; font-weight: 500; font-display: swap; src: url(fonts/rajdhani-500.woff2) format('woff2'); }
@font-face { font-family: 'Rajdhani'; font-weight: 600; font-display: swap; src: url(fonts/rajdhani-600.woff2) format('woff2'); }
@font-face { font-family: 'Rajdhani'; font-weight: 700; font-display: swap; src: url(fonts/rajdhani-700.woff2) format('woff2'); }

:root {
  --bg: #07101a; --bg-2: #0a1420; --bg-3: #0f1d2c; --line: #1f3a52;
  --text: #d6e6f2; --muted: #8aa1b4; --accent: #39c6ec; --gold: #f2c94c; --coral: #ff7054;
  --display: 'Rajdhani', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.6 system-ui, -apple-system, 'Segoe UI', sans-serif; }
a { color: var(--accent); }
img { max-width: 100%; height: auto; display: block; }

/* faint dotted grid behind everything, like the store pictures */
body::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(circle at 75% -10%, #123451aa, transparent 55%),
              radial-gradient(#ffffff0d 1px, transparent 1.2px) 0 0 / 28px 28px; }

.wrap { max-width: 1320px; margin: 0 auto; padding: 0 24px; }   /* one width for the top bar, the front page and the menu with its pages, so their edges line up */

/* top bar */
.top { position: sticky; top: 0; z-index: 10; backdrop-filter: blur(10px); background: #07101acc; border-bottom: 1px solid #ffffff0f; }
.top .wrap { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 18px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--gold); font: 700 20px var(--display); letter-spacing: .22em; }
.brand img { width: 30px; height: 30px; }
.top nav { justify-self: end; display: flex; gap: 22px; font: 600 15px var(--display); letter-spacing: .08em; text-transform: uppercase; }
.top nav a { color: var(--muted); text-decoration: none; }
.top nav a:hover { color: var(--text); }
.top .cta { display: flex; gap: 8px; justify-self: center; opacity: 0; transform: translateY(-6px); pointer-events: none; transition: opacity .25s, transform .25s; }
body.cta-on .top .cta { opacity: 1; transform: none; pointer-events: auto; }
.btn.sm { padding: 6px 12px; font-size: 13px; gap: 7px; }
.btn.sm svg { width: 15px; height: 15px; }
@media (max-width: 760px) { .top .cta .btn:not(.go) { display: none; } .top nav { gap: 14px; } }
@media (max-width: 640px) { .top nav a.hide-s { display: none; } }

/* buttons */
.btns { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-flex; align-items: center; gap: 9px; padding: 11px 20px; border-radius: 6px; text-decoration: none;
  font: 700 16px var(--display); letter-spacing: .06em; text-transform: uppercase; border: 1px solid var(--line); color: var(--text); background: var(--bg-3); }
.btn:hover { border-color: var(--accent); }
.btn.go { background: var(--accent); border-color: var(--accent); color: #04121c; }
.btn.go:hover { filter: brightness(1.08); }
.btn svg { width: 20px; height: 20px; flex: none; }

/* hero: a whole front page */
.hero { min-height: calc(100vh - 60px); min-height: calc(100svh - 60px); display: flex; flex-direction: column; justify-content: center; padding: 3vh 0 96px; position: relative; }
.hero .wrap.main { display: grid; grid-template-columns: 1fr 1.15fr; gap: 48px; align-items: center; width: 100%; }
.hero .promise { margin-top: 4.5vh; width: 100%; }
.hero .promise li { padding: 12px 18px; }
.hero .promise b { font-size: 18px; margin-bottom: 2px; }
.hero .promise span { font-size: 14px; line-height: 1.45; }
@keyframes bob { 0%, 100% { transform: translateY(0); opacity: .75; } 50% { transform: translateY(8px); opacity: 1; } }
.features { scroll-margin-top: 60px; }
.kicker { font: 700 14px var(--display); letter-spacing: .2em; text-transform: uppercase; color: var(--accent); margin: 0 0 10px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.05; margin: 0; }
.hero h1 { font-size: clamp(36px, min(5.2vw, 7.4vh), 66px); font-weight: 700; }
.lead { color: var(--muted); font-size: clamp(16px, 2.3vh, 19px); margin: 2.2vh 0 3.2vh; max-width: 34em; }
.small { color: var(--muted); font-size: 14px; margin-top: 16px; }
.shot { border-radius: 10px; border: 1px solid var(--line); box-shadow: 0 30px 80px #000a, 0 0 0 1px #ffffff08; overflow: hidden; background: var(--bg-2); }
.stack { position: relative; height: min(52vh, 540px); }
.stack .panel { position: absolute; height: 92%; width: auto; max-width: 66%; object-fit: cover; object-position: top left; border-radius: 10px; border: 1px solid var(--line); box-shadow: 0 30px 80px #000b, 0 0 0 1px #ffffff08; }
.stack .p0 { left: 0; top: 7%; opacity: .92; }
.stack .p1 { right: 0; top: 0; }
@media (max-width: 900px) { .hero .wrap.main { grid-template-columns: 1fr; } .stack { height: 46vh; } }
/* four captures per feature, like the store's pictures, but sharp (2x captures shown at half size) */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.tile { margin: 0; background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 14px 40px #0008; }
.tile img { width: 100%; height: auto; aspect-ratio: 5 / 4; object-fit: cover; object-position: top left; }
.tile.contain img { object-fit: contain; object-position: center; background: #0b1622; }
.tile figcaption { font: 700 13px var(--display); letter-spacing: .16em; text-transform: uppercase; color: #9fc3d6; padding: 9px 12px; border-top: 1px solid var(--line); background: #0d1a28; }
@media (max-width: 560px) { .tiles { grid-template-columns: 1fr; } }

/* promise strip (on the front page) */
.promise ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.promise li { background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; padding: 18px 20px; }
.promise b { display: block; font: 700 20px var(--display); color: var(--text); margin-bottom: 4px; }
.promise span { color: var(--muted); font-size: 15px; }
@media (max-width: 760px) { .promise ul { grid-template-columns: 1fr; } }

/* feature sections, picture left and right in turn */
.feature { padding: 70px 0; }
.feature .wrap { display: grid; grid-template-columns: 1fr 1.35fr; gap: 56px; align-items: center; }
.feature:nth-of-type(even) .wrap { grid-template-columns: 1.35fr 1fr; }
.feature:nth-of-type(even) .text { order: 2; }
.feature h2 { font-size: clamp(32px, 3.8vw, 46px); }
.feature ul { list-style: none; padding: 0; margin: 22px 0 0; }
.feature li { position: relative; padding-left: 24px; margin: 0 0 10px; color: #c3d4e2; }
.feature li::before { content: ''; position: absolute; left: 2px; top: .62em; width: 9px; height: 6px; background: var(--gold); transform: skewX(-20deg); }
@media (max-width: 900px) { .feature .wrap, .feature:nth-of-type(even) .wrap { grid-template-columns: 1fr; } .feature:nth-of-type(even) .text { order: 0; } }

/* how to start */
.steps { padding: 70px 0; }
.steps ol { list-style: none; counter-reset: s; padding: 0; margin: 30px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.steps li { counter-increment: s; background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px; padding: 22px; }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; margin-bottom: 12px;
  background: #39c6ec22; color: var(--accent); font: 700 18px var(--display); }
.steps b { display: block; font: 700 20px var(--display); }
.steps span { color: var(--muted); font-size: 15px; }
.steps h2, .faq h2 { font-size: clamp(30px, 3.4vw, 40px); }
@media (max-width: 760px) { .steps ol { grid-template-columns: 1fr; } }

/* questions */
.faq { padding: 40px 0 80px; }
.faq .wrap { max-width: 820px; width: 100%; }   /* full width, not as wide as the open answer */
.faq details { border-bottom: 1px solid var(--line); padding: 16px 0; }
.faq summary { cursor: pointer; font: 700 20px var(--display); list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::after { content: '+'; color: var(--accent); }
.faq details[open] summary::after { content: '–'; }
.faq summary::-webkit-details-marker { display: none; }
.faq p { color: var(--muted); margin: 10px 0 0; }

/* footer */
footer { border-top: 1px solid #ffffff10; padding: 34px 0 48px; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 10px 28px; align-items: baseline; }
footer nav { display: flex; gap: 18px; }
footer p { margin: 0; flex-basis: 100%; }

/* documents (privacy, what's new) */
.doc { max-width: 760px; margin: 0 auto; padding: 56px 24px 80px; }
.doc h1 { font-size: 46px; margin-bottom: 8px; }
.doc h2 { font-size: 28px; margin: 40px 0 8px; color: var(--text); }
.doc h3 { font-size: 18px; margin: 18px 0 6px; color: var(--accent); letter-spacing: .08em; text-transform: uppercase; }
.doc p, .doc li { color: #c3d4e2; }
.doc li { margin-bottom: 8px; }
.doc .date { color: var(--muted); }
.doc code { background: var(--bg-3); padding: 1px 5px; border-radius: 3px; font-size: .9em; }

/* sections slide in as you scroll (not with reduced motion; without script everything just shows) */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- the showcase: a menu of Krill's groups on the left, the tabs on the right ---------- */
.features { padding: 40px 0 30px; }
.showcase { display: grid; grid-template-columns: 220px 1fr; gap: 56px; align-items: start; }
.toc { position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow: auto; padding: 2px 0 0 10px; margin-left: -10px; }   /* room for the plates' slanted edge */
.toc ul { list-style: none; margin: 0; padding: 0; }
.toc .grp { margin-bottom: 18px; }
/* the group colours of Krill's own plates (panel.css --grp-*) */
.toc [data-group="hangar"] { --c: #8cc8d6; }
.toc [data-group="store"] { --c: #e19f86; }
.toc [data-group="tools"] { --c: #d6cf8f; }
.toc [data-group="extras"] { --c: #bba8e3; }
.toc [data-group="fleetview"] { --c: #39c6ec; }   /* Krill's outlined Fleet view plate */
.toc .plate { display: inline-block; padding: 5px 16px 4px; margin-bottom: 6px; text-decoration: none; color: var(--c); background: color-mix(in srgb, var(--c) 9%, #0d1a28);
  border: 1px solid color-mix(in srgb, var(--c) 30%, var(--line)); font: 700 15px var(--display); letter-spacing: .16em; text-transform: uppercase; transform: skewX(-14deg); }
.toc .plate:hover { background: color-mix(in srgb, var(--c) 20%, #0d1a28); }
.toc .plate.on { background: var(--c); border-color: var(--c); color: #0b1520; }
.toc .grp ul a { display: block; padding: 4px 0 4px 16px; border-left: 2px solid var(--line); color: var(--muted); text-decoration: none; font-size: 15px; }
.toc .grp ul a:hover { color: var(--text); }
.toc .grp ul a.on { color: var(--text); border-left-color: var(--c); }
/* every tab is a page of its own: words and small pictures on the left, the main picture big on the right */
.page { position: relative; }
.content .page { min-height: calc(100vh - 60px); display: flex; align-items: center; padding: 28px 0 78px; }
.content .pg { width: 100%; }
.domain .pg { text-align: left; }
.domain h2 { font-size: clamp(40px, 5vw, 68px); max-width: 12em; }
.domain .chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.chip { padding: 8px 16px; border: 1px solid var(--line); border-radius: 20px; text-decoration: none; color: var(--text); background: var(--bg-2); font: 600 16px var(--display); letter-spacing: .06em; }
.chip:hover { border-color: var(--accent); color: var(--accent); }
.tab .pg { display: grid; grid-template-columns: minmax(250px, .8fr) 1.7fr; gap: 40px; align-items: center; }
.tab h3 { font-size: clamp(34px, 3.6vw, 50px); margin-bottom: 12px; }
.tab .text > p:not(.kicker) { color: #c3d4e2; margin: 0 0 22px; }
.tab .pic { position: relative; }
/* the list of what the pictures show: also picks the picture in front */
.deckn { margin: 0 0 6px; color: var(--gold); font: 700 14px var(--display); letter-spacing: .18em; }
.caps { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 4px; }
.caps button { display: flex; gap: 12px; align-items: baseline; width: 100%; text-align: left; background: none; border: 0; border-left: 2px solid var(--line);
  padding: 7px 12px; color: var(--muted); font: 16px/1.4 system-ui, -apple-system, 'Segoe UI', sans-serif; cursor: pointer; transition: color .2s, border-color .2s, background .2s; }
.caps button:hover { color: var(--text); }
.caps button.on { color: var(--text); border-left-color: var(--gold); background: linear-gradient(90deg, #f2c94c14, transparent 70%); }
.tab .text > p.credit { margin: 18px 0 0; color: var(--muted); font-size: 14px; }
.credit a { color: var(--accent); }
.cap1 { color: var(--muted); font-size: 15px; border-left: 2px solid var(--gold); padding-left: 12px; }
/* the deck: a tilted stack; the picture in front, the next two darker behind it; dealt ones fly up and away */
.deck { --h: min(calc(100vh - 230px), 740px); position: relative; height: var(--h); }
.deck .card { position: absolute; left: 4%; top: 8%; width: auto; max-width: 80%; padding: 0; transform-origin: 50% 100%;
  transition: transform .6s cubic-bezier(.2, .7, .2, 1), opacity .5s, filter .5s; }
.deck .card img { width: auto; height: auto; max-height: calc(var(--h) * .86); max-width: 100%; }
.deck .card[data-pos="0"] { z-index: 5; transform: none; }   /* the one in front lies straight, so it reads well */
.deck .card[data-pos="1"] { z-index: 4; transform: translate(7%, -3%) rotate(2.5deg) scale(.96); filter: brightness(.5) saturate(.8); cursor: pointer; }
.deck .card[data-pos="2"] { z-index: 3; transform: translate(14%, -6%) rotate(6deg) scale(.92); filter: brightness(.3) saturate(.6); cursor: pointer; }
.deck .card[data-pos^="-"] { z-index: 6; transform: translate(-10%, -75%) rotate(-12deg) scale(.96); opacity: 0; pointer-events: none; }
.deck .card:not([data-pos="0"]):not([data-pos="1"]):not([data-pos="2"]):not([data-pos^="-"]) { z-index: 1; transform: translate(18%, -8%) rotate(8deg) scale(.9); opacity: 0; pointer-events: none; }
.deck .card[data-pos="1"]:hover, .deck .card[data-pos="2"]:hover { filter: brightness(.75); }
.deck.n1 .card { left: 0; top: 4%; transform: none; }
.deck.n1 { --h: min(calc(100vh - 200px), 760px); }
@media (prefers-reduced-motion: reduce) { .deck .card { transition: none; } }
.soon { width: 100%; aspect-ratio: 16 / 10; border: 1px dashed var(--line); border-radius: 10px; display: grid; place-items: center; color: var(--muted); font: 600 18px var(--display); letter-spacing: .12em; text-transform: uppercase; }
.zoom { display: block; width: 100%; padding: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--bg-2); cursor: zoom-in;
  box-shadow: 0 16px 44px #0009; transition: border-color .2s, transform .2s; }
.zoom:hover { border-color: var(--accent); transform: translateY(-2px); }
.zoom img { width: 100%; height: auto; }
.steps.page, .faq.page { min-height: calc(100vh - 60px); display: flex; align-items: center; }
.faq.page { flex-direction: column; justify-content: center; }
@media (max-width: 980px) {
  .content .page, .steps.page, .faq.page { min-height: 0; padding: 36px 0; }
  .tab .pg { grid-template-columns: 1fr; gap: 18px; }
  .tab .lead .zoom img { max-height: none; }
  .showcase { grid-template-columns: 1fr; gap: 0; }
  .toc { position: sticky; top: 60px; z-index: 5; max-height: none; overflow-x: auto; background: #07101aee; margin: 0 -24px; padding: 8px 24px; border-bottom: 1px solid #ffffff10; }
  .toc > ul { display: flex; gap: 8px; }
  .toc .grp { margin: 0; }
  .toc .grp ul { display: none; }
}

/* ---------- the picture viewer ---------- */
.lb { position: fixed; inset: 0; z-index: 50; background: #02070ce8; backdrop-filter: blur(6px); display: grid; grid-template-columns: 64px 1fr 64px; align-items: center; }
.lb[hidden] { display: none; }
.lb figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 12px; max-height: 100vh; padding: 28px 0; }
.lb img { max-width: 100%; max-height: calc(100vh - 110px); width: auto; height: auto; border-radius: 8px; border: 1px solid var(--line); box-shadow: 0 30px 90px #000; }
.lb figcaption { display: flex; gap: 18px; align-items: baseline; color: var(--text); font-size: 16px; }
.lb .lb-n { color: var(--muted); font: 600 14px var(--display); letter-spacing: .1em; }
.lb button { background: none; border: 0; color: var(--text); cursor: pointer; font: 300 54px/1 system-ui, sans-serif; opacity: .7; }
.lb button:hover { opacity: 1; color: var(--accent); }
.lb .lb-close { position: absolute; top: 12px; right: 18px; font-size: 40px; }
body.lb-open { overflow: hidden; }

/* the one glowing arrow at the foot of the screen (fades while a page glides, gone on the last page) */
.pager { position: fixed; left: 50%; bottom: 16px; z-index: 20; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 2px;
  color: var(--accent); text-decoration: none; font: 700 13px var(--display); letter-spacing: .2em; text-transform: uppercase; transition: opacity .25s; }
.pager span { display: none; }
.pager.front span { display: block; }
.pager svg { width: 36px; height: 36px; filter: drop-shadow(0 0 6px #39c6ec) drop-shadow(0 0 16px #39c6ec88); animation: bob 1.8s ease-in-out infinite; }
.pager:hover svg { filter: drop-shadow(0 0 8px #39c6ec) drop-shadow(0 0 24px #39c6ec); }
.pager.moving, .pager.gone { opacity: 0; pointer-events: none; }
body.lb-open .pager { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .pager svg { animation: none; } }
.deck .card.todo { width: min(640px, 80%); aspect-ratio: 16 / 10; display: grid; place-content: center; gap: 8px; text-align: center; padding: 24px;
  border: 1px dashed var(--line); border-radius: 10px; background: var(--bg-2); color: var(--muted); }
.deck .card.todo span { font: 600 15px var(--display); letter-spacing: .14em; text-transform: uppercase; }
.deck .card.todo b { color: var(--text); font-weight: 500; }
