/* BoatSprint site theme — ported from the game's MenuTheme (menu_theme.gd):
   candy buttons with ink rims and bottom bevels, gloss shines, translucent
   navy panels, gold headings, and one long dive from sunny sky to seabed. */

:root {
    --ink: #121f38;
    --white: #fafcff;
    --cream: #fff2d1;
    --green: #73c721;
    --orange: #fa991c;
    --coral: #ed574a;
    --teal: #1ab3ba;
    --purple: #9c66d9;
    --blue: #388aeb;
    --gold: #ffc729;
    --slate: #708099;
    --sky: #7ec0ef;
    --sky-high: #a8d8f5;
    --sea-mid: #14456e;
    --sea-deep: #0a2540;
    --sea-abyss: #061524;
    --panel: rgba(13, 30, 61, 0.55);
    --panel-border: rgba(255, 255, 255, 0.16);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: "Segoe UI", "Noto Sans", system-ui, -apple-system, sans-serif;
    color: var(--white);
    background: var(--sea-deep);
    overflow-x: hidden;
}

img { max-width: 100%; display: block; }

/* ---------- text styles (game title / subtitle / heading) ---------- */

.ink-title {
    position: relative;
    z-index: 0;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: var(--white);
    filter: drop-shadow(0 4px 0 rgba(18, 31, 56, 0.35));
}
/* fat ink outline behind the fill, like the menu titles */
.ink-title::before {
    content: attr(data-text);
    position: absolute;
    inset: 0;
    z-index: -1;
    -webkit-text-stroke: 0.22em var(--ink);
}

.sway { animation: sway 4.8s ease-in-out infinite; transform-origin: 50% 60%; }
@keyframes sway {
    0%, 100% { transform: rotate(-1.6deg); }
    50% { transform: rotate(1.6deg); }
}

.section-heading {
    font-size: clamp(1.7rem, 4vw, 2.4rem);
    text-align: center;
    margin-bottom: 0.4em;
}

.gold-kicker {
    display: block;
    text-align: center;
    color: var(--gold);
    font-weight: 800;
    font-size: 0.95rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    text-shadow: 0 2px 0 rgba(18, 31, 56, 0.6);
    margin-bottom: 0.7em;
}

.lead-line {
    color: var(--cream);
    text-align: center;
    font-size: 1.12rem;
    max-width: 46rem;
    margin: 0 auto 2.2rem;
    text-shadow: 0 1px 3px rgba(18, 31, 56, 0.7);
}

/* ---------- candy buttons (MenuTheme.button) ---------- */

.btn-candy {
    --c: var(--blue);
    --rim: color-mix(in srgb, var(--c) 45%, var(--ink));
    position: relative;
    display: inline-block;
    background: var(--c);
    color: var(--white);
    font-weight: 800;
    font-size: 1.05rem;
    text-decoration: none;
    text-align: center;
    text-shadow: -1px -1px 0 var(--ink), 1px -1px 0 var(--ink),
                 -1px 1px 0 var(--ink), 1px 1px 0 var(--ink);
    padding: 0.65em 1.4em;
    border: 3px solid var(--rim);
    border-radius: 14px;
    box-shadow: 0 8px 0 var(--rim);
    cursor: pointer;
    transition: filter 0.12s, transform 0.08s, box-shadow 0.08s;
    overflow: hidden;
}
.btn-candy::after { /* gloss shine (MenuTheme.Gloss) */
    content: "";
    position: absolute;
    left: 4px; right: 4px; top: 4px;
    height: 32%;
    background: rgba(255, 255, 255, 0.13);
    border-radius: 11px 11px 5px 5px;
    pointer-events: none;
}
.btn-candy:hover { filter: brightness(1.1); }
.btn-candy:active { transform: translateY(6px); box-shadow: 0 2px 0 var(--rim); }

.btn-green { --c: var(--green); }
.btn-orange { --c: var(--orange); }
.btn-coral { --c: var(--coral); }
.btn-teal { --c: var(--teal); }
.btn-purple { --c: var(--purple); }
.btn-gold { --c: var(--gold); }
.btn-small { font-size: 0.88rem; padding: 0.45em 1.1em; box-shadow: 0 5px 0 var(--rim); }
.btn-small:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--rim); }
.btn-big { font-size: 1.25rem; padding: 0.75em 1.8em; }

/* ---------- panels & pills (MenuTheme.panelize / pill) ---------- */

.panel {
    background: var(--panel);
    border: 2px solid var(--panel-border);
    border-radius: 16px;
    padding: 1.4rem;
    backdrop-filter: blur(2px);
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45em;
    background: rgba(15, 33, 61, 0.72);
    border: 2px solid rgba(255, 255, 255, 0.18);
    border-radius: 99px;
    padding: 0.3em 1em 0.3em 0.75em;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--white);
    text-shadow: 0 1px 2px rgba(18, 31, 56, 0.8);
}

.depth-marker {
    display: block;
    width: fit-content;
    margin: 0 auto 1.4rem;
    color: rgba(250, 252, 255, 0.55);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.3em;
}

/* ---------- top bar ---------- */

.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(10, 30, 54, 0.85);
    backdrop-filter: blur(8px);
    border-bottom: 2px solid rgba(255, 255, 255, 0.12);
}
.topbar-inner {
    max-width: 72rem;
    margin: 0 auto;
    padding: 0.55rem 1.2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}
.brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    margin-right: auto;
}
.brand-logo { width: 38px; height: 38px; border-radius: 9px; }
.brand-name {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--white);
    text-shadow: -1.5px -1.5px 0 var(--ink), 1.5px -1.5px 0 var(--ink),
                 -1.5px 1.5px 0 var(--ink), 1.5px 1.5px 0 var(--ink),
                 0 3px 0 rgba(18, 31, 56, 0.5);
}
.brand-name em { font-style: normal; color: var(--gold); }

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    list-style: none;
}
.nav-links a:not(.btn-candy) {
    color: var(--cream);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.98rem;
    text-shadow: 0 1px 2px rgba(18, 31, 56, 0.8);
}
.nav-links a:not(.btn-candy):hover { color: var(--gold); }

.nav-toggle, .nav-burger { display: none; }

@media (max-width: 760px) {
    .nav-burger {
        display: flex;
        flex-direction: column;
        gap: 5px;
        cursor: pointer;
        padding: 8px;
    }
    .nav-burger span {
        width: 26px; height: 4px;
        border-radius: 2px;
        background: var(--cream);
    }
    .nav-links {
        display: none;
        position: absolute;
        top: 100%; left: 0; right: 0;
        flex-direction: column;
        padding: 1rem;
        background: rgba(10, 30, 54, 0.97);
        border-bottom: 2px solid rgba(255, 255, 255, 0.12);
    }
    .nav-toggle:checked ~ .nav-links { display: flex; }
}

/* ---------- hero (sunny sky) ---------- */

.hero {
    position: relative;
    background: linear-gradient(180deg, var(--sky-high) 0%, var(--sky) 68%, #5aa9d8 100%);
    padding: 4.5rem 1.2rem 9rem;
    overflow: hidden;
}
.hero-inner {
    position: relative;
    max-width: 72rem;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: 2.5rem;
    align-items: center;
    z-index: 2;
}
@media (max-width: 900px) {
    .hero-inner { grid-template-columns: minmax(0, 1fr); text-align: center; }
    .hero-copy .btn-row { justify-content: center; }
}

.hero-title {
    font-size: clamp(2.6rem, 7vw, 4.3rem);
    line-height: 1.02;
}
.hero-title .gold { color: var(--gold); }
.hero-tag {
    color: var(--ink);
    font-size: clamp(1.05rem, 2.2vw, 1.3rem);
    font-weight: 700;
    margin: 1rem 0 1.6rem;
}
.btn-row { display: flex; flex-wrap: wrap; gap: 0.9rem; align-items: center; }

.hero-shot {
    position: relative;
    transform: rotate(2.5deg);
    animation: bob 5.5s ease-in-out infinite;
}
.hero-shot img {
    border: 4px solid var(--ink);
    border-radius: 18px;
    box-shadow: 0 10px 0 rgba(18, 31, 56, 0.35), 0 24px 50px rgba(10, 37, 64, 0.45);
}
@keyframes bob {
    0%, 100% { transform: rotate(2.5deg) translateY(0); }
    50% { transform: rotate(1.2deg) translateY(-10px); }
}

.hero .sun {
    position: absolute;
    top: 3.2rem; right: 6%;
    width: 110px; height: 110px;
    border-radius: 50%;
    background: #f8e27a;
    box-shadow: 0 0 0 26px rgba(248, 226, 122, 0.25), 0 0 0 52px rgba(248, 226, 122, 0.12);
    z-index: 1;
}
.cloud {
    position: absolute;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 99px;
    z-index: 1;
    animation: drift linear infinite;
}
.cloud::before, .cloud::after {
    content: "";
    position: absolute;
    background: inherit;
    border-radius: 50%;
}
.cloud.c1 { width: 120px; height: 34px; top: 14%; left: -140px; animation-duration: 52s; }
.cloud.c1::before { width: 50px; height: 50px; top: -24px; left: 20px; }
.cloud.c1::after { width: 38px; height: 38px; top: -16px; left: 62px; }
.cloud.c2 { width: 90px; height: 26px; top: 34%; left: -110px; animation-duration: 74s; animation-delay: -30s; opacity: 0.8; }
.cloud.c2::before { width: 36px; height: 36px; top: -18px; left: 16px; }
.cloud.c2::after { width: 28px; height: 28px; top: -12px; left: 46px; }
@keyframes drift { to { transform: translateX(calc(100vw + 200px)); } }

/* ---------- wave divider between sky and sea ---------- */

.waves {
    position: absolute;
    bottom: -2px; left: 0;
    width: 100%;
    height: 90px;
    z-index: 3;
    pointer-events: none;
}
.waves .wave-band {
    position: absolute;
    bottom: 0; left: 0;
    width: 200%;
    height: 100%;
    background-repeat: repeat-x;
    background-size: 50% 100%;
    animation: wave-scroll linear infinite;
}
/* two staggered sine bands, echoing water.gd's crest line */
.waves .w1 {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 720 90' preserveAspectRatio='none'%3E%3Cpath d='M0,55 Q90,25 180,55 Q270,85 360,55 Q450,25 540,55 Q630,85 720,55 L720,90 L0,90 Z' fill='%23327ba8' opacity='0.55'/%3E%3C/svg%3E");
    animation-duration: 13s;
}
.waves .w2 {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 720 90' preserveAspectRatio='none'%3E%3Cpath d='M0,62 Q90,38 180,62 Q270,86 360,62 Q450,38 540,62 Q630,86 720,62 L720,90 L0,90 Z' fill='%23144a75'/%3E%3Cpath d='M0,62 Q90,38 180,62 Q270,86 360,62 Q450,38 540,62 Q630,86 720,62' fill='none' stroke='%23fafcff' stroke-width='3'/%3E%3C/svg%3E");
    animation-duration: 9s;
    animation-direction: reverse;
}
@keyframes wave-scroll { to { transform: translateX(-50%); } }

/* ---------- underwater sections ---------- */

.sea {
    background: linear-gradient(180deg, #144a75 0%, var(--sea-mid) 22%, var(--sea-deep) 62%, var(--sea-abyss) 100%);
    position: relative;
    padding: 3rem 0 6rem;
}
.sea::before { /* faint light shafts */
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(100deg, transparent 18%, rgba(255,255,255,0.045) 22%, transparent 30%),
        linear-gradient(100deg, transparent 55%, rgba(255,255,255,0.035) 60%, transparent 70%);
    pointer-events: none;
}

.section {
    position: relative;
    max-width: 72rem;
    margin: 0 auto;
    padding: 3.2rem 1.2rem;
}

/* ---------- cards ---------- */

.card-grid {
    display: grid;
    gap: 1.2rem;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.mode-card {
    --c: var(--green);
    --rim: color-mix(in srgb, var(--c) 45%, var(--ink));
    position: relative;
    background: var(--c);
    border: 3px solid var(--rim);
    border-radius: 16px;
    box-shadow: 0 9px 0 var(--rim);
    padding: 1.6rem 1.3rem 1.8rem;
    text-align: center;
    overflow: hidden;
    transition: transform 0.15s;
}
.mode-card:hover { transform: translateY(-4px); }
.mode-card::after {
    content: "";
    position: absolute;
    left: 5px; right: 5px; top: 5px;
    height: 30%;
    background: rgba(255, 255, 255, 0.13);
    border-radius: 12px 12px 5px 5px;
    pointer-events: none;
}
.mode-card h3 {
    font-size: 1.5rem;
    font-weight: 800;
    text-shadow: -1.5px -1.5px 0 var(--ink), 1.5px -1.5px 0 var(--ink),
                 -1.5px 1.5px 0 var(--ink), 1.5px 1.5px 0 var(--ink);
    margin-bottom: 0.5rem;
}
.mode-card p { color: var(--white); font-weight: 600; font-size: 0.98rem; text-shadow: 0 1px 2px rgba(18,31,56,0.55); }
.mode-card .mode-sub { display: block; margin-top: 0.6rem; color: var(--cream); font-size: 0.88rem; font-weight: 700; }
.mode-green { --c: var(--green); }
.mode-orange { --c: var(--orange); }
.mode-coral { --c: var(--coral); }

/* hazard tiles */
.hazard-grid {
    display: grid;
    gap: 0.9rem;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}
.hazard {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    background: var(--panel);
    border: 2px solid var(--panel-border);
    border-radius: 14px;
    padding: 0.7rem 0.9rem;
    transition: transform 0.12s, border-color 0.12s;
}
.hazard:hover { transform: translateY(-3px); border-color: var(--gold); }
.hazard .emoji { font-size: 1.7rem; }
.hazard b { display: block; font-size: 0.95rem; }
.hazard small { color: var(--gold); font-weight: 700; font-size: 0.75rem; }

/* how-to-play keys */
.controls {
    display: grid;
    gap: 1.2rem;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}
.control-card { text-align: center; }
.keycap {
    display: inline-block;
    min-width: 3em;
    background: linear-gradient(180deg, #4a5568, #2d3748);
    border: 3px solid var(--ink);
    border-radius: 10px;
    box-shadow: 0 5px 0 var(--ink);
    color: var(--white);
    font-weight: 800;
    padding: 0.35em 0.7em;
    margin: 0 0.15em;
}
.keycap.gas { background: linear-gradient(180deg, #86d43c, #57a30d); }
.keycap.rev { background: linear-gradient(180deg, #f4705f, #cf3a2c); }
.control-card h3 { margin: 0.9rem 0 0.4rem; font-size: 1.1rem; }
.control-card p { font-size: 0.92rem; color: rgba(250, 252, 255, 0.85); }

/* gallery */
.gallery-grid {
    display: grid;
    gap: 1.4rem;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}
.shot { position: relative; }
.shot img {
    border: 4px solid var(--ink);
    border-radius: 16px;
    box-shadow: 0 8px 0 rgba(18, 31, 56, 0.5);
    transition: transform 0.18s;
}
.shot:hover img { transform: rotate(-1deg) scale(1.02); }
.shot figcaption {
    margin-top: 0.7rem;
    text-align: center;
    color: var(--cream);
    font-weight: 700;
    font-size: 0.95rem;
    text-shadow: 0 1px 2px rgba(18, 31, 56, 0.8);
}

/* video */
.video-frame {
    max-width: 56rem;
    margin: 0 auto;
    border: 4px solid var(--ink);
    border-radius: 18px;
    box-shadow: 0 10px 0 rgba(18, 31, 56, 0.5), 0 24px 60px rgba(4, 16, 28, 0.6);
    overflow: hidden;
    background: #000;
}
.video-frame video { display: block; width: 100%; }

/* stat pills row */
.stat-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    justify-content: center;
    margin-top: 2rem;
}

/* fleet list */
.fleet-grid {
    display: grid;
    gap: 0.9rem;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}
.fleet-card {
    background: var(--panel);
    border: 2px solid var(--panel-border);
    border-radius: 14px;
    padding: 0.9rem 1rem;
}
.fleet-card b { color: var(--gold); }
.fleet-card p { font-size: 0.88rem; color: rgba(250, 252, 255, 0.85); margin-top: 0.25rem; }

/* two-column about */
.split {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    align-items: center;
}
.prose p { margin-bottom: 1rem; line-height: 1.65; color: rgba(250, 252, 255, 0.92); }
.prose strong { color: var(--gold); }

/* scroll reveal */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.6s, transform 0.6s; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    .sway, .hero-shot, .cloud, .waves .wave-band { animation: none; }
    .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- seabed footer ---------- */

.seabed { background: var(--sea-abyss); }
.seabed-decor svg { display: block; width: 100%; height: 90px; }
.seabed-inner {
    background: #d8c188;
    color: #4a3f28;
    text-align: center;
    padding: 0.4rem 1.2rem 2.2rem;
}
.footer-title {
    font-weight: 800;
    font-size: 1.3rem;
    color: #3c331f;
}
.footer-title em { font-style: normal; color: #a4762a; }
.footer-line { font-size: 0.92rem; margin: 0.3rem 0 0.6rem; }
.footer-meta { font-size: 0.85rem; }
.footer-meta a { color: #7a5c20; }

/* privacy / plain pages */
.plain-page {
    max-width: 46rem;
    margin: 0 auto;
    padding: 3.5rem 1.2rem 5rem;
}
.plain-page h1 { margin-bottom: 1rem; }
.plain-page p { line-height: 1.65; margin-bottom: 1rem; color: rgba(250, 252, 255, 0.9); }

/* ---------- get-the-game store buttons ---------- */

.store-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.3rem;
    margin-top: 2.4rem;
}

.store-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.65em;
    text-align: left;
    padding: 0.55em 1.5em 0.65em 1.05em;
}

.store-icon {
    font-size: 1.9rem;
    filter: drop-shadow(0 2px 0 rgba(18, 31, 56, 0.4));
}

.store-text small {
    display: block;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    opacity: 0.85;
}
.store-text b { font-size: 1.18rem; line-height: 1.15; }

/* store not launched yet: muted, inert, no press feedback */
.store-soon {
    --c: var(--slate);
    opacity: 0.78;
    cursor: default;
    pointer-events: none;
}
.store-soon .store-icon { filter: grayscale(1) drop-shadow(0 2px 0 rgba(18, 31, 56, 0.4)); }

/* privacy policy page */
.plain-page h2 {
    color: var(--gold);
    font-size: 1.25rem;
    margin: 2rem 0 0.6rem;
    text-shadow: 0 2px 0 rgba(18, 31, 56, 0.6);
}
.plain-page ul { margin: 0 0 1rem 1.4rem; }
.plain-page li { line-height: 1.6; margin-bottom: 0.35rem; color: rgba(250, 252, 255, 0.9); }
.plain-page a { color: var(--gold); }
.plain-page .policy-date {
    font-size: 0.9rem;
    color: var(--slate);
    margin-top: -0.4rem;
}

/* support form */
.support-panel { padding: 1.6rem 1.8rem; margin-top: 1.6rem; }
.form-row { margin-bottom: 1.2rem; display: flex; flex-direction: column; gap: 0.4rem; }
.form-row label {
    font-weight: 700;
    color: var(--cream);
    font-size: 0.92rem;
}
.form-row input, .form-row textarea {
    font: inherit;
    color: var(--white);
    background: rgba(6, 21, 36, 0.55);
    border: 2px solid var(--panel-border);
    border-radius: 10px;
    padding: 0.65em 0.8em;
    resize: vertical;
}
.form-row input:focus, .form-row textarea:focus {
    outline: none;
    border-color: var(--gold);
}
.field-validation, .validation-summary ul {
    color: var(--coral);
    font-size: 0.85rem;
}
.validation-summary ul { margin: 0 0 1rem 1.2rem; }
.validation-summary:empty { display: none; }
/* honeypot: present in the DOM for bots, invisible and unreachable for people */
.honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
