:root {
  --bg: #090f20;
  --bg-raise: #10192e;
  --ink: #edf0f8;
  --body: #c5d0e4;
  --muted: #8ea0bf;
  --line: rgba(154, 191, 255, 0.18);
  --accent: #9abfff;
  --accent-ink: #102141;
  --amber: #ead089;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Avenir Next", Avenir, "Segoe UI", sans-serif;
  --measure: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(ellipse at 80% -10%, rgba(79, 117, 187, 0.22), transparent 42%),
    radial-gradient(ellipse at 0% 40%, rgba(58, 87, 158, 0.12), transparent 36%),
    var(--bg);
  color: var(--ink);
  font: 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.skip {
  position: absolute;
  left: 12px;
  top: 12px;
  transform: translateY(-160%);
  background: var(--accent);
  color: var(--accent-ink);
  padding: 8px 12px;
  z-index: 20;
}
.skip:focus { transform: none; }

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 18px 32px;
  background: rgba(9, 15, 32, 0.82);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
}
.nav-links { display: flex; gap: 22px; margin-left: auto; }
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.nav-links a:hover { color: var(--ink); }
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: 20px;
  letter-spacing: -0.04em;
}
.brand svg { width: 28px; height: 28px; color: var(--accent); }
.brand span { color: var(--accent); }

.hero {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) 1.25fr;
  gap: 48px;
  align-items: end;
  width: min(1440px, calc(100% - 64px));
  margin: 0 auto;
  padding: 72px 0 36px;
}
.kicker {
  margin: 0 0 18px;
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: -0.03em; }
h1 {
  margin: 0;
  font-size: clamp(52px, 6vw, 84px);
  line-height: 0.96;
}
.lede {
  max-width: 38rem;
  color: var(--body);
  font-size: 18px;
  margin: 24px 0 0;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  padding: 13px 18px;
  border-radius: 10px;
  border: 1px solid var(--accent);
}
.btn.ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.btn:hover { filter: brightness(1.08); }
.fine {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.hero-shot {
  margin: 0;
}
.frame {
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: #070b16;
  box-shadow: var(--shadow);
}
.frame img, .shot img { width: 100%; }
button.shot {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  cursor: zoom-in;
  text-align: left;
  font: inherit;
}
.caption {
  margin: 10px 2px 0;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.01em;
}

.facts {
  width: min(1440px, calc(100% - 64px));
  margin: 28px auto 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.facts li { padding: 22px 18px 22px 0; }
.facts strong {
  display: block;
  font-family: var(--serif);
  font-size: 34px;
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1;
}
.facts span { display: block; margin-top: 8px; color: var(--muted); font-size: 13px; }

.section {
  width: min(1440px, calc(100% - 64px));
  margin: 0 auto;
  padding: 96px 0 0;
  scroll-margin-top: 72px;
}
.section h2 {
  margin: 8px 0 12px;
  font-size: clamp(36px, 4vw, 56px);
  line-height: 1.05;
  max-width: 16ch;
}
.section .intro { max-width: 42rem; color: var(--body); margin: 0 0 28px; }

.split {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 36px;
  align-items: start;
}
.split.flip { grid-template-columns: 1.2fr 0.8fr; }
.split.flip .copy { order: 2; }

.pair {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 16px;
}
.stack { display: grid; gap: 16px; }

.cinema {
  width: min(1440px, calc(100% - 64px));
  margin: 88px auto 0;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 16px;
}
.cinema .tall { grid-row: span 2; }

.orders {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-top: 8px;
}
.orders article {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  background: rgba(16, 25, 46, 0.65);
  min-height: 150px;
}
.orders em {
  display: block;
  font-style: normal;
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0.16em;
}
.orders h3 { margin: 14px 0 8px; font-size: 22px; }
.orders p { margin: 0; color: var(--muted); font-size: 14px; }

.races {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 16px;
}
.races article {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 18px 16px;
  background: linear-gradient(160deg, rgba(21, 34, 57, 0.8), rgba(9, 15, 32, 0.4));
  border-top: 3px solid var(--race, var(--accent));
}
.races h3 { margin: 0 0 4px; font-size: 26px; color: var(--race, var(--ink)); }
.races .species { margin: 0 0 10px; color: var(--muted); font-size: 13px; }
.races p { margin: 0; color: var(--body); font-size: 14px; }
.races .drawback { margin-top: 8px; color: var(--amber); font-size: 13px; }

[hidden] { display: none !important; }

.hero-art { position: relative; padding: 0 0 56px; }
.hero-art .hero-ipad { width: 88%; }
.hero-art .hero-phone { position: absolute; right: 0; bottom: 0; width: 24%; transform: rotate(3deg); }
.hero-art .bezel { box-shadow: 0 40px 90px rgba(0, 0, 0, 0.55), 0 0 80px rgba(120, 160, 255, 0.12); }

.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 22px; }
.tabs [role="tab"] {
  font: 600 14px/1 var(--sans);
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-raise);
  color: var(--body);
  cursor: pointer;
}
.tabs [role="tab"]:hover { border-color: var(--accent); }
.tabs [aria-selected="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.pill { margin-left: 6px; padding: 3px 8px; border-radius: 999px; background: var(--amber); color: #2a2208; font-size: 11px; }
.panel .meta { margin: 0 0 22px; color: var(--muted); font-size: 14px; max-width: 46rem; }
.panel figure { margin: 0; }
.soon {
  margin: 0 0 22px;
  padding: 14px 18px;
  border: 1px solid rgba(234, 208, 137, 0.35);
  border-radius: 14px;
  background: rgba(234, 208, 137, 0.08);
  color: var(--body);
  font-size: 14px;
}
.soon strong { color: var(--amber); }

.phone-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; align-items: start; }
.land-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin-top: 30px; }
.ipad-feature { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.7fr); gap: 22px; align-items: center; }
.ipad-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; margin-top: 30px; align-items: start; }
.bezel {
  background: #05080f;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.bezel.ipad-land, .bezel.ipad-port { border-radius: 22px; padding: 12px; }
.bezel.phone-port { border-radius: 34px; padding: 10px; }
.bezel.phone-land { border-radius: 28px; padding: 10px 12px; }
.bezel img { border-radius: 12px; }
.bezel.phone-port img { border-radius: 26px; }
.bezel.phone-land img { border-radius: 18px; }
.bezel { transition: transform .25s ease; }
.bezel:hover { transform: translateY(-4px); }
.hero-art .hero-phone:hover { transform: rotate(3deg) translateY(-4px); }
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px 14px;
}
.gallery figure { margin: 0; }

.note {
  margin-top: 22px;
  color: var(--muted);
  font-size: 13px;
}

footer {
  width: min(1440px, calc(100% - 64px));
  margin: 80px auto 0;
  padding: 28px 0 48px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 24px;
  color: var(--muted);
  font-size: 13px;
}
footer a { color: var(--accent); }
footer p { margin: 0; max-width: 46rem; }

#viewer {
  width: min(1200px, calc(100% - 32px));
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #070b16;
  color: var(--ink);
  box-shadow: var(--shadow);
}
#viewer::backdrop { background: rgba(4, 8, 16, 0.82); }
#viewer img { width: 100%; max-height: 82vh; object-fit: contain; background: #05080f; }
#viewer p { margin: 0; padding: 12px 16px 16px; color: var(--body); font-size: 14px; }
#viewer form { position: absolute; top: 10px; right: 10px; }
#viewer button {
  border: 1px solid var(--line);
  background: rgba(9, 15, 32, 0.8);
  color: var(--ink);
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
}

@media (max-width: 980px) {
  .hero, .split, .split.flip, .cinema, .pair, .facts, .orders, .races, .gallery {
    grid-template-columns: 1fr;
  }
  .split.flip .copy { order: 0; }
  .cinema .tall { grid-row: auto; }
  .facts { grid-template-columns: 1fr 1fr; }
  .facts li:last-child { grid-column: 1 / -1; }
  .orders, .ipad-feature, .ipad-grid, .land-row { grid-template-columns: 1fr; }
  .phone-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .ipad-grid.ports { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ipad-feature .ipad-port { width: min(320px, 100%); margin: 0 auto; }
  .hero-art { padding-bottom: 40px; }
  .nav { padding: 14px 16px; gap: 12px; }
  .nav-links { display: none; }
  .hero, .section, .cinema, .facts, footer { width: min(1440px, calc(100% - 32px)); }
  .hero { padding-top: 36px; gap: 28px; }
  h1 { font-size: 46px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bezel { transition: none; }
}

/* legal and support pages */
.legal { width: min(760px, calc(100% - 32px)); margin: 0 auto; padding: 64px 0 0; }
.legal h1 { font-size: clamp(40px, 6vw, 64px); line-height: 1; margin: 0 0 8px; }
.legal h2 { font-size: 26px; margin: 36px 0 8px; }
.legal p, .legal li { color: var(--body); }
.legal ul { padding-left: 22px; }
.legal a { color: var(--accent); text-underline-offset: 3px; }
.legal .updated { color: var(--muted); font-size: 14px; margin: 0 0 28px; }
.contact-card { margin: 28px 0 8px; padding: 6px 22px 10px; border: 1px solid var(--line); border-radius: 16px; background: var(--panel); }
.contact-card h2 { margin-top: 16px; }
.legal details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.legal summary { cursor: pointer; font-weight: 600; color: var(--ink); }
.legal details p { margin: 10px 0 0; }
.legal-links { display: flex; flex-wrap: wrap; gap: 18px; }
.legal-links a { text-decoration: none; }
.legal-links a:hover { color: var(--ink); text-decoration: underline; }
@media (max-width: 980px) { .nav-links { display: flex; margin-left: auto; } .nav-links a:not(:last-child) { display: none; } footer { flex-direction: column; } }
