/* Copyright (c) 2026 NeuroGames Pty Ltd. All rights reserved. */
/* LAYOUT: how the page is arranged. Colours and fonts are in theme.css. Desktop first, then phone and tablet rules at the end. */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 1.125rem; line-height: 1.55; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { text-wrap: balance; font-family: var(--font-head); font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; margin: 0; color: var(--text); }
p { margin: 0 0 1em; }
ul { list-style: none; margin: 0; padding: 0; }
.wrap { width: min(1160px, 100% - 2 * clamp(20px, 4vw, 48px)); margin-inline: auto; }
.narrow { max-width: 760px; margin-inline: auto; }
.centre { text-align: center; }
.small { font-size: 0.95rem; color: var(--text-soft); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 12px 18px; border-radius: 12px; background: var(--text); color: #fff; }
.skip:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

/* ---------- Buttons (60px tall: easy to tap) ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 60px; padding: 0 30px;
  border: 2px solid transparent; border-radius: 999px; font: 700 1.05rem/1.2 var(--font); text-decoration: none; cursor: pointer;
  transition: transform 0.15s var(--ease), box-shadow 0.2s, background 0.2s;
}
.btn:active { transform: scale(0.97); }
.btn--primary { background: var(--primary); color: var(--primary-text); }
.btn--primary:hover { background: #000; box-shadow: var(--shadow-soft); }
.btn--ghost { background: rgba(255, 255, 255, 0.85); color: var(--text); border-color: var(--line); }
.btn--ghost:hover { background: #fff; box-shadow: var(--shadow-soft); }
.btn--light { background: #fff; color: var(--accent); }
.btn--light:hover { box-shadow: 0 10px 28px -12px rgba(0, 0, 0, 0.5); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.actions--centre { justify-content: center; }

/* ---------- Top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 50; background: rgba(255, 250, 242, 0.86); -webkit-backdrop-filter: saturate(180%) blur(16px); backdrop-filter: saturate(180%) blur(16px); border-bottom: 1px solid var(--line); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 76px; }
.brand { display: inline-flex; align-items: center; min-height: 52px; }
.brand img { height: 46px; width: auto; }
.nav { display: flex; align-items: center; gap: 6px; }
.nav a { display: inline-flex; align-items: center; min-height: 48px; padding: 0 16px; border-radius: 999px; color: var(--text); font-weight: 700; text-decoration: none; }
.nav a:hover { background: rgba(0, 0, 0, 0.06); }
.nav .nav-cta { background: var(--primary); color: #fff; margin-left: 6px; }
.nav .nav-cta:hover { background: #000; }
.menu-btn { display: none; }

/* ---------- Hero ---------- */
.hero { padding: clamp(40px, 7vw, 96px) 0 clamp(48px, 7vw, 96px); background:
  radial-gradient(60% 70% at 4% 0%, rgba(244, 124, 32, 0.20), transparent 70%),
  radial-gradient(60% 70% at 100% 100%, rgba(70, 205, 105, 0.22), transparent 70%), var(--bg); position: relative; }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 120px; background: linear-gradient(to bottom, transparent, var(--bg)); pointer-events: none; }   /* fades into the next section */
.hero-grid { position: relative; z-index: 1; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); align-items: center; gap: clamp(32px, 5vw, 72px); }
.eyebrow { margin: 0 0 14px; font: 700 0.95rem/1.2 var(--font); letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.hero h1 { font-size: clamp(2.6rem, 5.4vw, 4.6rem); line-height: 1.04; }
.lede { margin: 22px 0 0; max-width: 34em; font-size: clamp(1.15rem, 1.7vw, 1.4rem); line-height: 1.5; color: var(--text-soft); }
.video { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #111; box-shadow: var(--shadow); }
.video img, .video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.play { position: absolute; inset: 0; display: grid; place-items: center; width: 100%; border: 0; padding: 0; background: linear-gradient(to top, rgba(0, 0, 0, 0.30), rgba(0, 0, 0, 0.05) 55%); cursor: pointer; }
.play-icon { width: 92px; height: 92px; border-radius: 50%; background: rgba(255, 255, 255, 0.95); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35); position: relative; transition: transform 0.2s var(--ease); }
.play-icon::after { content: ""; position: absolute; left: 50%; top: 50%; transform: translate(-38%, -50%); border-style: solid; border-width: 17px 0 17px 28px; border-color: transparent transparent transparent var(--text); }
.play:hover .play-icon { transform: scale(1.08); }
.video-note { margin: 14px 4px 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 1rem; }
.video-note a { font-weight: 700; display: inline-flex; align-items: center; min-height: 48px; }
.note-soft { color: var(--text-soft); align-self: center; font-size: 0.9rem; }

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 8vw, 110px) 0; }
.section--tint { background: var(--bg-tint); }
.section h2 { font-size: clamp(2rem, 4vw, 3.1rem); }
.section-lede { max-width: 46em; margin: 16px 0 0; font-size: 1.2rem; color: var(--text-soft); }
.body-copy { max-width: 46em; margin: 16px 0 0; }
.body-copy + .body-copy { margin-top: 12px; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(18px, 2.4vw, 32px); margin-top: 40px; }
.card { display: flex; flex-direction: column; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.card-art { aspect-ratio: 4 / 3; overflow: hidden; background: #cfe6ff; }
.card-art img { width: 100%; height: 100%; object-fit: cover; }
.card-art--codex { position: relative; background: radial-gradient(70% 70% at 30% 20%, rgba(244, 124, 32, 0.25), transparent 70%), radial-gradient(70% 70% at 80% 90%, rgba(70, 205, 105, 0.25), transparent 70%), #fff6e8; }
.card-art--codex img { position: absolute; left: 50%; top: 7%; width: auto; height: 86%; object-fit: contain; filter: drop-shadow(0 14px 14px rgba(0, 0, 0, 0.3)); transform: translateX(-50%) rotate(-3deg); }
.card-body { display: flex; flex-direction: column; flex: 1; padding: 26px 28px 30px; }
.card-body h3 { font-size: 1.55rem; margin-bottom: 12px; }
.card-body .btn { margin-top: auto; align-self: flex-start; }
.card-body .small { margin-bottom: 22px; }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: clamp(10px, 1.6vw, 18px); margin-top: 36px; }
.gallery li { grid-column: span 2; }
.gallery li:nth-child(-n+2) { grid-column: span 3; }
.shot { display: block; width: 100%; padding: 0; border: 0; border-radius: var(--radius-sm); overflow: hidden; cursor: zoom-in; background: #ddd; box-shadow: var(--shadow-soft); aspect-ratio: 4 / 3; transition: transform 0.2s var(--ease); }
.gallery li:nth-child(-n+2) .shot { aspect-ratio: 3 / 2; }
.shot:hover { transform: translateY(-3px); }
.shot img { width: 100%; height: 100%; object-fit: cover; }

/* Research */

/* Media */
.media { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 2vw, 24px); margin-top: 36px; }
.media-card { display: flex; flex-direction: column; gap: 10px; height: 100%; padding: 28px 26px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); text-decoration: none; color: var(--text); transition: transform 0.2s var(--ease); }
.media-card:hover { transform: translateY(-3px); }
.media-src { font: 700 0.9rem var(--font); letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
.media-title { font: 800 1.3rem/1.25 var(--font-head); letter-spacing: -0.01em; }
.media-go { margin-top: auto; padding-top: 10px; font-weight: 700; color: var(--accent); }
.media-go::after { content: " \2192"; }

/* About */
.about { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: center; gap: clamp(28px, 6vw, 90px); }
.about p { max-width: 34em; }
.about h2 { margin-bottom: 20px; }
.about-logo { width: 100%; max-width: 360px; justify-self: center; opacity: 0.95; }

/* Contact */
.contact { background: var(--accent); color: #fff; padding: clamp(52px, 7vw, 92px) 0; text-align: center; }
.contact h2 { color: #fff; font-size: clamp(2rem, 4vw, 3rem); }
.contact p { max-width: 36em; margin: 16px auto 28px; font-size: 1.2rem; }

/* Footer */
.footer { padding: 40px 0 calc(40px + env(safe-area-inset-bottom, 0px)); background: var(--bg); }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.footer-inner p { margin: 0; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 12px; }
.footer-links a { display: inline-block; padding: 12px 8px; font-weight: 700; }

/* Picture viewer */
.lightbox { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: clamp(12px, 3vw, 40px); background: rgba(20, 18, 26, 0.86); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); cursor: zoom-out; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 100%; width: auto; height: auto; border-radius: 14px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6); }
.lightbox-close { position: absolute; top: max(12px, env(safe-area-inset-top, 0px)); right: 12px; width: 60px; height: 60px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.95); color: var(--text); font-size: 2.2rem; line-height: 1; cursor: pointer; }

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

/* ---------- Phones (up to 600px wide) ---------- */
@media (max-width: 600px) {
  body { font-size: 1.0625rem; }
  html { scroll-padding-top: 76px; }
  .topbar-inner { min-height: 68px; gap: 12px; }
  .brand img { height: 40px; }
  .menu-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; min-width: 96px; padding: 0 20px; border: 2px solid var(--line); border-radius: 999px; background: #fff; color: var(--text); font: 700 1rem var(--font); cursor: pointer; }
  .menu-btn[aria-expanded="true"] { background: var(--text); color: #fff; border-color: var(--text); }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 4px; padding: 12px 20px calc(20px + env(safe-area-inset-bottom, 0px)); background: #fffaf2; border-bottom: 1px solid var(--line); box-shadow: 0 30px 40px -24px rgba(60, 40, 10, 0.4); }
  .nav.is-open { display: flex; }
  .nav a { min-height: 56px; font-size: 1.15rem; padding: 0 16px; }
  .nav .nav-cta { margin: 6px 0 0; justify-content: center; }

  .hero { padding: 28px 0 44px; }
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .hero h1 { font-size: clamp(2.3rem, 10.5vw, 3rem); }
  .lede { font-size: 1.15rem; margin-top: 16px; }
  .hero-video { order: 2; }
  .actions { margin-top: 22px; }
  .actions .btn { flex: 1 1 100%; }
  .video { border-radius: 18px; }
  .play-icon { width: 76px; height: 76px; }
  .play-icon::after { border-width: 14px 0 14px 23px; }

  .section { padding: 52px 0; }
  .section h2 { font-size: clamp(1.9rem, 8vw, 2.4rem); }
  .cards { grid-template-columns: 1fr; margin-top: 28px; gap: 20px; }
  .card-body { padding: 22px 22px 26px; }
  .card-body .btn { align-self: stretch; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 26px; }
  .gallery li, .gallery li:nth-child(-n+2) { grid-column: span 1; }
  .gallery li:first-child { grid-column: span 2; }
  .gallery li:nth-child(-n+2) .shot { aspect-ratio: 4 / 3; }
  .gallery li:first-child .shot { aspect-ratio: 3 / 2; }

  .media { grid-template-columns: 1fr; margin-top: 26px; gap: 12px; }
  .media-card { padding: 22px 22px; }
  .about { grid-template-columns: 1fr; gap: 24px; }
  .about-logo { max-width: 220px; justify-self: start; }
  .contact .btn { width: 100%; padding: 0 12px; font-size: 1rem; }
  .footer-links { gap: 0 4px; }
}

/* ---------- Tablets (601 to 1100px wide, upright and sideways) ---------- */
@media (min-width: 601px) and (max-width: 1100px) {
  .nav a { white-space: nowrap; padding: 0 12px; }
  .nav .nav-cta { margin-left: 2px; }
  .topbar-inner { gap: 16px; }
  .hero-grid { gap: 32px; }
  .hero h1 { font-size: clamp(2.5rem, 5.6vw, 3.3rem); }
  .actions .btn { padding: 0 24px; white-space: nowrap; }
  .gallery li:nth-child(-n+2) { grid-column: span 3; }
  .card-body .btn { white-space: normal; text-align: center; }
}
@media (min-width: 601px) and (max-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; }
  /* each game is a wide row: picture on the left, words on the right */
  .cards { grid-template-columns: 1fr; gap: 22px; }
  .card { flex-direction: row; }
  .card-art { flex: 0 0 38%; aspect-ratio: auto; min-height: 260px; }
  .card-art--codex img { height: 80%; top: 10%; }
  .card-body { padding: 26px 30px 28px; justify-content: center; }
  .card-body .btn { margin-top: 4px; }
  .media { grid-template-columns: 1fr; }
  .media-card { flex-direction: row; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; padding: 24px 26px; }
  .media-src { flex: 0 0 100%; }
  .media-title { flex: 1 1 60%; }
  .media-go { margin-top: 0; padding-top: 0; }
  .about { grid-template-columns: minmax(0, 1fr) 220px; }
}
