/* ampere.games — one stylesheet for every page. */

:root {
  --night: #140f2e;      /* page: the arena at night */
  --rink: #1d1747;       /* raised surfaces */
  --rink-line: #2c2566;  /* hairlines on the rink */
  --ice: #edf2ff;        /* text */
  --frost: #aaa6d0;      /* secondary text */
  --cyan: #3ad7ff;       /* "AIR": links, rink lines */
  --magenta: #ff52ba;    /* "HOCKEY": twists */
  --flame: #ff8a24;      /* "CLASH": goals, calls to action */

  --display: "Big Shoulders Display", "Arial Narrow", sans-serif;
  --body: "Exo 2", system-ui, sans-serif;

  --gutter: clamp(16px, 4vw, 48px);
  --measure: 62ch;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--night);
  color: var(--ice);
  font: 400 1.125rem/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }

a { color: var(--cyan); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--ice); }
:focus-visible { outline: 2px solid var(--flame); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: absolute; left: var(--gutter); top: -100px;
  background: var(--flame); color: var(--night); padding: 8px 14px; font-weight: 600;
}
.skip:focus { top: 12px; z-index: 10; }

/* ---------- header ---------- */

.site-header {
  position: relative; z-index: 3;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px var(--gutter);
}
.site-header.over { position: absolute; inset: 0 0 auto 0; }

.wordmark { display: block; flex: none; }
.wordmark img { height: 56px; width: auto; }

.site-nav { display: flex; gap: clamp(14px, 3vw, 28px); }
.site-nav a {
  color: var(--frost); text-decoration: none; font-weight: 600; font-size: 1rem;
  padding: 6px 0; border-bottom: 2px solid transparent;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ice); border-bottom-color: var(--cyan); }

/* ---------- hero: the table ---------- */

.table {
  position: relative;
  min-height: min(92svh, 920px);
  display: grid; place-items: center;
  overflow: hidden;
  background: radial-gradient(120% 90% at 50% 50%, #221a55 0%, var(--night) 70%);
  touch-action: pan-y;
}
.table canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

.table-center {
  position: relative; z-index: 2;
  display: grid; justify-items: center; text-align: center; gap: 18px;
  padding: 96px var(--gutter) 72px;
  pointer-events: none;
}
.table-center a { pointer-events: auto; }
.table-center h1 { margin: 0; }
.table-center h1 img { width: min(560px, 82vw); filter: drop-shadow(0 6px 30px rgba(20, 15, 46, 0.9)); }

.pitch {
  margin: 0; max-width: 18em;
  font: 700 clamp(1.6rem, 3.6vw, 2.4rem)/1.05 var(--display);
  text-shadow: 0 2px 18px var(--night);
}
.status {
  margin: 4px 0 0;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 18px; border-radius: 999px;
  background: rgba(20, 15, 46, 0.78); border: 1px solid var(--rink-line);
  color: var(--ice); font-weight: 600; font-size: 1rem;
}
.status::before {
  content: ""; width: 9px; height: 9px; border-radius: 50%;
  background: var(--flame); box-shadow: 0 0 10px var(--flame);
}
.hint { margin: 0; color: var(--frost); font-size: 0.95rem; text-shadow: 0 1px 10px var(--night); }
@media (prefers-reduced-motion: reduce) { .hint { display: none; } }

/* ---------- sections ---------- */

main > section { padding: clamp(72px, 10vw, 140px) var(--gutter) 0; }
main > section:last-child { padding-bottom: clamp(72px, 10vw, 140px); }

.inner { max-width: 1180px; margin: 0 auto; }

h2 {
  margin: 0 0 18px;
  font: 800 clamp(2.5rem, 6vw, 4.5rem)/0.95 var(--display);
  letter-spacing: -0.005em;
}
h3 { margin: 0 0 6px; font: 700 1.6rem/1.05 var(--display); }
.lede { margin: 0; max-width: var(--measure); color: var(--frost); font-size: 1.2rem; }

/* phone screenshots */
.shot {
  margin: 0;
  border-radius: clamp(22px, 3.4vw, 40px);
  overflow: hidden;
  border: 3px solid #2b2560;
  box-shadow: 0 0 0 1px #0c0820, 0 30px 60px -20px rgba(0, 0, 0, 0.7);
  background: #0c0820;
  aspect-ratio: 1320 / 2868;
}
.shot img { width: 100%; height: 100%; object-fit: cover; }

/* the match */
.match-grid {
  display: grid; gap: clamp(20px, 4vw, 56px);
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.8fr) minmax(0, 0.8fr);
  align-items: end; margin-top: clamp(32px, 5vw, 56px);
}
.match-grid .copy { align-self: center; }
.match-grid .copy p { margin: 0 0 14px; max-width: 34ch; }
.match-grid figure:nth-of-type(2) { transform: translateY(-48px); }
figcaption { margin-top: 12px; color: var(--frost); font-size: 0.95rem; }
.match-grid figure { margin: 0; }

/* the journey: a street with stops */
.route {
  list-style: none; margin: clamp(36px, 5vw, 64px) 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(16px, 3vw, 36px);
  position: relative;
}
.route::before {
  content: ""; position: absolute; left: 0; right: 0; top: 11px; height: 4px; border-radius: 2px;
  background: repeating-linear-gradient(90deg, var(--flame) 0 18px, transparent 18px 30px);
  opacity: 0.8;
}
.route li { position: relative; padding-top: 40px; }
.route li::before {
  content: ""; position: absolute; top: 0; left: 0;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--night); border: 4px solid var(--flame);
  box-shadow: 0 0 14px rgba(255, 138, 36, 0.6);
}
.route h3 { margin-top: 18px; }
.route p { margin: 0; color: var(--frost); font-size: 1rem; }

/* twists */
.twists {
  list-style: none; margin: clamp(36px, 5vw, 56px) 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 30px clamp(20px, 3vw, 40px);
}
.twists li { display: grid; grid-template-columns: 64px 1fr; gap: 16px; align-items: start; }
.badge {
  width: 64px; height: 64px;
  background: var(--magenta);
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
  filter: drop-shadow(0 0 10px rgba(255, 82, 186, 0.55));
}
.twists .boss .badge { background: #ff4a4a; filter: drop-shadow(0 0 12px rgba(255, 74, 74, 0.7)); }
.twists h3 { font-size: 1.45rem; margin-top: 4px; }
.twists p { margin: 0; color: var(--frost); font-size: 1rem; }

/* gear: boosters (blue) and breakers (red), the game's two colours */
.gear {
  margin-top: clamp(36px, 5vw, 56px);
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(28px, 5vw, 72px);
}
.gear-side h3 { font-size: 1.9rem; padding-bottom: 14px; margin-bottom: 8px; border-bottom: 3px solid; }
.boosters h3 { color: #5aa8ff; border-color: #0379ff; }
.breakers h3 { color: #ff6a55; border-color: #ff2302; }
.gear-side ul { list-style: none; margin: 0; padding: 0; }
.gear-side li {
  display: grid; grid-template-columns: 72px 1fr; gap: 18px; align-items: center;
  padding: 14px 0; border-bottom: 1px solid var(--rink-line);
}
.gear-side img { width: 72px; height: 72px; }
.gear-side h4 { margin: 0 0 2px; font: 700 1.45rem/1.05 var(--display); }
.gear-side p { margin: 0; color: var(--frost); font-size: 1rem; }

/* physics: copy beside a bank shot drawn one sim step per dot */
.physics {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 340px);
  gap: clamp(32px, 6vw, 96px); align-items: center;
}
.points { list-style: none; margin: clamp(28px, 4vw, 44px) 0 0; padding: 0; display: grid; gap: 24px; }
.points p { margin: 0; color: var(--frost); max-width: 46ch; }
.bank-figure { margin: 0; }
.bank { display: block; width: 100%; max-width: 340px; margin: 0 auto; overflow: visible; }
.bank-floor { fill: var(--rink); }
.bank-rail { fill: none; stroke: var(--cyan); stroke-width: 2.2; stroke-linecap: round; filter: drop-shadow(0 0 3px rgba(58, 215, 255, 0.6)); }
.bank-goal { stroke: var(--flame); stroke-width: 2.2; opacity: 0.5; }
.bank-centre { fill: none; stroke: var(--magenta); stroke-width: 0.8; opacity: 0.7; }
.bank-crease { fill: none; stroke: var(--cyan); stroke-width: 0.8; opacity: 0.45; }
.bank-dots { fill: var(--flame); }
.bank-hit { fill: none; stroke: var(--ice); stroke-width: 0.8; opacity: 0.8; }
.bank-mallet { fill: var(--night); stroke: var(--cyan); stroke-width: 2; }
.bank-mallet.rival { stroke: var(--magenta); }
.bank-puck { fill: var(--night); stroke: var(--flame); stroke-width: 1.6; }
.bank-figure figcaption { max-width: 340px; margin: 14px auto 0; }

/* online: three steps on a signal line */
.steps {
  list-style: none; margin: clamp(36px, 5vw, 56px) 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px);
  counter-reset: step; position: relative;
}
.steps::before {
  content: ""; position: absolute; left: 0; right: 0; top: 26px; height: 2px;
  background: repeating-linear-gradient(90deg, var(--cyan) 0 10px, transparent 10px 18px); opacity: 0.6;
}
.steps li { position: relative; counter-increment: step; }
.steps li::before {
  content: counter(step);
  display: grid; place-items: center; width: 54px; height: 54px; margin-bottom: 18px;
  border-radius: 50%; background: var(--night); border: 3px solid var(--cyan);
  color: var(--cyan); font: 800 1.7rem/1 var(--display);
  box-shadow: 0 0 14px rgba(58, 215, 255, 0.45);
}
.steps p { margin: 0; color: var(--frost); max-width: 34ch; }
.fair { margin: clamp(28px, 4vw, 40px) 0 0; max-width: var(--measure); }
.ways {
  list-style: none; margin: clamp(36px, 5vw, 56px) 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--rink-line); border-bottom: 1px solid var(--rink-line);
}
.ways li { padding: 26px clamp(16px, 2.5vw, 32px) 26px 0; }
.ways li + li { border-left: 1px solid var(--rink-line); padding-left: clamp(16px, 2.5vw, 32px); }
.ways p { margin: 0; color: var(--frost); }

/* play at your own pace */
.modes {
  margin: clamp(36px, 5vw, 56px) 0 0; padding: 0; list-style: none;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--rink-line);
}
.modes li { padding: 28px clamp(0px, 3vw, 36px) 28px 0; border-bottom: 1px solid var(--rink-line); }
.modes li:nth-child(odd) { border-right: 1px solid var(--rink-line); }
.modes li:nth-child(even) { padding-left: clamp(20px, 3vw, 36px); }
.modes p { margin: 0; color: var(--frost); max-width: 44ch; }

/* ---------- document pages (privacy, support) ---------- */

.doc { padding: clamp(40px, 7vw, 96px) var(--gutter) clamp(72px, 10vw, 120px); }
.doc .inner { max-width: 760px; }
.doc h1 { margin: 0 0 12px; font: 800 clamp(2.8rem, 7vw, 4.8rem)/0.95 var(--display); }
.doc .updated { margin: 0 0 40px; color: var(--frost); }
.doc h2 { margin: 48px 0 12px; font-size: clamp(1.8rem, 3.6vw, 2.4rem); }
.doc h3 { margin: 28px 0 6px; font-size: 1.4rem; }
.doc p, .doc li { max-width: var(--measure); }
.doc ul { padding-left: 1.2em; }
.doc li { margin: 6px 0; }
.contact-card {
  margin: 28px 0 8px; padding: 22px 24px;
  border: 1px solid var(--rink-line); border-left: 4px solid var(--flame); border-radius: 6px;
  background: var(--rink);
}
.contact-card p { margin: 0; }
.contact-card a { font-size: 1.3rem; font-weight: 600; }

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--rink-line);
  padding: 36px var(--gutter) 48px;
  color: var(--frost); font-size: 0.95rem;
}
.site-footer .inner { display: flex; flex-wrap: wrap; gap: 14px 40px; justify-content: space-between; align-items: baseline; }
.site-footer p { margin: 0; }
.site-footer nav { display: flex; gap: 24px; flex-wrap: wrap; }

/* ---------- small screens ---------- */

@media (max-width: 900px) {
  .match-grid { grid-template-columns: 1fr 1fr; }
  .match-grid .copy { grid-column: 1 / -1; }
  .match-grid figure:nth-of-type(2) { transform: none; }
  .route { grid-template-columns: 1fr 1fr; row-gap: 48px; }
  .route::before { display: none; }
}
@media (max-width: 760px) {
  .gear { grid-template-columns: 1fr; }
  .physics { grid-template-columns: 1fr; }
  .bank { max-width: 260px; }
  .steps { grid-template-columns: 1fr; gap: 26px; }
  .steps::before { left: 26px; right: auto; top: 0; bottom: 0; width: 2px; height: auto;
    background: repeating-linear-gradient(180deg, var(--cyan) 0 10px, transparent 10px 18px); }
  .steps li { display: grid; grid-template-columns: 54px 1fr; column-gap: 18px; }
  .steps li::before { grid-row: span 2; margin-bottom: 0; }
  .ways { grid-template-columns: 1fr; }
  .ways li + li { border-left: 0; padding-left: 0; border-top: 1px solid var(--rink-line); }
}
@media (max-width: 620px) {
  .modes { grid-template-columns: 1fr; }
  .modes li:nth-child(odd) { border-right: 0; }
  .modes li:nth-child(even) { padding-left: 0; }
  .route { grid-template-columns: 1fr 1fr; gap: 40px 16px; }
  .route h3 { font-size: 1.35rem; }
  .site-header { padding-top: 14px; }
  .wordmark img { height: 46px; }
}
