/* ==========================================================================
   vitus-core.css — Iron & Ink foundation shared by every Vitus page.

   Source of truth: the approved design handover in this repo (not published),
   docs/design-handover/01_VITUS_APPROVED/
   - Stage 09 design system: tokens, buttons, labels, focus, motion contract
   - Stage 08A: site header, one-row four-column Features menu, mobile groups,
     creator role bar, footer
   Page families add vitus-home.css (Stage 06 homepage) or vitus-pages.css
   (Stage 08 / 08A secondary and feature pages).
   ========================================================================== */

:root {
  color-scheme: dark;
  /* Stage 09 semantic tokens */
  --ink: #111215;
  --deep: #161719;
  --iron: #222326;
  --iron-high: #2d292b;
  --surface: #242426;
  --paper: #f0e6d5;
  --cream: #e9d7bd;
  --muted: #c1b3a0;
  --gold: #cba778;
  --gold-bright: #e6c99f;
  --oxblood: #82363d;
  --red: #ae5050;
  --line: rgba(214, 178, 127, .25);
  --focus: #f1ca8b;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --sans: "DM Sans", "Segoe UI", system-ui, Arial, sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --dur-meaningful: 820ms;
  --dur-reveal: 580ms;
  --dur-fast: 180ms;
  --max: 1380px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 112px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-width: 300px;
  background: var(--ink);
  color: var(--paper);
  font: 15px/1.64 var(--sans);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img, video, svg { max-width: 100%; }
img, video { display: block; height: auto; }
h1, h2, h3, h4, p, figure { margin: 0; }
h1, h2, h3, h4, .serif { font-family: var(--serif); font-weight: 500; }
em { color: var(--gold); font-style: italic; font-weight: 400; }
::selection { background: #9b584a; color: #fff; }
:where(a, button, input, select, summary, [tabindex]):focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 400;
  background: var(--paper); color: var(--ink); padding: 10px 14px; font-weight: 700;
}
.skip-link:focus { top: 12px; }

/* ---------- Layout helpers ---------- */
.container { width: min(var(--max), calc(100% - 64px)); margin: 0 auto; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 10px; font-weight: 800; letter-spacing: .24em; text-transform: uppercase; color: var(--gold);
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.micro { font-size: 10px; letter-spacing: .065em; }
.inline-link { color: var(--gold-bright); text-decoration: underline; text-underline-offset: 3px; }
.inline-link:hover { color: #fff; }

/* ---------- Buttons (Stage 09) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 20px;
  background: var(--oxblood); color: #fff3e3;
  border: 1px solid #d0a071; border-radius: 2px;
  font-size: 12px; font-weight: 800; letter-spacing: .025em; line-height: 1.3; text-align: center;
  box-shadow: 0 12px 30px #0005;
  transition: transform .22s, box-shadow .22s, background var(--dur-fast);
}
.btn:hover { background: #a2494c; transform: translateY(-2px); box-shadow: 0 16px 32px #0008; }
.btn.secondary { background: #1d1d20d9; border-color: #a48d70; color: #f1dfc3; }
.btn.secondary:hover { background: #343034; }
.btn.ghost { background: transparent; box-shadow: none; border-color: var(--line); color: #d2bea3; }
.btn.paper { background: #ead5ae; color: #2d2621; border-color: #cda66e; }
.btn.sm { min-height: 40px; padding: 9px 14px; }
.btn svg { width: 16px; height: 16px; }

/* ---------- Status labels (Stage 09: availability from the source inventory) ---------- */
.status {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 10px; border-radius: 30px; border: 1px solid #a37a4e; background: #352922;
  font-size: 10px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: #f4dcb3;
}
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status.available { color: #c7dcb8; border-color: #6f8a64; background: #263026; }
.status.building { color: #f1c88f; border-color: #a07a4b; background: #3a2e22; }
.status.planned { color: #c9c3d8; border-color: #6e6984; background: #26252e; }
.plan-tag {
  display: inline-block; padding: 4px 9px; border: 1px solid #947655; color: #e5c499;
  font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
}

/* ---------- Site header (Stage 08A) ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: #17181af2;
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  border-bottom: 1px solid #83634590;
  transition: background .3s, box-shadow .3s;
}
.nav-inner { width: min(1450px, calc(100% - 56px)); margin: auto; min-height: 100px; display: flex; align-items: center; gap: 18px; }
/* The logo images keep their own proportions: set one dimension only, never stretch them. */
.logo { display: inline-flex; align-items: center; gap: 13px; min-width: 228px; }
.logo-mark { flex: none; width: 68px; height: auto; aspect-ratio: 190 / 192; filter: drop-shadow(0 0 14px #e0a95d33); }
.logo-name { display: flex; flex-direction: column; align-items: flex-start; line-height: 1; }
.logo-name img { flex: none; display: block; height: 54px; width: auto; max-width: none; aspect-ratio: 329 / 120; }
.logo-name small { margin-top: 5px; color: #b3a18d; text-transform: uppercase; font-size: 8.5px; letter-spacing: .15em; white-space: nowrap; }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 7px; }
.navlink, .navbtn {
  display: inline-flex; gap: 5px; align-items: center;
  border: 0; background: transparent; color: #e8ddcd;
  font-size: 12px; font-weight: 700; padding: 13px 11px; transition: color .2s;
}
.navlink:hover, .navbtn:hover, .navlink[aria-current="page"], .navbtn[aria-expanded="true"] { color: #e3b47a; }
.navbtn svg { width: 10px; height: 10px; transition: transform .25s; }
.navbtn[aria-expanded="true"] svg { transform: rotate(180deg); }
.header-cta { padding: 12px 14px; min-height: 43px; box-shadow: none; white-space: nowrap; }
.hamburger {
  display: none; margin-left: auto;
  border: 1px solid #a88964; background: #262528; color: #eedfc9;
  width: 44px; height: 44px; font-size: 22px; line-height: 1;
}

/* Homepage: header sits over the cinematic hero until scrolled (Stage 06) */
.site-header.is-overlay { position: fixed; left: 0; right: 0; background: transparent; border-bottom-color: rgba(238, 211, 169, .14); -webkit-backdrop-filter: none; backdrop-filter: none; }
.site-header.is-overlay.is-scrolled, .site-header.is-overlay.menu-open { background: rgba(15, 15, 16, .94); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 12px 40px #0004; }

/* Features mega menu: ONE row, FOUR columns, one heading per column (Stage 08A) */
.mega {
  display: none; position: absolute; top: 100%; left: 0; right: 0;
  background: #1c1b1d; border-bottom: 1px solid #b58a59; box-shadow: 0 24px 45px #000b;
  max-height: calc(100vh - 100px); overflow: auto;
}
.mega.open { display: block; animation: menu-in .22s both; }
.mega-inner { width: min(1370px, calc(100% - 60px)); margin: auto; padding: 27px 0 15px; }
.mega-columns { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; }
.mega-column { min-width: 0; padding: 0 24px; border-right: 1px solid #65503f75; }
.mega-column:first-child { padding-left: 0; }
.mega-column:last-child { padding-right: 0; border-right: 0; }
.mega-column h2 { font: 800 10px var(--sans); letter-spacing: .16em; color: var(--gold); text-transform: uppercase; margin: 0 0 13px; }
.mega-link { display: block; padding: 9px 7px; margin: 0 -7px; border-radius: 3px; transition: background .2s; }
.mega-link:hover, .mega-link:focus-visible, .mega-link[aria-current="page"] { background: #393032; }
.mega-link strong { display: block; font: 500 15px var(--serif); color: #f0e2cf; }
.mega-link small { display: block; font-size: 10px; color: #ae9a85; margin-top: 4px; line-height: 1.45; }
.mega-aside { margin-top: 18px; padding: 17px 0 0; border-top: 1px solid #65503f; display: flex; align-items: center; justify-content: space-between; gap: 25px; }
.mega-aside h2 { font-size: 19px; line-height: 1.2; margin: 0 0 3px; }
.mega-aside p { font-size: 11px; line-height: 1.5; color: #c9b6a2; }
.mega-aside .btn { flex: 0 0 auto; min-height: 39px; padding: 8px 16px; }

/* Mobile drawer: four independently expandable groups (Stage 08A) */
.mobile-drawer {
  display: none; position: absolute; top: 100%; left: 0; right: 0;
  background: #1b1a1c; border-bottom: 1px solid #ab8255; padding: 12px 20px 23px;
  max-height: calc(100svh - 70px); overflow: auto; box-shadow: 0 20px 40px #000a;
}
.mobile-drawer.open { display: block; }
.mobile-drawer > a { display: block; padding: 13px 4px; color: #efdfc9; border-bottom: 1px solid #463c35; font-size: 14px; }
.mobile-drawer details { border-bottom: 1px solid #45382e; }
.mobile-drawer summary { padding: 13px 4px; color: #f2e1c8; font-size: 13px; font-weight: 700; cursor: pointer; letter-spacing: .08em; text-transform: uppercase; }
.mobile-drawer .mobile-links { padding: 4px 6px 14px; }
.mobile-drawer .mobile-links a { display: block; padding: 9px 10px; font-size: 14px; color: #d7bba0; }
.mobile-drawer .btn { width: 100%; margin-top: 16px; }

/* ---------- Creator role bar (Stage 08A) ---------- */
.rolebar { border-bottom: 1px solid #614b39; background: linear-gradient(115deg, #281f23, #30282a 45%, #272627); padding: 17px 0; }
.rolebar-inner { display: grid; grid-template-columns: 240px 1fr auto; align-items: center; gap: 21px; }
.rolebar .hint strong { display: block; color: #f1e2d0; font: 500 19px var(--serif); }
.rolebar .hint span { display: block; color: #c4ac95; font-size: 11px; margin-top: 2px; }
.role-list { display: flex; flex-wrap: wrap; gap: 7px; }
.rolebtn {
  background: #201f20; border: 1px solid #745c48; color: #ddc9b1;
  padding: 9px 13px; min-height: 40px; font-size: 11px; font-weight: 800;
  transition: background .2s, border-color .2s;
}
.rolebtn:hover { border-color: #cfab7b; }
.rolebtn[aria-pressed="true"] { background: #853b3e; border-color: #e0ac75; color: #fff5e5; box-shadow: inset 0 0 0 1px #ba7161; }
.share { background: none; border: 1px solid #806b59; color: #dec9ae; font-size: 11px; padding: 8px 12px; min-height: 40px; }
.share:hover { background: #373032; }

/* ---------- CTA band and footer (Stage 08A) ---------- */
.cta-band { padding: 72px 0; background: linear-gradient(120deg, #633337, #2e2427 65%); border-top: 1px solid #936946; text-align: center; }
.cta-band h2 { margin: 13px auto 23px; max-width: 760px; font-size: clamp(33px, 3.6vw, 56px); line-height: 1.06; letter-spacing: -.025em; }
.cta-band .actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.footer { background: #111315; padding: 62px 0 26px; border-top: 1px solid #544333; }
.footer-grid { display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 35px; }
.footer p { font-size: 12px; color: #a99580; max-width: 345px; margin-top: 16px; line-height: 1.7; }
.footer h2 { font: 800 10px var(--sans); text-transform: uppercase; letter-spacing: .15em; color: #dcb780; margin: 0 0 4px; }
.footer a:not(.logo) { display: block; margin: 11px 0; color: #d8c5ac; font-size: 12px; }
.footer a:not(.logo):hover { color: #f2d2a4; }
.footer-social { display: flex; gap: 8px; margin-top: 18px; }
.footer-social a { display: grid !important; place-items: center; width: 38px; height: 38px; margin: 0 !important; border: 1px solid #5a4838; border-radius: 50%; }
.footer-bottom { border-top: 1px solid #453c36; margin-top: 44px; padding-top: 20px; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; font-size: 11px; color: #9c8b79; }
.footer-bottom a { display: inline !important; margin: 0 0 0 14px !important; font-size: 11px !important; color: #b9a690 !important; }

/* ---------- Motion (Stage 05 / 09): soft rise, 580ms reveal, 820ms sequences ---------- */
.reveal { opacity: 0; transform: translateY(25px); transition: opacity var(--dur-reveal) var(--ease), transform var(--dur-reveal) var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }
@keyframes menu-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes crossfade { from { opacity: .25; transform: translateY(6px); filter: blur(2px); } to { opacity: 1; transform: none; filter: none; } }

/* ---------- Cookie consent banner and form placeholders (scripts/consent.js) ---------- */
.cookie-banner { position: fixed; left: 0; right: 0; bottom: 0; z-index: 500; background: #18171a; border-top: 1px solid #8c6d4b; box-shadow: 0 -12px 40px #0007; }
.cookie-banner[hidden] { display: none; }
.cookie-banner__inner { width: min(1100px, calc(100% - 40px)); margin: auto; padding: 18px 0; display: flex; gap: 24px; align-items: center; justify-content: space-between; }
.cookie-banner__text { font-size: 13px; color: #e2d3c0; margin: 0; }
.cookie-banner__text a { color: var(--gold-bright); text-decoration: underline; }
.cookie-banner__actions { display: flex; gap: 10px; flex: 0 0 auto; }
.consent-btn { min-height: 44px; padding: 10px 18px; border: 1px solid #d0a071; background: #ead5ae; color: #241d19; font-weight: 800; font-size: 12px; }
.consent-btn[data-consent-choice="reject"] { background: #f0e6d5; }
.consent-placeholder { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; padding: 16px 18px; border: 1px dashed #8c7055; background: #1f1d1f; }
.consent-placeholder p { flex: 1 1 240px; margin: 0; font-size: 13px; color: #d6c4ad; }

/* ---------- Responsive (Stage 08A breakpoints) ---------- */
@media (max-width: 1230px) {
  .nav-inner { gap: 12px; }
  .logo { min-width: 0; }
  .logo-mark { width: 56px; }
  .logo-name img { height: 42px; }
  .site-nav { gap: 1px; }
  .navlink, .navbtn { font-size: 11px; padding: 10px 6px; }
}
@media (min-width: 991px) and (max-width: 1130px) {
  .mega-inner { width: calc(100% - 36px); }
  .mega-column { padding: 0 13px; }
  .mega-link strong { font-size: 13px; }
  .mega-link small { font-size: 9px; }
}
@media (max-width: 990px) {
  .site-nav, .header-cta { display: none; }
  .hamburger { display: block; }
  .mega { display: none !important; }
  .rolebar-inner { grid-template-columns: 1fr; }
  .rolebar .hint { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .container { width: calc(100% - 34px); }
  .nav-inner { min-height: 78px; width: calc(100% - 34px); }
  .logo { min-width: 0; gap: 10px; }
  .logo-mark { width: 48px; }
  .logo-name img { height: 36px; }
  .logo-name small { font-size: 7px; letter-spacing: .13em; }
  .rolebar { padding: 14px 0; }
  .role-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rolebtn { font-size: 11px; padding: 8px 5px; min-height: 44px; }
  .share { justify-self: start; }
  .rolebar .hint strong { font-size: 16px; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
  .footer-bottom { display: block; }
  .footer-bottom a { margin: 8px 14px 0 0 !important; }
  .cta-band { padding: 55px 0; }
  .cookie-banner__inner { flex-direction: column; align-items: stretch; gap: 14px; }
  .cookie-banner__actions .consent-btn { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
body.motion-off .reveal { opacity: 1; transform: none; transition: none; }

/* "Who it's for" menu: three destinations in one compact row */
.mega--small .mega-inner { width: min(980px, calc(100% - 60px)); padding: 20px 0 22px; }
.mega-columns--three { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.mega-columns--three .mega-link { margin: 0; padding: 14px 16px; border: 1px solid #5e4b3b; }

/* Accessibility: inline legal links are underlined, so they never rely on colour alone */
.footer-bottom a { text-decoration: underline; text-underline-offset: 3px; }
