@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("assets/fonts/plus-jakarta-sans-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}

/* Sizing: every length comes from --u. Below 1000px it is 16px. From 1000px up it follows the window's width and
   height, so the desktop layout is one drawing scaled as a whole. Inside a picture --u is 1/60 of the picture's width. */

:root {
  color-scheme: dark;
  --bg: #0b0e14;
  --surface: #171c26;
  --card: #11151c;
  --line: rgb(255 255 255 / 0.08);
  --line-strong: rgb(255 255 255 / 0.16);
  --text: #f3f5f9;
  --muted: #a4adbd;
  --amber: #fbbf24;
  --amber-deep: #f59e0b;
  --teal: #2dd4bf;
  --green: #34d399;
  --red: #f87171;
  --ink: #0b0e14;
  --font: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --u: 16px;

  --t-display: clamp(2.5rem, 11vw, 4.25rem);
  --t-title: 1.35rem;
  --t-body: 1rem;
  --t-ui: 0.9rem;
  --control-h: 2.75rem;
}

/* The spacing scale: the only values used for margin, padding and gap. */
:root,
.scene {
  --s-1: calc(var(--u) * 0.5);
  --s-2: var(--u);
  --s-3: calc(var(--u) * 1.5);
  --s-4: calc(var(--u) * 2);
  --s-5: calc(var(--u) * 3);
  --s-6: calc(var(--u) * 4);
}

[hidden] {
  display: none !important;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scrollbar-color: #2a3140 var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 var(--t-body) / 1.5 var(--font);
  word-spacing: 0.06em;
  -webkit-font-smoothing: antialiased;
  accent-color: var(--amber);
}

::selection {
  background: rgb(251 191 36 / 0.35);
  color: var(--text);
}

img,
svg {
  display: block;
  max-width: 100%;
}

h1,
h2,
p {
  margin: 0;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
  border-radius: 8px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Background: soft amber and teal glows on the dark base. */

.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(50vmax 42vmax at 10% 6%, rgb(251 191 36 / 0.2), transparent 70%),
    radial-gradient(52vmax 44vmax at 94% 98%, rgb(45 212 191 / 0.18), transparent 70%),
    radial-gradient(38vmax 34vmax at 58% 46%, rgb(251 191 36 / 0.05), transparent 70%);
}

/* Entrance: a short rise. Content is fully visible from the first frame. */

.reveal {
  animation: rise 0.3s var(--ease-out);
}

@keyframes rise {
  from {
    transform: translateY(6px);
  }
}

/* Page frame: header and content share it, so the logo, the copy, the Download button and the picture's right edge line up. */

.page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding-inline: var(--s-2);
}

.site-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--s-2);
  padding-block: var(--s-3);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-size: var(--t-body);
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand img {
  width: calc(var(--control-h) * 0.75);
  height: calc(var(--control-h) * 0.75);
}

.header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  align-self: stretch;
  gap: var(--s-2);
}

.header-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-2);
}

.contact {
  color: var(--muted);
  text-decoration: none;
  text-underline-offset: 4px;
}

.contact:hover {
  color: var(--text);
  text-decoration: underline;
}

.support {
  display: flex;
  align-items: center;
  gap: var(--s-1);
  min-height: var(--control-h);
  margin-top: var(--s-4);
  color: var(--muted);
  font-size: calc(var(--t-ui) * 0.75);
}

.support svg {
  width: 1em;
  height: 1em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-1);
  min-height: var(--control-h);
  padding: 0 var(--s-3);
  border: 1px solid transparent;
  border-radius: 999px;
  font: 700 var(--t-ui) / 1.3 var(--font);
  text-decoration: none;
  white-space: nowrap;
  transition:
    transform 0.35s var(--ease-out),
    box-shadow 0.35s var(--ease-out),
    background-color 0.25s ease,
    border-color 0.25s ease;
}

button.btn {
  cursor: pointer;
  word-spacing: inherit;
}

.btn svg {
  width: 1.15em;
  height: 1.15em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Windows logo: solid four panes, no stroke. */
.btn svg.win {
  fill: currentColor;
  stroke: none;
}

.btn-primary {
  color: var(--ink);
  background: linear-gradient(135deg, #fcd34d 0%, #fbbf24 45%, #f59e0b 100%);
  box-shadow: 0 14px 32px -12px rgb(251 191 36 / 0.6);
}

.btn-outline {
  color: var(--text);
  border-color: var(--line-strong);
  background: rgb(255 255 255 / 0.03);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary:hover {
  box-shadow: 0 20px 40px -14px rgb(251 191 36 / 0.7);
}

.btn-outline:hover {
  border-color: rgb(255 255 255 / 0.32);
  background: rgb(255 255 255 / 0.07);
}

/* Stage: copy and carousel. Stacks and scrolls below 1000px. */

.stage {
  flex: 1;
  display: flex;
  align-items: center;
  padding-bottom: var(--s-4);
}

.wrap {
  width: 100%;
  display: grid;
  gap: var(--s-5);
}

.carousel,
.copy {
  min-width: 0;
}

/* Left column */

.copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

h1 {
  font-size: var(--t-display);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.accent {
  background: linear-gradient(110deg, #fbbf24 15%, #f59e0b 95%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede,
.hook {
  text-wrap: balance;
}

.lede {
  margin-top: var(--s-5);
  color: var(--muted);
}

.hook {
  margin: var(--s-4) 0;
  font-weight: 700;
}

.price {
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
  height: var(--control-h);
  margin-top: var(--s-2);
  padding: 0 var(--s-3);
  border: 1px dashed rgb(251 191 36 / 0.55);
  border-radius: 999px;
  font-size: var(--t-ui);
  font-weight: 600;
}

.proof {
  margin-top: 0;
}

.flags {
  position: relative;
  display: flex;
  gap: var(--s-1);
}

.flag {
  display: block;
  border-radius: 50%;
}

.flag:focus-visible {
  border-radius: 50%;
}

.flag svg {
  width: calc(var(--control-h) * 0.6);
  height: calc(var(--control-h) * 0.6);
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--line-strong);
}

/* Tooltip: the accessible label, shown on hover and on keyboard focus. */
.flag::after {
  content: attr(aria-label);
  position: absolute;
  top: calc(100% + var(--s-1));
  left: 0;
  z-index: 10;
  display: none;
  padding: var(--s-1) var(--s-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--s-1);
  background: var(--surface);
  color: var(--text);
  font: 600 var(--t-ui) / 1.3 var(--font);
  white-space: nowrap;
}

.flag:hover::after,
.flag:focus-visible::after {
  display: block;
}

.price svg {
  width: 1em;
  height: 1em;
  flex: none;
  fill: none;
  stroke: var(--amber);
  stroke-width: 2.4;
  stroke-linecap: round;
}

/* Slide template: title, description, picture. Buttons follow in .carousel-nav. */

.slide h2 {
  font-size: var(--t-title);
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.slide-text {
  margin-top: var(--s-2);
  color: var(--muted);
  line-height: 1.5;
}

/* Inline icons: stay inside the text line, so they do not change its height. */
.learn-glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1em;
  height: 1em;
  margin: 0 0 0 0.2em;
  vertical-align: middle;
  color: var(--text);
}

.learn-glyph.is-button {
  width: 1.2em;
  height: 1.2em;
  margin: 0 0.4em 0 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface);
}

.learn-glyph svg {
  width: 0.85em;
  height: 0.85em;
}

.learn-glyph path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.learn-glyph.is-solid path {
  fill: currentColor;
  stroke: none;
}

/* Picture box: the same on all six slides. Everything inside is sized in the picture's own --u, 60 units wide. */

.pic {
  container-type: inline-size;
  position: relative;
  margin: var(--s-4) 0 0;
  width: 100%;
  aspect-ratio: 2 / 1;
  border: 1px solid var(--line);
  border-radius: calc(var(--control-h) * 0.4);
  background: var(--card);
}

.scene {
  --u: calc(100cqi / 60);
  /* Picture type scale. */
  --m-lg: calc(var(--u) * 4);
  --m-md: calc(var(--u) * 2.2);
  --m-sm: calc(var(--u) * 1.35);
  --m-xs: calc(var(--u) * 1.05);
  /* One portrait size on every slide. */
  --p: calc(var(--u) * 8.5);
  --spell: calc(var(--p) * 0.34);
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: var(--s-3);
}

.scene.row-layout {
  gap: var(--s-2);
}

/* Slides 1 and 4: portraits */

.rows {
  display: flex;
  align-items: flex-start;
  gap: var(--s-5);
}

/* Slide 1: two rows. The two below sit centred under the three above, half a step in.
   The padding balances the icons that hang out on the right, so the group with its icons is centred. */
.rows.is-team {
  display: grid;
  grid-template-columns: repeat(3, var(--p));
  padding-right: calc(var(--spell) * 0.5);
}

.rows.is-team .unit:nth-child(n + 4) {
  margin-left: calc((var(--p) + var(--s-5)) / 2);
}

/* One portrait wide: a label wider than the portrait hangs over evenly and does not change the spacing. */
.unit {
  width: var(--p);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-3);
}

.portrait {
  position: relative;
  flex: none;
  width: var(--p);
  height: var(--p);
}

.face {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 0 0 2px rgb(255 255 255 / 0.14), 0 18px 30px -12px rgb(0 0 0 / 0.85);
}

.face img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Spell buttons on the portrait's rim: R above, D to the side, F below. */

.spell {
  --ring: rgb(255 255 255 / 0.22);
  position: absolute;
  width: var(--spell);
  height: var(--spell);
  transform: translate(-50%, -50%);
  overflow: hidden;
  isolation: isolate;
  border: 2px solid var(--ring);
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 8px 16px -6px rgb(0 0 0 / 0.9);
}

.spell img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.spell.r {
  left: 82.1%;
  top: 11.7%;
}

.spell.d {
  left: 100%;
  top: 50%;
}

.spell.f {
  left: 82.1%;
  top: 88.3%;
}

/* Ready: crisp coloured ring. R teal; D and F amber. */
.spell.ready.r {
  --ring: var(--teal);
}

.spell.ready.d,
.spell.ready.f {
  --ring: var(--amber);
}

/* Just became ready: amber ring with a soft glow. */
.spell.glow {
  box-shadow:
    0 0 0 5px rgb(251 191 36 / 0.16),
    0 6px 26px 4px rgb(251 191 36 / 0.6),
    0 8px 16px -6px rgb(0 0 0 / 0.9);
}

/* Cooldown: the icon is greyed out, with a dark sweep over the unfinished part. --rem is that fraction. */
.cd img {
  filter: grayscale(1) brightness(0.6);
}

.dim {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(
    rgb(6 8 12 / 0.74) 0deg calc(var(--rem) * 360deg),
    transparent calc(var(--rem) * 360deg)
  );
}

.gold {
  flex: none;
  padding: var(--s-1) var(--s-2);
  border-radius: 999px;
  font: 700 var(--m-md) / 1 var(--font);
  white-space: nowrap;
}

/* Last slide: you, the difference, your lane opponent. */
.versus {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-around;
}

.versus .gold {
  padding: var(--s-2) var(--s-3);
  font-size: var(--m-lg);
}

.side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-2);
}

.side-name {
  color: var(--text);
  font: 600 var(--m-md) / 1.2 var(--font);
  white-space: nowrap;
}

.items {
  display: flex;
  gap: var(--s-2);
}

.items img {
  width: calc(var(--u) * 5);
  height: calc(var(--u) * 5);
  border-radius: var(--s-1);
  box-shadow: 0 0 0 1px var(--line-strong);
}

.gold.up {
  color: var(--green);
  background: rgb(52 211 153 / 0.14);
}

.gold.down {
  color: var(--red);
  background: rgb(248 113 113 / 0.14);
}

/* Slides 2 and 3: notice bars, the app's notice look: a bar with a coloured dot. */

.notices {
  width: 100%;
  height: 100%;
  display: grid;
  gap: var(--s-2);
}

.ready-notice,
.mini-notice {
  --dot: var(--amber);
  display: flex;
  align-items: center;
  gap: var(--s-2);
  padding: 0 var(--s-2);
  border: 1px solid var(--line);
  border-radius: var(--s-2);
  background: var(--surface);
  color: var(--text);
  font: 600 var(--m-sm) / 1.2 var(--font);
  white-space: nowrap;
}

.ready-notice.is-r {
  --dot: var(--teal);
}

.mini-notice {
  --dot: #60a5fa;
  flex: 1;
  min-width: 0;
  height: calc((100% - var(--s-2) * 2) / 3);
}

.ready-dot,
.mini-dot {
  flex: none;
  width: var(--s-3);
  height: var(--s-3);
  border-radius: 50%;
  background: var(--dot);
}

.minimap {
  flex: none;
  height: 100%;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--s-2);
}

.minimap img {
  width: auto;
  height: 100%;
}

/* Slide 5: damage panel, Lee Sin's numbers against Anivia. */

.damage {
  /* Every number uses --m-num; base damage numbers are 2px smaller. */
  --m-num: calc(var(--u) * 1.5);
  --m-md: calc(var(--u) * 1.85);
  --m-sm: calc(var(--u) * 1.2);
  width: 100%;
  height: 100%;
  display: flex;
  gap: var(--s-5);
  color: var(--text);
}

.dmg-abilities {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.dmg-cols {
  flex: 1;
  display: flex;
  align-items: center;
}

.dmg-col {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-2);
  text-align: center;
}

.dmg-col.is-rows {
  flex: none;
}

.dmg-head {
  display: flex;
  align-items: center;
  min-height: calc(var(--u) * 5);
  gap: var(--s-1);
  color: var(--amber);
  font: 700 var(--m-md) / 1 var(--font);
}

.dmg-head img {
  width: calc(var(--u) * 5);
  height: calc(var(--u) * 5);
  border-radius: 50%;
}

.dmg-col.is-r .dmg-head {
  color: var(--teal);
}

.dmg-after,
.dmg-raw {
  display: flex;
  align-items: center;
  height: var(--s-3);
  white-space: nowrap;
}

.dmg-after {
  color: var(--text);
  font: 700 var(--m-num) / 1 var(--font);
}

.dmg-raw {
  color: var(--muted);
  font: 600 calc(var(--m-num) - 2px) / 1 var(--font);
}

.dmg-total {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  padding-top: var(--s-3);
  border-top: 1px solid var(--line);
  white-space: nowrap;
}

.dmg-ico {
  flex: none;
  display: inline-flex;
  width: var(--m-num);
  height: var(--m-num);
  color: var(--muted);
}

.dmg-ico.is-gold {
  color: var(--amber);
}

/* The app's red for a kill: --ov-alert in damage-panel.css. */
.dmg-ico.is-lethal {
  color: var(--red);
}

.dmg-ico svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.dmg-ico svg path.solid {
  fill: currentColor;
  stroke: none;
}

.dmg-big {
  color: var(--text);
  font: 700 var(--m-num) / 1 var(--font);
}

.dmg-small {
  color: var(--muted);
  font: 600 calc(var(--m-num) - 2px) / 1 var(--font);
}

.dmg-hits {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
  color: var(--red);
  font: 700 var(--m-num) / 1 var(--font);
}

.dmg-target {
  flex: none;
  padding-left: var(--s-5);
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
}

/* The one exception to the shared portrait size, so the panel fits. */
.dmg-portrait {
  width: calc(var(--p) * 0.88);
  height: calc(var(--p) * 0.88);
  overflow: hidden;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgb(255 255 255 / 0.14);
}

.dmg-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dmg-lane {
  color: var(--muted);
  font: 600 var(--m-sm) / 1.2 var(--font);
  white-space: nowrap;
}

/* Slide 6: the enemy pick and its five counters. */

.champ {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.champ-head {
  display: flex;
  align-items: center;
  gap: var(--s-3);
}

.champ-portrait {
  position: relative;
  flex: none;
  width: var(--p);
  height: var(--p);
  overflow: hidden;
  border-radius: 50%;
  background: var(--bg);
}

.champ-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.champ-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.champ-name {
  color: var(--text);
  font: 700 var(--m-md) / 1.25 var(--font);
}

.champ-meta {
  color: var(--muted);
  font: 600 var(--m-sm) / 1.4 var(--font);
}

.champ-label {
  color: var(--muted);
  font: 700 var(--m-xs) / 1.2 var(--font);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.champ-counters {
  display: flex;
  justify-content: space-between;
}

.champ-counter {
  width: var(--p);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-1);
}

.champ-counter.is-best .champ-portrait {
  box-shadow: 0 0 0 2px var(--amber);
}

.champ-cname {
  color: var(--text);
  font: 600 var(--m-sm) / 1.2 var(--font);
  white-space: nowrap;
}

/* Previous and Next: directly under the picture, one at each edge. */

.carousel-nav {
  display: flex;
  align-items: center;
  min-height: var(--control-h);
  margin-top: var(--s-3);
}

/* Below 1000px each button takes at most half the row and its title may wrap. */
.step {
  width: 48%;
  padding: var(--s-1) var(--s-2);
  white-space: normal;
}

.step-next {
  margin-left: auto;
}

.btn-outline.step-next,
.btn-outline.step-next:hover {
  border-color: var(--amber);
}

/* Desktop: 94 units wide in total, centred; the side margins are at least --s-5. */

@media (min-width: 1000px) {
  :root {
    --u: clamp(9px, min(1vw, 1.7778vh), 40px);
    --t-display: calc(var(--u) * 4);
    --t-title: calc(var(--u) * 2.2);
    --t-body: calc(var(--u) * 1.35);
    --t-ui: calc(var(--u) * 1.15);
    --control-h: calc(var(--u) * 3.2);
  }

  .page {
    width: calc(var(--u) * 94);
    margin-inline: auto;
    padding-inline: 0;
  }

  .site-header {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding-block: var(--s-4);
  }

  .wrap {
    grid-template-columns: calc(var(--u) * 28) calc(var(--u) * 60);
    gap: calc(var(--s-5) * 2);
  }

  .flag {
    position: relative;
  }

  .flag::after {
    left: 50%;
    transform: translateX(-50%);
  }

  /* The partition: centred in the gap, the height of the content. */
  .carousel {
    position: relative;
  }

  .carousel::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 calc(var(--s-5) * -1);
    width: 1px;
    background: rgb(251 191 36 / 0.22);
  }

  /* An invisible copy of the h1's first line shares the title's baseline, so the title always sits level with
     "Stop guessing." and both columns start at the same top. */
  .slide h2 {
    display: flex;
    align-items: baseline;
  }

  .slide h2::before {
    content: "x";
    width: 0;
    visibility: hidden;
    font-size: var(--t-display);
    line-height: 1.05;
  }

  .slide-text {
    height: 1.5em;
  }

  .step {
    width: calc(var(--u) * 14);
    padding: 0 var(--s-3);
    white-space: nowrap;
  }

  .support {
    margin-top: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
