/* Smashabout's site, in the game's look (after Clankfire's site/style.css): night navy, white
   text, gold for what matters, chunky buttons with a dark lower lip, Barlow Semi Condensed Bold
   (the game's font, fonts/OFL.txt). Every page: the fixed header and the footer
   (site/_partials/, tools/build_site.py). */
@font-face {
  font-family: "Barlow Semi Condensed";
  src: url("/fonts/BarlowSemiCondensed-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  --navy: #101a33;
  --navy-deep: #0a1124;
  --plate: #17254a;
  --rim: #2c3d66;
  --text: #f6f6f8;
  --muted: #a9b6cc;
  --gold: #ffcc2a;
  --orange: #ff8a1e;
  --red: #e8452c;
  --blue: #8fcfff;
  --ink: #2a2410;
  --display: "Barlow Semi Condensed", "Arial Narrow", system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--navy-deep);
  color: var(--text);
  font: 17px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); }
h1, h2, h3, .display { font-family: var(--display); font-weight: 700; letter-spacing: 0.02em; text-transform: uppercase; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px; }

/* the header: fixed; on the home page see-through until the page scrolls */
.top {
  position: fixed; inset: 0 0 auto; z-index: 10; height: 64px;
  display: flex; align-items: center; gap: 20px;
  padding: 0 max(16px, calc((100vw - 1160px) / 2 + 16px));
  font-family: var(--display); text-transform: uppercase; letter-spacing: 0.06em;
  transition: background-color 0.25s, box-shadow 0.25s;
}
.top.scrolled { background: rgba(10, 17, 36, 0.94); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: 0 2px 0 var(--plate); }
.top .brand { margin-right: auto; }
.top .brand img { height: 46px; width: auto; transition: opacity 0.25s; }
.home .top:not(.scrolled) .brand img { opacity: 0; }  /* the hero's big logo first */
.menu { display: flex; align-items: center; gap: 24px; font-size: 18px; }
.menu a { color: var(--text); text-decoration: none; padding: 8px 0; position: relative; text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6); }
.menu a:hover, .menu a[aria-current="page"] { color: var(--gold); }
.menu a[aria-current="page"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--gold); border-radius: 2px; }
.menu .menu-cta {
  color: var(--ink); text-shadow: none; padding: 8px 16px; border-radius: 10px;
  background: linear-gradient(#ffd84d, var(--gold)); box-shadow: inset 0 -3px 0 var(--orange);
}
.menu .menu-cta:hover, .menu .menu-cta[aria-current="page"] { color: var(--ink); filter: brightness(1.06); }
.menu .menu-cta[aria-current="page"]::after { display: none; }
.menu-toggle { display: none; width: 48px; height: 48px; border: 0; background: none; padding: 12px; cursor: pointer; }
.menu-toggle span { display: block; height: 3px; margin: 4px 0; background: var(--text); border-radius: 2px; transition: transform 0.2s, opacity 0.2s; }

/* the language menu (tools/build_site.py writes it into the header) */
.lang { position: relative; }
.lang summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px; padding: 8px 10px;
  border: 2px solid var(--rim); border-radius: 8px; color: var(--text); font-size: 16px; background: rgba(10, 17, 36, 0.5);
}
.lang summary::-webkit-details-marker { display: none; }
.lang summary::after { content: ""; width: 7px; height: 7px; margin: -3px 2px 0 2px; border: solid var(--muted); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.lang[open] summary, .lang summary:hover { border-color: var(--gold); }
.lang-list {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 180px; display: flex; flex-direction: column; padding: 6px;
  background: rgba(10, 17, 36, 0.98); border: 2px solid var(--rim); border-radius: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}
.lang-list a { padding: 10px 12px; border-radius: 6px; color: var(--text); text-decoration: none; text-transform: none; letter-spacing: 0; font: 16px system-ui, sans-serif; }
.lang-list a:hover { background: var(--plate); color: var(--gold); }
.lang-list a[aria-current] { color: var(--gold); }

@media (max-width: 760px) {
  .top { gap: 10px; }
  .top .brand img { height: 40px; }
  .menu-toggle { display: block; order: 3; }
  .menu {
    position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(10, 17, 36, 0.98); box-shadow: 0 2px 0 var(--plate); padding: 8px 16px 18px; display: none; font-size: 22px;
  }
  .menu a { padding: 14px 4px; border-bottom: 1px solid var(--plate); }
  .menu a[aria-current="page"]::after { display: none; }
  .menu .menu-cta { margin-top: 14px; text-align: center; border-bottom: 0; }
  .top.open .menu { display: flex; }
  .top.open { background: rgba(10, 17, 36, 0.98); }
  .home .top.open .brand img { opacity: 1; }
  .top.open .menu-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .top.open .menu-toggle span:nth-child(2) { opacity: 0; }
  .top.open .menu-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* buttons, after the game's kit: gold with an orange lip; ghost on the navy plate */
.buttons { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.btn {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 60px; min-width: 180px; padding: 10px 24px; border: 0; border-radius: 14px; cursor: pointer;
  background: linear-gradient(#ffd84d, var(--gold)); color: var(--ink); text-decoration: none;
  font: 700 22px/1.1 var(--display); letter-spacing: 0.05em; text-transform: uppercase;
  box-shadow: inset 0 -5px 0 var(--orange), 0 5px 0 rgba(0, 0, 0, 0.35);
}
.btn small { font-size: 0.62em; letter-spacing: 0.12em; opacity: 0.75; }
.btn.ghost { background: linear-gradient(#22345f, var(--plate)); color: var(--text); box-shadow: inset 0 0 0 2px var(--rim), 0 5px 0 rgba(0, 0, 0, 0.35); }
.btn[aria-disabled="true"] { cursor: default; }
a.btn:not([aria-disabled]):hover, button.btn:hover { filter: brightness(1.07); }

/* the home page's hero: the town at dusk, the logo, the pitch, the stores */
.hero {
  min-height: 100svh; display: grid; place-items: center; text-align: center; padding: 88px 16px 48px;
  background:
    linear-gradient(rgba(10, 17, 36, 0.25), rgba(10, 17, 36, 0.35) 55%, var(--navy-deep)),
    url("/img/street.jpg") center / cover;
}
.hero h1 { margin: 0; }
.hero h1 img { width: min(560px, 88vw); margin: 0 auto 6px; filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.55)); }
.pitch {
  font: 700 clamp(24px, 4.4vw, 36px)/1.15 var(--display); text-transform: uppercase; letter-spacing: 0.03em;
  max-width: 760px; margin: 0 auto 26px; text-shadow: 0 2px 0 #000, 0 3px 12px rgba(0, 0, 0, 0.7);
}

/* the sections */
.block { padding: 72px 0; }
.block.alt { background: linear-gradient(var(--navy), var(--navy-deep)); }
.block h2 { font-size: clamp(32px, 5vw, 48px); line-height: 1.05; margin: 0 0 10px; }
.block h2 em { font-style: normal; color: var(--gold); }
.lede { color: var(--muted); margin: 0 0 32px; max-width: 760px; font-size: 18px; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 20px; }
.section-head a { font-family: var(--display); text-transform: uppercase; letter-spacing: 0.05em; color: var(--gold); text-decoration: none; font-size: 20px; }

.plates { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.plate { background: var(--plate); border: 2px solid var(--rim); border-radius: 16px; padding: 22px 22px 18px; }
.plate h3 { margin: 0 0 6px; font-size: 26px; color: var(--gold); }
.plate p { margin: 0; color: var(--muted); }
.tag { display: inline-block; margin-bottom: 10px; padding: 2px 10px; border-radius: 6px; background: var(--navy-deep); color: var(--text); font: 700 15px/1.5 var(--display); letter-spacing: 0.08em; text-transform: uppercase; }

/* the explore tiles and the map cards: a picture with a caption over its foot */
.tiles { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.tile { position: relative; display: block; border-radius: 16px; overflow: hidden; border: 2px solid var(--rim); color: var(--text); text-decoration: none; background: var(--plate); }
.tile img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; transition: transform 0.35s; }
.tile:hover img { transform: scale(1.04); }
.tile span { display: block; padding: 14px 18px 16px; color: var(--muted); }
.tile b { display: block; font: 700 26px/1.1 var(--display); text-transform: uppercase; letter-spacing: 0.03em; color: var(--text); margin-bottom: 2px; }
.tile.cars-tile img { object-fit: contain; background: radial-gradient(ellipse at 50% 70%, #3a4f80, #17254a 70%); padding: 8px 24px; }

/* the cars: each the game's own model on a light stage */
.cars { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.car { margin: 0; background: var(--plate); border: 2px solid var(--rim); border-radius: 18px; overflow: hidden; display: flex; flex-direction: column; }
.car .stage { background: radial-gradient(ellipse 70% 60% at 50% 72%, #f4f6fb, #c9d2e4 75%); padding: 18px 22px 8px; }
.car .stage img { width: 100%; aspect-ratio: 3 / 2; object-fit: contain; filter: drop-shadow(0 10px 8px rgba(10, 17, 36, 0.3)); }
.car figcaption { padding: 16px 20px 20px; }
.car h3 { margin: 0; font-size: 32px; line-height: 1; }
.car .class { display: block; margin: 4px 0 10px; color: var(--gold); font: 700 17px/1.2 var(--display); text-transform: uppercase; letter-spacing: 0.08em; }
.car p { margin: 0 0 8px; color: var(--muted); }
.car .trait { color: var(--text); }
.car .trait b { color: var(--gold); font-family: var(--display); text-transform: uppercase; letter-spacing: 0.04em; font-size: 18px; }

/* the maps' page: picture and words side by side on a wide screen */
.maps { display: grid; gap: 22px; }
.map { display: grid; gap: 0; background: var(--plate); border: 2px solid var(--rim); border-radius: 18px; overflow: hidden; }
.map img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.map div { padding: 18px 22px 22px; }
.map h3 { margin: 0 0 6px; font-size: 34px; line-height: 1; }
.map p { margin: 0; color: var(--muted); }
@media (min-width: 860px) {
  .map { grid-template-columns: 1.35fr 1fr; align-items: center; }
  .map div { padding: 26px 30px; }
}

.more { margin-top: 22px; padding: 18px; border: 2px dashed var(--rim); border-radius: 16px; text-align: center; color: var(--muted); font: 700 20px/1.3 var(--display); text-transform: uppercase; letter-spacing: 0.05em; }
.cta { text-align: center; }
.cta .lede { margin-left: auto; margin-right: auto; }

/* the inner pages: the header is fixed, so they start below it */
.page-head { padding: 112px 0 8px; }
.page-head h1 { font-size: clamp(40px, 7vw, 64px); line-height: 1; margin: 0 0 12px; }
.page-head + .block { padding-top: 24px; }

/* the legal pages and the contact form */
.page { max-width: 760px; margin: 0 auto; padding: 112px 16px 64px; }
.page h1 { font-size: clamp(36px, 6vw, 56px); margin: 0 0 12px; line-height: 1.05; }
.page h2 { font-size: 26px; margin: 32px 0 6px; color: var(--gold); }
.updated { color: var(--muted); }

.contact { display: grid; gap: 16px; max-width: 560px; }
.contact label { display: grid; gap: 6px; font-family: var(--display); text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.contact input, .contact select, .contact textarea {
  width: 100%; min-height: 52px; padding: 12px 14px; border: 2px solid var(--rim); border-radius: 10px;
  background: var(--plate); color: var(--text); font: 17px/1.4 system-ui, sans-serif;
}
.contact input:focus, .contact select:focus, .contact textarea:focus { outline: none; border-color: var(--gold); }
.contact .btn { justify-self: start; }
.contact .btn:disabled { opacity: 0.6; }
.status { margin: 0; min-height: 1.5em; color: var(--muted); }
.status.good { color: var(--gold); }
.status.bad { color: #ff8f7d; }

/* the footer */
.site-footer { color: var(--muted); font-size: 16px; background: #070c1a; border-top: 2px solid var(--plate); }
.footer-grid { display: grid; grid-template-columns: 1.8fr 1fr 1fr; gap: 32px; padding-top: 48px; padding-bottom: 40px; }
.footer-brand img { width: 170px; height: auto; }
.footer-logo { display: inline-block; margin-bottom: 12px; }
.footer-brand p { margin: 0 0 8px; max-width: 340px; }
.footer-soon { color: var(--gold); font-family: var(--display); letter-spacing: 0.02em; font-size: 18px; }  /* not in capitals: iOS stays iOS */
.footer-studio a { color: #ffb020; text-decoration: none; font-weight: 600; }
.site-footer nav { display: flex; flex-direction: column; gap: 4px; }
.site-footer h4 { margin: 0 0 4px; color: var(--text); font-family: var(--display); text-transform: uppercase; letter-spacing: 0.06em; font-size: 18px; }
.site-footer nav a { color: var(--muted); text-decoration: none; padding: 6px 0; }
.site-footer nav a:hover, .footer-base a:hover { color: var(--gold); }
.footer-base { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; padding-top: 18px; padding-bottom: 28px; border-top: 1px solid var(--plate); font-size: 14px; }
.footer-base a { color: var(--muted); text-decoration: none; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 400px) { .footer-grid { grid-template-columns: 1fr; } }
