/* Site-level pieces (the generated site, SITE_PLAN phase 4): header menu, sections, galleries, the preview edition bar.
   Tokens only, like components.css. */
.skip { position: absolute; left: -999px; top: 8px; background: var(--color-accent); color: var(--color-accent-ink); padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* the preview's edition switch */
.edition-bar { background: #FFE27A; color: #2B1A00; font-size: var(--text-sm); }
.edition-bar .wrap { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); justify-content: space-between; padding-block: 6px; }
.edition-bar a { color: #2B1A00; font-weight: 800; margin-left: var(--space-3); }
.edition-bar a[aria-current] { text-decoration: none; background: #2B1A00; color: #FFE27A; padding: 1px 8px; border-radius: 99px; }

/* header: the nav collapses into a menu on phones */
.nav { align-items: center; }
.nav__cta { padding: .55em 1.1em; font-size: var(--text-sm); color: var(--color-accent-ink) !important; }
.menu-btn { display: none; margin-left: auto; width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--color-border); background: transparent; cursor: pointer; position: relative; }
.menu-btn span:first-child, .menu-btn span:first-child::before, .menu-btn span:first-child::after { position: absolute; left: 11px; width: 20px; height: 2px; background: var(--color-text); content: ""; border-radius: 2px; }
.menu-btn span:first-child { top: 21px; } .menu-btn span:first-child::before { top: -6px; left: 0; } .menu-btn span:first-child::after { top: 6px; left: 0; }
@media (max-width: 860px) {
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--color-bg-deep); border-bottom: 1px solid var(--color-border); padding: var(--space-2) var(--gutter) var(--space-4); }
  .nav.open { display: flex; }
  .nav a { padding: 12px 4px; min-height: 44px; border-bottom: 1px solid var(--color-border); }
  .nav__cta { margin-top: var(--space-3); justify-content: center; border-bottom: 0 !important; }
}
@media (min-width: 861px) { .nav { display: flex !important; } }

/* announcements bar and the beta testers block */
.announce { background: var(--color-bg-deep); border-bottom: 1px solid var(--color-border); padding-block: var(--space-3); }
.announce .wrap { display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-6); align-items: center; justify-content: space-between; }
.announce__lead { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }
.announce__title { font-weight: 800; color: var(--color-text); text-decoration: none; }
.announce__title:hover { color: var(--color-accent); }
.announce--duo .wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); align-items: start; gap: var(--space-4) var(--space-7); }
.announce__col { display: flex; flex-direction: column; gap: var(--space-2); }
.announce__more { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-4); font-size: var(--text-sm); }
.beta { padding-block: var(--space-6); background: color-mix(in srgb, var(--color-surface) 60%, transparent); border-bottom: 1px solid var(--color-border); }
.beta h2 { margin: var(--space-1) 0 var(--space-4); }
.beta__grid { display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fill, minmax(min(100%, 13rem), 1fr)); }
.beta__item { display: grid; gap: var(--space-1); padding: var(--space-4); border-radius: var(--radius-md); background: var(--color-surface);
  border: var(--border-width) solid var(--color-border); color: var(--color-text); text-decoration: none; font-size: var(--text-sm); }
.beta__item b { font-size: var(--text-md); color: var(--color-accent); }
.beta__item:hover { border-color: var(--color-accent); }

/* page parts */
.page-head { padding-block: var(--space-7) var(--space-5); }
.page-head p { max-width: 44rem; }
.features { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); } /* (five on one line on a desktop, USER 2026-10-11; they stack on a phone) */
.feature { background: var(--color-surface); border: var(--border-width) solid var(--color-border); border-radius: var(--radius-lg); padding: var(--space-5); }
.feature h3 { margin: 0 0 var(--space-2); font: 400 var(--text-xl)/1.1 var(--font-display); color: var(--color-accent); }
.feature p { margin: 0; color: var(--color-text-muted); }
.ph { display: grid; place-items: center; color: rgba(255, 255, 255, .55); font-weight: 800; letter-spacing: .1em; text-transform: uppercase; font-size: var(--text-xs); }
.card--cave .card__img.ph { aspect-ratio: 4 / 5; }
.locked { opacity: .55; filter: saturate(.2); }
.locked .card__img.ph { background: radial-gradient(60% 50% at 50% 40%, #1a2a5a, #030918); font: 400 3rem/1 var(--font-display); }
.cave { padding-block: var(--space-7); border-top: 1px solid var(--color-border); scroll-margin-top: 80px; }
.gallery { display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); margin-top: var(--space-4); }
.gallery img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--radius-md); }
.strip { display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fill, minmax(min(100%, 11rem), 1fr)); }
.strip figure { margin: 0; background: var(--color-surface); border-radius: var(--radius-md); overflow: hidden; border: var(--border-width) solid var(--color-border); }
.strip img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.strip figcaption { padding: var(--space-2) var(--space-3); font-size: var(--text-sm); font-weight: 800; }
.prose { max-width: 46rem; padding-bottom: var(--space-8); }
.prose h2 { font: 400 var(--text-2xl)/1.1 var(--font-display); margin: var(--space-7) 0 var(--space-3); color: var(--color-accent); }
.prose h3 { font: 400 var(--text-xl)/1.1 var(--font-display); margin: var(--space-5) 0 var(--space-2); }
.prose table { width: 100%; border-collapse: collapse; margin: var(--space-4) 0; font-size: var(--text-sm); }
.prose th, .prose td { text-align: left; padding: var(--space-2) var(--space-3); border-bottom: 1px solid var(--color-border); vertical-align: top; }
.prose blockquote { margin: var(--space-4) 0; padding: var(--space-3) var(--space-4); border-left: 4px solid var(--color-accent-2); background: var(--color-surface); border-radius: var(--radius-sm); }
.prose li { margin-block: 4px; }
/* THE SEA (USER 2026-10-12: "as you scroll down the blue fades to black then we see a picture of the caves"): a fixed
   layer behind every page (base.html). position: fixed, not background-attachment, so phones keep it pinned too.
   --sea-dark / --sea-depths (0-1) come from the scroll script in base.html. */
.sea { position: fixed; inset: 0; z-index: -1; pointer-events: none; background: var(--page-bg, var(--color-bg)); }
.sea__dark, .sea__depths { position: absolute; inset: 0; }
.sea__dark { background: #01030c; opacity: var(--sea-dark, 0); }
.sea__depths { opacity: var(--sea-depths, 0);
  background: linear-gradient(#01030c 0%, rgba(1, 3, 12, .35) 30%, rgba(1, 3, 12, .2) 100%),
    url("../library/web/z1c01__card_kelp_garden-1920.webp") center bottom / cover no-repeat; }
@media (max-width: 860px) {
  .sea__depths { background: linear-gradient(#01030c 0%, rgba(1, 3, 12, .35) 30%, rgba(1, 3, 12, .2) 100%),
    url("../library/web/z1c01__card_kelp_garden-1280.webp") center bottom / cover no-repeat; }
}
/* the footer lets the depths show through */
.site-footer { background: rgba(1, 3, 12, .72); }
/* (USER 2026-10-12: a link to "#opt-in" put the heading under the sticky banner) every in-page jump stops below the
   banner (65px tall on desktop and phones, measured 2026-10-12) */
html { scroll-padding-top: 88px; }
/* the donation box on How to play (PLACEHOLDER: no PayPal link yet, USER 2026-10-11) */
.donate { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); margin: var(--space-5) 0;
  padding: var(--space-4) var(--space-5); background: var(--color-surface); border: var(--border-width) solid var(--color-border); border-left: 4px solid var(--color-accent); border-radius: var(--radius-md); }
.donate p { margin: var(--space-1) 0 0; color: var(--color-text-muted); }
.donate__btn { opacity: .6; cursor: default; }
/* picture rows in Markdown pages ("[[pics: ...]]", build.py pics_md); "Screenshot coming" boxes for shots not taken yet */
.shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: var(--space-3); margin: var(--space-4) 0; }
.shots figure { margin: 0; background: var(--color-surface); border: var(--border-width) solid var(--color-border); border-radius: var(--radius-md); overflow: hidden; }
.shots img, .shots .shot__ph { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.shots .shot__ph { display: grid; background: radial-gradient(60% 60% at 30% 35%, #1d4fd055, transparent 70%), radial-gradient(50% 50% at 75% 70%, #22e5d833, transparent 70%), #04102e; }
.shots figcaption { padding: var(--space-2) var(--space-3); font-size: var(--text-sm); color: var(--color-text-muted); }
.post-date { color: var(--color-text-muted); font-weight: 700; }
.split { display: grid; gap: var(--space-6); grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.split img { width: 100%; border-radius: var(--radius-lg); aspect-ratio: 16 / 9; object-fit: cover; }
.hero__img.ph { background: radial-gradient(60% 60% at 70% 40%, #1d4fd0aa, transparent 70%), radial-gradient(50% 50% at 20% 80%, #22e5d855, transparent 70%), #04102e; }

/* forms (the beta sign-up) */
.form { display: grid; gap: var(--space-4); max-width: 30rem; }
.field { display: grid; gap: var(--space-2); border: 0; padding: 0; margin: 0; }
.field > span, .field legend { font-weight: 800; }
.field input:not([type=radio]) { font: inherit; padding: .75em .9em; min-height: 44px; border-radius: var(--radius-sm); border: var(--border-width) solid var(--color-border);
  background: var(--color-surface); color: var(--color-text); }
.field input:focus { outline: 3px solid var(--color-focus); outline-offset: 1px; }
.choice { display: flex; gap: var(--space-2); align-items: center; min-height: 36px; cursor: pointer; }
.choice input { width: 20px; height: 20px; accent-color: var(--color-accent); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__msg { min-height: 1.5em; font-weight: 800; margin: 0; }
.form__msg.ok { color: #6BF09A; } .form__msg.bad { color: #FF8A98; }
.callout ul { margin: var(--space-2) 0; padding-left: 1.2em; }

/* the beta warning (USER 2026-10-09: wipes, restarts, kicks, nightly builds, feedback essential) */
.beta-warn { background: #3A2600; color: #FFE6B3; border-bottom: 1px solid #FFB547; font-size: var(--text-sm); }
.beta-warn .wrap { padding-block: var(--space-2); }
.beta-warn b { color: #FFC266; }
.beta-warn a { color: #FFC266; font-weight: 800; margin-left: var(--space-2); }
.beta-warn-box { border-left-color: #FFB547; margin-bottom: var(--space-4); }
.beta-expect { margin-bottom: var(--space-4); }
.beta-expect h3 { margin: var(--space-3) 0 var(--space-1); }
.beta-expect h3:first-child { margin-top: 0; }
.ack { align-items: flex-start; background: var(--color-surface); border: var(--border-width) solid var(--color-border); border-radius: var(--radius-sm); padding: var(--space-3); }
.ack input { margin-top: 3px; flex: none; }
.field[hidden], [hidden] { display: none !important; }

/* known issues: the draft's review notes */
.ki-src { display: block; font-size: var(--text-xs); color: #FFC266; opacity: .85; margin-top: 2px; }
.ki-draft { border-left-color: #FFB547; background: #3A2600; color: #FFE6B3; margin-bottom: var(--space-5); }

/* THE SPLASH TITLE on the home hero (USER 2026-10-15): the game icon's wordmark: warm gold letters with a dark outline and
   a hard drop shadow, a glowing cyan tag line under it; the hook below drops to a tagline size */
.splash { margin: 0 0 var(--space-3); line-height: .92; display: flex; flex-direction: column; align-items: flex-start; }
.splash__name {
  font-family: var(--font-display); font-weight: 400; font-size: clamp(3rem, 10.5vw, 5.8rem); letter-spacing: .01em;
  background: linear-gradient(180deg, #fff3a8 0%, #ffd34d 38%, #ffab2e 70%, #ff7f1a 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-text-stroke: 3px #3a1804; paint-order: stroke fill;
  filter: drop-shadow(0 5px 0 #261003) drop-shadow(0 14px 26px rgba(0, 0, 0, .6));
}
.splash__tag {
  margin-top: .32em; font: 400 clamp(1.05rem, 3.4vw, 1.9rem)/1 var(--font-display); letter-spacing: .38em; padding-left: .06em;
  text-transform: uppercase; color: #8ff6ff;
  text-shadow: 0 0 10px rgba(70, 230, 255, .85), 0 0 26px rgba(70, 230, 255, .45), 0 2px 0 #052a33;
}
.hero__body .hero__hook { font-size: clamp(1.7rem, 4.6vw, 2.7rem); color: inherit; margin: var(--space-2) 0 0; }

/* THE PAGE TEMPLATE (USER 2026-10-16: "they should all have a style template, I shouldn't be manually spotting them"):
   every page but home = the hero header (parts.html page_hero: the home hero's picture, the title, a line, buttons),
   then .page-flow: glass boxes (.page-box) and call-to-action bands (.cta-band), one even gap between them.
   build.py's style check fails the build if a page breaks this. */
.hero--page { min-height: min(46vh, 380px); }
.page-flow { padding-block: var(--space-7); }
.page-flow > * { margin-block: 0 !important; }
.page-flow > * + * { margin-top: var(--space-7) !important; }
.page-box { text-align: left; padding: var(--space-6) var(--space-7); background: color-mix(in srgb, var(--color-surface) 55%, transparent);
  backdrop-filter: blur(6px); border: var(--border-width) solid var(--color-border); border-radius: var(--radius-lg); }
.page-box > h2:first-child, .page-box > .box-title { font: 400 var(--text-2xl)/1.1 var(--font-display); margin: 0 0 var(--space-3); color: var(--color-accent); }
.page-box h2 { font: 400 var(--text-2xl)/1.1 var(--font-display); color: var(--color-accent); }
.page-box h3 { font: 400 var(--text-xl)/1.1 var(--font-display); margin: var(--space-5) 0 var(--space-2); }
.page-box > :last-child { margin-bottom: 0; }
.page-box .callout { background: transparent; padding: 0; border: 0; }
.page-box ul, .page-box ol { padding-left: 1.2em; }
.page-box img { max-width: 100%; }
@media (max-width: 640px) { .page-box { padding: var(--space-5); } }

/* THE QR CODES (join page; USER 2026-10-16): white tiles so phones scan them from the screen */
.qr-row { display: flex; flex-wrap: wrap; gap: var(--space-6); margin-top: var(--space-4); }
.qr { display: grid; justify-items: center; gap: var(--space-2); text-decoration: none; color: var(--color-accent);
  font: 400 var(--text-xl)/1 var(--font-display); }
.qr svg { width: 180px; height: 180px; background: #fff; padding: 8px; border-radius: var(--radius-lg);
  border: 3px solid var(--color-accent); }
/* the game icon between the two codes (USER 2026-10-18: "community qr left, our image, game qr right"), the codes' size */
.qr-row { align-items: flex-start; }
.qr-icon img { display: block; width: 202px; height: 202px; border-radius: var(--radius-lg); }

/* THE RED NOTE (USER 2026-10-18, the website review A5 / B2: "make red"): a line that must be seen, in the theme's red */
.note-red, .page-box .note-red { color: var(--color-red); font-weight: 800; }

/* THE WHOLE GAME, PART BY PART (USER 2026-10-18, the website review D1: content/reefhunter/game_parts.json): the home
   page's blocks (a picture, two lines, a link) and the game page's sections (the same picture beside the detail) */
.parts-grid { display: grid; gap: var(--space-5); grid-template-columns: repeat(3, minmax(0, 1fr)); }  /* nine parts: 3 x 3 */
@media (max-width: 900px) { .parts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .parts-grid { grid-template-columns: 1fr; } }
.part-card .card__body { align-content: start; flex: 1; }
.part-card .card__title { font-size: var(--text-lg); }
.part-card__more { color: var(--color-accent); font-weight: 800; font-size: var(--text-sm); margin-top: auto; }
.part-sec { align-items: center; scroll-margin-top: 88px; }
.part-sec .part-sec__pic img { display: block; }
.part-sec .prose { padding-bottom: 0; }
.part-sec .prose p:first-child { margin-top: 0; }
.part-sec .part-sec__text > p:first-of-type { margin-top: var(--space-3); }
@media (min-width: 861px) { .part-sec--flip .part-sec__pic { order: 2; } }
