/* Cape of Storms — storm navy and teal, gold accents, black panels like the game UI. No web fonts: Palatino ships with Windows and macOS. */
:root {
  --ink: #03070c;
  --navy-950: #050c14;
  --navy-900: #081522;
  --navy-800: #0d2133;
  --teal-700: #0f4a55;
  --teal-500: #2b8a8c;
  --teal-300: #86cbc6;
  --gold-700: #8a5f1f;
  --gold-500: #d9a441;
  --gold-400: #e8bf63;
  --gold-300: #f4dc9a;
  --text: #ece4d3;
  --muted: #a9bac2;
  --line: rgba(217, 164, 65, 0.38);
  --serif: "Palatino Linotype", Palatino, "Book Antiqua", "URW Palladio L", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wrap: 1160px;
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body { margin: 0; background: var(--navy-950); color: var(--text); font: 400 1.0625rem/1.65 var(--sans); overflow-x: hidden; }
img { display: block; max-width: 100%; height: auto; }
picture { flex-shrink: 0; }
a { color: var(--gold-400); }
a:hover { color: var(--gold-300); }
:focus-visible { outline: 2px solid var(--gold-300); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.15; margin: 0 0 0.5em; color: #f5ecd9; }
h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
code { font-family: ui-monospace, Consolas, monospace; font-size: 0.9em; background: rgba(255, 255, 255, 0.07); padding: 0.1em 0.35em; border-radius: 3px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip-link { position: absolute; left: 8px; top: -80px; z-index: 50; padding: 10px 16px; background: var(--gold-500); color: #24170a; font-weight: 700; border-radius: 4px; }
.skip-link:focus { top: 8px; color: #24170a; }
.eyebrow { font: 700 0.78rem/1.4 var(--sans); letter-spacing: 0.22em; text-transform: uppercase; color: var(--teal-300); margin: 0 0 0.9em; }
.lead { font-size: 1.15rem; color: #d5dee2; }
.note { font-size: 0.92rem; color: var(--muted); }
.ornament { position: relative; display: block; width: 160px; height: 12px; margin: 0 auto 22px; background: linear-gradient(90deg, transparent, var(--gold-500) 30%, var(--gold-500) 70%, transparent) center / 100% 1px no-repeat; }
.ornament::before { content: ""; position: absolute; left: 50%; top: 50%; width: 9px; height: 9px; background: var(--gold-400); transform: translate(-50%, -50%) rotate(45deg); box-shadow: 0 0 0 3px var(--navy-950); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 20; background: #04090f; border-bottom: 1px solid var(--line); }
.header-inner { max-width: var(--wrap); margin: 0 auto; padding: 10px var(--gutter); display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; }
.brand { display: flex; align-items: center; gap: 10px; margin-right: auto; color: var(--text); text-decoration: none; font: 700 1.1rem/1 var(--serif); letter-spacing: 0.08em; text-transform: uppercase; }
.brand:hover { color: #fff; }
.brand-emblem { width: 40px; height: 40px; }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px 24px; }
.site-nav a { padding: 6px 0; border-bottom: 2px solid transparent; color: var(--muted); text-decoration: none; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.site-nav a:hover { color: var(--text); }
.site-nav a[aria-current="page"] { color: var(--gold-400); border-bottom-color: var(--gold-500); }
.lang-switch { display: flex; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.lang-switch a { padding: 5px 10px; color: var(--muted); text-decoration: none; font-size: 0.76rem; font-weight: 700; letter-spacing: 0.1em; }
.lang-switch a:hover { color: var(--text); background: rgba(232, 191, 99, 0.1); }
.lang-switch a[aria-current="true"] { background: var(--gold-500); color: #24170a; }

/* Buttons and badges: gold like the game's buttons */
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 16px; }
.actions-start { justify-content: flex-start; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 12px 26px; border: 1px solid transparent; border-radius: 5px; font: 700 0.88rem/1.2 var(--sans); letter-spacing: 0.12em; text-transform: uppercase; text-decoration: none; cursor: pointer; transition: filter 0.15s, transform 0.15s, background-color 0.15s; }
.btn-gold { color: #2a1a06; background: linear-gradient(180deg, #fbe7ab 0%, #e9bd5c 42%, #c48a2c 60%, #9c6a20 100%); border-color: #5c3c0f; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), inset 0 -2px 0 rgba(0, 0, 0, 0.18), 0 2px 0 #2e1d07, 0 8px 22px rgba(0, 0, 0, 0.45); text-shadow: 0 1px 0 rgba(255, 240, 200, 0.45); }
.btn-gold:hover { color: #2a1a06; filter: brightness(1.08); }
.btn-gold:active { transform: translateY(1px); }
.btn-ghost { color: var(--gold-300); background: rgba(4, 9, 15, 0.5); border-color: rgba(232, 191, 99, 0.6); }
.btn-ghost:hover { color: #fff3d0; background: rgba(232, 191, 99, 0.12); }
.btn[disabled] { cursor: not-allowed; color: #98a3aa; background: linear-gradient(180deg, #2b3239, #1a1f24); border-color: #3b434b; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06); text-shadow: none; filter: none; transform: none; }
.btn-wide { width: 100%; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; background: var(--teal-300); color: #062024; font: 700 0.68rem/1.4 var(--sans); letter-spacing: 0.14em; text-transform: uppercase; text-shadow: none; white-space: nowrap; }
.text-link { display: inline-block; margin-top: 4px; font-weight: 700; text-decoration: none; }
.text-link:hover { text-decoration: underline; }

/* Panels: black with a gold rim and a dark inner bevel */
.panel { padding: 28px 24px; border: 1px solid var(--line); border-radius: 6px; background: linear-gradient(180deg, rgba(12, 20, 29, 0.97), rgba(3, 7, 11, 0.97)); box-shadow: inset 0 0 0 4px rgba(0, 0, 0, 0.55), inset 0 0 0 5px rgba(217, 164, 65, 0.14), 0 18px 40px rgba(0, 0, 0, 0.35); }

/* Picture behind a hero; the overlay keeps text readable */
.hero-media { position: absolute; inset: 0; z-index: -1; }
.hero-media::after { content: ""; position: absolute; inset: 0; }
.hero-art { width: 100%; height: 100%; object-fit: cover; }

/* Home hero */
.hero { position: relative; isolation: isolate; display: flex; align-items: flex-end; justify-content: center; min-height: clamp(560px, 88vh, 880px); overflow: hidden; text-align: center; }
.hero .hero-art { object-position: 50% 30%; }
.hero .hero-media::after { background: radial-gradient(ellipse 55% 42% at 50% 80%, rgba(4, 10, 17, 0.8), transparent 72%), linear-gradient(180deg, rgba(5, 12, 20, 0.3) 0%, rgba(5, 12, 20, 0) 28%, rgba(5, 12, 20, 0.2) 52%, rgba(5, 12, 20, 0.92) 86%, var(--navy-950) 100%); }
.hero-content { max-width: 1000px; padding: 0 var(--gutter) clamp(48px, 8vh, 88px); }
.hero-emblem { width: clamp(112px, 13vw, 168px); margin: 0 auto 14px; filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.65)); }
.title { margin: 0; font-size: clamp(2.5rem, 7vw, 5.2rem); letter-spacing: 0.06em; text-transform: uppercase; color: var(--gold-400); filter: drop-shadow(0 3px 0 rgba(40, 24, 6, 0.9)) drop-shadow(0 10px 30px rgba(0, 0, 0, 0.6)); }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .title { background: linear-gradient(180deg, #fff3cf 0%, #f0cf7a 45%, #c48a2c 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
}
.hero-subtitle { margin: 0.15em 0 0; font: italic 600 clamp(1.15rem, 2.4vw, 1.5rem)/1.3 var(--serif); color: var(--gold-300); letter-spacing: 0.04em; }
.hero-lead { max-width: 640px; margin: 18px auto 28px; font-size: clamp(1.02rem, 1.6vw, 1.2rem); color: #e0e8eb; text-shadow: 0 1px 12px rgba(0, 0, 0, 0.85); }
.hero .eyebrow { color: var(--teal-300); text-shadow: 0 1px 8px rgba(0, 0, 0, 0.9); }

/* Sections */
.section { position: relative; padding: clamp(56px, 9vw, 112px) 0; }
.section-tight { padding-top: clamp(40px, 6vw, 72px); }
.section-head { max-width: 740px; margin: 0 auto clamp(32px, 5vw, 56px); text-align: center; }
.section-head .lead { margin-bottom: 0; }

.pitch { background: radial-gradient(ellipse 70% 60% at 50% 0%, rgba(43, 138, 140, 0.16), transparent 70%), var(--navy-950); }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin: 0; padding: 0; list-style: none; }
.feature h3 { margin-bottom: 0.4em; }
.feature p { margin: 0; color: var(--muted); }
.feature-mark { display: grid; place-items: center; width: 44px; height: 44px; margin: 4px 0 22px 4px; border: 1px solid var(--gold-500); background: rgba(217, 164, 65, 0.08); transform: rotate(45deg); }
.feature-mark span { transform: rotate(-45deg); font: 700 0.95rem/1 var(--serif); color: var(--gold-400); }

.lore { overflow: hidden; background: linear-gradient(180deg, var(--navy-950), #071a26 40%, #06131d); }
.lore::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(200deg, rgba(232, 191, 99, 0.1) 0%, transparent 32%), radial-gradient(ellipse 50% 40% at 15% 30%, rgba(43, 138, 140, 0.12), transparent 70%); }
.lore-grid { position: relative; display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
.lore-art { position: sticky; top: 96px; margin: 0; }
.lore-image { border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 0 0 5px rgba(0, 0, 0, 0.6), 0 24px 60px rgba(0, 0, 0, 0.5); }
.lore-art figcaption { margin-top: 14px; font: italic 0.9rem/1.5 var(--serif); color: var(--muted); }
.timeline { margin: 32px 0; padding: 0; list-style: none; border-left: 1px solid var(--line); }
.timeline li { position: relative; padding: 0 0 24px 28px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 0.5em; width: 11px; height: 11px; background: var(--gold-500); transform: rotate(45deg); box-shadow: 0 0 0 3px #071a26; }
.timeline p { margin: 0; color: #d3dde1; }
.year { display: block; margin-bottom: 4px; font: 700 1.35rem/1.2 var(--serif); color: var(--gold-400); }
.legend-quote { margin: 0 0 28px; padding: 18px 22px; border-left: 3px solid var(--teal-500); background: rgba(15, 74, 85, 0.25); font: italic 1.15rem/1.6 var(--serif); color: #dbe7e7; }
.legend-quote p { margin: 0; }
.lore-close { font: 1.2rem/1.6 var(--serif); color: var(--text); }

.cta { background: linear-gradient(180deg, #06131d, var(--navy-950)); }
.cta-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.cta-card { display: flex; gap: 22px; align-items: flex-start; }
.cta-image { flex: 0 0 auto; width: 88px; height: 88px; }
.cta-card p { color: var(--muted); }
.cta-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 14px; }

/* Inner pages */
.page-hero { position: relative; isolation: isolate; overflow: hidden; padding: clamp(64px, 11vw, 132px) 0 clamp(40px, 6vw, 64px); }
.page-hero .hero-art { object-position: 50% 25%; }
.page-hero .hero-media::after { background: linear-gradient(180deg, rgba(5, 12, 20, 0.55), rgba(5, 12, 20, 0.82) 62%, var(--navy-950)); }
.page-hero h1 { font-size: clamp(2.2rem, 5.5vw, 3.8rem); }
.page-hero .lead { max-width: 640px; margin: 0; text-shadow: 0 1px 10px rgba(0, 0, 0, 0.8); }

.download-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: start; }
.download-head { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.download-head h2 { margin: 0 0 4px; font-size: clamp(1.4rem, 3vw, 1.8rem); }
.download-emblem { flex: 0 0 auto; width: 72px; height: 72px; }
.meta { margin: 0; color: var(--muted); font-size: 0.95rem; }
.download-card .note { margin: 16px 0 0; }
.download-info h2 { font-size: 1.5rem; }
.download-info h2 + ul, .download-info h2 + ol { margin-bottom: 32px; }
.checklist, .steps { margin: 0; padding: 0; list-style: none; }
.checklist li { position: relative; padding: 6px 0 6px 28px; border-bottom: 1px solid rgba(217, 164, 65, 0.15); }
.checklist li::before { content: ""; position: absolute; left: 4px; top: 0.95em; width: 8px; height: 8px; background: var(--gold-500); transform: rotate(45deg); }
.steps { counter-reset: step; }
.steps li { position: relative; counter-increment: step; padding: 8px 0 8px 48px; min-height: 44px; }
.steps li::before { content: counter(step); position: absolute; left: 0; top: 4px; display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--gold-500); border-radius: 50%; font: 700 1rem/1 var(--serif); color: var(--gold-400); }

.shop-grid { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.coin-image { width: min(280px, 70vw); margin: 0 auto; filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 40px rgba(232, 191, 99, 0.18)); }
.shop-card h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
.in-game-note { margin: 0 0 22px; padding: 12px 16px; border-left: 3px solid var(--teal-500); background: rgba(15, 74, 85, 0.25); color: #d6e3e4; }

.prose { max-width: 760px; }
.prose h2 { margin-top: 1.6em; font-size: 1.5rem; }
.prose ul { padding-left: 1.2em; }
.prose li { margin: 0.45em 0; color: #d3dde1; }
.draft-note { padding: 16px 20px; border-color: rgba(134, 203, 198, 0.55); }
.updated { margin-top: 2.2em; color: var(--muted); font-size: 0.9rem; }

.not-found { min-height: 72vh; display: flex; align-items: center; text-align: center; }
.not-found .page-hero-content { width: 100%; }
.not-found .hero-emblem { width: 120px; }
.not-found .lead { margin: 0 auto 1.2em; }
.h1-like { margin: 0.6em 0 0.3em; font: 700 clamp(1.6rem, 4vw, 2.4rem)/1.15 var(--serif); color: #f5ecd9; }

/* Footer */
.site-footer { padding: 36px 0 40px; border-top: 1px solid var(--line); background: var(--ink); color: var(--muted); font-size: 0.92rem; }
.footer-inner { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; }
.footer-brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font: 700 1rem/1 var(--serif); letter-spacing: 0.08em; text-transform: uppercase; }
.footer-emblem { width: 36px; height: 36px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.footer-nav a { color: var(--muted); text-decoration: none; }
.footer-nav a:hover { color: var(--gold-300); }
.footer-note { width: 100%; margin: 6px 0 0; font-size: 0.84rem; }

/* Tablets and phones: the painting sits above the hero text instead of behind it */
@media (max-width: 860px), (orientation: portrait) {
  .hero { display: block; min-height: 0; }
  .hero .hero-media { position: relative; z-index: 0; aspect-ratio: 16 / 10; }
  .hero .hero-art { object-position: 60% 50%; }
  .hero .hero-media::after { background: linear-gradient(180deg, rgba(5, 12, 20, 0) 55%, var(--navy-950) 100%); }
  .hero-content { position: relative; margin: -64px auto 0; padding-bottom: 56px; }
  .lore-grid { grid-template-columns: 1fr; }
  .lore-art { position: static; max-width: 340px; margin: 0 auto; }
  .download-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .shop-grid { grid-template-columns: 1fr; }
  .coin-image { width: 200px; }
}
@media (max-width: 640px) {
  body { font-size: 1rem; }
  .hero .hero-media { aspect-ratio: 4 / 3; }
  .header-inner { gap: 6px 16px; }
  .brand { font-size: 1rem; }
  .brand-emblem { width: 34px; height: 34px; }
  .site-nav { order: 3; width: 100%; justify-content: flex-start; gap: 4px 22px; padding-top: 4px; border-top: 1px solid rgba(217, 164, 65, 0.18); }
  .actions .btn { width: 100%; }
  .actions-start .btn { width: 100%; }
  .lore-image { aspect-ratio: 5 / 4; object-fit: cover; object-position: 50% 15%; }
  .cta-card { flex-direction: column; gap: 14px; }
  .cta-image { width: 72px; height: 72px; }
  .panel { padding: 22px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
