/* Sea Battle Survive site: the game's night-sea palette (client/ui/theme/palette.gd), plate panels,
   Russo One display type and Golos Text body. Mobile first; no external resources. */
@font-face {
  font-family: "Russo One";
  src: url("/assets/russo-one.57b2a5c9c4.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Golos Text";
  src: url("/assets/golos-text.efd01155ec.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}

:root {
  --depth: #082033;
  --abyss: #04121f;
  --water: #0e4660;
  --sonar: #3fd3e3;
  --hit: #ff8f40;
  --gold: #ffc94a;
  --storm: #8a5cd0;
  --ink: #eaf6ff;
  --ink-dim: #a9c2d2;
  --ink-muted: #7896ab;
  --plate-top: rgba(18, 51, 79, 0.86);
  --plate-bottom: rgba(8, 28, 48, 0.92);
  --plate-border: rgba(120, 191, 230, 0.28);
  --plate-hi: rgba(255, 255, 255, 0.14);
  --shadow: 0 18px 40px rgba(0, 5, 15, 0.45);
  --radius: 22px;
  --wrap: 1180px;
  --display: "Russo One", "Golos Text", system-ui, sans-serif;
  --body: "Golos Text", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: 16px;
  color-scheme: dark;
}
.cjk {
  --display: "Russo One", "Hiragino Sans", "PingFang SC", "Apple SD Gothic Neo", "Noto Sans CJK JP", "Noto Sans CJK KR", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  --body: "Golos Text", "Hiragino Sans", "PingFang SC", "Apple SD Gothic Neo", "Noto Sans CJK JP", "Noto Sans CJK KR", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body {
  margin: 0;
  background: var(--abyss);
  color: var(--ink);
  font: 400 17px/1.6 var(--body);
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(1200px 700px at 85% -10%, rgba(63, 211, 227, 0.12), transparent 60%),
    radial-gradient(900px 600px at -10% 40%, rgba(14, 70, 96, 0.55), transparent 65%),
    linear-gradient(180deg, var(--depth), var(--abyss) 70%);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--sonar); text-underline-offset: 3px; }
a:hover { color: #8be9f2; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.1; margin: 0; letter-spacing: 0.01em; }
h2 { font-size: clamp(30px, 6.4vw, 52px); text-wrap: balance; }
h3 { font-size: 22px; }
p { margin: 0; }
.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }

.skip { position: absolute; left: 12px; top: -60px; z-index: 50; padding: 10px 16px; border-radius: 12px; background: var(--gold); color: #1a1006; font-weight: 700; }
.skip:focus { top: 12px; }

/* Top bar */
.top { position: sticky; top: 0; z-index: 20; backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); background: rgba(4, 18, 31, 0.72); border-bottom: 1px solid rgba(120, 191, 230, 0.14); }
.top-in { display: flex; align-items: center; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--display); font-size: 18px; letter-spacing: 0.02em; text-transform: uppercase; white-space: nowrap; }
.brand img { border-radius: 10px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4); }
.brand b { font-weight: 400; color: var(--gold); }
.brand:hover { color: var(--ink); }
.top-nav { display: none; margin-left: auto; gap: 4px; }
.top-nav a { color: var(--ink-dim); text-decoration: none; font-weight: 600; font-size: 15px; padding: 8px 12px; border-radius: 999px; }
.top-nav a:hover { color: var(--ink); background: rgba(63, 211, 227, 0.1); }
.lang { position: relative; margin-left: auto; }
.top-nav + .lang { margin-left: 0; }
.lang summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px; border: 1px solid var(--plate-border); color: var(--ink); font-weight: 700; font-size: 14px; background: rgba(14, 70, 96, 0.35); }
.lang summary::-webkit-details-marker { display: none; }
.lang summary .icon { width: 18px; height: 18px; }
.lang ul { position: absolute; right: 0; top: calc(100% + 8px); margin: 0; padding: 8px; list-style: none; width: 200px; max-height: 70vh; overflow: auto; border-radius: 16px; background: linear-gradient(var(--plate-top), var(--plate-bottom)), var(--depth); border: 1px solid var(--plate-border); box-shadow: var(--shadow); }
.lang li a { display: block; padding: 8px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; }
.lang li a:hover { background: rgba(63, 211, 227, 0.12); }
.lang li a[aria-current] { color: var(--gold); font-weight: 700; }

.icon, .mode-icon { width: 26px; height: 26px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Hero */
.hero { position: relative; isolation: isolate; overflow: hidden; min-height: min(100svh, 980px); display: flex; align-items: flex-end; padding: 120px 0 56px; }
.hero-art { position: absolute; inset: 0; z-index: -2; }
.hero-art img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(4, 18, 31, 0.15) 0%, rgba(4, 18, 31, 0.1) 30%, rgba(8, 32, 51, 0.82) 62%, var(--abyss) 100%); }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0.22; background-image: linear-gradient(rgba(63, 211, 227, 0.35) 1px, transparent 1px), linear-gradient(90deg, rgba(63, 211, 227, 0.35) 1px, transparent 1px); background-size: 56px 56px; mask-image: linear-gradient(180deg, transparent 45%, #000 75%, transparent); -webkit-mask-image: linear-gradient(180deg, transparent 45%, #000 75%, transparent); }
.hero-in { display: grid; gap: 40px; align-items: end; }
.hero-copy > * { animation: rise 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.hero-copy > :nth-child(2) { animation-delay: 0.08s; }
.hero-copy > :nth-child(3) { animation-delay: 0.16s; }
.hero-copy > :nth-child(4) { animation-delay: 0.24s; }
.hero-copy > :nth-child(n + 5) { animation-delay: 0.32s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.eyebrow { display: inline-block; margin-bottom: 16px; padding: 6px 14px; border-radius: 999px; background: rgba(4, 18, 31, 0.6); border: 1px solid rgba(63, 211, 227, 0.45); color: var(--sonar); font-weight: 700; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; }
.title { font-size: clamp(50px, 14.5vw, 116px); line-height: 0.92; text-transform: uppercase; text-shadow: 0 4px 0 rgba(0, 10, 23, 0.55), 0 18px 40px rgba(0, 0, 0, 0.45); }
.title span { display: block; white-space: nowrap; }
.title .gold { color: var(--gold); }
.tagline { margin-top: 18px; font-family: var(--display); font-size: clamp(20px, 4.6vw, 28px); line-height: 1.25; color: var(--ink); max-width: 30ch; }
.lead { margin-top: 14px; color: var(--ink-dim); max-width: 54ch; font-size: 17px; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 22px 0 0; padding: 0; list-style: none; color: var(--ink-dim); font-weight: 600; font-size: 14px; }
.facts li { display: inline-flex; align-items: center; gap: 8px; }
.facts li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--sonar); box-shadow: 0 0 12px var(--sonar); }

.badge { display: inline-flex; align-items: center; gap: 12px; margin-top: 26px; padding: 11px 22px 11px 18px; border-radius: 14px; background: #000; color: #fff; border: 1px solid rgba(255, 255, 255, 0.55); text-decoration: none; line-height: 1.05; box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4); transition: transform 0.2s, box-shadow 0.2s; }
.badge span { display: flex; flex-direction: column; font-family: -apple-system, "SF Pro Display", var(--body); font-size: 25px; font-weight: 600; letter-spacing: -0.01em; }
.badge small { font-size: 12px; font-weight: 500; letter-spacing: 0.02em; margin-bottom: 2px; }
.badge-logo { width: 26px; height: 30px; }
a.badge:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5); }
.badge.is-soon { background: rgba(0, 0, 0, 0.55); border-style: dashed; color: rgba(255, 255, 255, 0.9); }

.hero-phone { display: none; position: relative; justify-self: end; }
.ping { position: absolute; left: 50%; top: 46%; width: 120px; height: 120px; margin: -60px; border-radius: 50%; border: 2px solid var(--sonar); opacity: 0; animation: ping 3.2s ease-out infinite; }
@keyframes ping { 0% { transform: scale(0.4); opacity: 0.8; } 100% { transform: scale(5); opacity: 0; } }

.phone { position: relative; border-radius: 34px; padding: 8px; background: linear-gradient(160deg, #3b5c78, #0a1a2a 45%, #203d56); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08) inset, var(--shadow), 0 0 60px rgba(63, 211, 227, 0.12); }
.phone img { border-radius: 27px; }
.hero-phone .phone { width: 300px; transform: rotate(3deg); }

/* Sections */
.band { position: relative; padding: 76px 0; }
.band-deep { background: linear-gradient(180deg, transparent, rgba(4, 14, 26, 0.65) 18%, rgba(4, 14, 26, 0.65) 82%, transparent); }
.kicker { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; color: var(--sonar); font-weight: 700; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; }
.coord { font-family: var(--display); letter-spacing: 0.04em; padding: 4px 9px; border-radius: 8px; color: #1a1006; background: var(--gold); box-shadow: 0 3px 0 #86560a; }
.section-lead { margin-top: 14px; color: var(--ink-dim); max-width: 60ch; font-size: 18px; }

.plate { position: relative; border-radius: var(--radius); background: linear-gradient(180deg, var(--plate-top), var(--plate-bottom)); border: 1px solid var(--plate-border); box-shadow: 0 1px 0 var(--plate-hi) inset, var(--shadow); }
.grid-3, .grid-2 { display: grid; gap: 16px; margin-top: 36px; }
.mode { padding: 26px 24px 28px; overflow: hidden; --accent: var(--sonar); }
.mode::before { content: ""; position: absolute; inset: 0 0 auto; height: 4px; background: var(--accent); box-shadow: 0 0 22px var(--accent); }
.mode::after { content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 28%, transparent), transparent); }
.mode-extended { --accent: var(--gold); }
.mode-survival { --accent: var(--storm); }
.mode-icon { width: 44px; height: 44px; padding: 9px; border-radius: 14px; color: var(--accent); background: rgba(4, 18, 31, 0.6); border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); }
.mode h3 { margin-top: 18px; font-size: 28px; text-transform: uppercase; }
.mode .meta { margin-top: 6px; color: var(--accent); font-weight: 700; font-size: 14px; letter-spacing: 0.04em; }
.mode p:last-child { margin-top: 12px; color: var(--ink-dim); }

.tile { display: flex; gap: 16px; padding: 22px; }
.tile .icon { width: 46px; height: 46px; padding: 10px; border-radius: 14px; color: var(--gold); background: rgba(255, 201, 74, 0.1); border: 1px solid rgba(255, 201, 74, 0.3); }
.tile h3 { font-size: 20px; }
.tile p { margin-top: 6px; color: var(--ink-dim); }

.split { display: grid; gap: 44px; align-items: center; }
.split .phone { width: min(270px, 74%); justify-self: center; }
.phone-tilt { transform: rotate(-3deg); }
.checks { margin: 26px 0 0; padding: 0; list-style: none; display: grid; gap: 14px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; }
.checks .icon { width: 26px; height: 26px; padding: 4px; margin-top: 1px; border-radius: 50%; color: #04121f; background: var(--sonar); stroke-width: 3; }
.fair { padding: 32px 24px; background: radial-gradient(600px 300px at 100% 0, rgba(63, 211, 227, 0.14), transparent 70%), linear-gradient(180deg, var(--plate-top), var(--plate-bottom)); }

.strip { display: flex; gap: 20px; margin: 36px 0 0; padding: 8px max(var(--gutter), (100% - var(--wrap)) / 2) 24px; list-style: none; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: max(var(--gutter), (100% - var(--wrap)) / 2); scrollbar-width: thin; scrollbar-color: var(--water) transparent; }
.strip li { flex: none; width: 230px; scroll-snap-align: start; }
.strip .phone { border-radius: 28px; padding: 6px; }
.strip .phone img { border-radius: 23px; }
.strip figure { margin: 0; }
.strip figcaption { margin-top: 14px; text-align: center; font-weight: 700; color: var(--ink-dim); }

.cta-band { padding-bottom: 96px; }
.cta { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 44px 24px; overflow: hidden; background: radial-gradient(500px 260px at 50% 0, rgba(255, 143, 64, 0.22), transparent 70%), linear-gradient(180deg, var(--plate-top), var(--plate-bottom)); }
.cta img { border-radius: 24px; box-shadow: var(--shadow); }
.cta h2 { margin-top: 22px; }
.cta p { margin-top: 12px; color: var(--ink-dim); max-width: 46ch; }

.js-reveal .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1); }
.js-reveal .reveal.is-in { opacity: 1; transform: none; }
.js-reveal .phone-tilt.reveal.is-in { transform: rotate(-3deg); }
.grid-3 > :nth-child(2), .grid-2 > :nth-child(2) { transition-delay: 0.08s; }
.grid-3 > :nth-child(3), .grid-2 > :nth-child(3) { transition-delay: 0.16s; }
.grid-2 > :nth-child(4) { transition-delay: 0.24s; }

/* Footer */
.foot { border-top: 1px solid rgba(120, 191, 230, 0.14); background: rgba(2, 10, 18, 0.7); padding: 36px 0 44px; }
.foot-in { display: grid; gap: 18px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 0; padding: 0; list-style: none; }
.foot-links a { color: var(--ink-dim); }
.foot-links a:hover { color: var(--ink); }
.copy { color: var(--ink-muted); font-size: 14px; }

/* Legal pages */
.doc-main { padding: 40px 0 80px; }
.doc-wrap { max-width: 860px; }
.doc-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.doc-tabs a { padding: 8px 16px; border-radius: 999px; border: 1px solid var(--plate-border); color: var(--ink-dim); text-decoration: none; font-weight: 600; font-size: 15px; background: rgba(14, 70, 96, 0.25); }
.doc-tabs a[aria-current] { color: #1a1006; background: var(--gold); border-color: var(--gold); }
.doc-note { margin-bottom: 16px; padding: 12px 16px; border-radius: 14px; border: 1px solid rgba(255, 201, 74, 0.4); background: rgba(255, 201, 74, 0.08); color: var(--gold); font-weight: 600; }
.doc { padding: 28px 20px 36px; border-radius: var(--radius); background: linear-gradient(180deg, var(--plate-top), var(--plate-bottom)); border: 1px solid var(--plate-border); box-shadow: 0 1px 0 var(--plate-hi) inset, var(--shadow); overflow-wrap: anywhere; }
.doc h1 { font-size: clamp(30px, 7vw, 44px); text-transform: uppercase; }
.doc h2 { font-size: 21px; margin-top: 34px; padding-top: 22px; border-top: 1px solid rgba(120, 191, 230, 0.16); color: var(--ink); }
.doc p, .doc ul, .doc ol { margin-top: 12px; color: #cfe0ec; }
.doc li + li { margin-top: 6px; }
.doc .note { margin-top: 14px; color: var(--ink-muted); font-size: 15px; }
.doc table { display: block; overflow-wrap: normal; overflow-x: auto; width: 100%; margin-top: 16px; border-collapse: collapse; font-size: 15px; }
.doc th, .doc td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid rgba(120, 191, 230, 0.16); min-width: 104px; }
.doc th { color: var(--sonar); font-weight: 700; font-size: 12px; letter-spacing: 0.03em; text-transform: uppercase; }
mark.todo { background: #ffe066; color: #000; padding: 0 3px; border-radius: 3px; }

/* 404 */
.nf-main { padding: 72px 0 96px; }
.nf { max-width: 620px; margin-inline: auto; padding: 44px 24px; text-align: center; }
.nf .nf-code { font-family: var(--display); font-size: clamp(88px, 26vw, 150px); line-height: 1; color: var(--gold); text-shadow: 0 5px 0 #86560a; }
.nf .nf-code span { display: block; margin-bottom: 10px; font-size: 16px; letter-spacing: 0.2em; color: var(--sonar); text-shadow: none; }
.nf h1 { margin-top: 18px; font-size: 32px; text-transform: uppercase; }
.nf p { margin-top: 12px; color: var(--ink-dim); }
.button { display: inline-block; margin-top: 26px; padding: 14px 28px; border-radius: 16px; font-family: var(--display); font-size: 18px; text-transform: uppercase; text-decoration: none; color: #2b1304; background: linear-gradient(180deg, #ffc27a, #ff8f40 55%, #d9611f); box-shadow: 0 5px 0 #8e3a0e, 0 14px 26px rgba(0, 0, 0, 0.4); }
.button:hover { color: #2b1304; filter: brightness(1.06); }

.cjk .title, .cjk .mode h3, .cjk .doc h1, .cjk .nf h1 { letter-spacing: 0; }
.cjk h2, .cjk h3, .cjk .tagline { font-weight: 800; }

@media (min-width: 640px) {
  :root { --gutter: 28px; }
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .checks-2 { grid-template-columns: 1fr 1fr; gap: 16px 28px; }
  .fair { padding: 44px; }
  .doc { padding: 40px 44px 48px; }
  .strip li { width: 250px; }
}
@media (min-width: 900px) {
  .top-nav { display: flex; }
  .hero { align-items: center; padding: 110px 0 90px; }
  .hero-art img { object-position: 50% 60%; }
  .hero::before { background: linear-gradient(90deg, rgba(4, 18, 31, 0.92) 0%, rgba(4, 18, 31, 0.6) 42%, rgba(4, 18, 31, 0.05) 75%), linear-gradient(180deg, transparent 70%, var(--abyss)); }
  .hero::after { mask-image: linear-gradient(90deg, #000, transparent 60%); -webkit-mask-image: linear-gradient(90deg, #000, transparent 60%); }
  .hero-in { grid-template-columns: 1.35fr 0.65fr; }
  .title { font-size: clamp(64px, 7.4vw, 108px); }
  .hero-phone { display: block; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .band { padding: 110px 0; }
  .split { grid-template-columns: 1.1fr 0.9fr; }
  .foot-in { grid-template-columns: auto 1fr auto; align-items: center; }
  .foot-links { justify-content: center; }
}
