@font-face {
  font-family: 'Apotek Wide';
  src: url('/assets/fonts/ApotekWide-Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: 'Apotek Wide';
  src: url('/assets/fonts/ApotekWide-Semibold.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: 'Apotek Wide';
  src: url('/assets/fonts/ApotekWide-Bold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

/* The X7 palette, dark-first like the product: the navy family of the brand, the electric blue
   from the logo gradient, the mint for calls to action, and the two World Taekwondo corners. */
:root {
  --page: #060a14;
  --card: #0e1524;
  --inset: #131b2d;
  --line: #24304a;
  --ink-strong: #eef3fc;
  --ink: #c3cee4;
  --muted: #96a3be;
  --accent: #479ada;
  --accent-soft: #7eb4ea;
  --mint: #3fd0a2;
  --blue: #479ada;
  --red: #f04f6a;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: 'Apotek Wide', system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

.wrap {
  width: min(1180px, 100% - 32px);
  margin-inline: auto;
}

/* ---- backdrop: two slow glows over a fading grid ---- */

.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.glow {
  position: absolute;
  width: 60vmax;
  height: 60vmax;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.32;
}

.glow-blue {
  top: -25vmax;
  left: -15vmax;
  background: radial-gradient(circle, #1f5fa8, transparent 65%);
  animation: drift 22s var(--ease) infinite alternate;
}

.glow-red {
  right: -25vmax;
  top: 10vmax;
  background: radial-gradient(circle, #8a1a35, transparent 65%);
  opacity: 0.22;
  animation: drift 28s var(--ease) infinite alternate-reverse;
}

@keyframes drift {
  to {
    transform: translate(8vmax, 6vmax) scale(1.1);
  }
}

.gridlines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgb(238 243 252 / 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgb(238 243 252 / 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at 50% 0%, black 20%, transparent 70%);
}

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

.top {
  position: sticky;
  top: 0;
  z-index: 10;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}

.top.scrolled {
  backdrop-filter: blur(14px);
  background: rgb(6 10 20 / 0.7);
  border-bottom-color: var(--line);
}

.top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.wordmark {
  color: #ffffff;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: 0.22em;
  line-height: 1;
}

.brand-rule {
  width: 56px;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.wordmark.small {
  font-size: 14px;
}

nav {
  display: flex;
  align-items: center;
  gap: 28px;
  font-size: 14px;
}

nav a {
  color: var(--muted);
  transition: color 0.2s;
}

nav a:hover {
  color: var(--ink-strong);
}

nav .pill {
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-strong);
  transition: border-color 0.2s, background 0.2s;
}

nav .pill:hover {
  border-color: var(--accent);
  background: rgb(71 154 218 / 0.1);
}

/* ---- hero: the sparring photograph from the portal's sign-in, shot dark ---- */

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  height: clamp(680px, 100svh, 960px);
  margin-top: -68px;
  padding: 140px 0 96px;
  overflow: hidden;
  background: #03060d;
}

.photo {
  position: absolute;
  z-index: -1;
  top: 0;
  right: max(-80px, (100vw - 1180px) / 2 - 140px);
  height: 100%;
  aspect-ratio: 1000 / 1127;
  mask-image: linear-gradient(90deg, transparent 0%, black 28%, black 82%, transparent 100%),
    linear-gradient(0deg, transparent 0%, black 18%);
  mask-composite: intersect;
}

.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(1.08) contrast(1.08) saturate(1.05);
  animation: settle 2.6s var(--ease) both;
}

@keyframes settle {
  from {
    opacity: 0;
    transform: scale(1.1);
  }
  30% {
    opacity: 1;
  }
}

/* A slow beam of light that sweeps the floor, like a broadcast spotlight. */
.spotlight {
  position: absolute;
  inset: 0;
  background: radial-gradient(38% 28% at var(--sx, 30%) 92%, rgb(255 214 150 / 0.22), transparent 70%);
  mix-blend-mode: screen;
  animation: sweep 9s ease-in-out infinite alternate;
}

@keyframes sweep {
  from {
    --sx: 30%;
  }
  to {
    --sx: 72%;
  }
}

@property --sx {
  syntax: '<percentage>';
  inherits: false;
  initial-value: 30%;
}

/* Where blue's kick meets red's chest protector: the receiver registers it. */
.impact {
  position: absolute;
  left: 63%;
  top: 39%;
  width: 0;
  height: 0;
}

.impact .ring {
  position: absolute;
  left: -40px;
  top: -40px;
  width: 80px;
  height: 80px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  opacity: 0;
  animation: impact 3.2s ease-out 2.2s infinite;
}

.impact .ring + .ring {
  animation-delay: 2.45s;
  border-color: var(--accent-soft);
}

@keyframes impact {
  0% {
    transform: scale(0.15);
    opacity: 0.95;
  }
  35%,
  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}

.impact .chip {
  position: absolute;
  left: 38px;
  top: -64px;
  padding: 6px 12px;
  border: 1px solid rgb(71 154 218 / 0.5);
  border-radius: 999px;
  background: rgb(6 10 20 / 0.75);
  backdrop-filter: blur(6px);
  color: var(--ink-strong);
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 12px;
  white-space: nowrap;
  opacity: 0;
  animation: chip 3.2s var(--ease) 2.2s infinite;
}

.impact .chip b {
  color: var(--mint);
}

@keyframes chip {
  0% {
    opacity: 0;
    transform: translateY(8px);
  }
  10%,
  70% {
    opacity: 1;
    transform: none;
  }
  85%,
  100% {
    opacity: 0;
    transform: translateY(-6px);
  }
}

.hero-copy {
  position: relative;
}

.hero-copy > * {
  max-width: 560px;
}

.tagline {
  display: flex;
  align-items: center;
  gap: 14px;
  color: rgb(255 255 255 / 0.75);
  animation: fadein 0.8s var(--ease) 0.15s both;
}

.tag-rule {
  width: 56px;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), transparent);
  transform-origin: left;
  animation: draw 1.2s var(--ease) 0.3s both;
}

@keyframes draw {
  from {
    transform: scaleX(0);
  }
}

@keyframes fadein {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

.corners {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 48px;
  color: rgb(255 255 255 / 0.7);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.corners .bar {
  width: 40px;
  height: 3px;
  border-radius: 3px;
}

.corners .bar.blue {
  background: var(--blue);
}

.corners .bar.red {
  background: var(--red);
}

.corners .sep {
  width: 1px;
  height: 12px;
  background: rgb(255 255 255 / 0.25);
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--ink-strong);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.headline {
  font-size: clamp(48px, 7.4vw, 104px);
  line-height: 0.98;
}

.headline .line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.06em;
}

.headline .line > span {
  display: inline-block;
  transform: translateY(105%);
  animation: rise 1s var(--ease) forwards;
}

.headline .line:nth-child(2) > span {
  animation-delay: 0.12s;
}

.accent {
  background: linear-gradient(100deg, var(--accent) 0%, var(--accent-soft) 45%, var(--mint) 100%);
  background-size: 200% 100%;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation:
    rise 1s var(--ease) 0.12s forwards,
    sheen 6s ease-in-out 1.2s infinite alternate !important;
}

@keyframes rise {
  to {
    transform: translateY(0);
  }
}

@keyframes sheen {
  to {
    background-position: 100% 0;
  }
}

.lede {
  max-width: 34em;
  margin: 28px 0 36px;
  font-size: 19px;
  color: var(--ink);
}

.actions {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}

.button {
  display: inline-block;
  padding: 14px 26px;
  border-radius: 999px;
  background: var(--mint);
  color: #04140d;
  font-weight: 700;
  font-size: 15px;
  box-shadow: 0 0 0 0 rgb(63 208 162 / 0.5);
  transition: transform 0.25s var(--ease), box-shadow 0.25s;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 34px -10px rgb(63 208 162 / 0.7);
}

.button.big {
  padding: 18px 34px;
  font-size: 17px;
}

.link {
  color: var(--ink-strong);
  font-weight: 600;
  font-size: 15px;
}

.link span {
  display: inline-block;
  transition: transform 0.25s var(--ease);
}

.link:hover span {
  transform: translateX(5px);
}

/* ---- the live card: a training session that scores itself ---- */

.live-card {
  margin: 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(180deg, rgb(14 21 36 / 0.92), rgb(10 15 27 / 0.92));
  box-shadow:
    0 40px 80px -40px rgb(0 0 0 / 0.8),
    0 0 0 1px rgb(71 154 218 / 0.06) inset;
  transform: perspective(1400px) rotateY(-6deg) rotateX(3deg);
  transition: transform 0.6s var(--ease);
}

.live-card:hover {
  transform: perspective(1400px) rotateY(0) rotateX(0);
}

.live-head {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mint);
  animation: pulse 1.6s ease-out infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgb(63 208 162 / 0.7);
  }
  100% {
    box-shadow: 0 0 0 10px rgb(63 208 162 / 0);
  }
}

.clock {
  margin-left: auto;
  color: var(--ink-strong);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.score {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 10px;
  margin: 16px 0 14px;
}

.corner {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 8px 6px;
  border-radius: 14px;
}

.corner.blue {
  background: linear-gradient(160deg, #1560b5, #0d3f7a);
}

.corner.red {
  background: linear-gradient(200deg, #cc1f49, #8a1431);
}

.who {
  color: rgb(255 255 255 / 0.8);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.pts {
  color: #ffffff;
  font-size: 64px;
  font-weight: 700;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.pts.bump {
  animation: bump 0.45s var(--ease);
}

@keyframes bump {
  40% {
    transform: scale(1.18);
  }
}

.vs {
  align-self: center;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.force {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  background: var(--inset);
}

.force .zone {
  fill: rgb(150 163 190 / 0.07);
}

.force .level {
  stroke: var(--ink-strong);
  stroke-width: 1.5;
}

.force .hard {
  stroke: var(--muted);
  stroke-dasharray: 4 4;
}

.force .tag,
.force .axis {
  fill: var(--muted);
  font-size: 9px;
  font-family: inherit;
}

.force .dot {
  stroke: var(--inset);
  stroke-width: 2;
  transform-box: fill-box;
  transform-origin: center;
  animation: land 0.5s var(--ease);
}

.force .dot.blue {
  fill: var(--blue);
}

.force .dot.red {
  fill: var(--red);
}

.force .ring {
  fill: none;
  stroke-width: 1.5;
  transform-box: fill-box;
  transform-origin: center;
  animation: ripple 1.2s ease-out forwards;
}

.force .ring.blue {
  stroke: var(--blue);
}

.force .ring.red {
  stroke: var(--red);
}

@keyframes land {
  from {
    transform: translateY(-14px) scale(0.2);
    opacity: 0;
  }
}

@keyframes ripple {
  from {
    transform: scale(0.4);
    opacity: 1;
  }
  to {
    transform: scale(3);
    opacity: 0;
  }
}

.feed {
  height: 66px;
  margin: 12px 0 0;
  padding: 0;
  overflow: hidden;
  list-style: none;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: 12px;
  color: var(--muted);
}

.feed li {
  display: flex;
  justify-content: space-between;
  padding: 2px 0;
  animation: slide 0.4s var(--ease);
}

.feed li:first-child {
  color: var(--ink-strong);
}

.feed .no {
  color: var(--red);
}

.feed .yes {
  color: var(--mint);
}

@keyframes slide {
  from {
    transform: translateY(-100%);
    opacity: 0;
  }
}

/* ---- ticker ---- */

.ticker {
  overflow: hidden;
  border-block: 1px solid var(--line);
  background: rgb(14 21 36 / 0.5);
  mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
}

.ticker-track {
  display: flex;
  width: max-content;
  animation: scroll 40s linear infinite;
}

.ticker span {
  padding: 18px 28px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.ticker span::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 28px;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: middle;
}

@keyframes scroll {
  to {
    transform: translateX(-50%);
  }
}

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

.band {
  padding: 140px 0 100px;
}

h2 {
  max-width: 18em;
  font-size: clamp(34px, 4.4vw, 56px);
  line-height: 1.05;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 56px;
}

.card {
  position: relative;
  padding: 32px 28px 34px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgb(14 21 36 / 0.7);
  overflow: hidden;
  transition: transform 0.4s var(--ease), border-color 0.4s;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%), rgb(71 154 218 / 0.14), transparent 50%);
  opacity: 0;
  transition: opacity 0.3s;
}

.card:hover {
  transform: translateY(-6px);
  border-color: rgb(71 154 218 / 0.5);
}

.card:hover::before {
  opacity: 1;
}

.num {
  display: block;
  margin-bottom: 44px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.card h3 {
  margin-bottom: 12px;
  font-size: 22px;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.split {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 72px;
  align-items: center;
  padding: 60px 0 140px;
}

.copy > p {
  margin: 24px 0 28px;
  color: var(--ink);
}

.facts {
  margin: 0;
  padding: 0;
  list-style: none;
}

.facts li {
  padding: 14px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 15px;
}

.facts strong {
  color: var(--ink-strong);
}

.cta {
  margin-bottom: 120px;
  padding: 88px 40px;
  border: 1px solid var(--line);
  border-radius: 28px;
  text-align: center;
  background:
    radial-gradient(600px circle at 50% 120%, rgb(63 208 162 / 0.18), transparent 60%),
    radial-gradient(700px circle at 50% -40%, rgb(71 154 218 / 0.22), transparent 60%),
    var(--card);
}

.cta h2 {
  max-width: none;
}

.cta p {
  margin: 18px 0 36px;
  color: var(--ink);
}

.foot {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.foot-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 84px;
}

/* ---- reveal on scroll ---- */

.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.9s var(--ease),
    transform 0.9s var(--ease);
  transition-delay: var(--delay, 0s);
}

.js .reveal.in {
  opacity: 1;
  transform: none;
}

.js .live-card.reveal.in {
  transform: perspective(1400px) rotateY(-6deg) rotateX(3deg);
}

.js .live-card.reveal.in:hover {
  transform: perspective(1400px) rotateY(0) rotateX(0);
}

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

@media (max-width: 900px) {
  .hero,
  .split {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .hero {
    align-items: flex-end;
    min-height: 0;
    padding: 0 0 64px;
    flex-direction: column;
  }

  .photo {
    position: relative;
    right: auto;
    width: 100%;
    height: auto;
    margin-bottom: -38%;
    mask-image: linear-gradient(0deg, transparent 0%, black 45%);
    mask-composite: add;
  }

  .hero-copy {
    width: calc(100% - 32px);
  }

  .impact .chip {
    display: none;
  }

  .live-card,
  .js .live-card.reveal.in {
    transform: none;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .band {
    padding: 96px 0 64px;
  }

  nav a:not(.pill) {
    display: none;
  }

  .cta {
    padding: 64px 22px;
  }
}

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

  .headline .line > span {
    transform: none;
  }

  .impact {
    display: none;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}

.missing {
  display: grid;
  align-content: center;
  justify-items: start;
  min-height: 100vh;
}

/* The teaser: one screen, the photograph, the title and the line under it. */
.teaser .hero {
  height: 100svh;
  min-height: 560px;
}

.teaser .tagline {
  margin: 32px 0 0;
  font-size: clamp(15px, 1.5vw, 19px);
  letter-spacing: 0.04em;
  animation-delay: 0.6s;
}

.teaser .top {
  position: absolute;
  inset: 0 0 auto;
}

.teaser .hero {
  margin-top: 0;
}

@media (max-width: 900px) {
  .teaser .hero {
    height: auto;
    min-height: 100svh;
    justify-content: flex-end;
  }
}
