/* RIO MYST — palette taken from the app icon and the in-game interface: emerald, gold, ivory. */
:root {
  --bg: #04201c;
  --bg-alt: #072d27;
  --card: #0b3a31;
  --line: rgba(233, 196, 106, 0.22);
  --gold: #e9c46a;
  --gold-strong: #f6d98b;
  --emerald: #2fbf8f;
  --ivory: #f7efdc;
  --muted: #b9cfc4;
  --radius: 18px;
  --header-height: 68px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--header-height); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ivory);
  font: 400 16px/1.65 'Be Vietnam Pro', system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }

a { color: var(--gold); }

:focus-visible { outline: 3px solid var(--gold-strong); outline-offset: 3px; }

h1, h2, h3 { font-family: 'Cinzel', Georgia, serif; line-height: 1.2; margin: 0; }
h2 { font-size: clamp(1.7rem, 4vw, 2.5rem); text-align: center; color: var(--gold-strong); }
h3 { font-size: 1.15rem; }
p { margin: 0; }

.container { width: min(1120px, 100% - 32px); margin-inline: auto; }
.narrow { max-width: 760px; }

.skip-link { position: absolute; left: 16px; top: -60px; background: var(--gold); color: var(--bg); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip-link:focus { top: 12px; }

/* ── Header ───────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(4, 32, 28, 0.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: var(--header-height); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 800 1.2rem 'Cinzel', Georgia, serif; letter-spacing: 0.08em; color: var(--gold-strong); }
.brand img { border-radius: 10px; }
.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav a:not(.btn) { color: var(--ivory); text-decoration: none; font-weight: 500; font-size: 0.95rem; }
.site-nav a:not(.btn):hover { color: var(--gold-strong); }

.btn { display: inline-block; background: linear-gradient(180deg, var(--gold-strong), var(--gold)); color: #2b2106; font-weight: 700; text-decoration: none; border-radius: 999px; padding: 12px 24px; }
.btn-small { padding: 8px 18px; font-size: 0.9rem; }

.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; margin: 5px 0; background: var(--ivory); border-radius: 2px; }

/* ── Hero ─────────────────────────────────────────────── */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(900px 520px at 75% 35%, rgba(47, 191, 143, 0.28), transparent 70%),
    radial-gradient(600px 420px at 12% 10%, rgba(233, 196, 106, 0.16), transparent 70%),
    var(--bg);
}
.hero-inner { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 40px; padding-block: 64px 80px; }
.hero-emblem { width: 120px; margin-bottom: 12px; filter: drop-shadow(0 0 28px rgba(233, 196, 106, 0.45)); animation: float 7s ease-in-out infinite; }
.eyebrow { color: var(--emerald); font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; font-size: 0.85rem; }
.hero h1 { font-size: clamp(2.8rem, 7vw, 4.8rem); font-weight: 800; color: var(--gold-strong); margin-top: 8px; text-shadow: 0 4px 30px rgba(233, 196, 106, 0.3); }
.hero h1 span { display: block; font-size: 0.36em; letter-spacing: 0.34em; text-transform: uppercase; color: var(--ivory); margin-top: 8px; }
.lead { color: var(--muted); font-size: 1.1rem; max-width: 34rem; margin-top: 20px; }

.store-buttons { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.store-btn { display: flex; flex-direction: column; min-width: 220px; padding: 10px 22px; border: 1px solid var(--gold); border-radius: 14px; background: rgba(11, 58, 49, 0.75); color: var(--ivory); text-decoration: none; line-height: 1.35; }
.store-btn small { color: var(--muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; }
.store-btn strong { font-size: 1.15rem; }
.store-btn[href] { transition: transform 0.2s, background 0.2s; }
.store-btn[href]:hover { transform: translateY(-2px); background: var(--card); }

.hero-phones { position: relative; display: flex; justify-content: center; align-items: center; min-height: 540px; }
.phone { border-radius: 30px; padding: 7px; background: linear-gradient(150deg, #f6d98b, #8a6a24 55%, #f6d98b); box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5); }
.phone img { border-radius: 24px; width: 100%; }
.phone-center { width: 250px; position: relative; z-index: 2; }
.phone-left, .phone-right { width: 200px; position: absolute; top: 50%; opacity: 0.92; }
.phone-left { left: 2%; transform: translateY(-46%) rotate(-8deg); }
.phone-right { right: 2%; transform: translateY(-46%) rotate(8deg); }

/* ── Sections ─────────────────────────────────────────── */
.section { padding-block: 80px; }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--line); }
.section-intro { text-align: center; color: var(--muted); max-width: 36rem; margin: 14px auto 0; }

.steps, .features, .gallery { list-style: none; margin: 44px 0 0; padding: 0; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.steps li, .features li { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.steps li { text-align: center; }
.step-number { display: grid; place-items: center; width: 48px; height: 48px; margin: 0 auto 16px; border-radius: 50%; background: linear-gradient(180deg, var(--gold-strong), var(--gold)); color: #2b2106; font: 800 1.3rem 'Cinzel', Georgia, serif; }
.steps p, .features p { color: var(--muted); margin-top: 8px; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.features svg { width: 38px; height: 38px; margin-bottom: 16px; fill: none; stroke: var(--gold); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px 20px; }
.gallery figure { margin: 0; }
.shot { display: block; width: 100%; padding: 0; border: 2px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--card); cursor: zoom-in; transition: transform 0.25s, border-color 0.25s; }
.shot:hover { transform: translateY(-6px); border-color: var(--gold); }
.shot img { width: 100%; }
.gallery figcaption { text-align: center; margin-top: 10px; font-size: 0.9rem; color: var(--muted); }

/* ── FAQ ──────────────────────────────────────────────── */
details { background: var(--card); border: 1px solid var(--line); border-radius: 14px; margin-top: 14px; }
details:first-of-type { margin-top: 40px; }
summary { cursor: pointer; padding: 18px 52px 18px 22px; font-weight: 600; list-style: none; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; position: absolute; right: 22px; top: 50%; transform: translateY(-50%); font-size: 1.5rem; color: var(--gold); }
details[open] summary::after { content: '−'; }
details p { padding: 0 22px 20px; color: var(--muted); }

/* ── Download & footer ────────────────────────────────── */
.download { text-align: center; background: radial-gradient(700px 380px at 50% 20%, rgba(47, 191, 143, 0.25), transparent 70%); }
.app-icon { width: 160px; margin: 0 auto 28px; border-radius: 36px; box-shadow: 0 0 0 3px var(--gold), 0 24px 50px rgba(0, 0, 0, 0.45); }
.download .store-buttons { justify-content: center; }

.site-footer { border-top: 1px solid var(--line); padding-block: 28px; color: var(--muted); font-size: 0.9rem; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; }

/* ── Lightbox ─────────────────────────────────────────── */
.lightbox { border: 0; padding: 0; background: transparent; color: var(--ivory); max-width: 100vw; max-height: 100vh; overflow: visible; }
.lightbox[open] { display: flex; align-items: center; gap: 12px; }
.lightbox::backdrop { background: rgba(2, 14, 12, 0.92); }
.lightbox figure { margin: 0; text-align: center; }
.lightbox img { max-height: 82vh; max-width: min(72vw, 420px); width: auto; border-radius: 22px; border: 2px solid var(--gold); }
.lightbox figcaption { margin-top: 10px; }
.lightbox button { background: var(--card); color: var(--ivory); border: 1px solid var(--gold); border-radius: 50%; width: 44px; height: 44px; font-size: 1.6rem; line-height: 1; cursor: pointer; flex: none; }
.lightbox-close { position: fixed; top: 16px; right: 16px; }

@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; padding-block: 40px 56px; }
  .hero-emblem { margin-inline: auto; }
  .lead { margin-inline: auto; }
  .hero .store-buttons { justify-content: center; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; gap: 18px; padding: 22px 16px 26px; background: var(--bg); border-bottom: 1px solid var(--line); }
  .site-nav.is-open { display: flex; }
  .section { padding-block: 56px; }
  .steps, .features { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 20px 14px; }
}

@media (max-width: 560px) {
  .hero-phones { min-height: 400px; }
  .phone { border-radius: 22px; padding: 5px; }
  .phone img { border-radius: 18px; }
  .phone-center { width: 176px; }
  .phone-left, .phone-right { width: 132px; }
  .phone-left { left: 0; }
  .phone-right { right: 0; }
  .lightbox-nav { position: fixed; bottom: 16px; }
  .lightbox-nav.prev { left: 25%; }
  .lightbox-nav.next { right: 25%; }
  .lightbox img { max-width: 90vw; max-height: 74vh; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
