/* Broadside site. Colors and type follow the app's design system
   (DSColors, DSTypography): navy surfaces, sonar green accent, SF Rounded
   headings. The app is dark-only, so the site is too. */

:root {
  --abyss: #050f26;        /* appBackgroundBottom */
  --navy: #0a1940;         /* appBackgroundTop */
  --hull: #0b1d36;         /* raised surfaces */
  --sonar: #0acc5c;        /* default accent preset "Sonar" */
  --sonar-ink: #022a12;    /* text on sonar */
  --amber: #ff9900;        /* hits; never text */
  --text: #f4f8ff;
  --text-2: rgba(244, 248, 255, 0.76);
  --text-3: rgba(244, 248, 255, 0.64);
  --hairline: rgba(244, 248, 255, 0.12);
  --grid: rgba(10, 204, 92, 0.16);

  --font-display: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", Roboto, "Hiragino Sans", "Apple SD Gothic Neo", "PingFang SC", "Noto Sans", sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Hiragino Sans", "Apple SD Gothic Neo", "PingFang SC", "Noto Sans", sans-serif;
  --font-coord: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.5625rem;
  --step-3: clamp(1.75rem, 1.2rem + 2vw, 2.4rem);
  --step-4: clamp(2.4rem, 1.4rem + 4.4vw, 4.2rem);

  --gutter: clamp(1rem, 4vw, 2.5rem);
  --measure: 36rem;
  --radius-small: 8px;
  --radius-medium: 12px;

  color-scheme: dark;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--abyss) linear-gradient(180deg, var(--navy) 0, var(--abyss) 70rem) no-repeat;
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  overflow-x: clip;
}

img { display: block; max-width: 100%; height: auto; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
}

h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); font-weight: 700; }
p { margin: 0; }

a { color: var(--sonar); text-underline-offset: 0.2em; }
a:hover { color: #3ee084; }

:focus-visible {
  outline: 3px solid var(--sonar);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -4rem;
  z-index: 20;
  padding: 0.6rem 1rem;
  background: var(--sonar);
  color: var(--sonar-ink);
  font-weight: 700;
  border-radius: var(--radius-small);
}
.skip:focus { top: 0.75rem; }

main:focus { outline: none; }

.lead { color: var(--text-2); font-size: var(--step-1); line-height: 1.5; max-width: var(--measure); }
.note { color: var(--text-3); font-size: var(--step--1); }

/* ---------- masthead ---------- */
.masthead {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(5, 15, 38, 0.86);
  border-bottom: 1px solid var(--hairline);
}
@supports (backdrop-filter: blur(1px)) {
  .masthead { background: rgba(5, 15, 38, 0.72); backdrop-filter: blur(14px); }
}

.masthead__bar {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0.6rem var(--gutter);
  display: flex;
  align-items: center;
  gap: 1rem 1.5rem;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.125rem;
}
.brand img { border-radius: 8px; }
.brand:hover { color: var(--text); }

.sections { margin-left: auto; }
.sections ul { display: flex; gap: 0.25rem 1.25rem; list-style: none; margin: 0; padding: 0; }
.sections a {
  display: inline-block;
  padding: 0.45rem 0;
  color: var(--text-2);
  text-decoration: none;
  font-size: var(--step--1);
  font-weight: 600;
  white-space: nowrap;
}
.sections a:hover,
.sections a[aria-current] { color: var(--text); }
.sections a[aria-current] { box-shadow: inset 0 -2px var(--sonar); }

.lang { position: relative; font-size: var(--step--1); }
.lang summary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0 0.75rem;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  color: var(--text-2);
  cursor: pointer;
  list-style: none;
}
.lang summary::-webkit-details-marker { display: none; }
.lang summary:hover { color: var(--text); border-color: rgba(244, 248, 255, 0.3); }
.lang summary svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.lang__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.lang__list {
  position: absolute;
  right: 0;
  top: calc(100% + 0.4rem);
  min-width: 12rem;
  margin: 0;
  padding: 0.4rem;
  list-style: none;
  background: var(--hull);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-medium);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}
.lang__list a {
  display: block;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-small);
  color: var(--text);
  text-decoration: none;
}
.lang__list a:hover { background: rgba(244, 248, 255, 0.06); }
.lang__list a[aria-current] { color: var(--sonar); font-weight: 700; }

@media (max-width: 760px) {
  .masthead__bar { gap: 0.25rem 1rem; }
  .lang { margin-left: auto; }
  .sections {
    order: 3;
    flex-basis: 100%;
    margin: 0 calc(var(--gutter) * -1);
    padding: 0 var(--gutter);
    overflow-x: auto;
    scrollbar-width: none;
  }
  .sections::-webkit-scrollbar { display: none; }
}

/* ---------- store badge ---------- */
.store-badge { display: inline-block; border-radius: 10px; }
.store-badge img { height: 48px; width: auto; }
.store-badge--large img { height: 56px; }

/* ---------- screenshots ----------
   Every screenshot is a framed slot: the device (frame drawn into the image,
   no CSS frame) alone on a transparent background, so there is no box and the
   shadow follows the device outline (.shot--framed). .shot alone (rounded
   corners, hairline, shadow) is for a slot without the "framed" flag. */
.shot {
  display: block;
  width: 100%;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(244, 248, 255, 0.14);
  background: var(--abyss);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5);
}
.shot img { width: 100%; }
.shot--framed {
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}
.shot--framed img { filter: drop-shadow(0 24px 40px rgba(0, 0, 0, 0.55)); }
.band__media .shot { max-width: 300px; }
.band__media .shot--framed { max-width: 280px; }
.band__media .shot--privacy-stats { max-width: 260px; }

/* ---------- hero ----------
   The App Store header artwork sits behind the hero, darkened on the side of
   the copy and faded into the page at the bottom. */
.hero {
  position: relative;
  isolation: isolate;
  max-width: 72rem;
  margin: 0 auto;
  padding: clamp(2.5rem, 7vw, 5.5rem) var(--gutter) clamp(3rem, 8vw, 6rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 3rem;
}
.hero__art {
  position: absolute;
  inset: 0 calc(50% - 50vw);
  z-index: -1;
}
.hero__art img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 40%; }
.hero__art::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 15, 38, 0.92) 0, rgba(5, 15, 38, 0.72) 45%, rgba(5, 15, 38, 0.25) 100%),
    linear-gradient(180deg, rgba(10, 25, 64, 0.4) 0, transparent 30%, transparent 70%, var(--abyss) 100%);
}
.hero__copy { display: grid; gap: 1.5rem; justify-items: start; }
.hero__title { font-size: var(--step-4); font-weight: 900; letter-spacing: -0.025em; max-width: 12ch; }
.hero__lead { color: var(--text-2); font-size: var(--step-1); line-height: 1.5; max-width: 32rem; }
.hero__copy .note { margin-top: -0.75rem; }

.hero__stage { display: grid; justify-items: center; }
.hero__stage .shot { width: min(280px, 62vw); }

/* ---------- content bands ---------- */
.band {
  max-width: 72rem;
  margin: 0 auto;
  padding: clamp(3.5rem, 9vw, 7rem) var(--gutter);
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 5rem);
  border-top: 1px solid var(--hairline);
}
.band--online,
.band--privacy { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); }
.band__text { display: grid; gap: 1.25rem; align-content: start; }
.band__media { display: grid; justify-items: center; }

/* Game modes, drawn like the app's TacticalModeRow: icon box and corner brackets. */
.modes { list-style: none; margin: 0.75rem 0 0; padding: 0; display: grid; gap: 0.75rem; }
.mode {
  position: relative;
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
  padding: 1rem 1.1rem;
  background: rgba(11, 29, 54, 0.6);
}
.mode::before,
.mode::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border: 0 solid rgba(10, 204, 92, 0.7);
}
.mode::before { top: 0; left: 0; border-top-width: 2px; border-left-width: 2px; }
.mode::after { right: 0; bottom: 0; border-right-width: 2px; border-bottom-width: 2px; }
.mode__icon {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border: 1px solid rgba(10, 204, 92, 0.45);
  border-radius: var(--radius-small);
  color: var(--sonar);
}
.mode__icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.mode__title { font-size: var(--step-1); margin-bottom: 0.2rem; }
.mode p { color: var(--text-2); }

.facts { margin: 0.5rem 0 0; display: grid; gap: 1.25rem; }
.facts div { padding-left: 1rem; border-left: 2px solid rgba(10, 204, 92, 0.55); }
.facts dt { font-family: var(--font-display); font-weight: 700; font-size: var(--step-1); }
.facts dd { margin: 0.2rem 0 0; color: var(--text-2); }
.facts--grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.75rem 2rem; }

.ticks { list-style: none; margin: 0.25rem 0 0; padding: 0; display: grid; gap: 0.8rem; max-width: var(--measure); }
.ticks li { display: grid; grid-template-columns: 1.5rem minmax(0, 1fr); gap: 0.6rem; color: var(--text-2); }
.ticks svg { width: 1.5rem; height: 1.6em; fill: none; stroke: var(--sonar); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

.text-link { font-weight: 700; }

/* iPhone Duo: text across the top, iPad and iPhone Duo side by side below. */
.band--duo { grid-template-columns: minmax(0, 1fr); align-items: start; }
.duo__text { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 1.25rem clamp(2rem, 6vw, 5rem); align-items: end; }
.duo__intro { display: grid; gap: 1.25rem; }
.duo__media { display: flex; justify-content: center; align-items: flex-end; gap: clamp(1.25rem, 4vw, 3rem); }
.duo__media .shot--large-battle { max-width: 400px; }
.duo__media .shot--duo-cover { max-width: 290px; }

/* ---------- closing ---------- */
.closing {
  max-width: 72rem;
  margin: 0 auto;
  padding: clamp(3.5rem, 9vw, 7rem) var(--gutter) clamp(4rem, 10vw, 8rem);
  display: grid;
  gap: 1.25rem;
  justify-items: start;
  border-top: 1px solid var(--hairline);
}
.closing h2 { font-size: var(--step-4); font-weight: 900; max-width: 14ch; }

/* ---------- footer ---------- */
.colophon { border-top: 1px solid var(--hairline); background: rgba(1, 5, 15, 0.5); font-size: var(--step--1); }
.colophon__inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 3rem var(--gutter) 2rem;
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 2rem;
}
.colophon__name { font-family: var(--font-display); font-weight: 800; font-size: var(--step-1); }
.colophon__brand p:not(.colophon__name) { color: var(--text-2); }
.colophon__heading { font-size: var(--step--1); font-family: var(--font-body); font-weight: 700; color: var(--text-2); margin-bottom: 0.75rem; }
.colophon ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.colophon__languages { grid-template-columns: repeat(2, max-content); column-gap: 1.5rem; }
.colophon a { color: var(--text); text-decoration: none; display: inline-block; padding: 0.2rem 0; }
.colophon a:hover { color: var(--sonar); text-decoration: underline; }
.colophon__base {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 var(--gutter) 2.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
}
.colophon__rights { color: var(--text-3); }
.colophon a.colophon__studio { display: inline-flex; align-items: center; gap: 0.45rem; color: var(--text-2); }
.colophon__studio img { flex: none; }

/* ---------- legal and support pages ---------- */
.page { max-width: 72rem; margin: 0 auto; padding: clamp(2.5rem, 6vw, 4.5rem) var(--gutter) 5rem; }
.page__header,
.legal__header { display: grid; gap: 0.9rem; margin-bottom: 2.5rem; max-width: 46rem; }
.page h1 { font-size: var(--step-4); font-weight: 900; }
.legal { max-width: 46rem; }
.legal__body h2 { font-size: var(--step-2); margin: 2.5rem 0 0.75rem; }
.legal__body h3 { margin: 1.5rem 0 0.5rem; }
.legal__body p,
.legal__body li { color: var(--text-2); }
.legal__body p + p { margin-top: 0.9rem; }
.legal__body ul { margin: 0.9rem 0; padding-left: 1.25rem; display: grid; gap: 0.5rem; }
.legal__body li::marker { color: var(--sonar); }
.legal__body strong { color: var(--text); }

.support { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.support h2 { font-size: var(--step-2); margin-bottom: 0.5rem; }
.support__faq > p,
.support__form > p { color: var(--text-2); margin-bottom: 1.5rem; }
.faqs { display: grid; gap: 0.6rem; }
.faq { border: 1px solid var(--hairline); border-radius: var(--radius-medium); background: rgba(11, 29, 54, 0.5); }
.faq summary {
  cursor: pointer;
  padding: 1rem 2.75rem 1rem 1.1rem;
  font-weight: 700;
  position: relative;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  position: absolute;
  right: 1.2rem;
  top: 1.45rem;
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid var(--sonar);
  border-bottom: 2px solid var(--sonar);
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}
.faq[open] summary::after { transform: rotate(225deg); top: 1.65rem; }
.faq p { padding: 0 1.1rem 1.1rem; color: var(--text-2); }
.faq strong { color: var(--text); }

.support__form { padding: clamp(1.25rem, 3vw, 2rem); border: 1px solid var(--hairline); border-radius: var(--radius-medium); background: rgba(11, 29, 54, 0.6); }
.form { display: grid; gap: 1rem; }
.form[hidden] { display: none; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.field { display: grid; gap: 0.35rem; }
.field label { font-weight: 600; font-size: var(--step--1); }
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 46px;
  padding: 0.65rem 0.8rem;
  font: inherit;
  color: var(--text);
  background: rgba(1, 5, 15, 0.55);
  border: 1px solid rgba(244, 248, 255, 0.28);
  border-radius: var(--radius-small);
}
.field textarea { resize: vertical; min-height: 9rem; }
.field ::placeholder { color: rgba(244, 248, 255, 0.5); }
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible { border-color: var(--sonar); outline-offset: 1px; }

.button {
  min-height: 48px;
  padding: 0.7rem 1.4rem;
  font: inherit;
  font-weight: 700;
  color: var(--sonar-ink);
  background: var(--sonar);
  border: 0;
  border-radius: var(--radius-small);
  cursor: pointer;
}
.button:hover { background: #3ee084; }
.button:disabled { opacity: 0.6; cursor: progress; }
.button--quiet { color: var(--text); background: transparent; border: 1px solid var(--hairline); margin-top: 1rem; }
.button--quiet:hover { background: rgba(244, 248, 255, 0.06); }
.form__status-title { font-family: var(--font-display); font-weight: 800; font-size: var(--step-2); margin-bottom: 0.5rem; }
.form__status [data-state="success"]:focus { outline: none; }
.form__alert { margin-top: 1rem; padding: 0.85rem 1rem; border-left: 3px solid var(--amber); background: rgba(255, 153, 0, 0.1); }

/* ---------- small screens ---------- */
@media (max-width: 900px) {
  .hero,
  .band,
  .band--online,
  .band--privacy,
  .band--duo,
  .support { grid-template-columns: minmax(0, 1fr); }
  .hero__art::after {
    background:
      linear-gradient(180deg, rgba(5, 15, 38, 0.6) 0, rgba(5, 15, 38, 0.82) 40%, var(--abyss) 100%);
  }
  .band--online .band__media,
  .band--privacy .band__media { order: 2; }
  .duo__text { grid-template-columns: minmax(0, 1fr); }
  .colophon__inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .colophon__brand { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .facts--grid,
  .form__row { grid-template-columns: minmax(0, 1fr); }
  .duo__media { flex-direction: column; align-items: center; }
  .duo__media .shot--large-battle { max-width: min(400px, 88vw); }
  .duo__media .shot--duo-cover { max-width: min(290px, 72vw); }
  .colophon__inner { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- reduced motion (WEB-A11Y-004) ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
