:root {
  --bg: #000000;
  --pill: #222222;
  --text: #ffffff;
  --muted: #8a8a8a;
  --border: rgba(255, 255, 255, 0.22);
  --header-h: 5rem;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scrollbar-color: #4a4a4a #000;   /* the page scrollbar is visible, in dark colours to suit the site */
}

/* On desktop-size screens everything renders at 67% (all sizes are in rem) */
@media (min-width: 1200px) {
  html { font-size: 67%; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1.375rem;
  border-radius: 62.4375rem;
  font-weight: 500;
  font-size: 0.9375rem;
  white-space: nowrap;
  transition: transform .2s ease, background .2s ease, border-color .2s ease, color .2s ease;
}
.btn:hover { transform: translateY(-0.0625rem); }
.btn--light { background: #fff; color: #0a0a0a; }
.btn--light:hover { background: #e9e9e9; }
.btn--outline { border: 1px solid var(--border); color: #fff; }
.btn--outline:hover { border-color: #fff; background: rgba(255, 255, 255, 0.06); }
.btn--lg { padding: 0 clamp(1.75rem, 4vw, 3.125rem); height: 4.375rem; font-size: clamp(1rem, 1.3vw, 1.125rem); }

/* ---------- Header ---------- */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.5rem 1rem 0;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.header__pill {
  pointer-events: auto;
  position: relative;
  width: 100%;
  max-width: 66rem;
  height: 5rem;
  padding: 0 1.5rem 0 1.875rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  background: rgba(34, 34, 34, 0.72);   /* slightly see-through, with a soft blur of what is behind it */
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-radius: 62.4375rem;
  box-shadow: 0 0.625rem 2.5rem rgba(0, 0, 0, 0.5);
}

.logo {
  justify-self: start;
  font-weight: 900;
  font-size: 1.375rem;
  letter-spacing: -0.02em;
  line-height: 1;
}

.header__cta { justify-self: end; }

.nav__list { display: flex; align-items: center; gap: 0.25rem; }
.nav__item { position: relative; }
.nav__item--mobile-cta { display: none; }

.nav__link {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.625rem 0.875rem;
  font-size: 1rem;
  font-weight: 500;
  color: #c9c9c9;
  border-radius: 62.4375rem;
  transition: color .2s ease;
}
.nav__link:hover, .has-dropdown.open > .nav__link { color: #fff; }

.chevron { transition: transform .2s ease; }
.has-dropdown.open .chevron { transform: rotate(180deg); }

/* Dropdown (desktop) */
.dropdown {
  position: absolute;
  top: calc(100% + 2.4rem);
  left: 50%;
  min-width: 11.875rem;
  padding: 0.5rem;
  background: var(--pill);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1.25rem;
  box-shadow: 0 0.875rem 2.5rem rgba(0, 0, 0, 0.55);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -0.375rem);
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
/* invisible bridge so hover isn't lost crossing the gap */
.dropdown::before { content: ""; position: absolute; top: -2.4rem; left: 0; right: 0; height: 2.4rem; }

.has-dropdown.open .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}
.dropdown a {
  display: block;
  padding: 0.6875rem 1rem;
  border-radius: 0.875rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #c9c9c9;
  transition: background .2s ease, color .2s ease;
}
.dropdown a:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }

/* Burger (hidden on desktop) */
.burger { display: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--header-h) + 3.75rem) 1.25rem 3.75rem;
  overflow: hidden;
}

/* video behind the first screen: darkened so the text stays readable */
.hero__bg {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: #000;
}
.hero__video { display: block; width: 100%; height: 100%; object-fit: cover; }
/* the bottom edge blurs and darkens into the black of the next section; the blur itself is masked so it eases in with no visible line */
.hero__fade {
  position: absolute; left: 0; right: 0; bottom: 0; height: 3.3rem;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0), #000);
  -webkit-backdrop-filter: blur(9px); backdrop-filter: blur(9px);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 60%);
  mask-image: linear-gradient(to bottom, transparent, #000 60%);
  opacity: var(--fade, 0);   /* set by script.js: hidden at the very top, comes in as you scroll toward the next section */
}
.hero__bg::after { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, 0.64); }

.hero__glow {
  position: absolute;
  left: 50%;
  bottom: -35%;
  width: 120%;
  height: 70%;
  transform: translateX(-50%);
  background: none;
  pointer-events: none;
}

.hero__inner {
  position: relative;
  max-width: 77.5rem;
  text-align: center;
  margin-top: 2.5rem;
}

.hero__title {
  margin: 0;
  font-weight: 600;
  font-size: clamp(2.375rem, 6vw, 5.25rem);
  line-height: 1.02;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.hero__text {
  margin: clamp(1.25rem, 3vw, 2rem) auto 0;
  max-width: 58.75rem;
  font-size: clamp(1rem, 1.6vw, 1.375rem);
  line-height: 1.5;
  color: var(--muted);
  text-wrap: balance;
}
#home .hero__text { color: #e4e4e4; }   /* brighter on top of the video */

.hero__actions {
  margin-top: clamp(2rem, 4vw, 3rem);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.125rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  :root { --header-h: 4rem; }

  .header { padding-top: 0.875rem; }

  .header__pill {
    height: 4rem;
    padding: 0 0.75rem 0 1.375rem;
    grid-template-columns: 1fr auto;
  }
  .header__cta { display: none; }
  .logo { font-size: 1.25rem; }

  .burger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.375rem;
    width: 3.375rem; height: 3.375rem;
    padding: 0 0.6875rem;
    border-radius: 50%;
  }
  .burger span {
    display: block;
    height: 0.125rem;
    background: #fff;
    border-radius: 0.125rem;
    transition: transform .25s ease;
  }
  .burger.open span:nth-child(1) { transform: translateY(0.25rem) rotate(45deg); }
  .burger.open span:nth-child(2) { transform: translateY(-0.25rem) rotate(-45deg); }

  /* Mobile menu panel */
  .nav {
    position: absolute;
    top: calc(100% + 0.625rem);
    left: 0; right: 0;
    padding: 0.75rem;
    background: var(--pill);
    border-radius: 1.75rem;
    box-shadow: 0 0.875rem 2.5rem rgba(0, 0, 0, 0.55);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-0.5rem);
    transition: opacity .2s ease, transform .2s ease, visibility .2s;
  }
  .nav.open { opacity: 1; visibility: visible; transform: none; }

  .nav__list { flex-direction: column; align-items: stretch; gap: 0.125rem; }
  .nav__link { width: 100%; justify-content: space-between; padding: 0.875rem 1rem; font-size: 1.0625rem; }

  .dropdown {
    position: static;
    min-width: 0;
    padding: 0 0 0 0.75rem;
    background: none;
    border: 0;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease;
  }
  .dropdown::before { display: none; }
  .has-dropdown.open .dropdown { transform: none; max-height: 12.5rem; }
  .dropdown a { padding: 0.75rem 1rem; font-size: 1rem; }

  .nav__item--mobile-cta { display: block; padding: 0.5rem 0.25rem 0.25rem; }
  .nav__item--mobile-cta .btn { width: 100%; height: 3.125rem; }

  .hero { padding-top: calc(var(--header-h) + 2.5rem); }
  .btn--lg { height: 3.625rem; }
  .hero__actions { gap: 0.75rem; }
}

@media (max-width: 820px) {
  .video { padding-block: 6rem; }
}

@media (max-width: 480px) {
  .hero__actions { flex-direction: column; align-items: stretch; }
  .hero__actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* ---------- "Sovereign" definition tooltip ---------- */
.sov {
  --q: 2rem;              /* size of the "?" box */
  --bw: 0px;
  position: relative;
  display: inline-block;
}
.def { position: absolute; top: 0; bottom: 0; left: 0.31em; width: 0; } /* 0.31em = middle of the "S" */

.def__btn {
  position: absolute;
  /* sits just outside the top-left corner of the border, not touching the word */
  /* sits directly above the "S" */
  top: calc(-1 * (var(--q) + 0.625rem));
  left: calc(var(--q) / -2);   /* centred on the .def anchor, which sits over the middle of the "S" */
  width: var(--q); height: var(--q);
  display: grid;
  place-items: center;
  border: 1.5px solid #fff;
  border-radius: 0.1875rem;
  font-size: 1.1875rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
  cursor: help;
  transition: background .2s ease, color .2s ease;
}
.def__btn:hover, .def.open .def__btn { background: #fff; color: #0a0a0a; }

.def__pop {
  position: absolute;
  right: 4.5rem;
  top: calc(-1 * (var(--q) + 0.625rem));
  width: var(--w, 27.5rem);
  padding: 1.625rem 1.75rem;
  display: block;
  text-align: left;
  background: transparent;
  border: 1px solid #fff;
  border-radius: 0;
  color: #e8e8e8;
  font-size: 1.1875rem;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateX(0.375rem);
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
  z-index: 20;
}
/* bridge so hover isn't lost crossing the gap */
.def__pop::after { content: ""; position: absolute; top: 0; bottom: 0; right: -1rem; width: 1rem; }
.def.open .def__pop { opacity: 1; visibility: visible; transform: none; }

.def__head { display: flex; align-items: center; gap: 0.875rem; }
.def__speak {
  flex: none;
  width: 2.75rem; height: 2.75rem;
  display: grid; place-items: center;
  border-radius: 50%;
  background: #fff;
  color: #000;
  transition: background .2s ease;
}
.def__speak:hover { background: #d9d9d9; }
.def__word { font-size: 2.375rem; font-weight: 600; color: #fff; letter-spacing: -0.02em; }
.def__pron { display: block; margin-top: 0.5rem; font-size: 1.0625rem; color: #9aa0a6; }
.def__pos { display: block; margin-top: 1rem; font-size: 1rem; font-style: italic; color: #9aa0a6; }
.def__meaning { display: block; margin-top: 0.25rem; }

/* Tighter card when the space to the left is small */
.def.compact .def__pop { padding: 1rem 1rem; font-size: 0.9375rem; }
.def.compact .def__head { gap: 0.625rem; }
.def.compact .def__speak { width: 2.375rem; height: 2.375rem; }
.def.compact .def__speak svg { width: 1.125rem; height: 1.125rem; }
.def.compact .def__word { font-size: 1.5625rem; }
.def.compact .def__pron { font-size: 0.875rem; }
.def.compact .def__pos { margin-top: 0.625rem; font-size: 0.875rem; }

/* Popup dropped below the "?" when there's no room on its left (set by script.js) */
.def.below .def__pop {
  right: auto;
  top: calc(100% + 1rem);
  left: var(--shift, 0);
  transform: translateY(0.375rem);
}
.def.below.open .def__pop { transform: none; }
.def.below .def__pop::after { display: none; }

@media (max-width: 820px) {
  .sov { --q: 1.625rem; }
  .def__btn { font-size: 0.9375rem; }
  .def { display: none; }   /* the "?" and its pop-up are for bigger screens only */
}

/* ---------- Video ---------- */
/* Registered so the gradient colours can animate smoothly as the video changes */
@property --c1 { syntax: "<color>"; inherits: true; initial-value: #e9e9e9; }
@property --c2 { syntax: "<color>"; inherits: true; initial-value: #cfcfcf; }
@property --c3 { syntax: "<color>"; inherits: true; initial-value: #e9e9e9; }

.video {
  /* one screen tall, video centred, with room above and below for the fixed header */
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: 8rem 1rem;
  overflow-x: clip;
}
.video__frame {
  position: relative;
  isolation: isolate;
  /* as large as possible while the whole video still fits on screen (16:9) */
  width: min(100%, calc((100vh - 16rem) * 16 / 9));
  width: min(100%, calc((100svh - 16rem) * 16 / 9));
  max-width: 106.25rem;
  margin: 0 auto;
  flex: none;
  transition: --c1 .5s linear, --c2 .5s linear, --c3 .5s linear;
}
/* Soft colour glow behind the video; colours are set live from the video by script.js */
.video__frame::before {
  content: "";
  position: absolute;
  inset: -8% -6%;
  background:
    radial-gradient(ellipse at 0% 50%, var(--c1), transparent 60%),
    radial-gradient(ellipse at 100% 50%, var(--c3), transparent 60%),
    radial-gradient(ellipse at 50% 0%, var(--c2), transparent 65%),
    radial-gradient(ellipse at 50% 100%, var(--c2), transparent 65%);
  filter: blur(4.375rem);
  opacity: .4;
  pointer-events: none;
}
/* Always-on, very faint white glow so the edges never go fully black */
.video__frame::after {
  content: "";
  position: absolute;
  inset: -7% -5%;
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.05) 55%, transparent 75%);
  filter: blur(3.75rem);
  pointer-events: none;
}
.video__player {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: clamp(0.625rem, 1.8vw, 1.625rem);
  pointer-events: none;
}

/* ---------- Section indicator ([A] [B] [C] ...) ---------- */
.sections {
  position: fixed;
  left: clamp(16px, 2.4vw, 40px);
  top: 50%;
  transform: translateY(-50%);
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 1.9rem;
}
.sections a {
  font-size: 1.6rem;
  line-height: 1;
  color: #5c5c5c;
  transition: color .25s ease;
}
.sections a:hover { color: #bdbdbd; }
.sections a.active { color: #fff; font-weight: 700; }

/* Light-flicker when a letter becomes the current one */
.sections a.flicker { animation: flicker 1.5s ease-in-out; }
/* three slow blinks: off, on, off, on, off, on, then steady */
@keyframes flicker {
  0%   { opacity: .08; }
  10%  { opacity: 1; }
  24%  { opacity: 1; }
  33%  { opacity: .08; }
  43%  { opacity: 1; }
  57%  { opacity: 1; }
  66%  { opacity: .08; }
  76%  { opacity: 1; }
  100% { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { .sections a.flicker { animation: none; } }

@media (max-width: 1023px) {
  .sections { display: none; }
}

/* Final call to action: same look as the hero, one button */
.hero--cta { background: #000; }
.hero--cta .hero__inner { margin-top: 0; }
