/* muniQuant website styles. Colours and sizes are set once as variables in :root. */

:root {
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Graphite background */
  --bg: #1b1d21; --bg-2: #202227; --menu-bg: #202227;
  --text: #dfe2e7; --heading: #ffffff; --muted: #9ba1ac; --nav: #c8d4ea;
  --line: rgba(255, 255, 255, 0.09); --card: rgba(255, 255, 255, 0.035);
  --header-bg: rgba(27, 29, 33, 0.7); --header-line: rgba(255, 255, 255, 0.07);

  /* Logo colours: orange wordmark, blue icon */
  --accent: #f28a26; --accent-2: #9ccbff; --blue: #2f6fb5; --link: #9ccbff; --cta-text: #0a0f24;
  --card-hover-line: rgba(156, 203, 255, 0.4);
  --ghost-text: #ffffff; --ghost-line: rgba(156, 203, 255, 0.35);
  --join-bg: var(--bg-2);
  --todo-bg: rgba(242, 138, 38, 0.18); --todo-text: #ffc58f;

  --radius: 18px; --btn-radius: 999px;
}

/* Base */

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
}

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

a { color: var(--link); }

h1, h2, h3 { color: var(--heading); text-wrap: balance; }
p { text-wrap: pretty; }

::selection { background: rgba(242, 138, 38, 0.35); color: #fff; }

/* Keyboard focus: a clear ring, only when navigating with the keyboard */
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; }
[tabindex="-1"]:focus { outline: none; }

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  padding: 10px 16px; border-radius: 8px; background: var(--accent); color: var(--cta-text);
  font-weight: 600; text-decoration: none; transition: top 0.2s ease;
}
.skip-link:focus { top: 12px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* Scroll progress bar */

.progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 100%; z-index: 50;
  background: linear-gradient(90deg, var(--blue), var(--accent-2), var(--accent));
  transform-origin: 0 50%; transform: scaleX(0);
}

/* Header (gets more solid after scrolling) */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--header-line);
  transition: background 0.4s ease, box-shadow 0.4s ease;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  gap: 24px;
  transition: min-height 0.4s ease;
}

.scrolled .site-header {
  background: var(--header-bg); background: color-mix(in srgb, var(--bg) 92%, transparent);
  box-shadow: 0 10px 30px -18px rgba(0, 0, 0, 0.8);
}
.scrolled .site-header .wrap { min-height: 58px; }

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand .icon { height: 28px; width: auto; }
.brand .word { height: 15px; width: auto; }

.nav { display: flex; align-items: center; gap: 24px; }

.nav a {
  color: var(--nav);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  transition: color 0.25s ease;
}

.nav a:hover, .nav a.active { color: var(--accent); }

.nav .nav-cta {
  color: var(--cta-text);
  background: var(--accent);
  padding: 8px 18px;
  border-radius: var(--btn-radius);
}

.nav .nav-cta:hover, .nav .nav-cta.active { color: var(--cta-text); }
.nav .nav-cta:hover { filter: brightness(1.08); }

/* Legal pages: a single "Back to home" link that stays visible on every screen */
.nav.nav-simple { display: flex; position: static; padding: 0; background: none; border: 0; }

.nav-toggle {
  display: none;
  place-items: center;
  width: 42px;
  height: 38px;
  padding: 0;
  background: none;
  border: 1px solid var(--header-line);
  color: var(--nav);
  border-radius: 8px;
  cursor: pointer;
}

/* Menu icon: three bars that turn into a cross when the menu is open */
.bars, .bars::before, .bars::after {
  display: block; width: 18px; height: 2px; border-radius: 2px; background: currentColor;
  transition: transform 0.3s ease, background 0.2s ease;
}
.bars { position: relative; }
.bars::before, .bars::after { content: ""; position: absolute; left: 0; }
.bars::before { top: -6px; }
.bars::after { top: 6px; }
.nav-open .bars { background: transparent; }
.nav-open .bars::before { transform: translateY(6px) rotate(45deg); }
.nav-open .bars::after { transform: translateY(-6px) rotate(-45deg); }

@keyframes menu-in { from { opacity: 0; transform: translateY(-6px); } }

/* Buttons */

.buttons { display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: var(--btn-radius);
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: var(--cta-text); box-shadow: 0 10px 30px -10px rgba(242, 138, 38, 0.7); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; color: var(--ghost-text); border-color: var(--ghost-line); }
.btn-ghost:hover { border-color: var(--ghost-text); }
/* A button for something that is not open yet (for example Championship registration). */
.btn-closed, .btn-closed:hover { background: var(--card); color: var(--muted); border-color: var(--line); border-style: dashed; cursor: not-allowed; transform: none; font-family: inherit; }
.btn-closed svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Sections */

section { padding: 104px 0; scroll-margin-top: 80px; }

.band { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

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

h2 { font-size: clamp(30px, 4.2vw, 44px); line-height: 1.15; margin: 0 0 18px; letter-spacing: -0.01em; }

.lead { font-size: 19px; color: var(--muted); max-width: 64ch; margin: 0 0 48px; }

.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }

.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid.four { grid-template-columns: repeat(4, 1fr); }

/* Cards, with a soft light that follows the mouse */

.card {
  position: relative;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.card:hover { transform: translateY(-3px); border-color: var(--card-hover-line); }
.card > * { position: relative; }
.card h3 { margin: 0 0 8px; font-size: 19px; }
.card p { margin: 0; color: var(--muted); font-size: 16px; }
.card .tag { font-size: 13px; font-weight: 600; color: var(--accent-2); margin: 0 0 10px; letter-spacing: 0.04em; }

.card.glow::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.4s ease;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(156, 203, 255, 0.14), transparent 70%);
}
.card.glow:hover::before { opacity: 1; }

.icon-box { width: 46px; height: 46px; flex: none; border-radius: 12px; display: grid; place-items: center; margin-bottom: 18px;
  background: linear-gradient(135deg, rgba(47, 111, 181, 0.35), rgba(156, 203, 255, 0.12)); border: 1px solid rgba(156, 203, 255, 0.25); }
.icon-box svg { width: 24px; height: 24px; fill: none; stroke: var(--accent-2); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.feature h3 { font-size: 21px; }
.team .tag { margin-top: 2px; }
.team > p:not(.tag) { margin-bottom: 18px; }

/* Lists with a small check mark */
.ticks { list-style: none; margin: 0; padding: 18px 0 0; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 28px; color: var(--text); font-size: 15px; line-height: 1.5; }
.ticks li::before {
  content: ""; position: absolute; left: 2px; top: 4px; width: 14px; height: 8px;
  border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg);
}

.principle h3 { font-size: 17px; }
.principle p { font-size: 15px; }

/* Hero */

.hero { position: relative; min-height: calc(100vh - 68px); display: flex; align-items: center; padding: 72px 0 180px; text-align: center; overflow: hidden; }
.hero .wrap { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; width: 100%; }

.hero-lines { position: absolute; left: 0; right: 0; bottom: 24px; height: 140px; overflow: hidden; opacity: 0.4; z-index: 1; }
.hero-lines svg { width: 200%; height: 100%; animation: drift 30s linear infinite; }
.hero-lines path { fill: none; stroke-width: 2; vector-effect: non-scaling-stroke; }
.hero-lines .l1 { stroke: var(--blue); }
.hero-lines .l2 { stroke: var(--accent); opacity: 0.6; }
@keyframes drift { to { transform: translateX(-50%); } }

.hero-logo { width: min(280px, 64vw); margin: 0 0 28px; filter: drop-shadow(0 14px 24px rgba(0, 0, 0, 0.35)); animation: float 6s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-10px); } }

.hero h1 { font-size: clamp(36px, 6.4vw, 72px); line-height: 1.06; margin: 0 0 22px; max-width: 22ch; letter-spacing: -0.025em; }
.shine {
  background: linear-gradient(90deg, #9ccbff, #f28a26, #9ccbff);
  background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shine 6s linear infinite;
}
@keyframes shine { to { background-position: 200% center; } }

.hero .sub { font-size: 20px; color: var(--muted); max-width: 54ch; margin: 0 0 36px; }
.hero .buttons { justify-content: center; }

/* Partner band below the hero */

.partners-band { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg-2); }
.partners-band .wrap { display: flex; align-items: center; justify-content: center; gap: 40px; min-height: 92px; }
.band-label { flex: none; padding-right: 40px; border-right: 1px solid var(--line); line-height: 40px; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.band-logo { display: block; opacity: 0.9; transition: opacity 0.25s ease, transform 0.25s ease; }
.band-logo:hover { opacity: 1; transform: translateY(-1px); }
.band-logo img { width: auto; }
.band-logo.hrt img { height: 44px; }
.band-logo.js-logo img { height: 32px; }

/* About */

.about { display: grid; gap: 56px; grid-template-columns: 1.1fr 1fr; align-items: start; }
.about p { margin: 0 0 18px; color: var(--muted); }
.about p.first { color: var(--text); font-size: 20px; }
.about .motto { font-weight: 700; color: var(--heading); font-size: 18px; margin-top: 28px; }
.about .eyebrow, .join .eyebrow { color: var(--accent); margin-bottom: 12px; }

.facts { list-style: none; margin: 56px 0 0; padding: 28px 0 0; border-top: 1px solid var(--line); display: grid; gap: 20px; grid-template-columns: repeat(4, 1fr); }
.facts li { display: grid; gap: 2px; }
.facts b { color: var(--heading); font-size: 24px; letter-spacing: -0.01em; }
.facts span { color: var(--muted); font-size: 15px; }

.focus { display: grid; gap: 14px; }
.focus .card { display: flex; gap: 18px; align-items: flex-start; padding: 22px 24px; }
.focus .icon-box { margin: 0; }
.focus .card h3 { font-size: 18px; }

/* What we do: who it's for */

.for-whom { margin-top: 56px; text-align: center; }
.for-whom p { color: var(--muted); margin: 0 0 16px; }
.for-whom .small { font-size: 15px; margin-top: 16px; }
.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.chips li { padding: 9px 18px; border-radius: 999px; border: 1px solid rgba(242, 138, 38, 0.4); color: #ffd2a6; background: rgba(242, 138, 38, 0.08); font-size: 15px; font-weight: 500; }

/* Championship, with the live candle chart behind it */

.market-section { position: relative; overflow: hidden; }
.market-section .wrap { position: relative; z-index: 1; }
.market-bg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; opacity: 0.55;
  -webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.25) 40%, #000 75%);
  mask-image: linear-gradient(90deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.25) 40%, #000 75%); }

.champ { display: grid; grid-template-columns: minmax(0, 620px); gap: 56px; align-items: center; }
.champ .lead { margin-bottom: 32px; }
.champ .lead, .champ .steps p { text-shadow: 0 1px 12px var(--bg-2); }

.steps { list-style: none; padding: 0; margin: 0 0 36px; display: grid; gap: 0; position: relative; }
.steps::before { content: ""; position: absolute; left: 17px; top: 18px; bottom: 18px; width: 2px; background: linear-gradient(var(--accent), var(--blue)); opacity: 0.6; }
.steps li { display: flex; gap: 18px; align-items: flex-start; padding: 10px 0; position: relative; }
.steps .num { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: var(--cta-text); background: var(--accent); box-shadow: 0 0 0 6px rgba(242, 138, 38, 0.15); }
.steps b { color: var(--heading); font-size: 17px; }
.steps p { margin: 2px 0 0; color: var(--muted); font-size: 15px; }

/* Research: the trading system pipeline */

.system { margin-top: 56px; padding: 40px; border: 1px solid var(--line); border-radius: calc(var(--radius) + 8px); background: var(--bg-2); scroll-margin-top: 80px; }
.system > h3 { margin: 0 0 8px; font-size: 22px; }
.system > p { margin: 0; color: var(--muted); max-width: 70ch; }
.system .system-note { margin-top: 28px; font-size: 15px; }
.pipeline { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(6, 1fr); counter-reset: none; }
.pipeline li { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 18px 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.pipeline li:not(:last-child)::after {
  content: ""; position: absolute; top: 30px; right: -10px; z-index: 1; width: 8px; height: 8px;
  border-top: 2px solid var(--accent); border-right: 2px solid var(--accent); transform: rotate(45deg);
}
.pipeline .stage { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; color: var(--cta-text); background: var(--accent); }
.pipeline b { color: var(--heading); font-size: 16px; line-height: 1.3; }
.pipeline p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.45; flex: 1; }

/* How we work: the year at a glance */

.year { margin-top: 48px; }
.year h3 { margin: 0 0 20px; font-size: 20px; }
.year ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; position: relative; }
.year ol::before { content: ""; position: absolute; left: 0; right: 0; top: 7px; height: 2px; background: linear-gradient(90deg, var(--blue), var(--accent)); opacity: 0.6; }
.year li { position: relative; padding-top: 28px; display: grid; gap: 4px; }
.year li::before { content: ""; position: absolute; left: 0; top: 0; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 3px solid var(--accent); }
.year b { color: var(--heading); font-size: 16px; }
.year span { color: var(--muted); font-size: 15px; line-height: 1.5; }
/* Set by main.js from today's date */
.year li.past { opacity: 0.55; }
.year li.past::before { background: var(--accent); }
.year li.now::before { background: var(--accent); box-shadow: 0 0 0 6px rgba(242, 138, 38, 0.2); }
.year li.now b::after { content: "Now"; margin-left: 8px; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; vertical-align: 2px; color: var(--cta-text); background: var(--accent); }

/* Partners */

.partner-cards { display: grid; gap: 20px; grid-template-columns: 1fr 1fr; max-width: 860px; margin: 0 auto; }
.partner-card {
  display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 22px;
  padding: 28px 24px 24px; min-height: 260px; text-decoration: none;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  transition: transform 0.3s ease, border-color 0.3s ease;
}
.partner-card:hover { transform: translateY(-3px); border-color: var(--card-hover-line); }
.partner-card.founding { border-color: rgba(242, 138, 38, 0.45); background: linear-gradient(180deg, rgba(242, 138, 38, 0.08), var(--card)); }
.partner-card.founding:hover { border-color: var(--accent); }
.partner-card img { width: auto; max-width: 100%; }
.partner-card.founding img { height: 96px; }
.partner-card:not(.founding) img { height: 46px; }
.partner-tier { font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.partner-card:not(.founding) .partner-tier { color: var(--accent-2); }
.partner-name { color: var(--muted); font-size: 15px; }
.partner-note { text-align: center; color: var(--muted); margin: 32px 0 0; font-size: 16px; }

/* FAQ: native details/summary, works without JavaScript */

.faq { max-width: 820px; margin: 40px auto 0; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  position: relative; list-style: none; cursor: pointer; padding: 20px 48px 20px 4px;
  color: var(--heading); font-weight: 600; font-size: 17px; line-height: 1.45; transition: color 0.2s ease;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--accent); }
.faq summary::before, .faq summary::after {
  content: ""; position: absolute; right: 10px; top: 50%; width: 14px; height: 2px; margin-top: -1px;
  border-radius: 2px; background: var(--accent); transition: transform 0.3s ease;
}
.faq summary::after { transform: rotate(90deg); }
.faq details[open] summary::after { transform: rotate(0deg); }
.faq details p { margin: 0 0 22px; padding: 0 48px 0 4px; color: var(--muted); font-size: 16px; }
.faq details[open] p { animation: menu-in 0.3s ease; }

/* Join */

#join { padding-top: 0; }
.join {
  position: relative; overflow: hidden; text-align: center;
  border-radius: calc(var(--radius) + 8px); padding: 72px 48px; background: var(--join-bg); border: 1px solid var(--line);
}
.join h2 { margin-bottom: 14px; }
.join p { color: var(--muted); max-width: 60ch; margin: 0 auto 30px; }
.join .buttons { justify-content: center; }
.join-steps { list-style: none; margin: 0 auto 32px; padding: 0; max-width: 760px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; text-align: left; }
.join-steps li { display: grid; grid-template-columns: 30px 1fr; column-gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
.join-steps span { grid-row: span 2; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; font-weight: 700; color: var(--cta-text); background: var(--accent); }
.join-steps b { color: var(--heading); font-size: 16px; line-height: 1.35; }
.join-steps small { color: var(--muted); font-size: 14px; line-height: 1.45; }
.join .join-faq { margin: 24px auto 0; font-size: 15px; }
.join-mark { position: absolute; right: -40px; bottom: -50px; width: 280px; opacity: 0.12; transform: rotate(-12deg); pointer-events: none; }

/* Footer and back to top */

.site-footer { border-top: 1px solid var(--line); padding: 56px 0 40px; font-size: 15px; color: var(--muted); background: rgba(0, 0, 0, 0.18); }
.footer-grid { display: grid; gap: 40px; grid-template-columns: 2fr 1fr 1fr 1fr; }
.footer-grid h4 { margin: 0 0 12px; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--heading); }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-grid a { color: var(--muted); text-decoration: none; }
.footer-grid a:hover { color: var(--accent); }
.footer-logo { height: 16px; width: auto; margin-bottom: 14px; }
.footer-bottom { margin-top: 48px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 14px; }
.to-top-link { color: var(--muted); text-decoration: none; }
.to-top-link:hover { color: var(--accent); }

.to-top {
  position: fixed; right: 20px; bottom: 20px; z-index: 30; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; text-decoration: none; font-size: 18px; color: var(--cta-text); background: var(--accent);
  box-shadow: 0 10px 24px -8px rgba(242, 138, 38, 0.8);
  opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity 0.3s ease, transform 0.3s ease;
}
.scrolled-far .to-top { opacity: 1; transform: none; pointer-events: auto; }

/* Short notice for buttons that are not live yet */

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 60; width: min(460px, calc(100% - 32px));
  display: flex; gap: 14px; align-items: flex-start; padding: 16px 16px 16px 20px;
  background: var(--bg-2); color: var(--text); border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: 14px; font-size: 15px; line-height: 1.55; box-shadow: 0 24px 48px -20px rgba(0, 0, 0, 0.8);
  opacity: 0; transform: translate(-50%, 16px); pointer-events: none; transition: opacity 0.3s ease, transform 0.3s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast p { margin: 0; flex: 1; }
.toast a { color: var(--link); font-weight: 600; white-space: nowrap; }
.toast-close { flex: none; background: none; border: 0; color: var(--muted); font-size: 22px; line-height: 1; padding: 0 4px; cursor: pointer; border-radius: 6px; }
.toast-close:hover { color: var(--heading); }

/* Legal pages and 404 */

.legal { padding: 72px 0; }
.legal .wrap { max-width: 780px; }
.legal h1 { font-size: 38px; margin: 0 0 24px; }
.legal h2 { font-size: 22px; margin: 36px 0 8px; }
.legal p { color: var(--muted); }
.todo { background: var(--todo-bg); color: var(--todo-text); border-radius: 6px; padding: 1px 6px; font-weight: 600; }

.not-found { min-height: calc(100vh - 69px); display: flex; align-items: center; text-align: center; padding: 72px 0; }
.not-found .wrap { width: 100%; }
.not-found h1 { font-size: clamp(34px, 6vw, 60px); line-height: 1.1; margin: 0 0 18px; letter-spacing: -0.02em; }
.not-found .lead { margin: 0 auto 36px; }
.not-found .buttons { justify-content: center; }

/* Reveal on scroll (content stays visible without JavaScript), staggered inside grids */

.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.8s ease, transform 0.8s ease; }
.js .reveal.in { opacity: 1; transform: none; }
.js .grid .reveal:nth-child(2), .js .focus .reveal:nth-child(2) { transition-delay: 0.1s; }
.js .grid .reveal:nth-child(3), .js .focus .reveal:nth-child(3) { transition-delay: 0.2s; }
.js .grid .reveal:nth-child(4), .js .focus .reveal:nth-child(4) { transition-delay: 0.3s; }

/* Laptop and tablet: fewer columns */

@media (max-width: 1100px) {
  .pipeline { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .pipeline li:nth-child(3n)::after { display: none; }
  .pipeline li:not(:last-child)::after { right: -12px; }
}

@media (max-width: 1024px) {
  .grid.four { grid-template-columns: repeat(2, 1fr); }
}

/* Tablet and smaller: menu behind the toggle button */

@media (max-width: 960px) {
  .champ { grid-template-columns: 1fr; gap: 40px; }
  .nav-toggle { display: inline-grid; }
  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 4px;
    padding: 12px 24px 20px; background: var(--menu-bg); border-bottom: 1px solid var(--header-line);
  }
  .nav a { padding: 8px 0; font-size: 17px; }
  .nav .nav-cta { margin-top: 8px; padding: 10px 18px; }
  .nav-open .nav { display: flex; animation: menu-in 0.25s ease; }
}

@media (max-width: 820px) {
  .about { grid-template-columns: 1fr; gap: 36px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid .footer-brand { grid-column: 1 / -1; }
  .facts { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .join-steps { grid-template-columns: 1fr; max-width: 420px; }
  .partner-cards { grid-template-columns: 1fr; max-width: 480px; }
  .partner-card { min-height: 0; }
  .pipeline { grid-template-columns: repeat(2, 1fr); }
  .pipeline li:nth-child(3n)::after { display: block; }
  .pipeline li:nth-child(2n)::after { display: none; }
  /* the year becomes a vertical timeline */
  .year ol { grid-template-columns: 1fr; gap: 18px; }
  .year ol::before { left: 7px; right: auto; top: 8px; bottom: 8px; width: 2px; height: auto; background: linear-gradient(var(--blue), var(--accent)); }
  .year li { padding: 0 0 0 34px; }
}

/* Phone */

@media (max-width: 720px) {
  body { font-size: 16px; }
  section { padding: 72px 0; }
  .wrap { padding: 0 16px; }
  .nav { padding: 12px 16px 20px; }
  .hero { min-height: auto; padding: 56px 0 100px; }
  .hero-lines { bottom: 16px; height: 80px; }
  .focus .card { padding: 20px; }
  .market-bg { opacity: 0.35; }
  .system { padding: 28px 20px; margin-top: 40px; }
  .facts { margin-top: 40px; }
  .join { padding: 48px 22px; }
  .to-top { right: 14px; bottom: 14px; }
  .toast { bottom: 72px; }
}

/* Narrow phones: one column, arrows point down */

@media (max-width: 520px) {
  .grid.four { grid-template-columns: 1fr; }
  .pipeline { grid-template-columns: 1fr; gap: 14px; }
  .pipeline li { display: grid; grid-template-columns: 26px 1fr; column-gap: 14px; row-gap: 4px; padding: 14px 16px; }
  .pipeline .stage { grid-row: span 3; }
  .pipeline li:not(:last-child)::after { display: block; top: auto; bottom: -12px; right: auto; left: 25px; transform: rotate(135deg); }
  .partners-band .wrap { gap: 20px; min-height: 76px; }
  .band-label { padding-right: 20px; }
  .band-logo.hrt img { height: 34px; }
  .band-logo.js-logo img { height: 24px; }
}

/* Small phones: stacked full-width buttons, icon above text in the focus cards */

@media (max-width: 420px) {
  .buttons { width: 100%; }
  .buttons .btn { flex: 1 1 100%; justify-content: center; text-align: center; padding: 13px 16px; font-size: 15px; }
  .focus .card { flex-direction: column; gap: 14px; }
  .market-bg { opacity: 0.25; }
}

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