/* Melodic Escape marketing site (Home, About, Contact).
   Spec: design_handoff_melodic_escape_quest/README_SITE.md. Deep-sea palette, not the Quest's near-black. */

:root {
  /* One font across the site pages (Inknut Antiqua 400/500/600). */
  --font-serif: 'Inknut Antiqua', serif;

  --bg: #0b1c29;
  --bg-alt: #102a3c;
  --card: #143349;
  --purple: #2e2c5c;
  --purple-eyebrow: #c4c2f0;

  --text: #f4f8f9;
  --text-body: #c9d3d7;
  --text-muted: #93a3aa;
  --quote: #e7edef;
  --accent: #86c4cf;
  --accent-hover: #b6e2e9;
  --error: #f0b3a8;

  --btn: #3c92b9;
  --btn-hover: #4fa6cd;
  --btn-text: #04171f;

  --line: rgba(134,196,207,0.18);
  --line-soft: rgba(134,196,207,0.14);
  --line-strong: rgba(134,196,207,0.4);

  --content: 1180px;
  --side: clamp(16px, 4vw, 40px);
  --section-y: clamp(56px, 8vw, 110px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 80px; }
html, body { margin: 0; background: var(--bg); }
body {
  font-family: var(--font-serif); color: var(--text); background: var(--bg);
  min-height: 100vh; display: flex; flex-direction: column;
  -webkit-text-size-adjust: 100%;
}
main { flex: 1; }
img { max-width: 100%; }
a { color: var(--accent); }
a:hover { color: var(--accent-hover); }
[hidden] { display: none !important; }
/* Form controls don't inherit the page font by default */
button, input, textarea, select { font-family: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
input::placeholder, textarea::placeholder { color: #6c7c84; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 50; padding: 10px 16px; border-radius: 3px;
  background: var(--btn); color: var(--btn-text); font-family: inherit; font-size: 14px; text-decoration: none;
}
.skip-link:focus { top: 12px; color: var(--btn-text); }

/* ---------- Shared bits ---------- */
.wrap { max-width: var(--content); margin: 0 auto; }
.section { padding: var(--section-y) var(--side); }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.eyebrow {
  font-size: 15px; font-weight: 500; letter-spacing: 0.03em; color: var(--accent);
}
.on-purple .eyebrow { color: var(--purple-eyebrow); }
.body-text { margin: 0; font-size: 17px; line-height: 1.9; color: var(--text-body); text-wrap: pretty; }
.grid-2 {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: clamp(32px, 5vw, 72px); align-items: center;
}
.stack { display: flex; flex-direction: column; }
/* height:auto lets aspect-ratio win over the width/height attributes (which are only there to reserve space) */
.photo { display: block; height: auto; border-radius: 4px; border: 1px solid rgba(134,196,207,0.25); object-fit: cover; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 26px;
  border-radius: 3px; font-family: inherit; font-size: 15px; letter-spacing: 0.04em;
  text-decoration: none; cursor: pointer; transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.btn-primary { background: var(--btn); color: var(--btn-text); border: none; font-weight: 500; }
.btn-primary:hover { background: var(--btn-hover); color: var(--btn-text); }
.btn-primary[disabled] { opacity: 0.7; cursor: progress; }
.btn-ghost { background: rgba(9,12,15,0.6); border: 1px solid rgba(134,196,207,0.5); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--text); }
.btn-outline {
  background: transparent; color: var(--accent); border: 1px solid var(--line-strong);
  font-size: 13px; letter-spacing: 0.02em; min-height: 44px; padding: 0 16px;
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent-hover); }

/* Form fields */
.field { display: flex; flex-direction: column; gap: 6px; }
.field-label {
  font-size: 12px; letter-spacing: 0.02em; color: var(--text-muted);
}
.input {
  font-family: inherit; font-size: 15px; min-height: 48px; padding: 0 14px; width: 100%;
  background: var(--card); color: var(--text); border: 1px solid var(--line-strong); border-radius: 3px; outline: none;
  transition: border-color 0.2s;
}
.input:focus { border-color: var(--accent); }
textarea.input { padding: 12px 14px; min-height: 150px; resize: vertical; line-height: 1.6; }
.form-status { margin: 0; font-size: 16px; line-height: 1.7; color: var(--accent); }
.form-error { margin: 0; font-size: 15px; line-height: 1.7; color: var(--error); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20; background: rgba(11,28,41,0.9);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.hdr {
  max-width: var(--content); margin: 0 auto; padding: 10px clamp(16px, 3vw, 32px); min-height: 76px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}
.hdr-logo { display: flex; align-items: center; flex: none; }
.hdr-logo img { height: clamp(42px, 5vw, 54px); width: auto; display: block; max-width: 60vw; object-fit: contain; }
.hdr-nav { display: flex; align-items: center; gap: 28px; flex: 1; justify-content: flex-end; }
.nav-link {
  font-size: 13px; letter-spacing: 0.02em;
  color: var(--text-body); text-decoration: none; padding: 12px 0;
}
.nav-link:hover { color: var(--text); }
.nav-link[aria-current="page"] { color: var(--text); box-shadow: inset 0 -1px 0 var(--accent); }
.hdr-nav .btn { min-height: 44px; padding: 0 20px; font-size: 14px; }
.hdr-menu-btn {
  display: none; font-family: inherit; font-size: 13px; letter-spacing: 0.02em;
  background: transparent; color: var(--text); border: 1px solid var(--line-strong); border-radius: 3px;
  min-height: 44px; padding: 0 16px; cursor: pointer;
}
.hdr-mnav { display: none; flex-direction: column; gap: 4px; padding: 8px 16px 20px; border-top: 1px solid var(--line); }
.hdr-mnav .nav-link { font-size: 15px; color: var(--text); padding: 14px 0; }
.hdr-mnav .nav-link[aria-current="page"] { box-shadow: none; color: var(--accent); }
.hdr-mnav .btn { min-height: 48px; margin-top: 8px; }

/* Games menu (desktop): button + 310px panel. On a game page "Games" gets the active
   underline and the current item a tinted background + aria-current. */
.nav-games { position: relative; }
.nav-games-btn {
  display: flex; align-items: center; gap: 6px; background: none; border: 0; cursor: pointer;
  font-family: inherit; min-height: 44px; box-sizing: border-box;
}
.nav-games-btn .caret { font-size: 10px; transition: transform 0.15s; }
.nav-games.is-open .caret { transform: rotate(180deg); }
.nav-games-btn.is-current, .nav-games.is-open .nav-games-btn { color: var(--text); }
.nav-games-btn.is-current { box-shadow: inset 0 -1px 0 var(--accent); }
.games-panel {
  position: absolute; z-index: 30; top: calc(100% + 10px); left: -18px; width: 310px; box-sizing: border-box;
  background: var(--bg-alt); border: 1px solid rgba(134,196,207,0.3); border-radius: 6px; padding: 8px;
  display: flex; flex-direction: column; gap: 2px; box-shadow: 0 24px 50px rgba(0,0,0,0.45);
}
.games-panel[hidden] { display: none; }
.games-item {
  display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 4px; text-decoration: none;
}
.games-item:hover, .games-item:focus-visible, .games-item[aria-current="page"] { background: rgba(134,196,207,0.14); }
.games-name { font-size: 15px; font-weight: 500; color: var(--text); }
.games-desc { font-size: 12px; color: var(--text-muted); }
/* Mobile menu: "Games" label, then the three games indented with a left rule. */
.mnav-games { display: flex; flex-direction: column; }
.mnav-label { font-size: 13px; letter-spacing: 0.02em; color: var(--text-muted); padding: 12px 0 4px; }
.hdr-mnav .mnav-game { padding: 12px 0 12px 16px; border-left: 1px solid rgba(134,196,207,0.3); }

/* "New artwork coming soon" pill: one component (data-art-soon), switched off everywhere by
   SITE_CONFIG.SHOW_ARTWORK_COMING_SOON. Sits in a position: relative wrapper. */
.art-soon {
  position: absolute; z-index: 2; display: inline-flex; align-items: center;
  font-size: 13px; font-weight: 500; letter-spacing: 0.02em; line-height: 1.4; color: #0b1c29;
  background: var(--purple-eyebrow); padding: 6px 14px; border-radius: 20px; box-shadow: 0 6px 16px rgba(0,0,0,0.35);
  pointer-events: none; white-space: nowrap;
}
.art-soon--br { right: 12px; bottom: 12px; }
.art-soon--tl { top: 14px; left: 14px; }
.art-soon--tl0 { top: 0; left: 0; }

@media (max-width: 767.98px) {
  .hdr-nav { display: none; }
  .hdr-menu-btn { display: inline-flex; align-items: center; }
  .hdr-mnav.is-open { display: flex; }
}

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: clamp(48px, 6vw, 72px) var(--side) 28px; }
.ftr { max-width: var(--content); margin: 0 auto; display: flex; flex-direction: column; gap: 48px; }
.ftr-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 40px; }
.ftr-col { display: flex; flex-direction: column; gap: 14px; }
.ftr-col:first-child { gap: 18px; }
.ftr-logo img { width: 96px; height: auto; display: block; filter: invert(1); }
.ftr-nav { display: flex; flex-wrap: wrap; gap: 0 24px; max-width: 360px; } /* games, then About / Contact */
.ftr-nav .nav-link { padding: 10px 0; }
.ftr-title { font-size: 17px; font-weight: 500; }
.socials { display: flex; gap: 10px; }
.social {
  width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 50%;
  border: 1px solid rgba(134,196,207,0.35); color: var(--quote); transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.social:hover { color: var(--bg); background: var(--accent); border-color: var(--accent); }
.social .yt-play { fill: var(--bg); }
.social:hover .yt-play { fill: var(--accent); }
/* Signup form (shared component: Home "Get notified" card + footer) */
.signup { display: flex; flex-direction: column; gap: 14px; }
.signup-fields { display: flex; flex-wrap: wrap; gap: 12px; }
.signup-fields .field { flex: 1 1 200px; min-width: 0; }
.signup-row { display: flex; gap: 8px; }
.signup-row .input { flex: 1; min-width: 0; }
.signup--card .signup-email { flex-basis: 240px; }
.signup--card > .btn { align-self: flex-start; }
.signup--footer { gap: 12px; }
.signup--footer .signup-fields { flex-direction: column; }
.signup--footer .signup-fields .field { flex: none; }
.signup--footer .input { min-height: 46px; padding: 0 12px; }
.signup--footer .signup-row .btn { flex: none; min-height: 46px; padding: 0 18px; font-size: 14px; }
.field-error { margin: 2px 0 0; font-size: 14px; line-height: 1.6; color: var(--error); }
.input[aria-invalid="true"] { border-color: var(--error); }
.consent { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.consent input { width: 18px; height: 18px; margin: 3px 0 0; accent-color: var(--btn); flex: none; }
.consent input[aria-invalid="true"] { outline: 2px solid var(--error); outline-offset: 2px; }
.consent span { font-size: 14px; line-height: 1.6; color: var(--text-body); }
.honey { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status:focus { outline: none; }
.site-footer .form-status { font-size: 15px; }

/* Analytics cookie banner (only shown when GA4 is configured) */
.consent-banner {
  position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 40; max-width: 640px; margin: 0 auto;
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding: 16px 18px;
  background: var(--card); border: 1px solid var(--line-strong); border-radius: 6px; box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}
.consent-banner p { margin: 0; flex: 1 1 280px; font-size: 14px; line-height: 1.7; color: var(--text-body); }
.consent-actions { display: flex; gap: 10px; }
.consent-actions .btn { min-height: 44px; padding: 0 20px; font-size: 14px; }
.cookie-settings {
  background: none; border: none; padding: 0; cursor: pointer; color: var(--text-muted);
  font-size: 12px; text-decoration: underline;
}
.cookie-settings:hover { color: var(--text-body); }
.ftr-legal {
  display: flex; flex-wrap: wrap; gap: 8px 18px; justify-content: center;
  font-size: 12px; color: var(--text-muted);
  padding-top: 22px; border-top: 1px solid rgba(134,196,207,0.12);
}
.ftr-legal a { color: var(--text-muted); }
.ftr-legal a:hover { color: var(--text-body); }

/* ---------- Legal pages (/privacy-policy, /terms) ---------- */
.legal-intro {
  background: var(--purple);
  padding: clamp(56px, 8vw, 100px) var(--side) clamp(40px, 6vw, 64px);
}
.legal-col { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; }
.legal-intro .legal-col { gap: 16px; }
.legal-intro h1 { margin: 0; font-weight: 600; font-size: clamp(32px, 4.6vw, 50px); line-height: 1.25; }
.legal-lede { margin: 0; font-size: clamp(17px, 1.9vw, 19px); line-height: 1.85; color: var(--quote); text-wrap: pretty; }
.legal-body { padding: clamp(40px, 6vw, 72px) var(--side) clamp(64px, 9vw, 110px); }
.legal-body .legal-col { gap: 32px; }
.legal-sec { display: flex; flex-direction: column; gap: 14px; padding-top: 32px; border-top: 1px solid var(--line); }
.legal-sec h2 { margin: 0; font-weight: 600; font-size: clamp(20px, 2.4vw, 24px); line-height: 1.4; color: var(--text); }
.legal-sec p { margin: 0; font-size: 17px; line-height: 1.9; color: var(--text-body); text-wrap: pretty; }
.legal-sec ul { margin: 0; padding-left: 1.3em; display: flex; flex-direction: column; gap: 8px; }
.legal-sec li { font-size: 17px; line-height: 1.8; color: var(--text-body); text-wrap: pretty; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
