/* Ship Busters site. One stylesheet, no build step. Dark harbor palette. */
:root {
  --ink: #0a1420; --deep: #0e1c2c; --panel: #16283a; --line: #2e4256;
  --sand: #f5edd6; --gold: #ffd34d; --brass: #c9962e; --red: #c22e2a;
  --sea: #2f8fbe; --mist: #9fb8c9; --good: #7fd487;
  --max: 1060px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--ink); color: var(--sand);
  font: 17px/1.65 -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
img { max-width: 100%; display: block; }
a { color: var(--gold); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; letter-spacing: .01em; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); color: var(--gold); margin-bottom: .6em; }
h3 { font-size: 1.15rem; color: var(--gold); margin: 1.4em 0 .4em; }
p { margin: .7em 0; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* header */
.site-head { position: sticky; top: 0; z-index: 50; background: rgba(10,20,32,.92); backdrop-filter: blur(8px); border-bottom: 2px solid var(--brass); }
.site-head .wrap { display: flex; align-items: center; gap: 14px; padding: 10px 20px; }
.site-head img { width: 44px; height: 44px; border-radius: 10px; }
.site-head .name { font-weight: 800; font-size: 1.15rem; color: var(--sand); }
.site-head nav { margin-left: auto; display: flex; gap: 18px; flex-wrap: wrap; }
.site-head nav a { color: var(--mist); font-weight: 700; font-size: .95rem; }
.site-head nav a:hover, .site-head nav a.here { color: var(--gold); text-decoration: none; }

/* hero */
.hero { position: relative; min-height: 72vh; display: flex; align-items: center; overflow: hidden; }
.hero .bg { position: absolute; inset: 0; background-size: cover; background-position: center; }
.hero video.bg-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; opacity: 0; transition: opacity 1s ease; }
.hero video.bg-video.playing { opacity: 1; }
.hero .veil { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10,20,32,.88) 0%, rgba(10,20,32,.55) 45%, rgba(10,20,32,.15) 100%); }
.hero .wrap { position: relative; padding: 70px 20px; }
.hero p.tag { font-size: clamp(1.05rem, 2.5vw, 1.4rem); color: var(--gold); font-weight: 800; letter-spacing: .04em; margin: .3em 0 1em; }
.hero p.blurb { max-width: 34em; color: var(--sand); }

/* buttons */
.btn { display: inline-block; padding: 14px 30px; border-radius: 12px; font-weight: 800; font-size: 1.05rem; margin: 8px 10px 8px 0; border: 2px solid transparent; }
.btn.play { background: var(--red); color: #fff; border-color: #ff8a80; }
.btn.play:hover { background: #d8423e; text-decoration: none; }
.btn.ghost { background: rgba(22,40,58,.7); color: var(--sand); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--gold); text-decoration: none; }

/* sections & cards */
section.band { padding: 110px 0; }
section.band.alt { background: var(--deep); }

/* full-bleed parallax art behind sections. The .pbg layer is taller than its
   section and driven by scroll position in site.js; .pclip keeps the overflow
   from bleeding into neighbors, and .pveil fades the art into deep water at
   the top and bottom so the wave seams read as one continuous ocean. */
.bgband { position: relative; min-height: 64vh; display: flex; align-items: center; }
.bgband .wrap { width: 100%; }
.bgband .pclip { position: absolute; inset: 0; overflow: hidden; z-index: 0; }
.bgband .pbg { position: absolute; left: 0; right: 0; top: -12%; height: 124%; background-size: cover; background-position: center; will-change: transform; }
.bgband .pveil { position: absolute; inset: 0; z-index: 0; }
.bgband .pveil.fromright { background:
  linear-gradient(180deg, rgba(14,28,44,.95) 0, rgba(14,28,44,0) 150px),
  linear-gradient(0deg, rgba(14,28,44,.95) 0, rgba(14,28,44,0) 150px),
  linear-gradient(270deg, rgba(10,20,32,.9) 0%, rgba(10,20,32,.6) 46%, rgba(10,20,32,.2) 100%); }
.bgband .pveil.fromleft { background:
  linear-gradient(180deg, rgba(14,28,44,.95) 0, rgba(14,28,44,0) 150px),
  linear-gradient(0deg, rgba(14,28,44,.95) 0, rgba(14,28,44,0) 150px),
  linear-gradient(90deg, rgba(10,20,32,.9) 0%, rgba(10,20,32,.6) 46%, rgba(10,20,32,.2) 100%); }
.bgband .pveil.dim { background:
  linear-gradient(180deg, rgba(14,28,44,.95) 0, rgba(14,28,44,0) 150px),
  linear-gradient(0deg, rgba(14,28,44,.95) 0, rgba(14,28,44,0) 150px),
  linear-gradient(rgba(10,20,32,.74), rgba(10,20,32,.74)) ; }
.bgband .wrap { position: relative; z-index: 1; text-shadow: 0 1px 8px rgba(0,0,0,.45); }
.bgband .btn { text-shadow: none; }
.copy-left, .copy-right { max-width: 560px; }
.copy-right { margin-left: auto; }
@media (max-width: 760px) { .copy-left, .copy-right { max-width: none; } }

/* store badges in the platforms band */
.store-badges { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 28px; }
.badge { display: inline-flex; align-items: center; gap: 14px; border: 2px solid var(--line); border-radius: 14px; padding: 12px 26px 12px 18px; background: rgba(8,16,26,.82); min-width: 210px; color: var(--sand); transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.badge svg { width: 34px; height: 34px; flex: none; color: var(--sand); opacity: .92; }
.badge .txt { display: flex; flex-direction: column; line-height: 1.3; }
.badge .txt small { font-size: .68rem; letter-spacing: .13em; font-weight: 700; color: var(--mist); }
.badge .txt strong { font-size: 1.16rem; }
.badge:hover { border-color: var(--brass); transform: translateY(-3px); text-decoration: none; }
.badge.now { border-color: #ff8a80; background: var(--red); }
.badge.now svg { color: #fff; }
.badge.now .txt small { color: #ffd6d4; }
.badge.now .txt strong { color: #fff; }
.badge.now:hover { box-shadow: 0 10px 24px rgba(194,46,42,.38); border-color: #ffb3ac; }
.store-badges.compact { margin-top: 22px; }
.store-badges.compact .badge { min-width: 0; padding: 9px 20px 9px 14px; gap: 11px; }
.store-badges.compact .badge svg { width: 26px; height: 26px; }
.store-badges.compact .txt strong { font-size: 1rem; }
.store-badges.compact .txt small { font-size: .62rem; }

/* the outfitting panel: sets and battle specials on a glass card over the shipyard */
.fit-panel { margin-top: 46px; background: rgba(10,20,32,.52); border: 1px solid rgba(46,66,86,.65); border-radius: 16px; padding: 28px 30px 32px; backdrop-filter: blur(3px); }
.fit-panel h3 { margin: 0 0 .35em; }
.fit-panel h3 + p { margin-top: 0; }
.fit-panel .emblems { margin-top: 20px; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); }
.set-rows { margin: 8px 0 32px; }
.set-row { margin: 12px 0; }
.set-row .lbl { display: block; color: var(--mist); font-size: .82rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; margin: 0 0 8px; }
.set-row .set { display: inline-block; border: 1px solid var(--line); color: var(--sand); border-radius: 999px; padding: 4px 13px; margin: 0 8px 8px 0; font-size: .9rem; font-weight: 700; background: rgba(22,40,58,.7); }
.set-row .set.leg { border-color: var(--gold); color: var(--gold); }

/* gear slot pills and the fleet lineup in the fitting section */
.slot-pills { margin: 4px 0 14px; }
.slot-pills span { display: inline-block; border: 1px solid var(--brass); color: var(--gold); border-radius: 999px; padding: 4px 13px; margin: 0 8px 8px 0; font-size: .85rem; font-weight: 700; background: rgba(22,40,58,.55); }
.ship-line { display: flex; align-items: flex-end; justify-content: center; gap: 5%; margin: 44px 0 0; }
.ship-line figure { flex: 0 1 30%; margin: 0; text-align: center; }
.ship-line img { width: 100%; max-width: 300px; animation: ship-bob 6s ease-in-out infinite alternate; }
.ship-line figure:nth-child(2) img { animation-delay: -2s; }
.ship-line figure:nth-child(3) img { animation-delay: -4s; }
.ship-line figcaption { color: var(--gold); font-weight: 800; letter-spacing: .06em; margin-top: 8px; }
@media (max-width: 640px) { .ship-line { flex-wrap: wrap; gap: 12px; } .ship-line figure { flex: 0 1 46%; } }
@keyframes ship-bob { from { transform: translateY(0) rotate(-1.2deg); } to { transform: translateY(-12px) rotate(1.2deg); } }

/* mode tiles: four full-art panels filling the band, like the game's mode select */
.wrap.wide { max-width: 1560px; }
.mode-head { display: flex; align-items: baseline; gap: 18px; }
.mode-head .hint { color: var(--mist); margin: 0; }
.mode-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 26px; }
.mode-tile { position: relative; border-radius: 16px; overflow: hidden; border: 2px solid var(--line); height: clamp(440px, 64vh, 660px); cursor: pointer; transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease; }
.mode-tile img { width: 100%; height: 100%; object-fit: cover; object-position: center 25%; display: block; transition: transform .5s ease; }
.mode-tile .overlay { position: absolute; inset: auto 0 0 0; padding: 46px 20px 18px; background: linear-gradient(180deg, rgba(10,20,32,0) 0%, rgba(10,20,32,.9) 62%); }
.mode-tile h3 { margin: 0 0 .3em; }
.mode-tile .overlay p { margin: 0 0 .35em; color: var(--sand); font-size: .95rem; }
.mode-tile .more { color: var(--gold); font-weight: 800; font-size: .9rem; }
.mode-tile:hover, .mode-tile:focus-visible { transform: translateY(-4px); border-color: var(--brass); box-shadow: 0 14px 30px rgba(0,0,0,.4); }
.mode-tile:hover img { transform: scale(1.05); }
@media (max-width: 1100px) { .mode-grid { grid-template-columns: repeat(2, 1fr); } .mode-tile { height: 440px; } }
@media (max-width: 640px) { .mode-grid { grid-template-columns: 1fr; } .mode-head .hint { display: none; } }

/* mode detail dialogs */
.mode-dialog { margin: auto; border: 2px solid var(--line); border-radius: 16px; background: var(--panel); color: var(--sand); padding: 0; width: min(660px, 92vw); overflow: hidden; }
.mode-dialog::backdrop { background: rgba(6,12,20,.74); backdrop-filter: blur(3px); }
.mode-dialog img { width: 100%; height: 280px; object-fit: cover; object-position: center 22%; display: block; }
.mode-dialog .pad { padding: 22px 28px 28px; }
.mode-dialog h3 { margin: 0 0 .5em; }
.mode-dialog p { color: var(--mist); }
.mode-dialog .close { cursor: pointer; margin-top: 12px; font: inherit; font-weight: 800; }

/* wavy section seams: the darker band rolls into its neighbors as drifting
   surf, a solid deep-water wave with a translucent brass crest counter-drifting
   behind it, instead of a flat straight edge */
section.band.alt { position: relative; }
section.band.alt::before {
  content: ""; position: absolute; left: 0; right: 0; height: 44px; pointer-events: none; z-index: 2;
  background:
    url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20900%2044'%20preserveAspectRatio='none'%3E%3Cpath%20d='M0%2028%20C75%2028%2075%2010%20150%2010%20C225%2010%20225%2028%20300%2028%20C375%2028%20375%2010%20450%2010%20C525%2010%20525%2028%20600%2028%20C675%2028%20675%2010%20750%2010%20C825%2010%20825%2028%20900%2028%20L900%2044%20L0%2044%20Z'%20fill='%230e1c2c'/%3E%3C/svg%3E") repeat-x bottom / 900px 44px,
    url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20900%2044'%20preserveAspectRatio='none'%3E%3Cpath%20d='M0%2022%20C75%2022%2075%206%20150%206%20C225%206%20225%2022%20300%2022%20C375%2022%20375%206%20450%206%20C525%206%20525%2022%20600%2022%20C675%2022%20675%206%20750%206%20C825%206%20825%2022%20900%2022%20L900%2044%20L0%2044%20Z'%20fill='%231c3247'/%3E%3Cpath%20d='M0%2022%20C75%2022%2075%206%20150%206%20C225%206%20225%2022%20300%2022%20C375%2022%20375%206%20450%206%20C525%206%20525%2022%20600%2022%20C675%2022%20675%206%20750%206%20C825%206%20825%2022%20900%2022'%20fill='none'%20stroke='%23c9962e'%20stroke-opacity='.7'%20stroke-width='2.5'/%3E%3C/svg%3E") repeat-x bottom / 900px 44px;
  animation: seam-drift 38s linear infinite;
}
section.band.alt::before { bottom: 100%; }
@keyframes seam-drift {
  from { background-position: 0 100%, 150px 100%; }
  to { background-position: 900px 100%, -750px 100%; }
}
.grid { display: grid; gap: 22px; }
.grid.cols3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.grid.cols2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.card { background: var(--panel); border: 2px solid var(--line); border-radius: 14px; overflow: hidden; }
.card img { width: 100%; height: 190px; object-fit: cover; }
.card .pad, .pad { padding: 18px 20px; }
.card h3 { margin-top: 0; }
.card p { color: var(--mist); font-size: .97rem; }

/* prose pages (manual, legal) */
.prose { max-width: 780px; margin: 0 auto; padding: 48px 20px 80px; }
.prose h1 { color: var(--gold); margin-bottom: .3em; }
.prose .meta { color: var(--mist); font-size: .9rem; margin-bottom: 2em; }
.prose h2 { margin-top: 1.8em; border-bottom: 1px solid var(--line); padding-bottom: .25em; }
.prose ul, .prose ol { margin: .7em 0 .7em 1.4em; }
.prose li { margin: .35em 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 1em 0; font-size: .95rem; }
.prose th, .prose td { border: 1px solid var(--line); padding: 9px 12px; text-align: left; vertical-align: top; }
.prose th { background: var(--panel); color: var(--gold); }
.prose .note { background: var(--panel); border-left: 4px solid var(--brass); padding: 12px 16px; border-radius: 0 10px 10px 0; margin: 1.2em 0; color: var(--mist); }
.table-scroll { overflow-x: auto; }

/* footer */
.site-foot { background: var(--deep); border-top: 2px solid var(--brass); padding: 36px 0; margin-top: 0; }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; }
.site-foot a { color: var(--mist); font-size: .92rem; }
.site-foot a:hover { color: var(--gold); }
.site-foot .fine { width: 100%; color: #5d7285; font-size: .85rem; margin-top: 10px; }
@media (max-width: 640px) {
  .site-head nav { gap: 12px; }
  .hero { min-height: 58vh; }
}

/* FAQ disclosure widgets, styled to match the cards instead of browser defaults */
details { background: var(--panel); border: 2px solid var(--line); border-radius: 12px; margin: .7em 0; padding: 0; }
details summary { cursor: pointer; font-weight: 800; color: var(--sand); padding: 14px 18px; list-style-position: inside; }
details summary:hover { color: var(--gold); }
details[open] summary { border-bottom: 1px solid var(--line); color: var(--gold); }
details .a, details p { padding: 4px 18px 14px; color: var(--mist); margin: 0; }

/* motion: hero entrance, scroll reveals, hover states */
@keyframes hero-rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes hero-drift { from { transform: scale(1.08); } to { transform: scale(1); } }
.hero .bg { animation: hero-drift 14s ease-out both; }
.hero h1 { animation: hero-rise .7s ease-out both; }
.hero p.tag { animation: hero-rise .7s ease-out .12s both; }
.hero p.blurb { animation: hero-rise .7s ease-out .24s both; }
.hero .wrap p:last-child, .hero .store-badges { animation: hero-rise .7s ease-out .36s both; }

/* homepage intro: logo pop and a short load bar, then the overlay clears */
.intro { position: fixed; inset: 0; z-index: 60; background: var(--ink); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; pointer-events: none; animation: intro-out .55s ease 1.6s both; }
.intro img { width: 92px; height: 92px; animation: intro-pop .55s cubic-bezier(.22,.61,.36,1) both; }
.intro .intro-name { font-weight: 800; font-size: 1.1rem; letter-spacing: .16em; color: var(--sand); animation: hero-rise .55s ease-out .15s both; }
.intro .intro-bar { width: 180px; height: 4px; border-radius: 999px; background: var(--panel); overflow: hidden; animation: hero-rise .55s ease-out .25s both; }
.intro .intro-bar span { display: block; height: 100%; background: var(--gold); transform-origin: left; animation: intro-fill 1.05s ease .4s both; }
@keyframes intro-pop { from { opacity: 0; transform: scale(.55); } to { opacity: 1; transform: scale(1); } }
@keyframes intro-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes intro-out { to { opacity: 0; visibility: hidden; } }

/* while the intro runs, hold the hero entrance until it clears */
body.has-intro .hero .bg { animation-delay: 1.3s; }
body.has-intro .hero h1 { animation-delay: 1.45s; }
body.has-intro .hero p.tag { animation-delay: 1.57s; }
body.has-intro .hero p.blurb { animation-delay: 1.69s; }
body.has-intro .hero .wrap p:last-child, body.has-intro .hero .store-badges { animation-delay: 1.81s; }

.rv { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s cubic-bezier(.22,.61,.36,1); transition-delay: var(--rvd, 0s); }
.rv.in { opacity: 1; transform: none; }

a, .site-head nav a, .site-foot a, details summary { transition: color .15s ease; }
.btn { transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease; }
.btn:hover { transform: translateY(-2px); }
.btn.play:hover { box-shadow: 0 10px 24px rgba(194,46,42,.38); }
.btn.ghost:hover { box-shadow: 0 8px 20px rgba(0,0,0,.3); }
.card { transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease; }
.card:hover { transform: translateY(-4px); border-color: var(--brass); box-shadow: 0 14px 30px rgba(0,0,0,.35); }
.card img { transition: transform .5s ease; }
.card:hover img { transform: scale(1.04); }
.shot { transition: transform .3s ease, box-shadow .3s ease; }
.shot:hover { transform: scale(1.015); box-shadow: 0 12px 28px rgba(0,0,0,.35); }
.emblems > div img { transition: transform .25s ease, filter .25s ease; }
.emblems > div:hover img { transform: translateY(-5px) scale(1.06); filter: drop-shadow(0 10px 14px rgba(0,0,0,.45)); }
details { transition: border-color .2s ease; }
details:hover { border-color: var(--brass); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
}
