/* Sea Battle: Armada — site styles. No external resources. */

@font-face {
  font-family: "PT Serif";
  src: url("assets/fonts/PTSerif_400Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "PT Serif";
  src: url("assets/fonts/PTSerif_700Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Palette (shared with the game) */
  --abyss: #061521;
  --deep: #0b2838;
  --hull: #123a50;
  --ocean: #2a6f92;
  --foam: #eaf3f5;
  --mist: #a9c4ce;
  --brass: #f2c66d;
  --brass-dim: #b8954d;
  --line: rgba(169, 196, 206, 0.18);

  /* Type */
  --serif: "PT Serif", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3125rem;
  --step-2: 1.75rem;
  --step-3: clamp(2rem, 4vw, 2.625rem);
  --step-4: clamp(2.75rem, 7.5vw, 5.25rem);

  --measure: 66ch;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --wide: 72rem;
  --radius-s: 4px;
  --radius-m: 10px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--abyss);
  color: var(--foam);
  font-family: var(--sans);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--brass);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

a:hover {
  color: #ffdf9a;
}

:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
  border-radius: 2px;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.15;
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  background: var(--brass);
  color: var(--abyss);
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius-s);
}

.skip-link:focus {
  top: 1rem;
}

.wrap {
  width: min(100% - 2 * var(--gutter), var(--wide));
  margin-inline: auto;
}

/* Scrollbars follow the site's ocean and brass palette. */
html {
  scrollbar-color: var(--brass-dim) var(--abyss);
  scrollbar-width: thin;
}

@supports not (scrollbar-color: auto) {
  ::-webkit-scrollbar {
    width: 10px;
    height: 10px;
  }

  ::-webkit-scrollbar-track {
    background: var(--abyss);
  }

  ::-webkit-scrollbar-thumb {
    background: var(--brass-dim);
    border: 2px solid var(--abyss);
    border-radius: 8px;
  }

  ::-webkit-scrollbar-thumb:hover {
    background: var(--brass);
  }
}

@media (forced-colors: active) {
  html {
    scrollbar-color: auto;
  }
}

/* ---------- Header ---------- */

.site-header {
  background: #081c28;
  position: relative;
  z-index: 2;
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.25rem;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--foam);
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.125rem;
  text-decoration: none;
}

.brand:hover {
  color: var(--foam);
}

/* Shared game brand mark. */
.brand-mark {
  width: 2.5rem;
  height: 2.5rem;
  object-fit: contain;
  flex: none;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: var(--step--1);
}

.site-nav a {
  color: #d0e1e5;
  text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--foam);
}

.site-nav a[aria-current="page"] {
  text-decoration: underline;
  text-decoration-color: var(--brass);
}

@media (max-width: 760px) {
  .site-header .wrap {
    padding-block: 0.6rem;
  }

  .site-nav ul {
    gap: 0.6rem 1rem;
  }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 60% at 75% 40%, rgba(42, 111, 146, 0.35), transparent 70%),
    linear-gradient(180deg, var(--deep) 0%, var(--abyss) 100%);
  border-bottom: 1px solid var(--line);
}

.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2.5rem;
  padding-block: clamp(3rem, 8vw, 6.5rem);
  align-items: center;
}

@media (min-width: 900px) {
  .hero .wrap {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  }
}

.hero-logo {
  margin-bottom: 1.75rem;
}

.hero h1 {
  font-size: var(--step-4);
  letter-spacing: -0.015em;
  line-height: 1.02;
}

.hero h1 .title-sub {
  display: block;
  color: var(--brass);
  font-weight: 400;
}

.hero .lead {
  margin-top: 1.5rem;
  max-width: 34rem;
  font-size: var(--step-1);
  line-height: 1.5;
  color: var(--mist);
}

.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 2.25rem 0 0;
  padding: 0;
  list-style: none;
}

.store {
  display: flex;
  flex-direction: column;
  min-width: 11rem;
  padding: 0.65rem 1.1rem;
  border: 1px solid var(--brass-dim);
  border-radius: var(--radius-m);
  background: rgba(6, 21, 33, 0.55);
  line-height: 1.25;
}

.store-name {
  font-family: var(--serif);
  font-size: 1.125rem;
  font-weight: 700;
}

.store-status {
  font-size: var(--step--1);
  color: var(--brass);
}

/* Plotting chart: the one bold visual on the page */
.chart {
  position: relative;
  margin: 0;
}

.chart svg {
  width: 100%;
  height: auto;
}

.chart .grid-line {
  stroke: var(--line);
  stroke-width: 1;
}

.chart .grid-frame {
  fill: rgba(11, 40, 56, 0.6);
  stroke: rgba(169, 196, 206, 0.35);
  stroke-width: 1;
}

.chart .coord {
  fill: var(--mist);
  font-family: var(--sans);
  font-size: 11px;
  opacity: 0.75;
}

.chart .arc {
  fill: none;
  stroke: var(--brass);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 6 8;
}

.chart .impact {
  fill: none;
  stroke: var(--brass);
  stroke-width: 2;
}

.chart .impact-core {
  fill: var(--brass);
}

.chart .launch {
  fill: var(--foam);
}

/* Ship artwork slot sits on the chart */
.chart .ship-slot {
  position: absolute;
  left: 0;
  width: 34%;
  bottom: 4%;
}

@media (prefers-reduced-motion: no-preference) {
  .chart .arc-draw {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: plot 1.6s 0.3s cubic-bezier(0.45, 0, 0.2, 1) forwards;
  }

  .chart .impact,
  .chart .impact-core {
    opacity: 0;
    transform-box: fill-box;
    transform-origin: center;
    animation: land 0.5s 1.8s ease-out forwards;
  }
}

@keyframes plot {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes land {
  from {
    opacity: 0;
    transform: scale(0.4);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ---------- Placeholders for art the developer will supply ---------- */

.placeholder {
  display: grid;
  place-items: center;
  border: 1px dashed rgba(242, 198, 109, 0.45);
  border-radius: var(--radius-m);
  background: rgba(6, 21, 33, 0.45);
  color: var(--mist);
  font-size: var(--step--1);
  text-align: center;
  padding: 1rem;
}

.placeholder-logo {
  width: 7rem;
  aspect-ratio: 1;
}

.placeholder-ship {
  aspect-ratio: 16 / 7;
}

.placeholder-shot {
  aspect-ratio: 16 / 9;
}

/* ---------- Sections ---------- */

.section {
  padding-block: clamp(3.5rem, 8vw, 6rem);
}

.section + .section {
  border-top: 1px solid var(--line);
}

.section h2 {
  font-size: var(--step-3);
  max-width: 24ch;
}

.section-intro {
  margin-top: 1.25rem;
  max-width: var(--measure);
  color: var(--mist);
  font-size: var(--step-1);
  line-height: 1.55;
}

/* Screenshot strip: landscape frames, scroll on small screens */
.shots {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(16rem, 1fr);
  gap: 1rem;
  margin: 2.5rem 0 0;
  padding: 0 0 0.5rem;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
}

.shots > li {
  scroll-snap-align: start;
}

.shots img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius-m);
  border: 1px solid var(--line);
}

@media (min-width: 900px) {
  .shots {
    overflow: visible;
  }
}

/* Feature list: ruled entries, not cards */
.features {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  margin: 2.5rem 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

@media (min-width: 760px) {
  .features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 3rem;
  }
}

.features > li {
  padding: 1.75rem 0 1.75rem 1.25rem;
  border-bottom: 1px solid var(--line);
  position: relative;
}

.features > li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 2.1rem;
  width: 3px;
  height: 1.4rem;
  background: var(--brass);
  border-radius: 2px;
}

.features h3 {
  font-size: var(--step-1);
}

.features p {
  margin-top: 0.5rem;
  color: var(--mist);
  max-width: 40ch;
}

.availability {
  background: var(--deep);
}

.availability .stores {
  margin-top: 2rem;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 2.5rem;
  font-size: var(--step--1);
  color: var(--mist);
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  justify-content: space-between;
  align-items: baseline;
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer a {
  color: var(--foam);
}

/* ---------- Document pages (privacy, terms, support) ---------- */

.doc {
  padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(3.5rem, 8vw, 6rem);
}

.doc .wrap {
  max-width: 46rem;
}

.doc h1 {
  font-size: var(--step-3);
}

.doc .doc-meta {
  margin-top: 0.75rem;
  color: var(--mist);
  font-size: var(--step--1);
}

.doc h2 {
  font-size: var(--step-2);
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.doc h3 {
  font-size: var(--step-1);
  margin-top: 2rem;
}

.doc p,
.doc ul,
.doc ol,
.doc dl {
  margin: 1rem 0 0;
  max-width: var(--measure);
}

.doc ul,
.doc ol {
  padding-left: 1.25rem;
}

.doc li + li {
  margin-top: 0.4rem;
}

.doc li::marker {
  color: var(--brass-dim);
}

.doc dt {
  font-weight: 600;
  margin-top: 1rem;
}

.doc dd {
  margin: 0.25rem 0 0;
  color: var(--mist);
}

.doc .toc {
  margin-top: 2rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: rgba(11, 40, 56, 0.5);
}

.doc .toc h2 {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: var(--step-0);
  font-family: var(--sans);
  font-weight: 600;
}

.doc .toc ol {
  margin-top: 0.75rem;
  columns: 2 14rem;
  column-gap: 2rem;
}

.doc .toc li + li {
  margin-top: 0.25rem;
}

.service {
  margin-top: 1.5rem;
  padding: 1.25rem 1.5rem;
  border-left: 3px solid var(--ocean);
  background: rgba(11, 40, 56, 0.55);
  border-radius: 0 var(--radius-m) var(--radius-m) 0;
}

.service h3 {
  margin-top: 0;
}

.service dl {
  margin-top: 0.5rem;
}

/* Support FAQ */
.faq details {
  border-bottom: 1px solid var(--line);
  padding-block: 0.25rem;
  max-width: var(--measure);
}

.faq details:first-of-type {
  border-top: 1px solid var(--line);
}

.faq summary {
  cursor: pointer;
  padding-block: 0.9rem;
  font-weight: 600;
  list-style-position: inside;
}

.faq summary::marker {
  color: var(--brass);
}

.faq details > :not(summary) {
  margin-top: 0;
  margin-bottom: 1rem;
  color: var(--mist);
}

.contact-box {
  margin-top: 1.5rem;
  padding: 1.5rem;
  border: 1px solid var(--brass-dim);
  border-radius: var(--radius-m);
  background: var(--deep);
  max-width: var(--measure);
}

/* 404 */
.lost {
  min-height: 60vh;
  display: grid;
  align-content: center;
  padding-block: 4rem;
}

.lost h1 {
  font-size: var(--step-4);
}

.lost p {
  margin-top: 1rem;
  color: var(--mist);
  font-size: var(--step-1);
  max-width: 36ch;
}

.button {
  display: inline-block;
  margin-top: 2rem;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius-m);
  background: var(--brass);
  color: var(--abyss);
  font-weight: 600;
  text-decoration: none;
}

.button:hover {
  background: #ffdf9a;
  color: var(--abyss);
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
