/* Magic Camelot Companion website. Built on the design-system tokens (tokens.css) and the bundled fonts. */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--night-900); color: var(--text-body);
  font-family: var(--font-body); font-size: var(--fs-body); line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--gold-400); text-decoration: none; transition: color var(--dur-fast) var(--ease-out); }
a:hover { color: var(--gold-200); }
:focus-visible { outline: 2px solid var(--gold-300); outline-offset: 3px; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--gold-400); color: var(--night-900); padding: 8px 14px; font-family: var(--font-ui); font-weight: 700; }
.skip:focus { top: 12px; color: var(--night-900); }

.wrap { width: 100%; max-width: var(--container-max); margin: 0 auto; padding: 0 var(--gutter); }
.icon { width: 1em; height: 1em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

/* Typography */
.eyebrow { font-family: var(--font-heading); font-size: 13px; font-weight: 600; letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--gold-400); margin: 0 0 12px; }
.display { font-family: var(--font-display); font-weight: 700; color: var(--text-strong); letter-spacing: var(--tracking-display); line-height: var(--lh-tight); margin: 0; text-wrap: balance; }
h2.display { font-size: clamp(30px, 4.4vw, var(--fs-display-l)); }
h3 { font-family: var(--font-heading); font-weight: 700; font-size: var(--fs-h3); letter-spacing: .03em; color: var(--text-strong); line-height: var(--lh-heading); margin: 0 0 6px; }
.lede { font-size: var(--fs-body-l); color: var(--text-muted); max-width: 62ch; margin: 16px 0 0; text-wrap: pretty; }
.center { text-align: center; }
.center .lede { margin-left: auto; margin-right: auto; }
.divider { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 18px auto 0; width: min(320px, 70%); }
.divider::before, .divider::after { content: ''; height: 1px; flex: 1; background: linear-gradient(90deg, transparent, var(--gold-600)); }
.divider::after { transform: scaleX(-1); }
.divider i { width: 9px; height: 9px; background: var(--gold-300); transform: rotate(45deg); box-shadow: var(--glow-gold); }

/* Buttons (design system: square, 2px gold) */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: var(--control-h-m); padding: 0 22px; border: 2px solid var(--gold-400); background: transparent; color: var(--gold-400);
  font-family: var(--font-display); font-weight: 700; font-size: 16px; letter-spacing: .02em; white-space: nowrap;
  transition: background var(--dur-base) var(--ease-out), color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
.btn:hover { background: var(--accent-soft); color: var(--gold-200); box-shadow: var(--glow-gold); }
.btn:active { transform: translateY(1px); }
.btn .icon { width: 19px; height: 19px; }
.btn-solid { background: var(--gold-400); color: var(--night-900); border-color: transparent; }
.btn-solid:hover { background: var(--gold-300); color: var(--night-900); box-shadow: var(--glow-gold-strong); }
.btn-l { height: var(--control-h-l); padding: 0 30px; font-size: 19px; }
.btn-s { height: 38px; padding: 0 16px; font-size: 14px; }
.btn-quiet { border-color: transparent; color: var(--text-body); font-family: var(--font-ui); font-weight: 500; font-size: 17px; }
.btn-quiet:hover { background: none; box-shadow: none; color: var(--gold-200); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(4,11,18,.78); backdrop-filter: var(--blur-overlay); -webkit-backdrop-filter: var(--blur-overlay); border-bottom: 1px solid var(--border-faint); }
.site-header .wrap { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--text-strong); margin-right: auto; min-width: 0; }
.brand:hover { color: var(--text-strong); }
.brand img { height: 42px; width: auto; filter: var(--glow-logo); }
.brand span { font-family: var(--font-heading); font-weight: 600; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; line-height: 1.15; }
.brand b { display: block; font-family: var(--font-display); font-weight: 700; font-size: 21px; letter-spacing: .02em; text-transform: none; color: var(--gold-300); }
.site-nav { display: flex; gap: 26px; font-family: var(--font-ui); font-size: 16px; }
.site-nav a { color: var(--text-muted); }
.site-nav a:hover { color: var(--gold-200); }
.lang { font-family: var(--font-ui); font-size: 15px; color: var(--text-muted); display: inline-flex; align-items: center; gap: 6px; }
.lang .icon { width: 17px; height: 17px; }

/* Hero */
.hero { position: relative; overflow: hidden; background: var(--gradient-night); padding: 72px 0 0; }
.hero-castle { position: absolute; left: 0; top: 0; height: 100%; width: auto; max-width: none; opacity: .75; pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, #000 40%, transparent 92%); mask-image: linear-gradient(90deg, #000 40%, transparent 92%); }
.hero-castle.right { left: auto; right: 0; transform: scaleX(-1); opacity: .35; }
.hero::after { content: ''; position: absolute; inset: auto 0 0 0; height: 40%; background: var(--gradient-protect-bottom); pointer-events: none; }
.hero-inner { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; text-align: center; }
.hero-crest { width: 128px; height: auto; filter: drop-shadow(0 0 26px rgba(232,200,103,.42)); margin-bottom: 26px; }
.hero h1 { font-size: clamp(38px, 7vw, 76px); }
.hero h1 small { display: block; font-family: var(--font-heading); font-weight: 600; font-size: clamp(14px, 1.6vw, 18px); letter-spacing: .3em; text-transform: uppercase; color: var(--gold-400); margin-bottom: 14px; }
.hero-tagline { font-family: var(--font-heading); font-weight: 500; font-size: clamp(19px, 2.4vw, 26px); color: var(--gold-200); letter-spacing: .04em; margin: 14px 0 0; }
.hero .lede { max-width: 60ch; }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 16px; margin-top: 34px; }
.hero-meta { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; padding: 0; margin: 22px 0 0; font-family: var(--font-ui); font-size: 15px; color: var(--text-faint); }
.hero-meta li { display: inline-flex; align-items: center; gap: 7px; }
.hero-meta .icon { color: var(--gold-500); width: 16px; height: 16px; }
.hero-shot { margin-top: 56px; width: 100%; max-width: 1120px; }

.hero-magic { display: inline-flex; align-items: flex-start; gap: 10px; max-width: 60ch; margin: 18px 0 0; font-style: italic; font-size: var(--fs-body-l); color: var(--gold-200); text-wrap: pretty; }
.hero-magic .icon { width: 20px; height: 20px; margin-top: 6px; color: var(--gold-400); }

/* Why the Companion is different */
.why { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.why-card { padding: 26px 24px 28px; }
.why-card > .icon { width: 30px; height: 30px; color: var(--gold-300); margin-bottom: 16px; filter: drop-shadow(0 0 10px rgba(212,175,55,.35)); }
.why-card h3 { font-size: 19px; }

/* Small advantage chips on rooms */
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 4px 0 12px; }
.chips li { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border: 1px solid var(--border-subtle); border-radius: var(--radius-pill); background: var(--accent-soft); font-family: var(--font-ui); font-size: 13px; font-weight: 500; color: var(--gold-200); white-space: nowrap; }
.chips li .icon { width: 13px; height: 13px; color: var(--success); }

/* Framed screenshots */
.shot { position: relative; margin: 0; border: 1px solid var(--border-subtle); background: var(--night-950); box-shadow: var(--shadow-3), 0 0 60px rgba(212,175,55,.08); }
.shot::before { content: ''; position: absolute; inset: -6px; border: 1px solid rgba(212,175,55,.12); pointer-events: none; }
.shot img { width: 100%; height: auto; }

/* Sections */
.section { position: relative; padding: 112px 0; }
.section.alt { background: linear-gradient(180deg, var(--night-950), var(--night-900)); border-top: 1px solid var(--border-faint); border-bottom: 1px solid var(--border-faint); }
.section-head { margin-bottom: 52px; }

/* Cards */
.card { background: var(--surface-card); border: 1px solid var(--border-subtle); box-shadow: var(--shadow-1); transition: transform var(--dur-base) var(--ease-out), border-color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out); }
.card:hover { transform: translateY(-3px); border-color: var(--gold-400); box-shadow: var(--shadow-2), var(--glow-gold); }
.card-body { padding: 20px 22px 24px; }
.card .tag { font-family: var(--font-heading); font-size: 12px; font-weight: 600; letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--gold-400); margin: 0 0 10px; }
.card p { margin: 0; color: var(--text-muted); font-size: 16px; line-height: 1.55; }

.personas { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.persona img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; border-bottom: 1px solid var(--border-subtle); }

.rooms { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; }
.room { grid-column: span 2; overflow: hidden; }
.room:nth-child(-n+2) { grid-column: span 3; }
.room .media { aspect-ratio: 12 / 5; background: var(--night-950) center / cover no-repeat; border-bottom: 1px solid var(--border-subtle);
  -webkit-mask-image: linear-gradient(180deg, #000 72%, rgba(0,0,0,.55)); mask-image: linear-gradient(180deg, #000 72%, rgba(0,0,0,.55)); }
.room .media.hall { background-position: center 58%; background-size: 150%; }
.room h3 { display: flex; align-items: center; gap: 10px; }
.room h3 .icon { color: var(--gold-400); width: 20px; height: 20px; }

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 64px; align-items: center; }
.split.flip { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
.split.flip > :first-child { order: 2; }
.split + .split { margin-top: 96px; }

.spells { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.spell { display: flex; gap: 16px; padding: 20px; }
.spell .badge { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--border-subtle); color: var(--gold-300); background: var(--accent-soft); }
.spell .badge .icon { width: 22px; height: 22px; }
.spell h3 { font-size: 18px; }

.promises { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px 40px; }
.promise { display: flex; gap: 16px; }
.promise > .icon { width: 28px; height: 28px; color: var(--gold-400); margin-top: 2px; }
.promise h3 { font-size: 18px; }
.promise p { margin: 0; color: var(--text-muted); font-size: 16px; line-height: 1.55; }
.honest { margin-top: 48px; padding: 24px 28px; border: 1px solid var(--border-subtle); border-left: 3px solid var(--gold-400); background: rgba(212,175,55,.05); display: flex; gap: 18px; }
.honest > .icon { width: 26px; height: 26px; color: var(--gold-300); margin-top: 3px; }
.honest p { margin: 0; color: var(--text-body); }
.honest strong { color: var(--gold-200); }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
.step { position: relative; padding: 30px 26px 28px; }
.step .num { font-family: var(--font-display); font-weight: 700; font-size: 44px; line-height: 1; color: var(--gold-400); text-shadow: 0 0 24px rgba(212,175,55,.35); display: block; margin-bottom: 14px; }

.costs { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.cost { padding: 28px; }
.cost .value { font-family: var(--font-display); font-weight: 700; font-size: 30px; color: var(--gold-300); line-height: 1.15; margin: 4px 0 12px; }
.support { margin-top: 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 18px 32px; padding: 24px 28px; border: 1px dashed var(--border-subtle); }
.support > div { flex: 1 1 360px; }
.support h3 { display: flex; align-items: center; gap: 10px; }
.support h3 .icon { color: var(--gold-400); width: 22px; height: 22px; }
.support p { margin: 0; color: var(--text-muted); font-size: 16px; }

.faq { max-width: 820px; margin: 0 auto; border-top: 1px solid var(--border-faint); }
.faq details { border-bottom: 1px solid var(--border-faint); }
.faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 20px 4px; font-family: var(--font-heading); font-weight: 600; font-size: 19px; letter-spacing: .02em; color: var(--text-strong); transition: color var(--dur-fast) var(--ease-out); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--gold-200); }
.faq summary .icon { width: 20px; height: 20px; color: var(--gold-400); transition: transform var(--dur-base) var(--ease-out); }
.faq details[open] summary .icon { transform: rotate(180deg); }
.faq details p { margin: 0; padding: 0 4px 22px; color: var(--text-muted); max-width: 70ch; }

.download { position: relative; overflow: hidden; background: var(--gradient-night); border-top: 1px solid var(--border-subtle); }
.download .hero-castle { opacity: .5; }
.download-inner { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.download-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; margin-top: 30px; }
.download-actions a.more { font-family: var(--font-ui); font-size: 16px; display: inline-flex; align-items: center; gap: 8px; }
.download-actions a.more .icon { width: 17px; height: 17px; }
.req { padding: 28px; }
.req ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.req li { display: flex; gap: 12px; color: var(--text-body); font-size: 16px; line-height: 1.45; }
.req li .icon { color: var(--success); width: 20px; height: 20px; margin-top: 1px; }

.site-footer { border-top: 1px solid var(--border-subtle); background: var(--night-950); }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; padding-top: 32px; padding-bottom: 32px; font-family: var(--font-ui); font-size: 14px; color: var(--text-faint); }
.site-footer .who { display: flex; align-items: center; gap: 12px; }
.site-footer .who img { height: 40px; width: auto; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.site-footer nav a { color: var(--text-muted); }
.site-footer nav a:hover { color: var(--gold-200); }

/* Gentle entrance, only where motion is welcome */
@media (prefers-reduced-motion: no-preference) {
  .hero-inner > * { animation: rise var(--dur-slow) var(--ease-out) both; }
  .hero-inner > :nth-child(2) { animation-delay: 60ms; } .hero-inner > :nth-child(3) { animation-delay: 120ms; }
  .hero-inner > :nth-child(4) { animation-delay: 180ms; } .hero-inner > :nth-child(5) { animation-delay: 240ms; }
  .hero-inner > :nth-child(6) { animation-delay: 300ms; } .hero-inner > :nth-child(7) { animation-delay: 380ms; }
  @keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

/* Tablet */
@media (max-width: 1020px) {
  .site-nav { display: none; }
  .personas { grid-template-columns: repeat(2, 1fr); }
  .rooms { grid-template-columns: repeat(2, 1fr); }
  .room, .room:nth-child(-n+2) { grid-column: span 1; }
  .room:first-child { grid-column: span 2; }
  .split, .split.flip { grid-template-columns: 1fr; gap: 36px; }
  .split.flip > :first-child { order: 0; }
  .spells, .promises, .why { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .download-inner { grid-template-columns: 1fr; gap: 36px; }
  .section { padding: 88px 0; }
}
/* Phone */
@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .site-header .wrap { gap: 12px; height: 60px; }
  .brand img { height: 34px; }
  .brand span { font-size: 10px; }
  .brand b { font-size: 17px; }
  .site-header .btn-s { padding: 0 12px; font-size: 13px; }
  .site-header .btn-s .icon { display: none; }
  .lang span { display: none; }
  .hero { padding-top: 48px; }
  .hero-crest { width: 96px; }
  .hero-castle.right { display: none; }
  .hero-actions .btn { width: 100%; }
  .hero-shot { margin-top: 40px; }
  .rooms, .spells, .promises, .costs, .why { grid-template-columns: 1fr; }
  .hero-magic { font-size: 17px; text-align: left; }
  .personas { gap: 12px; }
  .persona .card-body { padding: 14px 14px 16px; }
  .persona h3 { font-size: 17px; }
  .persona p { font-size: 15px; }
  .room:first-child { grid-column: span 1; }
  .section { padding: 72px 0; }
  .section-head { margin-bottom: 36px; }
  .honest, .support, .cost, .req { padding: 20px; }
  .faq summary { font-size: 17px; }
  .download-actions .btn { width: 100%; }
}
