/* Eko Rush – landing page */
/* This file styles index.html (the landing page). */
/* Order: variables and themes, base resets, buttons, nav, hero, sections, explorer, */
/* runner cards, how-to-play, CTA banner, footer, custom cursor, scroll reveal, then responsive rules. */
/* CSS variables (custom properties) start with -- and are read with var(--name). */
/* Shared variables that do not change between light and dark themes live on :root. */
:root {
  /* Brand colour: Airbnb-style red #FF385C, plus a darker shade for gradients. */
  --primary: #ff385c;
  --primary-dark: #e31c5f;
  /* Very transparent red (12% opacity) for soft backgrounds behind icons and badges. */
  --primary-soft: rgba(255, 56, 92, 0.12);
  /* Diagonal red-to-pink gradient used on primary buttons, accents and the CTA banner. */
  --grad: linear-gradient(135deg, #ff385c 0%, #e31c5f 55%, #d70466 100%);
  /* Standard corner roundness for cards (large and small). */
  --radius: 20px;
  --radius-sm: 12px;
  /* Easing curve for animations: starts fast, ends gently (feels smooth and springy). */
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  /* Font stack: Plus Jakarta Sans first, then system fonts as fallbacks if it fails to load. */
  --font: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
}
/* LIGHT THEME colours: used when <html data-theme="light"> (set by the inline script and js/theme.js). */
:root[data-theme="light"] {
  --bg: #ffffff;
  --bg-soft: #f7f7f7;
  /* Hero background: two big soft radial gradients (pink top-right, peach bottom-left) on white. */
  --bg-hero: radial-gradient(1200px 600px at 80% 20%, #ffe3e9 0%, rgba(255, 227, 233, 0) 60%), radial-gradient(900px 500px at 0% 100%, #fff3e0 0%, rgba(255, 243, 224, 0) 60%), #ffffff;
  --text: #222222;
  --muted: #6a6a6a;
  --card: #ffffff;
  --border: #ebebeb;
  /* Shadows for cards (normal and large). */
  --shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 18px 50px rgba(0, 0, 0, 0.12);
  /* Slightly see-through background for the nav bar so the blur effect behind it shows through. */
  --nav-bg: rgba(255, 255, 255, 0.82);
  /* Background colour for <kbd> keyboard keys. */
  --kbd: #f1f1f1;
}
/* DARK THEME colours: same variable names, darker values. Every rule using var() updates automatically. */
:root[data-theme="dark"] {
  --bg: #0f0f12;
  --bg-soft: #16161b;
  --bg-hero: radial-gradient(1200px 600px at 80% 20%, rgba(255, 56, 92, 0.22) 0%, rgba(255, 56, 92, 0) 60%), radial-gradient(900px 500px at 0% 100%, rgba(80, 60, 200, 0.18) 0%, rgba(80, 60, 200, 0) 60%), #0f0f12;
  --text: #f5f5f7;
  --muted: #a1a1aa;
  --card: #1a1a20;
  --border: #2a2a33;
  --shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 18px 50px rgba(0, 0, 0, 0.55);
  --nav-bg: rgba(15, 15, 18, 0.78);
  --kbd: #26262e;
}

/* BASE RESETS: border-box makes width/height include padding and border, which makes sizing predictable. */
*, *::before, *::after { box-sizing: border-box; }
/* Smoothly scroll when clicking #section links. */
html { scroll-behavior: smooth; }
/* Page-wide defaults: font, colours (from the theme variables) and line spacing. */
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  /* Smoother font rendering on Mac browsers. */
  -webkit-font-smoothing: antialiased;
  /* Fade the colours when switching between light and dark theme. */
  transition: background-color 0.35s var(--ease), color 0.35s var(--ease);
  /* Prevent sideways scrolling caused by elements that poke out of the page. */
  overflow-x: hidden;
}
/* Images never overflow their container. */
img { max-width: 100%; display: block; }
/* Links inherit the surrounding text colour and have no underline. */
a { color: inherit; text-decoration: none; }
/* Remove the browser's default button look so we can style buttons ourselves. */
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
/* Visible red outline for keyboard users (only appears when tabbing, not on mouse click). */
:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; border-radius: 8px; }
/* Centred content wrapper: min() picks the smaller of 1200px or full width minus 40px of side space. */
.container { width: min(1200px, 100% - 40px); margin-inline: auto; }

/* ---------- buttons ---------- */
/* Base button: pill-shaped, inline-flex keeps icon and text side by side and centred. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 26px; border-radius: 999px; font-weight: 700; font-size: 1rem;
  /* Animate lift and shadow on hover. */
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s;
  white-space: nowrap;
}
/* Primary (red gradient) button that lifts slightly and casts a stronger glow on hover. */
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 10px 30px rgba(255, 56, 92, 0.35); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 36px rgba(255, 56, 92, 0.45); }
/* Ghost button: outlined, with a card-coloured background. */
.btn-ghost { border: 1.5px solid var(--border); background: var(--card); }
.btn-ghost:hover { border-color: var(--text); transform: translateY(-2px); }
/* Size of icons inside buttons. */
.btn svg { width: 18px; height: 18px; }

/* Round icon-only buttons (theme toggle, menu button). */
.icon-btn {
  /* display: grid + place-items: center is a short way to centre the icon both ways. */
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--border); background: var(--card); transition: transform 0.2s, border-color 0.2s;
}
/* Grow slightly on hover; icon size. */
.icon-btn:hover { transform: scale(1.06); border-color: var(--primary); }
.icon-btn svg { width: 20px; height: 20px; }
/* Theme toggle icons: show the sun in light mode and the moon in dark mode. */
.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }

/* ---------- nav ---------- */
/* Top navigation bar, fixed so it stays visible while scrolling. */
.nav {
  /* inset: 0 0 auto 0 is shorthand for top 0, right 0, bottom auto, left 0 (stretched across the top). z-index keeps it above content. */
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  /* backdrop-filter blurs and saturates whatever is behind the bar (frosted glass). The -webkit- version is for Safari. */
  background: var(--nav-bg); backdrop-filter: saturate(180%) blur(16px); -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid transparent; transition: border-color 0.3s, background 0.35s;
}
/* js/landing.js adds .scrolled once you scroll, revealing a bottom border. */
.nav.scrolled { border-bottom-color: var(--border); }
/* Row layout: logo on the left, links in the middle, actions on the right. */
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 20px; }
/* Logo: red pin icon plus text; the bold "Rush" part uses the normal text colour. */
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.3rem; letter-spacing: -0.02em; color: var(--primary); }
.logo svg { width: 34px; height: 34px; }
.logo span b { color: var(--text); font-weight: 800; }
/* Nav links: a row of pill-shaped links that get a soft background on hover. */
.nav-links { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; }
.nav-links a { padding: 10px 16px; border-radius: 999px; font-weight: 600; font-size: 0.95rem; color: var(--muted); transition: background 0.2s, color 0.2s; }
.nav-links a:hover { background: var(--bg-soft); color: var(--text); }
/* Right-side group of nav buttons; the Play button is a bit smaller here. */
.nav-actions { display: flex; align-items: center; gap: 10px; }
.nav-actions .btn { padding: 11px 20px; }
/* Hamburger menu button is hidden on desktop (shown in the 860px media query below). */
.menu-btn { display: none; }

/* ---------- hero ---------- */
/* Hero: full-screen intro area. Content is vertically centred with flexbox. */
.hero {
  /* 100vh = full screen height; 100svh (small viewport height) is the newer unit that avoids jumps from mobile browser bars. Older browsers ignore it and keep 100vh. padding-top leaves room for the fixed nav. */
  position: relative; min-height: 100vh; min-height: 100svh; padding-top: 76px;
  background: var(--bg-hero); overflow: hidden; display: flex; align-items: center;
  transition: background 0.35s;
}
/* The 3D canvas fills the whole hero behind the text. touch-action: pan-y still lets phones scroll vertically over it. */
#hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; touch-action: pan-y; }
/* Text layer sits above the canvas but ignores the mouse so you can still interact with the 3D model behind it. */
.hero-content { position: relative; z-index: 2; pointer-events: none; padding-block: 40px 120px; }
/* Mini Nigerian flag: three equal stripes (green, white, green). */
.flag { display: inline-flex; width: 20px; height: 14px; border-radius: 3px; overflow: hidden; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08); }
.flag i { flex: 1; background: #008751; }
.flag i:nth-child(2) { background: #fff; }
/* Re-enable clicks on links and buttons inside the text layer. */
.hero-content a, .hero-content button { pointer-events: auto; }
/* Keep the hero text column from getting too wide. */
.hero-copy { max-width: 600px; }
/* "Made in Lagos" badge: pill shape with soft red background. */
.badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px;
  background: var(--primary-soft); color: var(--primary); font-weight: 700; font-size: 0.85rem; margin-bottom: 22px;
}
/* Pulsing dot inside the badge, using the pulse animation below. */
.badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); animation: pulse 1.6s infinite; }
/* Keyframe animation: a red ring grows out from the dot and fades, repeating forever. */
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 56, 92, 0.6); } 50% { box-shadow: 0 0 0 8px rgba(255, 56, 92, 0); } }
/* Big headline. clamp(min, preferred, max): the size scales with screen width (6.4vw) but never below 2.6rem or above 5.2rem. */
.hero h1 { font-size: clamp(2.6rem, 6.4vw, 5.2rem); line-height: 1.02; letter-spacing: -0.045em; margin: 0 0 22px; font-weight: 800; }
/* Gradient text: paint the gradient as the background, clip it to the letters, and make the text itself transparent. */
.hero h1 .accent { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
/* Intro paragraph, also with a fluid clamp() font size. */
.hero p.lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--muted); max-width: 520px; margin: 0 0 32px; }
/* Row of hero buttons that wraps on narrow screens. */
.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }
/* Stats row: each stat is a big number stacked above a small label. */
.hero-stats { display: flex; gap: 36px; margin-top: 44px; flex-wrap: wrap; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats strong { font-size: 1.8rem; font-weight: 800; letter-spacing: -0.03em; }
.hero-stats span { color: var(--muted); font-size: 0.9rem; }

/* Floating toolbar of model buttons at the bottom of the hero. */
.playground {
  /* left: 50% plus translateX(-50%) centres it horizontally. */
  position: absolute; z-index: 3; left: 50%; bottom: 28px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center;
  padding: 8px; border-radius: 999px; background: var(--nav-bg); border: 1px solid var(--border);
  /* Frosted-glass blur behind the toolbar. */
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); box-shadow: var(--shadow);
  /* calc() keeps 12px of space on each side on small screens. */
  max-width: calc(100% - 24px);
}
/* Hint text and its hand icon (flex: none stops the icon from shrinking). */
.playground .hint { font-size: 0.8rem; color: var(--muted); padding: 0 10px 0 12px; display: flex; align-items: center; gap: 8px; }
.playground .hint svg { width: 16px; height: 16px; color: var(--primary); flex: none; }
/* Pill buttons for choosing the 3D model; .active is the selected one. */
.pill { padding: 8px 14px; border-radius: 999px; font-size: 0.85rem; font-weight: 700; color: var(--muted); transition: background 0.2s, color 0.2s; }
.pill:hover { color: var(--text); background: var(--bg-soft); }
.pill.active { background: var(--primary); color: #fff; }

/* Speech bubble ("Oshodi! Oshodi!") above the danfo. JS sets its position; it starts invisible and small. */
.bubble {
  /* The 4px bottom-left corner makes it look like a speech bubble tail. */
  position: absolute; z-index: 4; pointer-events: none; padding: 10px 16px; border-radius: 18px 18px 18px 4px;
  background: var(--card); color: var(--text); font-weight: 800; font-size: 0.95rem; box-shadow: var(--shadow-lg);
  /* Hidden by default: transparent and scaled down to 60%. */
  border: 2px solid var(--primary); white-space: nowrap; opacity: 0; transform: translate(-10%, -100%) scale(0.6);
  transition: opacity 0.25s, transform 0.35s var(--ease);
}
/* When JS adds .show, it fades in, grows to full size and floats up a little. */
.bubble.show { opacity: 1; transform: translate(-10%, -120%) scale(1); }

/* ---------- sections ---------- */
/* Vertical spacing for every page section. */
section { padding: 110px 0; }
/* Alternate sections get a soft grey background to separate them visually. */
.section-soft { background: var(--bg-soft); transition: background 0.35s; }
/* Small uppercase red label above section titles. */
.eyebrow { color: var(--primary); font-weight: 800; text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.8rem; }
/* Section titles with a fluid clamp() font size. */
.section-title { font-size: clamp(2rem, 4vw, 3.2rem); letter-spacing: -0.035em; line-height: 1.08; margin: 10px 0 16px; font-weight: 800; }
/* Grey subtitle under section titles. */
.section-sub { color: var(--muted); font-size: 1.1rem; max-width: 620px; margin: 0; }
/* Space below section headings; .center variants centre the text and subtitle. */
.section-head { margin-bottom: 56px; }
.section-head.center { text-align: center; }
.section-head.center .section-sub { margin-inline: auto; }

/* Features grid: 3 equal columns (1fr = one share of the available space). */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
/* Feature card. */
.feature {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s;
}
/* Card lifts and gains a bigger shadow on hover. */
.feature:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }
/* Rounded square icon box with a soft red background. */
.feature .ic { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); margin-bottom: 18px; }
.feature .ic svg { width: 26px; height: 26px; }
/* Card title and grey description. */
.feature h3 { margin: 0 0 8px; font-size: 1.15rem; letter-spacing: -0.01em; }
.feature p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* landmark explorer */
/* Explorer layout: grid with a fixed 340px list column and a viewer that takes the rest (1fr). */
.explorer { display: grid; grid-template-columns: 340px 1fr; gap: 28px; align-items: stretch; }
/* Vertical list of landmark buttons (created by JS). */
.lm-list { display: flex; flex-direction: column; gap: 8px; }
/* Each landmark button: number badge plus name, laid out in a row. */
.lm-item {
  text-align: left; padding: 16px 18px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: var(--card); display: flex; gap: 14px; align-items: center; transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
/* Nudge right on hover; the active one gets a red border and a soft red glow ring. */
.lm-item:hover { transform: translateX(4px); }
.lm-item.active { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
/* Number badge; turns red on the active landmark. */
.lm-item .num { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--bg-soft); font-weight: 800; font-size: 0.85rem; flex: none; }
.lm-item.active .num { background: var(--primary); color: #fff; }
/* Landmark name and grey location text. */
.lm-item strong { display: block; font-size: 0.98rem; }
.lm-item small { color: var(--muted); }
/* 3D viewer box with rounded corners; overflow: hidden clips the canvas to those corners. */
.viewer {
  position: relative; border-radius: 28px; overflow: hidden; min-height: 560px; border: 1px solid var(--border);
  /* Soft red glow at the top of the viewer, layered over the card colour. */
  background: radial-gradient(800px 400px at 50% 0%, var(--primary-soft), transparent 70%), var(--card);
  box-shadow: var(--shadow);
}
/* Viewer canvas fills the box; the cursor shows a grabbing hand while dragging to rotate. */
#landmark-canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; touch-action: pan-y; }
#landmark-canvas:active { cursor: grabbing; }
/* Info card pinned to the bottom of the viewer. */
.viewer-info {
  position: absolute; left: 20px; right: 20px; bottom: 20px; padding: 20px 22px; border-radius: 18px;
  /* Frosted-glass look; pointer-events: none lets drags pass through to the canvas. */
  background: var(--nav-bg); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--border);
  pointer-events: none;
}
/* Info card text: name, red location label and grey fact. */
.viewer-info h3 { margin: 0; font-size: 1.35rem; letter-spacing: -0.02em; }
.viewer-info .place { color: var(--primary); font-weight: 700; font-size: 0.9rem; }
.viewer-info p { margin: 6px 0 0; color: var(--muted); font-size: 0.95rem; }
/* "Drag to rotate" tag in the top-right corner of the viewer. */
.viewer-tag { position: absolute; top: 18px; right: 18px; padding: 8px 12px; border-radius: 999px; background: var(--nav-bg); border: 1px solid var(--border); font-size: 0.8rem; font-weight: 700; color: var(--muted); pointer-events: none; }

/* characters */
/* Runner cards in a 3-column grid. */
.chars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
/* Single runner card. */
.char {
  border-radius: 28px; overflow: hidden; background: var(--card); border: 1px solid var(--border);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
/* Card lifts on hover. */
.char:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
/* Picture area: aspect-ratio keeps it almost square at any width. */
.char .art { aspect-ratio: 4 / 4.2; display: grid; place-items: center; position: relative; overflow: hidden; }
/* Runner image: object-fit: contain shows the whole picture without stretching; it tilts and grows on hover. */
.char .art img { height: 96%; width: auto; object-fit: contain; transition: transform 0.5s var(--ease); position: relative; z-index: 1; }
.char:hover .art img { transform: scale(1.06) rotate(-2deg); }
/* Each runner's own background gradient, chosen with the data-c attribute. */
.char[data-c="tunde"] .art { background: linear-gradient(160deg, #ffe0b2, #ff8a65); }
.char[data-c="amaka"] .art { background: linear-gradient(160deg, #e1bee7, #7e57c2); }
.char[data-c="seun"] .art { background: linear-gradient(160deg, #c8e6c9, #2e7d32); }
/* In dark mode, tone the bright backgrounds down a little. */
:root[data-theme="dark"] .char .art { filter: saturate(0.9) brightness(0.85); }
/* Card text area, name and description. */
.char .body { padding: 22px 24px 26px; }
.char h3 { margin: 0 0 4px; font-size: 1.3rem; }
.char p { margin: 0 0 16px; color: var(--muted); font-size: 0.95rem; }
/* Row of small grey tag pills. */
.char .tags { display: flex; gap: 8px; flex-wrap: wrap; }
.tag { padding: 6px 12px; border-radius: 999px; background: var(--bg-soft); font-size: 0.8rem; font-weight: 700; color: var(--muted); }

/* how to play */
/* Controls grid: 4 equal columns. */
.howto { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
/* Single control step card. */
.step { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; text-align: center; }
/* Row of key graphics; min-height keeps all cards aligned even with different keys. */
.keys { display: flex; gap: 6px; justify-content: center; margin-bottom: 16px; min-height: 48px; align-items: center; }
/* Keyboard key look: rounded box with a thicker bottom border to look pressable. */
kbd {
  min-width: 46px; height: 46px; padding: 0 10px; display: inline-grid; place-items: center; border-radius: 12px;
  background: var(--kbd); border: 1px solid var(--border); border-bottom-width: 4px; font-family: var(--font); font-weight: 800; font-size: 0.95rem;
/* Step title and description. */
}
.step h3 { margin: 0 0 6px; font-size: 1.05rem; }
.step p { margin: 0; color: var(--muted); font-size: 0.9rem; }
/* Obstacles grid: 5 equal columns. */
.dangers { margin-top: 28px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
/* Obstacle card: bold name on its own line, then a grey tip. */
.danger { padding: 16px; border-radius: 16px; background: var(--card); border: 1px solid var(--border); font-size: 0.9rem; }
.danger strong { display: block; margin-bottom: 2px; }
.danger span { color: var(--muted); font-size: 0.82rem; }

/* CTA */
/* Red gradient call-to-action banner; text and button spread to opposite ends and wrap on small screens. */
.cta {
  position: relative; border-radius: 36px; padding: 72px 56px; overflow: hidden; color: #fff; background: var(--grad);
  display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap;
}
/* Decorative stripes over the banner using a pseudo-element (an extra box created with CSS only). */
.cta::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  /* repeating-linear-gradient draws vertical stripes: 18px dark, 18px transparent, repeated. */
  background: repeating-linear-gradient(90deg, rgba(0, 0, 0, 0.12) 0 18px, transparent 18px 36px);
  /* mask fades the stripes in from the middle so only the right half shows them. */
  mask: linear-gradient(90deg, transparent 50%, #000); -webkit-mask: linear-gradient(90deg, transparent 50%, #000);
  opacity: 0.35;
}
/* Banner title (fluid size) and text. */
.cta h2 { margin: 0 0 10px; font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.03em; line-height: 1.05; }
.cta p { margin: 0; opacity: 0.9; font-size: 1.1rem; }
/* White button on the red banner; position + z-index keep it above the stripes. */
.cta .btn { background: #fff; color: var(--primary); position: relative; z-index: 1; }
.cta .btn:hover { transform: translateY(-2px) scale(1.02); }
/* Keep the banner text above the stripes too. */
.cta > div { position: relative; z-index: 1; }

/* Footer: top border, grey small text. */
footer { padding: 40px 0 50px; border-top: 1px solid var(--border); color: var(--muted); font-size: 0.9rem; }
/* Footer row: two items spread apart, wrapping on small screens. */
.foot { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }

/* custom cursor */
/* Shared cursor styles: fixed to the screen, ignore clicks, round, invisible until JS enables them. */
.cursor-ring, .cursor-dot { position: fixed; top: 0; left: 0; pointer-events: none; z-index: 100; border-radius: 50%; opacity: 0; transition: opacity 0.3s, width 0.25s var(--ease), height 0.25s var(--ease), background 0.25s, border-color 0.25s; }
/* Outer ring; the negative margins centre it on the mouse point. */
.cursor-ring { width: 38px; height: 38px; border: 2px solid var(--primary); margin: -19px 0 0 -19px; }
/* Small inner dot. */
.cursor-dot { width: 6px; height: 6px; background: var(--primary); margin: -3px 0 0 -3px; }
/* Ring grows and fills when hovering links or buttons (JS adds .hover). */
.cursor-ring.hover { width: 60px; height: 60px; margin: -30px 0 0 -30px; background: var(--primary-soft); }
/* JS adds .has-cursor to the body on devices with a mouse, which makes the custom cursor visible. */
body.has-cursor .cursor-ring, body.has-cursor .cursor-dot { opacity: 1; }

/* reveal */
/* Elements with .reveal start invisible and 28px lower... */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
/* ...and slide into place when JS adds .in as they scroll into view. */
.reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
/* Media query: these rules only apply when the screen is 1080px wide or less (tablets). */
@media (max-width: 1080px) {
  /* Two-column feature and control grids, three-column obstacles. */
  .features, .howto { grid-template-columns: repeat(2, 1fr); }
  .dangers { grid-template-columns: repeat(3, 1fr); }
  /* Explorer stacks: list above viewer. */
  .explorer { grid-template-columns: 1fr; }
  /* Landmark list becomes a horizontal scroller; scroll-snap makes it stop neatly on each item. */
  .lm-list { flex-direction: row; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; }
  .lm-item { flex: none; scroll-snap-align: start; min-width: 230px; }
  /* No hover nudge on touch devices. */
  .lm-item:hover { transform: none; }
}
/* Media query for phones and small tablets (860px wide or less). */
@media (max-width: 860px) {
  /* Nav links become a dropdown panel under the nav, hidden until the menu button is pressed. */
  .nav-links {
    position: fixed; top: 76px; left: 12px; right: 12px; flex-direction: column; padding: 12px; border-radius: 20px;
    background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow-lg);
    /* Hidden state: transparent, slightly raised and not clickable. */
    opacity: 0; transform: translateY(-10px); pointer-events: none; transition: 0.25s var(--ease);
  }
  /* JS adds .open when the menu button is pressed. */
  .nav-links.open { opacity: 1; transform: none; pointer-events: auto; }
  .nav-links a { display: block; padding: 14px 16px; }
  /* Show the hamburger button; hide the "Play now" text so only the icon shows. */
  .menu-btn { display: grid; }
  .nav-actions .btn span { display: none; }
  .nav-actions .btn { padding: 11px 14px; }
  /* Runner cards stack in one column. */
  .chars { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; }
  /* Hero text moves to the top and is centred; padding-bottom: 46vh leaves room for the 3D model below it. */
  .hero { align-items: flex-start; }
  .hero-content { padding-top: 28px; padding-bottom: 46vh; }
  .hero-copy { text-align: center; margin-inline: auto; }
  .hero p.lead { margin-inline: auto; }
  .hero-ctas, .hero-stats { justify-content: center; }
  .hero-stats { gap: 24px; margin-top: 30px; }
  /* Hide the hint; the toolbar scrolls sideways instead of wrapping (scrollbar hidden). */
  .playground .hint { display: none; }
  .playground { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; width: calc(100% - 24px); scrollbar-width: none; bottom: 18px; }
  .playground::-webkit-scrollbar { display: none; }
  .pill { flex: none; }
  /* Less section padding and smaller CTA and viewer on small screens. */
  section { padding: 80px 0; }
  .cta { padding: 48px 28px; border-radius: 28px; }
  .viewer { min-height: 460px; }
}
/* Media query for small phones (560px wide or less). */
@media (max-width: 560px) {
  /* Single-column grids and smaller text and buttons. */
  .features, .howto { grid-template-columns: 1fr; }
  .dangers { grid-template-columns: 1fr 1fr; }
  .hero-stats strong { font-size: 1.4rem; }
  .btn { padding: 13px 20px; }
  /* Hide the logo text, keeping just the pin icon. */
  .logo span { display: none; }
}
/* Accessibility: if the user asked their system to reduce motion, turn off all animations and transitions. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  /* Make sure reveal elements are still visible without their animation. */
  .reveal { opacity: 1; transform: none; }
}
