/* Grog & Glory teaser: the game's sea chart and map-legend look (Artwork/Main menu/SPEC.md),
   light and "lantern light" dark. Grenze Gotisch for display and Alegreya Sans for text, the same
   OFL fonts the app ships, served from here, so the page makes no third-party requests. */

@font-face { font-family: "Grenze Gotisch"; src: url("../fonts/GrenzeGotisch-Medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Alegreya Sans"; src: url("../fonts/AlegreyaSans-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Alegreya Sans"; src: url("../fonts/AlegreyaSans-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --bg: #e9dcb9; --panel: #dfd0a8; --card: #f3e6c2; --ink: #4a321f; --soft: #6b5640; --red: #8b2a1a;
  --rum: #b33826; --pale: #f7ebc9; --hatch: rgba(61, 56, 54, .05); --shadow: rgba(30, 18, 8, .45);
  --chart-filter: none;
  --display: "Grenze Gotisch", "Iowan Old Style", Georgia, serif;
  --body: "Alegreya Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
/* Lantern light: follows the device unless the header toggle chose (data-theme). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1c1610; --panel: #241c14; --card: #2e241a; --ink: #eedfbd; --soft: #bba98a; --red: #e5806b;
    --hatch: rgba(238, 223, 189, .04); --shadow: rgba(0, 0, 0, .6);
    --chart-filter: brightness(.46) saturate(.8) sepia(.18); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #1c1610; --panel: #241c14; --card: #2e241a; --ink: #eedfbd; --soft: #bba98a; --red: #e5806b;
  --hatch: rgba(238, 223, 189, .04); --shadow: rgba(0, 0, 0, .6);
  --chart-filter: brightness(.46) saturate(.8) sepia(.18); color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 18px/1.55 var(--body); }
a { color: var(--red); }
.wrap { max-width: 1120px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left, 0px)); padding-right: max(20px, env(safe-area-inset-right, 0px)); }
h1, h2, h3 { font-family: var(--display); font-weight: 500; line-height: 1.05; margin: 0; text-wrap: balance; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Map-legend panel: hatched parchment, ink border and an inner rule (a double rule). */
.legend { position: relative; background: repeating-linear-gradient(45deg, var(--hatch) 0 1px, transparent 1px 7px), var(--card); border: 1.5px solid var(--ink); border-radius: 2px; box-shadow: 0 6px 12px var(--shadow); }
.legend::before { content: ""; position: absolute; inset: 5px; border: 1px solid color-mix(in srgb, var(--ink) 75%, transparent); pointer-events: none; }

/* Top bar */
.top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1.5px solid var(--ink); }
.top .wrap { display: flex; align-items: center; gap: 18px; padding-block: 10px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: var(--display); font-weight: 500; font-size: 1.6rem; white-space: nowrap; }
.brand img { width: 36px; height: 36px; border-radius: 9px; }
.top nav { display: flex; gap: 22px; margin-left: auto; font-weight: 700; }
.top nav a { color: var(--soft); text-decoration: none; }
.top nav a:hover { color: var(--ink); }
.theme { all: unset; box-sizing: border-box; cursor: pointer; width: 38px; height: 38px; border-radius: 2px; display: grid; place-items: center; color: var(--ink); background: var(--card); box-shadow: inset 0 0 0 1.5px var(--ink); flex: none; }
.theme:hover { color: var(--red); }
.theme:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
.theme svg { width: 20px; height: 20px; }
.theme .sun { display: none; }
:root[data-theme="dark"] .theme .sun { display: block; }
:root[data-theme="dark"] .theme .moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme .sun { display: block; }
  :root:not([data-theme="light"]) .theme .moon { display: none; }
}
@media (max-width: 760px) { .top nav { display: none; } .top .theme { margin-left: auto; } }

/* Hero: the game's sea chart, the title lockup and a phone showing the main menu */
.hero { position: relative; overflow: hidden; isolation: isolate; border-bottom: 1.5px solid var(--ink); }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: #8fb2ae url("../../images/chart-wide.jpg") 0% 50% / cover no-repeat; filter: var(--chart-filter); }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(70% 50% at 50% 0%, rgba(255, 196, 120, .16), transparent 70%); }
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; column-gap: 56px; align-items: center; padding-block: 40px 64px; }
.title { margin: 0; }
.title svg { display: block; width: 100%; max-width: 520px; height: auto; overflow: visible; }
.title text { font-family: var(--display); font-weight: 500; }
.sub { margin: 4px 0 18px 6%; display: table; padding: 4px 12px; font-family: var(--display); font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.1; color: var(--ink); background: color-mix(in srgb, var(--card) 88%, transparent); border-radius: 2px; }
.soon { display: inline-block; margin: 6px 0 0 6%; padding: 10px 22px 8px; font-family: var(--display); font-size: 1.9rem; line-height: 1; color: var(--red); transform: rotate(-3deg); }
.pitch { margin-top: 26px; padding: 22px 26px 24px; max-width: 34em; }
.pitch p { margin: 0; font-size: 1.15rem; }
.pitch p + p { margin-top: 12px; color: var(--soft); font-weight: 700; font-size: 1rem; }
.phone { justify-self: center; width: 100%; max-width: 300px; margin: 0; }
.phone img { display: block; width: 100%; height: auto; border: 10px solid #22170d; border-radius: 46px; box-shadow: 0 0 0 1.5px #000, 0 26px 60px -20px rgba(20, 12, 4, .7); background: #8fb2ae; }
.phone figcaption { margin-top: 12px; text-align: center; font-weight: 700; font-size: .95rem; }
.phone figcaption span { background: var(--card); padding: 3px 10px; border: 1px solid var(--ink); border-radius: 2px; }
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; row-gap: 36px; padding-block: 24px 48px; }
  .phone { max-width: 250px; }
}

/* Sections */
section.band { padding-block: 72px; }
section.alt { background: var(--panel); }
.head { max-width: 40em; margin-bottom: 36px; }
.head h2 { font-size: clamp(2.2rem, 4.6vw, 3.2rem); }
.head p { color: var(--soft); font-size: 1.15rem; margin: 12px 0 0; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
@media (max-width: 860px) { .grid3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .grid3 { grid-template-columns: 1fr; } }
.card { padding: 24px 26px 26px; min-width: 0; }
.card svg { display: block; width: 44px; height: 44px; color: var(--ink); }
.card h3 { font-size: 1.75rem; margin: 14px 0 6px; }
.card p { margin: 0; color: var(--soft); }
.card .red { color: var(--red); }

.sail { display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center; padding: 34px 38px; }
.sail h2 { font-size: clamp(2.2rem, 4.6vw, 3.2rem); color: var(--red); }
.sail p { margin: 10px 0 0; color: var(--soft); font-size: 1.12rem; max-width: 34em; }
.sail img { width: 120px; height: 120px; border-radius: 26px; box-shadow: 0 6px 14px var(--shadow); }
.social { display: inline-flex; align-items: center; gap: 6px; }
.social svg { width: 1.05em; height: 1.05em; color: #1185fe; flex: none; }
@media (max-width: 600px) { .sail { grid-template-columns: 1fr; padding: 28px 26px; } .sail img { width: 88px; height: 88px; border-radius: 20px; grid-row: 1; } }

/* Footer */
footer { padding-block: 56px; border-top: 1.5px solid var(--ink); }
footer .wrap { display: grid; grid-template-columns: 2fr 1fr; gap: 32px; }
footer h3 { font-size: 1.6rem; margin-bottom: 6px; }
footer p { margin: 0; color: var(--soft); }
footer .links { display: flex; flex-wrap: wrap; gap: 8px 20px; grid-column: 1 / -1; font-size: .95rem; color: var(--soft); }
footer .links a { color: var(--soft); }
@media (max-width: 700px) { footer .wrap { grid-template-columns: 1fr; } }
