:root {
  color-scheme: dark;
  --ink: #040d13;
  --deep: #071722;
  --navy: #0b2130;
  --sea: #123a4f;
  --text: #ecf4f8;
  --muted: #94adbb;
  --plot: #a3d9e0;
  --fire: #ff9147;
  --line: rgba(163, 217, 224, 0.16);
  --card: rgba(163, 217, 224, 0.05);
  --radius: 22px;
}

* { box-sizing: border-box; }

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

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

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", system-ui, sans-serif;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", system-ui, sans-serif;
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin: 0;
}

a { color: var(--plot); }

img { max-width: 100%; }

.wrap {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 700px) { .wrap { padding: 0 32px; } }

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--plot);
}

/* ---------- Header ---------- */

header.site {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(4, 13, 19, 0.72);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 1px solid var(--line);
}

header.site .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 60px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 650;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.brand img { width: 30px; height: 30px; border-radius: 8px; }

header.site nav { display: flex; align-items: center; gap: 22px; font-size: 15px; }

header.site nav a { color: var(--muted); text-decoration: none; }

header.site nav a:hover { color: var(--text); }

@media (max-width: 640px) { header.site nav .optional { display: none; } }

@media (max-width: 420px) { header.site nav .pill { display: none; } }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(163, 217, 224, 0.35);
  background: rgba(163, 217, 224, 0.08);
  color: var(--plot);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--plot);
  box-shadow: 0 0 10px var(--plot);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(60% 55% at 72% 42%, rgba(163, 217, 224, 0.20), transparent 70%),
    linear-gradient(180deg, var(--deep) 0%, var(--navy) 55%, var(--ink) 100%);
}

/* The plot's grid, faint, fading out towards the edges. */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(163, 217, 224, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(163, 217, 224, 0.07) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(70% 70% at 60% 45%, #000 20%, transparent 75%);
  mask-image: radial-gradient(70% 70% at 60% 45%, #000 20%, transparent 75%);
  pointer-events: none;
}

.hero .wrap {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding-top: 28px;
  padding-bottom: 72px;
}

.hero .device {
  order: -1;
  display: flex;
  justify-content: center;
  animation: rise 1.1s cubic-bezier(.2, .7, .2, 1) both;
}

.hero .device img {
  width: min(88vw, 560px);
  max-height: 68vh;
  object-fit: contain;
  height: auto;
  filter: drop-shadow(0 40px 60px rgba(0, 0, 0, 0.55)) drop-shadow(0 0 80px rgba(163, 217, 224, 0.12));
}

.hero .copy { text-align: center; animation: rise 1.1s .15s cubic-bezier(.2, .7, .2, 1) both; }

.hero h1 {
  font-size: clamp(44px, 9vw, 88px);
  font-weight: 750;
  margin: 14px 0 18px;
  background: linear-gradient(180deg, #ffffff 30%, #b9dbe4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero .sub {
  font-size: clamp(18px, 2.2vw, 21px);
  color: var(--muted);
  max-width: 34em;
  margin: 0 auto 28px;
}

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

.button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-weight: 650;
  font-size: 16px;
  text-decoration: none;
  white-space: nowrap;
}

.button.primary {
  background: linear-gradient(180deg, #c3ecf1, #8fcbd4);
  color: #06202b;
  box-shadow: 0 10px 30px rgba(163, 217, 224, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.button.ghost {
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

@media (min-width: 900px) {
  .hero .wrap {
    grid-template-columns: 1fr 1.05fr;
    align-items: center;
    gap: 40px;
    padding-top: 56px;
    padding-bottom: 96px;
    min-height: calc(100vh - 60px);
  }
  .hero .device { order: 0; justify-content: flex-end; }
  .hero .device img { width: auto; max-width: 100%; max-height: calc(100vh - 190px); }
  .hero .copy { text-align: left; }
  .hero .sub { margin-left: 0; }
  .cta-row { justify-content: flex-start; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Sections ---------- */

section { position: relative; }

.section { padding: 96px 0; }

.section-head { max-width: 680px; margin-bottom: 44px; }

.section-head h2 { font-size: clamp(34px, 5.4vw, 56px); font-weight: 720; margin: 12px 0 16px; }

.section-head p { color: var(--muted); font-size: 19px; margin: 0; }

.center { text-align: center; margin-left: auto; margin-right: auto; }

/* Full-bleed picture with words over it. */
.band {
  min-height: 92vh;
  display: flex;
  align-items: flex-end;
  background-size: cover;
  background-position: center 60%;
  overflow: hidden;
}

.band::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, var(--ink) 0%, rgba(4, 13, 19, 0) 28%, rgba(4, 13, 19, 0) 45%, rgba(4, 13, 19, 0.88) 82%, var(--ink) 100%);
}

.band .wrap { position: relative; z-index: 1; padding-bottom: 72px; }

.band h2 { font-size: clamp(38px, 6.5vw, 72px); font-weight: 750; max-width: 12em; margin: 12px 0 18px; }

.band p { font-size: clamp(18px, 2.2vw, 21px); color: #c9dbe3; max-width: 34em; margin: 0; }

.sea-band { background-image: url("images/fleet-at-sea.jpg"); }

/* Picture beside words. */
.split {
  display: grid;
  gap: 40px;
  align-items: center;
}

@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: 64px; } }

.split .art {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--line);
  position: relative;
}

.split .art img { display: block; width: 100%; height: auto; }

.split .art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 50% at 45% 75%, rgba(255, 145, 71, 0.18), transparent 70%);
  mix-blend-mode: screen;
  pointer-events: none;
}

.split h2 { font-size: clamp(34px, 5.4vw, 56px); font-weight: 720; margin: 12px 0 16px; }

.split p { color: var(--muted); font-size: 19px; margin: 0 0 14px; }

.fire { color: var(--fire); }

/* Cards. */
.grid { display: grid; gap: 16px; }

@media (min-width: 640px) { .grid.two, .grid.four { grid-template-columns: 1fr 1fr; } }

@media (min-width: 1000px) { .grid.four { grid-template-columns: repeat(4, 1fr); } }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px 24px;
}

.card h3 { font-size: 22px; font-weight: 680; margin: 18px 0 8px; letter-spacing: -0.015em; }

.card p { color: var(--muted); margin: 0; font-size: 16px; }

.icon {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: rgba(163, 217, 224, 0.1);
  border: 1px solid rgba(163, 217, 224, 0.25);
  color: var(--plot);
}

.icon svg { width: 24px; height: 24px; }

.card.rules { padding: 32px 28px; }

.card.rules .tag {
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--plot);
}

.card.rules h3 { font-size: 30px; margin-top: 10px; }

.card.rules.enhanced {
  background:
    radial-gradient(80% 90% at 100% 0%, rgba(255, 145, 71, 0.14), transparent 60%),
    var(--card);
}

.card.rules.enhanced .tag { color: var(--fire); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }

.chips span {
  font-size: 14px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}

/* Devices in a row. */
.devices {
  display: grid;
  gap: 32px;
  align-items: end;
}

@media (min-width: 800px) { .devices { grid-template-columns: 0.72fr 1.28fr; gap: 48px; } }

.devices figure { margin: 0; text-align: center; }

.devices img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 30px 50px rgba(0, 0, 0, 0.5));
}

.devices figure.narrow img { max-width: 380px; }

.devices figcaption { color: var(--muted); font-size: 16px; margin-top: 14px; }

.devices figcaption strong { color: var(--text); font-weight: 650; }

/* Price. */
.price {
  border-radius: 28px;
  border: 1px solid rgba(163, 217, 224, 0.28);
  background:
    radial-gradient(70% 120% at 50% 0%, rgba(163, 217, 224, 0.16), transparent 70%),
    linear-gradient(180deg, var(--navy), var(--deep));
  padding: 56px 24px;
  text-align: center;
}

.price h2 { font-size: clamp(34px, 5.4vw, 56px); font-weight: 720; margin: 12px 0 28px; }

.price ul {
  list-style: none;
  padding: 0;
  margin: 0 auto;
  max-width: 560px;
  display: grid;
  gap: 14px;
  text-align: left;
}

.price li { display: flex; gap: 14px; align-items: flex-start; font-size: 18px; }

.price li svg { flex: none; width: 24px; height: 24px; color: var(--plot); margin-top: 2px; }

/* Closing call. */
.closing { text-align: center; padding: 110px 0 120px; }

.closing img { width: 112px; height: 112px; border-radius: 26px; box-shadow: 0 20px 60px rgba(163, 217, 224, 0.18); }

.closing h2 { font-size: clamp(38px, 6vw, 64px); font-weight: 750; margin: 26px 0 12px; }

.closing .wordmark { --s: clamp(30px, 5vw, 56px); margin: 30px 0 22px; }

.closing p { color: var(--muted); font-size: 19px; margin: 0 0 28px; }

/* ---------- Text pages ---------- */

.prose { max-width: 720px; margin: 0 auto; padding: 64px 16px 80px; }

.prose h1 { font-size: clamp(36px, 6vw, 52px); font-weight: 740; margin: 10px 0 8px; }

.prose h2 { font-size: 22px; letter-spacing: -0.015em; margin: 40px 0 10px; }

.prose p { color: #c4d4dc; margin: 0 0 14px; }

.prose .updated { color: var(--muted); font-size: 15px; margin-bottom: 28px; }

.prose .lead { font-size: 20px; color: var(--text); }

.prose .card p { margin: 0; color: var(--text); }

/* ---------- Footer ---------- */

footer.site { border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }

footer.site .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-top: 28px;
  padding-bottom: 40px;
}

footer.site nav { display: flex; flex-wrap: wrap; gap: 10px 22px; }

footer.site a { color: var(--muted); text-decoration: none; }

footer.site a:hover { color: var(--text); }

/* ---------- The game's wordmark ---------- */
/* As BattleshipWordmark draws it in StartMenu.swift: BATTLEFLEET over DUO in the system's
   monospaced face (SF Mono on Apple devices), DUO at 56/76 of the size, 8/76 tracking, and a
   rule either side of DUO tapering out to BATTLEFLEET's width, 5/76 tall. */

.wordmark {
  --s: clamp(36px, 7.4vw, 76px);
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  margin: 0;
  font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  line-height: 1;
  letter-spacing: 0;
  color: rgba(246, 241, 244, 0.94);
  filter: drop-shadow(0 3px 12px rgba(0, 0, 0, 0.55));
}

.wordmark .wm-title {
  font-size: var(--s);
  font-weight: 600;
  letter-spacing: calc(var(--s) * 8 / 76);
  margin-right: calc(var(--s) * -8 / 76);
  white-space: nowrap;
}

.wordmark .wm-duo {
  display: flex;
  align-items: center;
  gap: calc(var(--s) * 0.09);
  margin-top: calc(var(--s) * 0.06);
}

.wordmark .wm-word {
  font-size: calc(var(--s) * 56 / 76);
  font-weight: 500;
  letter-spacing: calc(var(--s) * 8 / 76);
  margin-right: calc(var(--s) * -8 / 76);
}

.wordmark .wm-rule {
  flex: 1;
  height: calc(var(--s) * 5 / 76);
  background: currentColor;
}

.wordmark .wm-rule.lead { clip-path: polygon(100% 0, 0 50%, 100% 100%); }

.wordmark .wm-rule.trail { clip-path: polygon(0 0, 100% 50%, 0 100%); }

/* The hero's headline gradient would clip the wordmark's text and hide its rules. */
.hero h1.wordmark {
  background: none;
  -webkit-background-clip: border-box;
  background-clip: border-box;
  color: rgba(246, 241, 244, 0.94);
  margin: 0;
  font-weight: 600;
}
