@font-face {
  font-family: Tide Display;
  src: url('/site-art/tide-q-display.ttf') format('truetype');
  font-display: swap;
}

:root {
  color-scheme: dark;
  --background: #080f1b;
  --surface: #101e30;
  --ink: #f4f5fb;
  --muted: #b5c4d7;
  --ice: #8ae0fc;
  --gold: #ffca77;
  --line: #28445a;
  --display: 'Tide Display', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-family: 'PingFang SC', 'Microsoft YaHei', 'Noto Sans CJK SC', sans-serif;
  scroll-behavior: smooth;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--background); line-height: 1.65; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--ice); outline-offset: 5px; }
h1, h2, h3, p { margin: 0; }
section[id] { scroll-margin-top: 92px; }

.shell { width: min(1200px, calc(100% - 96px)); margin-inline: auto; }
.display { font-family: var(--display); font-weight: 400; letter-spacing: .03em; }
.skip-link { position: fixed; left: 12px; top: 12px; z-index: 10; padding: 8px 16px; transform: translateY(-160%); background: #071a2a; border: 1px solid var(--ice); }
.skip-link:focus { transform: none; }

.site-header { position: sticky; z-index: 5; top: 0; background: #081320f5; border-bottom: 1px solid #244054; }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 71px; gap: 24px; }
.brand { display: inline-flex; gap: 12px; align-items: center; flex: 0 0 auto; font-family: var(--display); font-size: 1.3rem; color: #f7f5ea; letter-spacing: .035em; }
.brand-mark { position: relative; display: grid; place-items: center; width: 35px; height: 35px; background: #142c41; border: 1px solid #53849b; border-radius: 11px; box-shadow: inset 0 0 10px #67abca24; }
.brand-mark::before { content: ''; height: 20px; width: 16px; background: linear-gradient(to bottom, #ffd490 0 43%, #8adaf3 44%); clip-path: polygon(50% 0, 94% 27%, 75% 35%, 80% 58%, 100% 100%, 0 100%, 20% 58%, 25% 35%, 6% 27%); }
.brand-mark::after { content: ''; position: absolute; width: 3px; height: 3px; top: 13px; left: 15px; background: #8d461c; border-radius: 1px; }
.site-nav { display: flex; align-items: center; gap: clamp(24px, 4vw, 58px); color: #c3d4e5; font-size: .94rem; }
.site-nav a { padding: 8px 0; transition: color .15s; }
.site-nav a:hover, .site-nav a:focus-visible, .footer-inner > a:last-child:hover { color: var(--ice); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.menu-button { display: none; }

.button { display: inline-flex; min-height: 52px; align-items: center; justify-content: center; padding: 0 24px; border: 1px solid transparent; border-radius: 9px; font-size: .98rem; font-weight: 800; line-height: 1.25; white-space: nowrap; transition: background .18s, border-color .18s, transform .18s; }
.button:hover { transform: translateY(-2px); }
.button-small { min-height: 42px; padding-inline: 17px; font-size: .875rem; }
.button-gold { color: #271706; background: linear-gradient(#ffdc9b, #f0ad4f); border-color: #ffd88f; box-shadow: inset 0 1px #fff0cc, 0 6px 18px #db9b342d; }
.button-gold:hover { background: linear-gradient(#ffe5b6, #f6be67); }
.button-outline { color: #ebf7ff; background: #13283bdc; border-color: #527c93; }
.button-outline:hover { background: #214159; border-color: #87d4ef; }

.hero { position: relative; display: grid; align-items: center; isolation: isolate; min-height: clamp(580px, 49vw, 700px); overflow: hidden; background: #111e36; }
.hero-art { position: absolute; z-index: -3; width: min(81%, 1440px); height: 100%; right: 0; top: 0; object-fit: cover; object-position: center 53%; }
.hero-shade { position: absolute; z-index: -2; inset: 0; background: linear-gradient(90deg, #0c1a2d 0%, #0c1a2dfb 23%, #0c1a2de0 34%, #0c1a2d72 52%, transparent 72%), linear-gradient(0deg, #080f1b 0%, #0a172958 21%, transparent 51%); }
.hero-content { padding-block: 76px 105px; }
.eyebrow { color: var(--ice); font-size: .875rem; font-weight: 750; letter-spacing: .16em; }
.hero-eyebrow { display: flex; align-items: center; gap: 12px; margin-bottom: 13px; }
.hero-eyebrow span { width: 4px; height: 4px; border-radius: 50%; background: #ffd08a; }
.hero h1 { font-size: clamp(3.15rem, 6.1vw, 6rem); line-height: 1.04; color: #fff2cd; text-shadow: 0 3px #713e22, 0 9px 35px #0a0d17, 0 0 25px #eaa95b30; }
.hero-tagline { margin-top: 19px; color: #edf7ff; font-size: clamp(1.18rem, 2.1vw, 1.75rem); font-weight: 750; letter-spacing: .035em; }
.hero-description { max-width: 25em; margin-top: 13px; color: #cfdeeb; font-size: 1.03rem; line-height: 1.85; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.hero-location { position: absolute; inset: auto 0 27px; display: flex; justify-content: end; align-items: center; gap: 9px; pointer-events: none; font-size: .875rem; color: #d6e8f7; letter-spacing: .13em; }
.hero-location span { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 15px var(--gold); }

.section { padding-block: clamp(66px, 8vw, 112px); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 30px; }
.section-heading h2, .play-section h2 { margin-top: 5px; color: #f4f3eb; font-size: clamp(2.03rem, 4vw, 3.25rem); line-height: 1.18; }
.section-heading > p { max-width: 26em; color: var(--muted); padding-bottom: 4px; }
.gameplay { padding-top: 70px; background: radial-gradient(ellipse at 75% 30%, #10233a 0%, transparent 62%); }
.gameplay-frame { overflow: hidden; background: #101d30; border: 1px solid #36536a; border-radius: 17px; }
.gameplay-nav { padding: 12px; border-bottom: 1px solid #2e465c; }
.gameplay-tab-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
[role='tab'] { min-height: 46px; color: #c4d4e5; background: transparent; border: 1px solid transparent; border-radius: 9px; font-weight: 700; }
[role='tab']:hover { color: #ffffff; background: #1e3b50; }
[role='tab'][aria-selected='true'] { color: #fff0ce; background: #253648; border-color: #8a7351; box-shadow: inset 0 -2px #e7b774; }
.gameplay-panel { display: grid; grid-template-columns: minmax(0, 1.46fr) minmax(0, 1fr); min-height: 320px; }
.gameplay-image { position: relative; min-height: 100%; overflow: hidden; }
.gameplay-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 52%; }
.gameplay-image::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 69%, #101d30 100%); }
.move-art img { object-position: center 56%; }
.beacon-art img { object-position: center 36%; }
.gameplay-copy { align-self: center; padding: 38px 36px 38px 20px; }
.gameplay-copy h3 { color: #fff2d5; margin-bottom: 13px; font-size: clamp(1.3rem, 2.3vw, 1.85rem); line-height: 1.35; }
.gameplay-copy p { max-width: 26em; color: var(--muted); }

.crew-section { border-block: 1px solid #1c3449; background: #0a1625; }
.crew-showcase { display: grid; grid-template-columns: 158px minmax(0, 1fr); align-items: stretch; gap: 14px; }
.crew-tab-list { display: grid; align-content: start; gap: 8px; }
.crew-tab-list button { display: flex; gap: 12px; align-items: center; padding: 8px 12px; text-align: left; background: #102235; border-color: #253e54; }
.crew-tab-list button[aria-selected='true'] { background: #233647; }
.crew-thumb, .crew-portrait { background-image: url('/site-art/q-crew-ready.png'); background-repeat: no-repeat; background-size: 200% 200%; }
.crew-thumb { width: 54px; height: 54px; flex: 0 0 54px; }
.water { background-position: 0 0; }
.power { background-position: 100% 0; }
.repair { background-position: 0 100%; }
.patrol { background-position: 100% 100%; }
.crew-panel { position: relative; display: grid; grid-template-columns: 1fr minmax(0, 1.18fr); align-items: center; min-height: 372px; padding: clamp(20px, 4vw, 47px); isolation: isolate; overflow: hidden; border: 1px solid #3a526a; border-radius: 16px; background: #102034; }
.crew-panel::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, #142239 0%, #15243ae8 33%, #14243a50 77%), url('/site-art/q-crew-workshop.jpg') right 59% / 64% auto no-repeat; }
.crew-profile h3 { font-size: clamp(2.45rem, 5.1vw, 4.45rem); color: #ffe7b8; line-height: 1.2; margin-block: 4px 13px; }
.crew-profile > p:not(.eyebrow) { max-width: 22em; color: #d4dfeb; }
.crew-profile .crew-tool { width: fit-content; margin-top: 21px; padding: 5px 12px; background: #09192b; border: 1px solid #456176; border-radius: 6px; }
.crew-tool strong { color: var(--gold); margin-left: 8px; }
.crew-portrait { width: min(100%, 325px); aspect-ratio: 1; justify-self: center; filter: drop-shadow(0 13px 13px #07101dc9); }

.campaign { background: radial-gradient(ellipse at 45% 15%, #132337 0%, transparent 68%); }
.campaign-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.campaign-card { position: relative; display: flex; align-items: end; min-height: 362px; isolation: isolate; overflow: hidden; border-radius: 14px; border: 1px solid #38556c; background: #122439; }
.campaign-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 51%; z-index: -2; }
.campaign-card::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, #091524 1%, #091524ed 23%, #09152434 66%, #0915240b); }
.campaign-card > div { padding: 21px 23px; }
.campaign-card h3 { margin: 3px 0 4px; font-family: var(--display); font-size: clamp(1.4rem, 2.4vw, 1.9rem); letter-spacing: .04em; color: #fff3d9; }
.campaign-card p:first-child { color: #b9edff; font-size: .875rem; font-weight: 700; }
.campaign-card p:last-child { color: #d0dceb; }

.play-section { padding-block: 55px; border-top: 1px solid #325570; border-bottom: 1px solid #253e54; background: linear-gradient(104deg, #122238, #16354c); }
.play-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px; }
.play-inner p:not(.eyebrow) { color: #ccdded; margin-top: 10px; }
.play-steps { width: 100%; display: none; }
.play-steps:target { display: block; }
.site-footer { padding-block: 28px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; color: var(--muted); font-size: .875rem; }

.play-dialog { position: fixed; width: min(475px, calc(100% - 32px)); max-height: calc(100dvh - 32px); padding: 30px; color: var(--ink); background: #102033; border: 1px solid #5b889f; border-radius: 16px; box-shadow: 0 20px 80px #000a; }
.play-dialog:not([open]) { display: none; }
.play-dialog::backdrop { background: #050b14d9; }
.play-dialog h2 { margin-block: 4px 12px; font-family: var(--display); font-size: 2.25rem; color: #ffe8bd; }
.play-dialog ol { padding-left: 1.4em; color: #cdddee; }
.play-dialog label { display: block; margin-top: 8px; color: var(--muted); font-size: .875rem; }
.close-dialog { position: absolute; top: 12px; right: 12px; width: 42px; height: 42px; color: #e8f6ff; background: #192f42; border: 1px solid #395b72; border-radius: 8px; font-size: 1.45rem; }
.copy-row { display: flex; gap: 8px; margin-top: 5px; }
.copy-row input { width: 100%; min-width: 0; padding: 7px 10px; border: 1px solid #456176; border-radius: 8px; color: #f5f9ff; background: #071423; }
.copy-status { min-height: 1.5em; margin-top: 8px; color: var(--ice); font-size: .875rem; }
.play-note { color: var(--muted); font-size: .875rem; }

@media (max-width: 1050px) {
  .shell { width: calc(100% - 64px); }
  .hero-shade { background: linear-gradient(90deg, #0c1a2d 0%, #0c1a2df5 22%, #0c1a2dc9 36%, #0c1a2d35 70%, transparent), linear-gradient(0deg, #080f1b, transparent 42%); }
  .campaign-card > div { padding: 17px; }
}

@media (max-width: 760px) {
  .shell { width: calc(100% - 36px); }
  .site-header .shell { width: calc(100% - 26px); }
  .header-inner { gap: 10px; min-height: 62px; }
  .brand { gap: 8px; font-size: 1.12rem; }
  .brand-mark { width: 31px; height: 31px; border-radius: 9px; }
  .brand-mark::after { left: 13px; top: 11px; }
  .header-actions .button-small { padding-inline: 10px; }
  .site-nav { flex-wrap: wrap; gap: 8px 16px; }
  .has-js .menu-button { display: grid; width: 42px; height: 42px; flex: 0 0 42px; place-content: center; gap: 5px; color: var(--ink); background: #14283b; border: 1px solid #3a5b70; border-radius: 8px; }
  .menu-button span { display: block; width: 17px; height: 2px; background: #e7f7ff; border-radius: 2px; }
  .has-js .site-nav { display: none; position: absolute; top: 100%; right: 0; left: 0; padding: 9px 18px 15px; background: #0c1c2d; border-bottom: 1px solid #35566f; }
  .has-js .site-nav.is-open { display: grid; }
  .site-nav a { min-height: 45px; padding: 10px; }
  body:not(.has-js) .header-inner { flex-wrap: wrap; padding-block: 8px; }
  body:not(.has-js) .site-nav { order: 1; width: 100%; }
  section[id] { scroll-margin-top: 74px; }

  .hero { min-height: 0; align-items: end; }
  .hero-art { width: 100%; height: 430px; object-position: 64% 43%; }
  .hero-shade { background: linear-gradient(0deg, #080f1b 0%, #080f1b 28%, #0a1627e6 46%, #0d1b2d31 67%, #16233a04 82%); }
  .hero-content { padding-block: clamp(295px, 63vw, 365px) 54px; }
  .hero h1 { font-size: clamp(2.65rem, 10vw, 4rem); }
  .hero-eyebrow { margin-bottom: 10px; }
  .hero-tagline { margin-top: 14px; }
  .hero-description { margin-top: 9px; }
  .hero-actions { margin-top: 19px; }
  .hero-location { display: none; }
  .section { padding-block: 60px; }
  .section-heading { display: grid; gap: 12px; margin-bottom: 22px; }
  .section-heading > p { padding-bottom: 0; }

  .gameplay-nav { padding: 8px; }
  .gameplay-tab-list { gap: 3px; }
  .gameplay-panel { grid-template-columns: 1fr; }
  .gameplay-image { min-height: 230px; }
  .gameplay-image::after { background: linear-gradient(0deg, #101d30, transparent 34%); }
  .gameplay-copy { padding: 8px 19px 23px; }
  .crew-showcase { grid-template-columns: minmax(0, 1fr); gap: 9px; }
  .crew-tab-list { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
  .crew-tab-list button { padding: 5px 0 7px; flex-direction: column; gap: 0; font-size: .875rem; }
  .crew-thumb { width: 46px; height: 46px; flex: 0 0 46px; }
  .crew-panel { grid-template-columns: minmax(0, 1fr) minmax(0, .85fr); min-height: 235px; padding: 18px 14px; }
  .crew-panel::before { background-size: auto, auto 160%; }
  .crew-profile h3 { font-size: clamp(2rem, 8vw, 3rem); }
  .crew-profile .crew-tool { padding-inline: 8px; margin-top: 14px; font-size: .875rem; }
  .crew-tool strong { margin-left: 4px; }
  .campaign-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .campaign-card { min-height: 258px; }
  .chapter-frost img { object-position: center 45%; }
  .chapter-sky img { object-position: center 30%; }
  .play-section { padding-block: 36px; }
  .footer-inner { flex-wrap: wrap; justify-content: start; }
}

@media (max-width: 365px) {
  .shell { width: calc(100% - 28px); }
  .header-inner { min-height: 58px; }
  .header-actions { gap: 6px; }
  .hero-actions .button { padding-inline: 17px; }
  .crew-panel { grid-template-columns: minmax(0, 1fr); }
  .crew-portrait { width: 170px; grid-row: 1; }
  .crew-panel::before { background: linear-gradient(0deg, #142239, #15243a80), url('/site-art/q-crew-workshop.jpg') center 65% / cover; }
  .play-dialog { padding-inline: 19px; }
}

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