/* ============================================================
   Cloud9VR website: site.css   (v2, "Mission Select")
   This file holds the LOOK: colours, fonts, sizes, layout.
   Each block starts with a "selector" (which things to style),
   then { property: value; } pairs inside curly brackets.
   Both pages (index.html and missions.html) use this one file.
   ============================================================ */


/* ---------- 1. BRAND COLOURS AND FONTS (change them here, they update everywhere) ---------- */
:root {
  --red: #EC1F22;        /* the red in the Cloud9VR logo */
  --black: #050507;      /* page background */
  --panel: #0E0E12;      /* cards, a little lighter than the background */
  --line: #26262E;       /* thin borders */
  --white: #F5F5F7;
  --grey: #9C9CAA;       /* softer text */
  --head: "Chakra Petch", "Arial Narrow", sans-serif;   /* game/HUD font for titles */
  --body: "Montserrat", Arial, sans-serif;              /* easy-to-read font for text */
}


/* ---------- 2. THE WHOLE PAGE ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.65;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; }

h1, h2, h3 {
  font-family: var(--head);
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.02;
  margin: 0 0 0.45em;
}
h1 { font-size: clamp(2.8rem, 8vw, 6.2rem); letter-spacing: 0.01em; }
h2 { font-size: clamp(2rem, 5vw, 3.6rem); }
h3 { font-size: 1.35rem; letter-spacing: 0.03em; }
.red { color: var(--red); }

/* Small tactical labels like "MODE 01 // RACING" */
.label {
  font-family: var(--head);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--grey);
  margin: 0 0 14px;
}
.label::before { content: "// "; color: var(--red); }

/* Film grain over the whole page (a tiny pattern drawn by the browser, no image file) */
body::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;           /* clicks pass straight through */
  z-index: 50;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}


/* ---------- 3. TOP BAR ---------- */
.topbar {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 20;
  display: flex; align-items: center; gap: 28px;
  padding: 14px 28px;
  background: linear-gradient(rgba(5,5,7,0.92), rgba(5,5,7,0));
}
.topbar-logo { height: 38px; width: auto; }
.menu { display: flex; gap: 26px; margin-left: auto; }
.menu a {
  font-family: var(--head);
  font-weight: 600; font-size: 0.9rem;
  letter-spacing: 0.14em; text-transform: uppercase;
  text-decoration: none;
}
.menu a:hover { color: var(--red); }

/* "OFFLINE · RELOADING" status light */
.status {
  font-family: var(--head);
  font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase;
  border: 1px solid var(--line);
  padding: 6px 12px;
  white-space: nowrap;
}
.status::before {
  content: "";
  display: inline-block; width: 8px; height: 8px; margin-right: 8px;
  border-radius: 50%; background: var(--red);
  box-shadow: 0 0 10px var(--red);
  animation: blink 1.6s infinite;
}
@keyframes blink { 50% { opacity: 0.25; } }


/* ---------- 4. HERO (first screen) ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; align-items: center;
  padding: 120px 28px 90px;
  overflow: hidden;
  isolation: isolate;                 /* keeps the layers below inside the hero */
}
.hero-img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: 70% center;
  z-index: -2;
  animation: slowzoom 24s ease-out forwards;   /* slow push-in, like a film shot */
}
@keyframes slowzoom { from { transform: scale(1.06); } to { transform: scale(1); } }
.hero::after {                          /* dark shade on the left so the words are readable */
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(5,5,7,0.92) 0%, rgba(5,5,7,0.55) 40%, rgba(5,5,7,0) 70%),
    linear-gradient(to top, var(--black) 0%, rgba(5,5,7,0) 30%);
}
.hero-text { max-width: 640px; }
.lead { font-size: 1.12rem; color: #D9D9E0; max-width: 520px; }

/* Cinema black bars at top and bottom of the hero */
.letterbox::before, .letterbox::after {
  content: ""; position: absolute; left: 0; right: 0; height: 4.5vh;
  background: #000; z-index: 1;
}
.letterbox::before { top: 0; }
.letterbox::after  { bottom: 0; }


/* ---------- 5. HUD CORNERS (the brackets around pictures) ---------- */
.hud { position: relative; }
.hud::before, .hud::after {
  content: ""; position: absolute; width: 26px; height: 26px; z-index: 2;
  pointer-events: none;
}
.hud::before { top: 10px; left: 10px; border-top: 2px solid var(--red); border-left: 2px solid var(--red); }
.hud::after  { bottom: 10px; right: 10px; border-bottom: 2px solid var(--red); border-right: 2px solid var(--red); }


/* ---------- 6. BUTTONS ---------- */
.buttons { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.btn {
  display: inline-block;
  font-family: var(--head);
  font-weight: 700; font-size: 1rem;
  letter-spacing: 0.12em; text-transform: uppercase;
  padding: 15px 28px;
  background: var(--red); color: var(--white);
  text-decoration: none;
  border: 2px solid var(--red);
  clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);  /* cut corners */
  transition: background 0.15s, color 0.15s;
}
.btn:hover { background: var(--white); color: var(--black); border-color: var(--white); }
.btn-ghost { background: transparent; border-color: var(--white); }


/* ---------- 7. MOVING TICKER BAND ---------- */
.ticker {
  overflow: hidden;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  background: var(--panel);
  font-family: var(--head); font-weight: 700;
  letter-spacing: 0.2em; text-transform: uppercase;
  white-space: nowrap;
}
.ticker div { display: inline-block; padding: 14px 0; animation: scroll 32s linear infinite; }
.ticker span { margin: 0 28px; }
.ticker span:nth-child(odd) { color: var(--red); }
@keyframes scroll { to { transform: translateX(-50%); } }


/* ---------- 8. SECTIONS (shared spacing) ---------- */
.section { max-width: 1200px; margin: 0 auto; padding: 100px 28px; }
.section-head { max-width: 680px; margin-bottom: 44px; }
.section-head p { color: var(--grey); }


/* ---------- 9. EXPERIENCE CARDS ("game modes") ---------- */
.modes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 22px;
}
.mode {
  background: var(--panel);
  border: 1px solid var(--line);
  transition: border-color 0.2s, transform 0.2s;
}
.mode:hover { border-color: var(--red); transform: translateY(-4px); }
.mode img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.mode-text { padding: 20px 22px 24px; }
.mode-text .label { margin-bottom: 8px; }
.mode-text p { margin: 0; color: var(--grey); font-size: 0.95rem; }


/* ---------- 10. FULL-WIDTH CINEMATIC BAND ---------- */
.band {
  position: relative;
  min-height: 70vh;
  display: flex; align-items: flex-end;
  padding: 60px 28px;
  isolation: isolate;
}
.band img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; z-index: -2;
}
.band::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to top, var(--black) 0%, rgba(5,5,7,0.2) 60%, var(--black) 100%);
}
.band blockquote {
  margin: 0 auto; max-width: 1200px; width: 100%;
  font-family: var(--head); font-weight: 700; text-transform: uppercase;
  font-size: clamp(2rem, 5vw, 4rem); line-height: 1.05;
}


/* ---------- 11. VIDEOS ---------- */
.screen {
  width: 100%;
  background: #000;
  border: 1px solid var(--line);
  box-shadow: 0 0 90px rgba(236, 31, 34, 0.18);   /* soft red glow */
}
.screen-wide { aspect-ratio: 16 / 9; }
.screen-tall { aspect-ratio: 9 / 16; max-width: 380px; }


/* ---------- 12. MISSION LOG LIST ---------- */
.log { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px; }
.log-item { border-left: 3px solid var(--red); padding: 4px 0 4px 18px; }
.log-item strong { display: block; font-family: var(--head); font-size: 2.2rem; line-height: 1; }
.log-item span { color: var(--grey); font-size: 0.92rem; }


/* ---------- 13. GALLERY (mission log page) ---------- */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.gallery img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: start; }


/* ---------- 14. FINAL CALL TO ACTION ---------- */
.join { text-align: center; }
.join p { color: var(--grey); }
.join .buttons { justify-content: center; }


/* ---------- 15. FOOTER ---------- */
.footer {
  text-align: center;
  padding: 48px 28px 64px;
  border-top: 1px solid var(--line);
  color: var(--grey); font-size: 0.85rem;
}
.footer img { height: 32px; width: auto; margin: 0 auto 16px; }
.footer p { margin: 4px 0; }


/* ---------- 16. PHONES (screens narrower than 760 px) ---------- */
@media (max-width: 760px) {
  .topbar { padding: 12px 16px; gap: 14px; }
  .topbar-logo { height: 30px; }
  .menu { display: none; }                 /* phones: just logo + status */
  .status { margin-left: auto; font-size: 0.62rem; }
  .hero { align-items: flex-end; padding: 100px 16px 70px; }
  .hero-img { object-position: center top; }   /* the tall phone picture: people at the top */
  .hero::after {
    background: linear-gradient(to top, rgba(5,5,7,0.95) 0%, rgba(5,5,7,0.6) 45%, rgba(5,5,7,0.1) 75%);
  }
  .section { padding: 72px 16px; }
  .band { min-height: 55vh; padding: 40px 16px; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .two-col { grid-template-columns: 1fr; }
}


/* ---------- 17. People who turn off motion in their settings ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-img, .ticker div, .status::before { animation: none; }
}
