/* Sea Craft website. Night sea for the frame, chart paper for reading, logo gold for action. */
:root {
  --ink: #0a1726;
  --sea: #0d2547;
  --sea-2: #153d6b;
  --sea-3: #1f5a8f;
  --foam: #e6f0f4;
  --paper: #efe7d2;
  --panel: #faf4e3;
  --chip: #e6dcc2;
  --line: #d2c39d;
  --fg: #14222e;
  --mute: #55646d;
  --gold: #f2c14e;
  --gold-2: #e09b2d;
  --gold-d: #8a5f12;
  --red: #b23a2e;
  --teal: #1f6f73;
  --display: "Jersey 10", "Silkscreen", ui-monospace, monospace;
  --label: "Silkscreen", ui-monospace, monospace;
  --body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1160px;
  --gutter: 16px;
  /* chart-paper grain, so the paper is not a flat fill */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .42 0 0 0 0 .33 0 0 0 0 .16 .16 0 0 0 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper) var(--grain);
  color: var(--fg);
  font: 16px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); }
a:hover { color: var(--sea-3); }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.05; letter-spacing: .5px; margin: 0 0 .4em; }
h1 { font-size: clamp(44px, 7vw, 76px); }
h2 { font-size: clamp(34px, 4.6vw, 52px); }
h3 { font-size: 30px; }
h1, h2, h3 { text-wrap: balance; }
p, li { text-wrap: pretty; }
p { margin: 0 0 1em; }
code, kbd { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .9em; }
kbd {
  display: inline-block; min-width: 1.9em; padding: 1px 7px; text-align: center;
  background: var(--panel); border: 1px solid var(--line); border-bottom-width: 3px; border-radius: 4px;
  color: var(--fg); font-weight: 600;
}
.wrap { width: min(var(--wrap), 100% - 2 * var(--gutter)); margin-inline: auto; }
.pixel { image-rendering: pixelated; }
.eyebrow { font-family: var(--label); font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--gold-d); margin-bottom: 10px; }
.lead { font-size: 19px; color: var(--mute); max-width: 62ch; }

.skip { position: absolute; left: 12px; top: -60px; z-index: 60; padding: 10px 14px; background: var(--gold); color: #2a1a02; font-weight: 600; border-radius: 4px; }
.skip:focus { top: 10px; }
.more { font-weight: 600; color: var(--teal); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 5px; }
.more:hover { color: var(--sea-3); }
.band-dark .more { color: var(--gold); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 23, 38, .92); backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(242, 193, 78, .18);
}
.site-header .wrap { display: flex; align-items: center; gap: 20px; height: 64px; }
.brand img { height: 30px; width: auto; }
.nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav a {
  color: var(--foam); text-decoration: none; font-family: var(--label); font-size: 13px;
  padding: 8px 12px; border-radius: 6px; letter-spacing: .5px;
}
.nav a:hover, .nav a[aria-current="page"] { background: rgba(255,255,255,.08); color: var(--gold); }
.nav .btn { margin-left: 8px; }
.menu-toggle { display: none; margin-left: auto; background: none; border: 1px solid rgba(255,255,255,.25); color: var(--foam); border-radius: 6px; padding: 8px 10px; font-family: var(--label); font-size: 12px; cursor: pointer; }

/* Buttons: chunky, like a game button */
.btn {
  --b: var(--gold); --b2: var(--gold-2); --t: #2a1a02;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 22px; border: 0; border-radius: 6px; cursor: pointer;
  background: linear-gradient(var(--b), var(--b2)); color: var(--t);
  font-family: var(--display); font-size: 24px; line-height: 1; letter-spacing: .5px; text-decoration: none;
  box-shadow: 0 4px 0 var(--gold-d), 0 8px 18px rgba(0,0,0,.25);
  transition: transform .08s, box-shadow .08s, filter .15s;
}
.btn:hover { filter: brightness(1.06); color: var(--t); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--gold-d), 0 4px 10px rgba(0,0,0,.25); }
.btn.sm { font-size: 19px; padding: 8px 14px; }
.btn.ghost { --b: rgba(255,255,255,.08); --b2: rgba(255,255,255,.04); --t: var(--foam); box-shadow: inset 0 0 0 2px rgba(255,255,255,.28); }
.btn.ghost:hover { --t: var(--gold); }
.btn.discord { --b: #6c78f0; --b2: #5865f2; --t: #fff; box-shadow: 0 4px 0 #3a43b0, 0 8px 18px rgba(0,0,0,.25); }
.btn.dark { --b: var(--sea-2); --b2: var(--sea); --t: var(--foam); box-shadow: 0 4px 0 #06111f, 0 8px 18px rgba(0,0,0,.2); }
.btn[aria-disabled="true"] { filter: grayscale(.85) brightness(.9); cursor: not-allowed; pointer-events: none; opacity: .75; }
.btn:focus-visible, .nav a:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.btn svg { width: 22px; height: 22px; flex: none; }

/* Hero: the game's title scene on a canvas, cropped like the game (bottom anchored) */
.hero {
  position: relative; overflow: hidden; color: #fff3d6; padding: 0;
  height: clamp(560px, 56.25vw, calc(100svh - 64px)); max-height: 960px;
  background: #1d1238;
}
.hero-scene {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 100%; image-rendering: pixelated;
  opacity: 0; transition: opacity .6s;
}
.hero-scene.ready { opacity: 1; }
.hero-copy { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: clamp(28px, 7vh, 80px); }
.hero h1 { margin: 0; }
.hero-logo { width: min(588px, 100%); height: auto; filter: drop-shadow(0 6px 0 rgba(12, 6, 28, .45)); }
.hero .tagline {
  /* the game's label style: cream pixel text with a hard dark outline */
  --o: #1b0f2c;
  font-family: var(--display); font-size: clamp(26px, 3.2vw, 40px); line-height: 1.1; margin: 14px 0 0;
  text-shadow: 2px 0 var(--o), -2px 0 var(--o), 0 2px var(--o), 0 -2px var(--o), 2px 2px var(--o), -2px 2px var(--o), 2px -2px var(--o), -2px -2px var(--o), 3px 5px 0 rgba(12, 6, 28, .4);
}
.hero .actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin: 26px 0 16px; }
.hero .btn.ghost { --b: rgba(18, 9, 38, .62); --b2: rgba(18, 9, 38, .62); box-shadow: inset 0 0 0 2px rgba(255, 243, 214, .55), 0 4px 0 rgba(12, 6, 28, .5); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .hero-scene { transition: none; } }

/* Home: statement, feature rows and the short list */
.intro { padding: 88px 0 24px; }
.statement { font-size: clamp(24px, 2.7vw, 34px); line-height: 1.35; font-weight: 500; max-width: 34ch; margin: 0 0 22px; letter-spacing: -.2px; }
.meta { font-family: var(--label); font-size: 12px; letter-spacing: 1px; color: var(--gold-d); margin: 0 0 10px; }
.status { color: var(--mute); max-width: 70ch; margin: 0; }
.status b { color: var(--fg); font-variant-numeric: tabular-nums; }
.features { padding-top: 64px; }
.feature { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; margin-bottom: clamp(72px, 9vw, 120px); }
.feature.flip .feature-art { order: 2; }
.feature-text h2 { margin-bottom: 16px; }
.feature-text p { max-width: 46ch; }
.feature-art { margin: 0; border-radius: 6px; overflow: hidden; box-shadow: 0 18px 40px -18px rgba(10, 23, 38, .55); }
.feature-art.shot img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.plate {
  /* a sea chart: navy with a faint grid, for the game's own pixel art */
  position: relative; aspect-ratio: 16 / 10; display: grid; place-items: center;
  background: linear-gradient(rgba(242, 193, 78, .06) 1px, transparent 1px) 0 0 / 32px 32px,
              linear-gradient(90deg, rgba(242, 193, 78, .06) 1px, transparent 1px) 0 0 / 32px 32px,
              radial-gradient(120% 90% at 50% 40%, var(--sea-2), var(--ink));
  box-shadow: inset 0 0 0 1px rgba(242, 193, 78, .22), 0 18px 40px -18px rgba(10, 23, 38, .55);
}
.fruits { display: flex; gap: clamp(12px, 3vw, 32px); }
.fruits img { width: clamp(80px, 11vw, 128px); height: auto; filter: drop-shadow(0 6px 0 rgba(0, 0, 0, .35)); }
.plate.haki img { width: min(512px, 88%); height: auto; }
.art-note { position: absolute; left: 0; right: 0; bottom: 12px; margin: 0; text-align: center; font-family: var(--label); font-size: 11px; letter-spacing: 1px; color: #9fb1bf; }
.aboard { list-style: none; margin: 0; padding: 40px 0 0; border-top: 2px dashed var(--line); display: grid; grid-template-columns: 1fr 1fr; gap: 32px 56px; }
.aboard li { display: grid; grid-template-columns: 64px 1fr; gap: 18px; align-items: start; }
.aboard a { font-family: var(--display); font-size: 32px; line-height: 1; color: var(--fg); text-decoration: none; }
.aboard a:hover { color: var(--teal); }
.aboard p { margin: 6px 0 0; color: var(--mute); font-size: 15px; }
.section-head.split { display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; }
.section-head.split h2 { margin: 0; }
.start { background: var(--panel) var(--grain); border-block: 1px solid var(--line); }
.start-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.start-links { display: flex; align-items: center; gap: 22px; margin-top: 22px; }

/* Sections */
section { padding: 84px 0; }
.section-head { margin-bottom: 36px; }
.band-dark { background: linear-gradient(180deg, var(--sea) 0%, var(--ink) 100%); color: var(--foam); }
.band-dark .lead { color: #b9c8d4; }
.band-dark .eyebrow { color: var(--gold); }
.band-panel { background: var(--panel); border-block: 1px solid var(--line); }

.grid { display: grid; gap: 18px; }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--panel); border-top: 3px solid var(--sea); border-radius: 2px 2px 8px 8px; padding: 22px;
  transition: background-color .2s;
}
a.card { color: inherit; text-decoration: none; display: block; }
a.card:hover { background: var(--chip); color: inherit; }
a.card:hover h3 { color: var(--teal); }
.card h3 { font-size: 28px; margin-bottom: 6px; }
.card p { color: var(--mute); margin: 0; font-size: 15px; }
.band-dark .card { background: rgba(255,255,255,.05); border-color: var(--gold); color: var(--foam); }
.band-dark .card p { color: #b9c8d4; }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.gallery figure { margin: 0; position: relative; border-radius: 10px; overflow: hidden; background: var(--ink); cursor: zoom-in; border: 2px solid rgba(255,255,255,.08); }
.gallery figure.wide { grid-column: span 4; }
.gallery figure.half { grid-column: span 3; }
.gallery figure.third { grid-column: span 2; }
.gallery img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16/9; transition: transform .4s; }
.gallery figure:hover img { transform: scale(1.04); }
.gallery figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 14px 10px;
  background: linear-gradient(transparent, rgba(10,23,38,.92)); color: var(--foam);
  font-family: var(--display); font-size: 22px; line-height: 1.1;
}
.gallery figcaption small { display: block; font-family: var(--body); font-size: 13px; color: #b9c8d4; }
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(6,12,20,.92); display: none; place-items: center; padding: 24px; cursor: zoom-out; }
.lightbox.open { display: grid; }
.lightbox img { max-height: 82vh; width: auto; border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.lightbox p { color: var(--foam); text-align: center; margin-top: 14px; font-family: var(--display); font-size: 26px; }
.videos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.videos iframe { width: 100%; aspect-ratio: 16/9; border: 0; border-radius: 10px; }

/* Download */
.dl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.dl-card { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 28px; box-shadow: 0 4px 0 var(--line); }
.dl-card.recommended { border: 3px solid var(--gold-2); box-shadow: 0 4px 0 var(--gold-d); }
.dl-card .tag { position: absolute; top: -14px; left: 24px; background: var(--gold); color: #2a1a02; font-family: var(--label); font-size: 11px; letter-spacing: 1px; padding: 5px 10px; border-radius: 6px; box-shadow: 0 2px 0 var(--gold-d); }
.dl-card h3 { font-size: 36px; }
.dl-card ul { padding-left: 20px; color: var(--mute); margin: 0 0 20px; }
.dl-card .buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.unreleased { font-family: var(--label); font-size: 12px; letter-spacing: 1px; color: var(--mute); margin: 0; padding: 12px 0 2px; border-top: 1px dashed var(--line); }
.req { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.req span { font-family: var(--label); font-size: 11px; letter-spacing: 1px; padding: 7px 11px; border-radius: 6px; background: var(--chip); border: 1px solid var(--line); color: var(--fg); }
.req span span { padding: 0; border: 0; background: none; }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.steps li { counter-increment: step; position: relative; padding: 14px 16px 14px 60px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
.steps li::before { content: counter(step); position: absolute; left: 14px; top: 12px; width: 32px; height: 32px; border-radius: 6px; display: grid; place-items: center; background: var(--sea); color: var(--gold); font-family: var(--display); font-size: 22px; }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); margin: 0 0 24px; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-family: var(--label); font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--mute); background: var(--chip); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td .muted, .muted { color: var(--mute); }
.pill { display: inline-block; font-family: var(--label); font-size: 10px; letter-spacing: 1px; padding: 3px 7px; border-radius: 4px; background: var(--chip); border: 1px solid var(--line); white-space: nowrap; }
.pill.boss { background: var(--red); color: #fff; border-color: #7d2219; }
.pill.slash { background: #dfe9f0; } .pill.blunt { background: #efe0cf; } .pill.pierce { background: #e2efe0; }

/* Discord band */
.discord-band { background: var(--ink); color: var(--foam); padding: 64px 0; border-top: 1px solid rgba(242, 193, 78, .18); }
.discord-band .wrap { display: flex; align-items: center; justify-content: space-between; gap: 28px; flex-wrap: wrap; }
.discord-band h2 { margin: 0 0 8px; }
.discord-band p { margin: 0; color: #b9c8d4; max-width: 60ch; }

/* Wiki */
.wiki { display: grid; grid-template-columns: 250px 1fr; gap: 40px; padding: 48px 0 84px; align-items: start; }
.wiki-nav { position: sticky; top: 84px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.wiki-nav h4 { font-family: var(--label); font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--mute); margin: 6px 8px 8px; font-weight: 400; }
.wiki-nav a { display: block; padding: 7px 10px; border-radius: 6px; text-decoration: none; color: var(--fg); font-size: 15px; }
.wiki-nav a:hover { background: var(--chip); }
.wiki-nav a[aria-current="page"] { background: var(--sea); color: var(--gold); }
.wiki-search { width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 6px; background: #fff; font: inherit; font-size: 14px; margin-bottom: 8px; }
.prose { min-width: 0; }
.prose h1 { font-size: clamp(44px, 6vw, 64px); }
.prose h2 { font-size: 40px; margin-top: 48px; padding-top: 8px; border-top: 2px dashed var(--line); }
.prose h3 { margin-top: 28px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.callout { border-left: 4px solid var(--gold-2); background: var(--panel); padding: 14px 18px; border-radius: 0 10px 10px 0; margin: 0 0 24px; }
.callout.sea { border-color: var(--teal); }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 28px; }
.toc a { font-family: var(--label); font-size: 11px; letter-spacing: 1px; padding: 6px 10px; border-radius: 6px; background: var(--chip); border: 1px solid var(--line); color: var(--fg); text-decoration: none; }
.toc a:hover { background: var(--panel); }
.keys { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin-bottom: 24px; }
.keys div { display: flex; align-items: center; gap: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font-size: 15px; }
.filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.filter button { font-family: var(--label); font-size: 11px; letter-spacing: 1px; padding: 7px 11px; border-radius: 6px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; color: var(--fg); }
.filter button[aria-pressed="true"] { background: var(--sea); color: var(--gold); border-color: var(--sea); }
.island-list { list-style: none; padding: 0; counter-reset: isl; display: grid; gap: 10px; }
.island-list li { counter-increment: isl; display: grid; grid-template-columns: 44px 1fr; gap: 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px; }
.island-list li::before { content: counter(isl); width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--sea); color: var(--gold); font-family: var(--display); font-size: 26px; }
.island-list b { font-family: var(--display); font-weight: 400; font-size: 26px; display: block; line-height: 1.1; }
.island-list .soon { color: var(--mute); }

/* Footer */
.site-footer { background: var(--ink); color: #9fb1bf; padding: 48px 0 28px; font-size: 14px; }
.site-footer .wrap { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 28px; }
.site-footer h4 { font-family: var(--label); font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--gold); margin: 0 0 12px; font-weight: 400; }
.site-footer a { color: #c7d6e2; text-decoration: none; display: block; padding: 3px 0; }
.site-footer a:hover { color: var(--gold); }
.site-footer .fine { grid-column: 1 / -1; border-top: 1px solid rgba(255,255,255,.08); padding-top: 18px; font-size: 12px; color: #74889a; }
.site-footer img { height: 26px; width: auto; margin-bottom: 12px; }

/* Page hero for inner pages */
.page-hero {
  /* the night scene's islands along the bottom */
  position: relative; color: var(--foam); padding: 64px 0 72px; image-rendering: pixelated;
  background: url(scene/night/isles_near.png) 50% calc(100% + 48px) / auto 426px no-repeat,
              url(scene/night/isles_far.png) 50% calc(100% + 48px) / auto 426px no-repeat,
              linear-gradient(180deg, var(--ink), var(--sea));
}
.page-hero .lead { color: #b9c8d4; }
.page-hero .eyebrow { color: var(--gold); }

@media (max-width: 960px) {
  .feature, .start-grid { grid-template-columns: 1fr; gap: 28px; }
  .feature.flip .feature-art { order: 0; }
  .aboard { grid-template-columns: 1fr; }
  .grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
  .dl-grid { grid-template-columns: 1fr; }
  .wiki { grid-template-columns: 1fr; gap: 24px; }
  .wiki-nav { position: static; }
  .site-footer .wrap { grid-template-columns: 1fr 1fr; }
  .gallery figure.wide, .gallery figure.half { grid-column: span 6; }
  .gallery figure.third { grid-column: span 3; }
}
@media (max-width: 760px) {
  .menu-toggle { display: block; }
  .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--ink); padding: 10px var(--gutter) 16px; border-bottom: 1px solid rgba(242,193,78,.18); }
  .nav.open { display: flex; }
  .nav .btn { margin: 8px 0 0; justify-content: center; }
}
@media (max-width: 560px) {
  section { padding: 60px 0; }
  .hero { height: min(640px, calc(100svh - 64px)); min-height: 520px; }
  .intro { padding-top: 56px; }
  .grid.cols-4, .grid.cols-3, .grid.cols-2, .videos { grid-template-columns: 1fr; }
  .gallery figure.third { grid-column: span 6; }
  .site-footer .wrap { grid-template-columns: 1fr; }
  .btn { font-size: 21px; }
}

/* 404 */
.page-hero.lost { min-height: calc(100svh - 64px - 220px); display: grid; align-content: center; padding-bottom: 200px; }
.lost-links { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; margin-top: 26px; }
.page-hero .more { color: var(--gold); }
