/* =========================================================
   The Sim Empire — redesign
   CSS custom properties ("variables") live on :root so the
   whole palette can be changed from one place.
   ========================================================= */
:root {
  --bg: #0a0a0c;
  --surface: #131317;
  --surface-2: #1b1b21;
  --line: #2a2a31;
  --text: #f5f5f6;
  --muted: #a3a3ad;
  --red: #e5191d;
  --orange: #ff7a1a;
  --grad: linear-gradient(100deg, var(--red), var(--orange));

  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: "Barlow", system-ui, sans-serif;

  --radius: 6px;
  --container: 1180px;
  --header-h: 106px;
}

/* ---------- Base / reset ---------- */
/* border-box: an element's width includes its padding and border, which makes sizing predictable */
*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  margin: 0 0 0.5em;
}
h2 { font-size: clamp(2.25rem, 5vw, 3.5rem); }
h3 { font-size: 1.6rem; }
p { margin: 0 0 1em; }

/* clamp(min, preferred, max) lets the gutter grow with the screen but never get too small */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 32px);
}

.skip-link {
  position: absolute; left: 16px; top: -60px;
  background: var(--orange); color: #000; padding: 8px 14px; z-index: 100;
  font-weight: 600; border-radius: var(--radius);
}
.skip-link:focus { top: 12px; }

/* Visible keyboard focus ring for accessibility */
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }

/* Gradient text: paint the gradient as a background, then clip it to the letter shapes */
.grad {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: #fff;
  background: var(--grad);
  border: 2px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  /* Slanted corners like a racing livery; clip-path cuts the shape */
  clip-path: polygon(10px 0, 100% 0, calc(100% - 10px) 100%, 0 100%);
  transition: transform .2s, filter .2s;
}
.btn:hover { transform: translateY(-2px); filter: brightness(1.1); }
.btn-ghost {
  background: transparent;
  border-color: rgba(255,255,255,.35);
  clip-path: none;
}
.btn-ghost:hover { border-color: var(--orange); color: var(--orange); }
.btn-sm { padding: 9px 18px; font-size: 1rem; white-space: nowrap; }
.btn-block { width: 100%; }

.link-arrow {
  font-family: var(--font-display);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  text-decoration: none;
  color: var(--orange);
}
/* ::after inserts an arrow without extra HTML; it slides on hover */
.link-arrow::after { content: " →"; display: inline-block; transition: transform .2s; }
.link-arrow:hover::after { transform: translateX(4px); }

/* ---------- Header ---------- */
/* position: fixed keeps the header pinned to the top while you scroll */
.site-header {
  position: fixed; inset: 0 0 auto 0;
  z-index: 50;
  height: var(--header-h);
  transition: background .3s, border-color .3s;
  border-bottom: 1px solid transparent;
}
/* JS adds .scrolled once you leave the top, giving the header a solid background */
.site-header.scrolled {
  background: rgba(10,10,12,.88);
  backdrop-filter: blur(10px);
  border-color: var(--line);
}
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.brand img { width: auto; height: 87px; }

.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav a:not(.btn) {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  text-decoration: none;
  color: var(--muted);
  white-space: nowrap;   /* keep "Buy a Sim" on one line instead of wrapping */
  transition: color .2s;
}
.site-nav a:not(.btn):hover { color: var(--text); }
/* The page you're on: [aria-current="page"] is an attribute selector, matching links that carry it */
.site-nav a[aria-current="page"] {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--orange);
  text-decoration-thickness: 2px;
  text-underline-offset: 8px;
}

.nav-toggle { display: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;          /* svh = "small viewport height", avoids mobile address-bar jumps */
  display: flex; flex-direction: column; justify-content: flex-end;
  padding-top: var(--header-h);
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;            /* fill the box like a background image, cropping instead of stretching */
  object-position: 40% center;
  z-index: -2;
}
/* Pause/play button for the hero video, top-right just under the header
   (the spec strip at the bottom changes height on phones, so anchoring to the top is safer) */
.video-toggle {
  position: absolute; right: clamp(16px, 4vw, 32px); top: calc(var(--header-h) + 16px); z-index: 2;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  background: rgba(10,10,12,.55);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 50%;
  cursor: pointer;
  transition: border-color .2s;
}
.video-toggle:hover { border-color: var(--orange); }
/* Pause icon = two bars drawn with borders; when paused, it becomes a CSS triangle (play icon) */
.icon-pause { width: 12px; height: 14px; border-left: 4px solid #fff; border-right: 4px solid #fff; }
.video-toggle[aria-pressed="true"] .icon-pause {
  width: 0; height: 0; margin-left: 4px;
  border-style: solid; border-width: 7px 0 7px 12px;
  border-color: transparent transparent transparent #fff;
}
/* Dark gradient over the photo so the white text stays readable */
.hero::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(10,10,12,.95) 0%, rgba(10,10,12,.7) 45%, rgba(10,10,12,.25) 100%),
    linear-gradient(0deg, var(--bg) 0%, transparent 40%);
}
.hero-content { padding-bottom: 56px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: .9rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--muted);
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 12px var(--red); }

.hero-title {
  font-size: clamp(4rem, 13vw, 10rem);
  font-style: italic;
  line-height: .88;
  margin: .15em 0 .3em;
}
.hero-lead { max-width: 34rem; font-size: 1.15rem; color: #d4d4d8; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }

.hero-strip {
  border-top: 1px solid var(--line);
  background: rgba(10,10,12,.7);
  backdrop-filter: blur(6px);
}
.strip-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.strip-inner > div {
  padding: 22px 0 22px 20px;
  border-left: 1px solid var(--line);
}
.strip-inner > div:first-child { border-left: 0; padding-left: 0; }
.strip-inner strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.9rem; font-weight: 800; line-height: 1;
}
.strip-inner span { font-size: .9rem; color: var(--muted); }

/* ---------- Sections ---------- */
.section { padding: clamp(72px, 10vw, 128px) 0; }
.section-alt { background: var(--surface); }

.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head-row {
  max-width: none;
  display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap;
}
.section-head-row h2 { margin-bottom: 0; }
.section-sub { color: var(--muted); }
.section-tight { padding: clamp(48px, 6vw, 72px) 0; }
.muted { color: var(--muted); }

/* ---------- Inner-page hero (Book, Buy a Sim, Empire Cup, Contact) ---------- */
/* A shorter cousin of the homepage hero. Top padding clears the fixed header. */
.page-hero {
  position: relative;
  padding: calc(var(--header-h) + clamp(48px, 7vw, 88px)) 0 clamp(48px, 6vw, 72px);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  isolation: isolate;   /* keeps the negative z-index photo inside this section */
}
.page-hero::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(10,10,12,.96) 0%, rgba(10,10,12,.8) 50%, rgba(10,10,12,.45) 100%);
}
.page-hero h1 { font-size: clamp(3.25rem, 9vw, 6rem); font-style: italic; margin-bottom: .25em; }
.page-lead { max-width: 36rem; font-size: 1.15rem; color: #d4d4d8; margin: 0; }
.page-hero .hero-actions { margin-top: 28px; }

/* Checkered-flag pattern, built entirely from CSS gradients (no image file) */
.checkered::after {
  content: "";
  position: absolute; top: 0; right: 0; bottom: 0; width: 50%; z-index: -1;
  background-image: conic-gradient(#fff 25%, transparent 0 50%, #fff 0 75%, transparent 0);
  background-size: 48px 48px;
  opacity: .05;
  mask-image: linear-gradient(90deg, transparent, #000);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000);
}

/* ---------- Split (image + text side by side) ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.split-img { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); aspect-ratio: 4 / 3; }
.split-img img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- CTA band (heading on the left, button on the right) ---------- */
.cta-band {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px 48px; flex-wrap: wrap;
}
.cta-band > div { max-width: 640px; }
.cta-band h2 { font-size: clamp(2rem, 4vw, 2.75rem); }
.cta-band p { margin: 0; }
.cta-band .open-status { margin-left: 8px; vertical-align: 2px; }

/* Kicker = small label above a heading, with a racing-stripe accent drawn by ::before */
.kicker {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-display);
  font-weight: 600; font-size: 1rem;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 14px;
}
.kicker::before {
  content: "";
  width: 28px; height: 4px;
  background: var(--grad);
  transform: skewX(-30deg);
}

/* ---------- Experience cards ---------- */
/* 4 across on desktop; the media queries below drop it to 2, then 1, so no card is left alone on a row */
.exp-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.exp-card {
  position: relative;
  padding: 32px 28px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .25s, transform .25s;
}
/* Gradient bar that grows across the top of the card on hover */
.exp-card::before {
  content: ""; position: absolute; left: 0; top: 0; height: 3px; width: 0;
  background: var(--grad); transition: width .35s;
}
.exp-card:hover { border-color: #3a3a42; transform: translateY(-4px); }
.exp-card:hover::before { width: 100%; }
.exp-num {
  display: block;
  font-family: var(--font-display);
  font-style: italic; font-weight: 800;
  font-size: 3.5rem; line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px #4a4a52;   /* outlined numbers */
  margin-bottom: 18px;
}
.exp-card p { color: var(--muted); }

/* ---------- Pricing ---------- */
.price-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  align-items: stretch;
}
.price-card {
  position: relative;
  display: flex; flex-direction: column;
  padding: 36px 30px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.price-card p:not(.price):not(.duration) { color: var(--muted); flex-grow: 1; }
/* These are <h2>s for correct page outline, but sized like the smaller card headings */
.price-name { font-size: 1.6rem; }
.price-card.featured {
  /* Two backgrounds: inner solid fill + outer gradient, which shows only in the border area */
  border: 2px solid transparent;
  background:
    linear-gradient(var(--bg), var(--bg)) padding-box,
    var(--grad) border-box;
}
.badge {
  position: absolute; top: -13px; left: 30px;
  padding: 3px 12px;
  font-family: var(--font-display); font-weight: 800; font-size: .85rem;
  letter-spacing: .1em; text-transform: uppercase;
  background: var(--grad); border-radius: 3px;
}
.price {
  font-family: var(--font-display);
  font-weight: 800; font-size: 4.5rem; line-height: 1;
  margin: 8px 0 4px;
}
.price span { font-size: 2rem; vertical-align: top; color: var(--muted); }
.price-text { font-size: 4.5rem; }
.duration {
  font-weight: 600; text-transform: uppercase; letter-spacing: .1em; font-size: .85rem;
  color: var(--orange); margin-bottom: 18px;
}

/* ---------- Products ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}
.product {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.product-img { aspect-ratio: 4 / 3; overflow: hidden; background: #000; }
.product-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.product:hover .product-img img { transform: scale(1.05); }
.product-body { padding: 20px 22px 24px; }
.product-tier {
  font-size: .8rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 6px;
}
.product-name { font-size: 1.45rem; margin-bottom: 8px; }
.product .link-arrow { display: inline-block; margin-top: 14px; font-size: .95rem; }
.product-price { font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; margin: 0; }

/* ---------- Empire Cup page ---------- */
/* Steps reuse the .exp-card look; list-style: none hides the default 1. 2. 3. numbers */
.steps {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.narrow { max-width: 760px; }
.empty-state a { color: var(--orange); }
.empty-state {
  padding: 24px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
}
.empty-state strong { color: var(--text); }
.empty-state p:last-child { margin: 0; }

/* ---------- Gift card ---------- */
.gift {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 56px;
  align-items: center;
}
.gift-card-visual {
  position: relative;
  aspect-ratio: 1.6;
  max-width: 440px;
  border-radius: 16px;
  background:
    radial-gradient(circle at 80% 10%, rgba(255,122,26,.45), transparent 50%),
    linear-gradient(135deg, #1d1d24, #0c0c0f);
  border: 1px solid #33333b;
  box-shadow: 0 30px 60px rgba(0,0,0,.5);
  transform: rotate(-4deg);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 28px;
  transition: transform .4s;
}
.gift-card-visual:hover { transform: rotate(0) scale(1.02); }
.gift-card-visual img { width: 110px; }
.gift-card-visual span {
  align-self: flex-end;
  font-family: var(--font-display); font-weight: 800; font-size: 1.4rem;
  letter-spacing: .1em; text-transform: uppercase;
}
.gift-text p { color: var(--muted); }

/* ---------- Visit / Contact ---------- */
.visit-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 56px;
  align-items: start;
}
.visit-info > p { color: var(--muted); }
.contact-list { list-style: none; padding: 0; margin: 32px 0; }
.contact-list li {
  display: grid; grid-template-columns: 80px 1fr; gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.contact-list span {
  font-size: .8rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); padding-top: 3px;
}
.contact-list a { text-decoration: none; font-weight: 500; overflow-wrap: anywhere; }
.contact-list a:hover { color: var(--orange); }

.hours-title { display: flex; align-items: center; gap: 12px; font-size: 1.4rem; }
.contact-list { margin-top: 0; }

/* ---------- Map (contact page) ---------- */
.map-wrap { line-height: 0; border-top: 1px solid var(--line); }
.map-wrap iframe { width: 100%; height: 420px; border: 0; display: block; }
.open-status {
  font-family: var(--font-body);
  font-size: .75rem; font-weight: 600; letter-spacing: .08em;
  padding: 3px 10px; border-radius: 99px;
}
.open-status:empty { display: none; }
.open-status.is-open { background: rgba(34,197,94,.15); color: #4ade80; }
.open-status.is-closed { background: rgba(255,255,255,.08); color: var(--muted); }
.hours dl { margin: 0; }
.hours dl div { display: flex; justify-content: space-between; padding: 6px 0; }
.hours dt { color: var(--muted); }
.hours dd { margin: 0; font-weight: 500; }

.contact-form {
  display: grid; gap: 18px;
  padding: clamp(24px, 4vw, 40px);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.contact-form label {
  display: grid; gap: 6px;
  font-size: .85rem; font-weight: 600; letter-spacing: .04em;
  color: var(--muted);
}
.optional { font-weight: 400; opacity: .7; }
.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  font: inherit; font-size: 1rem; font-weight: 400;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .2s;
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus { outline: none; border-color: var(--orange); }
.contact-form textarea { resize: vertical; }
.form-status { margin: 0; font-size: .9rem; color: var(--muted); min-height: 1.4em; }
.form-status.error { color: #f87171; }
/* Dim the button while a message is sending so it can't be double-clicked */
.contact-form button:disabled { opacity: .6; cursor: wait; transform: none; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 48px 0; }
.footer-inner {
  display: flex; flex-wrap: wrap; align-items: center; gap: 20px 32px;
}
.footer-inner img { height: 48px; width: auto; }
.footer-tag {
  margin: 0;
  font-family: var(--font-display); font-weight: 800; font-style: italic;
  text-transform: uppercase; letter-spacing: .08em; color: var(--muted);
}
.socials { display: flex; flex-wrap: wrap; gap: 20px; margin-left: auto; }
.socials a { text-decoration: none; color: var(--muted); font-weight: 500; }
.socials a:hover { color: var(--orange); }
.copyright { width: 100%; margin: 0; font-size: .85rem; color: #6b6b75; }

/* ---------- Scroll reveal ---------- */
/* Elements start slightly lowered and invisible; JS adds .visible when they scroll into view */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* Respect people who've asked their OS for less motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-video, .video-toggle { display: none; }
  * { transition: none !important; }
}

/* =========================================================
   Responsive: media queries apply styles only below a width
   ========================================================= */
@media (max-width: 960px) {
  .gift, .visit-grid, .split { grid-template-columns: 1fr; gap: 40px; }
  .steps { grid-template-columns: 1fr; }
  .exp-grid { grid-template-columns: repeat(2, 1fr); }
  .gift-card-visual { margin: 0 auto; width: 100%; }
  .strip-inner { grid-template-columns: repeat(2, 1fr); }
  .strip-inner > div:nth-child(3) { border-left: 0; padding-left: 0; }
  .strip-inner > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}

@media (max-width: 1024px) {
  /* Slightly smaller on phones so the header doesn't eat the screen.
     Changing the variable here also moves the dropdown menu, which sits at top: var(--header-h). */
  :root { --header-h: 88px; }
  .brand img { height: 71px; }

  /* Hamburger button: three bars drawn with spans */
  .nav-toggle {
    display: flex; flex-direction: column; justify-content: center; gap: 5px;
    width: 44px; height: 44px; padding: 10px;
    background: none; border: 0; cursor: pointer;
  }
  .nav-toggle span { height: 2px; background: var(--text); transition: transform .25s, opacity .25s; }
  /* When open, bars rotate into an X */
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  /* The menu becomes a full-width panel that slides down */
  .site-nav {
    position: fixed; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px 16px 24px;
    background: rgba(10,10,12,.97);
    border-bottom: 1px solid var(--line);
    transform: translateY(-110%);
    visibility: hidden;
    transition: transform .3s, visibility .3s;
  }
  .site-nav.open { transform: none; visibility: visible; }
  .site-nav a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 1.25rem; }
  .site-nav .btn { margin-top: 18px; }
  .site-header:has(.site-nav.open) { background: rgba(10,10,12,.97); }
}

@media (max-width: 560px) {
  .field-row, .exp-grid { grid-template-columns: 1fr; }
  .hero-actions .btn { flex: 1 1 100%; }
  .strip-inner strong { font-size: 1.5rem; }
  .socials { margin-left: 0; }
}
