/* WPKG landing page. Tokens copied from the app (src/index.css, src/App.css); no imports from src/. */

/* ---------------------------------------------------------------- fonts */
@font-face { font-family: 'Chakra Petch'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/chakra-petch-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Chakra Petch'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/chakra-petch-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Chakra Petch'; font-style: normal; font-weight: 600; font-display: swap; src: url('fonts/chakra-petch-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Chakra Petch'; font-style: normal; font-weight: 700; font-display: swap; src: url('fonts/chakra-petch-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/jetbrains-mono-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url('fonts/jetbrains-mono-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 700; font-display: swap; src: url('fonts/jetbrains-mono-latin-700-normal.woff2') format('woff2'); }

/* ---------------------------------------------------------------- tokens (from the app) */
:root {
  --bg: #07060d;
  --surface: #0e0c1a;
  --surface-2: #16132a;
  --border: #2b2650;
  --border-hi: #4a4382;
  --text: #e9e7ff;
  --muted: #8f8ab8;
  --cyan: #22e6ff;
  --magenta: #ff2e97;
  --power: #f5ff3b;
  --warn: #ffb000;
  --on-cyan: #03151a;
  --cyan-glow: rgba(34, 230, 255, 0.55);
  --grid-texture: rgba(143, 138, 184, 0.035);

  --font-ui: 'Chakra Petch', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --hud-h: clamp(26px, 2.5vh, 36px);
  --small: clamp(0.72rem, 1.05vh, 0.95rem);

  --cut-btn: 10px;
  --cut-shot: 22px;

  --gutter: clamp(16px, 4vw, 64px);
  --maxw: 2200px;

  color-scheme: dark;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 100vh;
  min-height: 100svh;
  font-family: var(--font-ui);
  font-size: 1.0625rem;
  line-height: 1.55;
  color: var(--text);
  background-color: var(--bg);
  /* the app's faint HUD grid */
  background-image:
    linear-gradient(var(--grid-texture) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-texture) 1px, transparent 1px);
  background-size: 32px 32px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--cyan); color: var(--on-cyan); }

img { display: block; max-width: 100%; height: auto; }
h1, h2 { margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }

:where(a):focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

/* shared horizontal frame: capped width, centred */
.top, .stage, .foot {
  width: 100%;
  max-width: calc(var(--maxw) + 2 * var(--gutter));
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* ---------------------------------------------------------------- top + footer */
.top { padding-top: clamp(14px, 3.2vh, 40px); padding-bottom: clamp(8px, 1.6vh, 20px); }
.logo { height: clamp(30px, 4.6vh, 46px); width: auto; }

.foot { padding-top: clamp(10px, 2vh, 24px); padding-bottom: clamp(12px, 2.6vh, 32px); }
.foot p {
  font-family: var(--font-mono);
  font-size: clamp(0.74rem, 0.95vh, 0.88rem);
  line-height: 1.6;
  letter-spacing: 0.02em;
  color: var(--muted);
}

/* ---------------------------------------------------------------- stage: text left, picture right */
.stage {
  display: grid;
  grid-template-columns: clamp(20rem, 31vw, 40rem) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  align-items: center;
  column-gap: clamp(32px, 4.5vw, 104px);
  padding-top: clamp(8px, 2vh, 32px);
  padding-bottom: clamp(8px, 2vh, 32px);
}

h1 {
  font-size: clamp(2.3rem, min(4.5vw, 7.6vh), 6.6rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.015em;
}
h1 .hl { display: block; color: var(--cyan); text-shadow: 0 0 32px rgba(34, 230, 255, 0.35); }

.lede {
  margin-top: clamp(16px, 3vh, 36px);
  max-width: 40ch;
  font-size: clamp(1.02rem, min(1.25vw, 2.3vh), 1.55rem);
  line-height: 1.5;
}

/* ---------------------------------------------------------------- downloads */
.downloads { margin-top: clamp(22px, 4.6vh, 56px); }
.dl-title {
  font-family: var(--font-mono);
  font-size: var(--small);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.dl-list {
  list-style: none;
  margin: clamp(10px, 1.6vh, 16px) 0 0;
  padding: 0;
  display: grid;
  gap: clamp(10px, 1.6vh, 16px);
  max-width: 36rem;
}

/* Chamfer lives on ::before so the focus ring (outline) is not clipped. */
.dl {
  --fill: var(--surface-2);
  --line: var(--border-hi);
  --ink: var(--text);
  --accent: var(--cyan);
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: clamp(48px, 7vh, 76px);
  padding: 0 20px 0 16px;
  color: var(--ink);
  text-decoration: none;
}
.dl::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  border: 1px solid var(--line);
  background:
    linear-gradient(315deg, var(--line) calc(var(--cut-btn) * 0.7071 + 1px), transparent 0) border-box,
    var(--fill) padding-box;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut-btn)), calc(100% - var(--cut-btn)) 100%, 0 100%);
}
.glyph {
  width: clamp(24px, 2.4vh, 32px);
  height: clamp(24px, 2.4vh, 32px);
  flex: none;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.6;
  stroke-linecap: square;
  stroke-linejoin: miter;
}
.dl-name {
  font-size: clamp(1rem, 1.5vh, 1.3rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.dl-state {
  margin-left: auto;
  padding-left: 12px;
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-mono);
  font-size: var(--small);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
}

a.dl[href]:hover { --line: var(--cyan); }

/* Not available yet: readable, clearly inactive, no link. */
.dl[aria-disabled='true'] {
  --fill: rgba(14, 12, 26, 0.7);
  --line: var(--border);
  --accent: var(--muted);
  cursor: default;
}
.dl[aria-disabled='true'] .dl-state::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--warn);
}

/* «Recommended for you» */
.dl-badge {
  position: absolute;
  top: -0.75em;
  right: 18px;
  padding: 0.15em 0.6em;
  font-family: var(--font-mono);
  font-size: clamp(0.64rem, 0.9vh, 0.82rem);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--on-cyan);
  background: var(--cyan);
  box-shadow: 0 0 12px var(--cyan-glow);
}
.dl-badge[hidden] { display: none; }
.dl.is-recommended { --line: var(--cyan); --fill: #0c1622; }
.dl.is-recommended[aria-disabled='true'] { --accent: var(--cyan); }
/* recommended and available: the primary button */
a.dl.is-recommended[href] {
  --fill: var(--cyan);
  --line: var(--cyan);
  --ink: var(--on-cyan);
  --accent: var(--on-cyan);
  filter: drop-shadow(0 0 8px var(--cyan-glow));
}
a.dl.is-recommended[href] .dl-badge { background: var(--text); box-shadow: none; }

/* ---------------------------------------------------------------- the picture, in its HUD frame */
.shot-cell { min-width: 0; }
.shot {
  margin: 0;
  filter: drop-shadow(0 0 32px rgba(34, 230, 255, 0.13)) drop-shadow(0 18px 40px rgba(0, 0, 0, 0.6));
}
.hud-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  height: var(--hud-h);
  margin: 0 28px 12px 20px;
}
.hud {
  padding: 0 0.7em;
  font-family: var(--font-mono);
  font-size: var(--small);
  font-weight: 500;
  line-height: calc(var(--hud-h) - 2px);
  letter-spacing: 0.12em;
  color: var(--cyan);
  background: rgba(7, 6, 13, 0.92);
  border: 1px solid var(--border-hi);
  white-space: nowrap;
}
.hud b { color: var(--power); font-weight: 700; }

.shot-body { position: relative; }
.shot-frame {
  padding: 1px;
  background: var(--border-hi);
  clip-path: polygon(0 0, calc(100% - var(--cut-shot)) 0, 100% var(--cut-shot), 100% 100%, var(--cut-shot) 100%, 0 calc(100% - var(--cut-shot)));
}
.shot-frame picture { display: block; }
.shot-frame img {
  width: 100%;
  clip-path: polygon(0 0, calc(100% - var(--cut-shot)) 0, 100% var(--cut-shot), 100% 100%, var(--cut-shot) 100%, 0 calc(100% - var(--cut-shot)));
  background: var(--surface);
}
/* cyan and magenta corner ticks */
.shot-body::before,
.shot-body::after {
  content: '';
  position: absolute;
  width: 28px;
  height: 28px;
  pointer-events: none;
}
.shot-body::before { left: -8px; top: -8px; border-left: 2px solid var(--cyan); border-top: 2px solid var(--cyan); }
.shot-body::after { right: -8px; bottom: -8px; border-right: 2px solid var(--magenta); border-bottom: 2px solid var(--magenta); }

/* ---------------------------------------------------------------- one screen on desktop/laptop
   The page is exactly the viewport tall. The picture cell is a size container, so the
   picture is as large as the cell allows in BOTH directions while keeping its 16:10 ratio
   (plus the HUD row above it and room for the corner ticks). */
@media (min-width: 901px) and (min-height: 600px) {
  body { height: 100vh; height: 100svh; }
  .shot-cell {
    container-type: size;
    align-self: stretch;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .shot { width: min(100cqw - 16px, (100cqh - var(--hud-h) - 12px - 16px) * 1.6); }
}

/* ---------------------------------------------------------------- narrow or short: one column, scrolls */
@media (max-width: 900px), (max-height: 599px) {
  .stage {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    row-gap: clamp(40px, 8vw, 64px);
    padding-top: clamp(20px, 5vw, 40px);
    padding-bottom: clamp(32px, 7vw, 56px);
  }
  h1 { font-size: clamp(2.3rem, 8.4vw, 4.4rem); }
  .lede { font-size: clamp(1.02rem, 2.6vw, 1.2rem); }
  .dl-list { max-width: 34rem; }
  .shot { max-width: 760px; }
}

@media (max-width: 600px) {
  :root { --cut-shot: 12px; }
  .hud { font-size: 0.66rem; }
  .hud-row { margin: 0 14px 10px 10px; }
  .shot-body::before, .shot-body::after { width: 18px; height: 18px; }
  .shot-body::before { left: -5px; top: -5px; }
  .shot-body::after { right: -5px; bottom: -5px; }
  .dl { min-height: 56px; padding: 0 16px 0 14px; }
  .dl-list { max-width: none; }
}

/* Phones get the phone layout of the same screen, cropped above the controls. */
@media (max-width: 560px) {
  .shot { max-width: 420px; margin: 0 auto; }
  .shot-frame img { aspect-ratio: 780 / 1225; object-fit: cover; object-position: top; }
}
