/* Pass the Baton website styles. The web builder agent edits this file.
   Concept: the exchange zone, the stretch of track where the baton must change hands. */

:root {
  --ink: #111318;
  --ink-2: #1b1e26;
  --paper: #F6F3EC;
  --paper-2: #ECE6D8;
  --amber: #F5A623;
  --glint: #FFF4DC;
  --shade: #A85F07;
  --shadow: #6B3B04;
  --muted: #5A5F6B;
  --on-ink-muted: #B9BCC6;
  --head: 'Archivo Black', 'Arial Black', 'Helvetica Neue', system-ui, sans-serif;
  --body: Inter, 'Noto Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { animation: none !important; transition: none !important; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 18px/1.6 var(--body);
}

img { max-width: 100%; display: block; }
a { color: var(--shadow); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

h1, h2, h3 { font-family: var(--head); font-weight: 400; letter-spacing: -0.015em; }
h2 { font-size: clamp(32px, 5vw, 56px); line-height: 1.02; margin: 0 0 24px; max-width: 18ch; }
h3 { font-size: 22px; line-height: 1.2; margin: 0 0 8px; }
p { max-width: 64ch; }

/* ---------- Header ---------- */
header.top { background: var(--ink); color: var(--paper); position: relative; z-index: 2; }
header.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--paper); text-decoration: none; font: 400 21px var(--head); letter-spacing: -0.01em; }
.brand img { width: 36px; height: 36px; }
nav { display: flex; flex-wrap: wrap; gap: 4px 22px; }
nav a { color: var(--paper); text-decoration: none; font-weight: 600; font-size: 15px; opacity: .82; padding: 6px 0; border-bottom: 2px solid transparent; }
nav a:hover { opacity: 1; color: var(--paper); border-bottom-color: var(--amber); }

/* ---------- Buttons ---------- */
.btn { display: inline-block; padding: 15px 26px; border-radius: 999px; font-weight: 600; font-size: 17px; text-decoration: none; margin: 0 10px 12px 0; }
.btn.primary { background: var(--amber); color: var(--ink); }
.btn.primary:hover { background: var(--glint); color: var(--ink); }
.btn.ghost { box-shadow: inset 0 0 0 2px var(--paper); color: var(--paper); }
.btn.ghost:hover { background: var(--paper); color: var(--ink); }
.btn.dark { background: var(--ink); color: var(--paper); }
.btn.dark:hover { background: var(--ink-2); color: var(--amber); }

/* ---------- Hero: the track and the exchange zone ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  color: var(--paper);
  padding: clamp(40px, 7vw, 96px) 0 clamp(56px, 8vw, 112px);
  isolation: isolate;
}
.hero::before { /* lane lines */
  content: "";
  position: absolute; inset: -40% -20%;
  background: repeating-linear-gradient(-28deg, transparent 0 118px, rgba(246, 243, 236, .09) 118px 121px);
  z-index: -2;
}
.hero::after { /* the exchange zone */
  content: "";
  position: absolute;
  top: -20%; bottom: -20%;
  left: 54%;
  width: clamp(120px, 16vw, 220px);
  background: linear-gradient(90deg, rgba(245, 166, 35, 0) 0, rgba(245, 166, 35, .16) 18%, rgba(245, 166, 35, .16) 82%, rgba(245, 166, 35, 0) 100%);
  border-left: 3px solid rgba(245, 166, 35, .55);
  border-right: 3px solid rgba(245, 166, 35, .55);
  transform: skewX(-28deg);
  z-index: -1;
}
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.hero h1 {
  font-size: clamp(46px, 8.4vw, 112px);
  line-height: .92;
  letter-spacing: -0.03em;
  margin: 0 0 28px;
  max-width: 9.5ch;
}
.hero .lead { font-size: clamp(18px, 2vw, 21px); color: var(--on-ink-muted); max-width: 46ch; margin: 0 0 32px; }
.hero .baton-art { position: relative; margin-right: calc(var(--gutter) * -1.6); }
.hero .baton-art img { width: 118%; max-width: none; transform: translateX(-6%); filter: drop-shadow(0 30px 40px rgba(0, 0, 0, .45)); }
.hero .zone-label { position: absolute; left: 6%; bottom: -6px; font-size: 14px; color: var(--amber); font-weight: 600; letter-spacing: .02em; }

/* ---------- Facts strip ---------- */
.facts { background: var(--amber); color: var(--ink); }
.facts ul { list-style: none; margin: 0; padding: 22px 0; display: flex; flex-wrap: wrap; gap: 12px 44px; }
.facts li { font-weight: 600; font-size: 16px; }
.facts strong { font: 400 28px/1 var(--head); margin-right: 8px; vertical-align: -3px; }

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 9vw, 128px) 0; }
.section.ink { background: var(--ink); color: var(--paper); }
.section.ink p { color: var(--on-ink-muted); }
.section.ink a { color: var(--amber); }
.section.paper-2 { background: var(--paper-2); }

/* The demand */
.demand-grid { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: clamp(24px, 5vw, 72px); align-items: center; }
.big-67 { font: 400 clamp(140px, 24vw, 320px)/.8 var(--head); letter-spacing: -0.05em; color: var(--ink); position: relative; }
.big-67 span { display: block; font: 600 15px/1.3 var(--body); letter-spacing: 0; color: var(--shadow); margin-top: 18px; max-width: 18ch; }
.demand-text { font: 400 clamp(24px, 3.2vw, 38px)/1.18 var(--head); letter-spacing: -0.01em; margin: 0 0 24px; max-width: 24ch; }
.demand-notes { font-size: 17px; color: var(--muted); }

/* The gap: leaders versus the people they lead */
.gap { display: grid; gap: 28px; margin: 40px 0 16px; max-width: 920px; }
.gap-row { display: grid; grid-template-columns: minmax(150px, 230px) minmax(0, 1fr); gap: 16px; align-items: center; }
.gap-row .label { font-weight: 600; color: var(--paper); }
.gap-row .label small { display: block; font-weight: 400; color: var(--on-ink-muted); font-size: 14px; }
.bar { position: relative; height: 54px; background: rgba(246, 243, 236, .07); border-radius: 999px; overflow: hidden; }
.bar i { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: linear-gradient(180deg, #FFCF73 0, #F5A623 45%, #C27A0C 85%, #A85F07 100%); }
.bar.people i { background: linear-gradient(180deg, #F6F3EC 0, #D9D3C4 100%); }
.bar b { position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font: 400 26px/1 var(--head); color: var(--paper); }
.bar i + b { mix-blend-mode: normal; }
.gap-note { font-size: 14px; }

/* Why */
.why-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border-top: 3px solid var(--ink); margin-top: 40px; }
.why-grid > div { padding: 32px 32px 36px 0; border-bottom: 1px solid #CFC7B6; }
.why-grid > div:nth-child(odd) { padding-right: 48px; }
.why-grid > div:nth-child(even) { padding-left: 32px; border-left: 1px solid #CFC7B6; }
.why-grid p { margin: 0; color: var(--muted); }

/* Handover band */
.handover { position: relative; background: var(--ink); color: var(--paper); padding: 0 0 clamp(56px, 7vw, 96px); }
.handover img { width: 100%; aspect-ratio: 16 / 8; object-fit: cover; object-position: center 45%; }
.handover blockquote { margin: clamp(-120px, -9vw, -60px) 0 0; position: relative; font: 400 clamp(28px, 4.4vw, 56px)/1.04 var(--head); letter-spacing: -0.02em; max-width: 17ch; }
.handover cite { display: block; margin-top: 18px; font: 600 15px var(--body); color: var(--amber); font-style: normal; }

/* Countries teaser */
.country-cloud { display: flex; flex-wrap: wrap; gap: 10px; margin: 28px 0 36px; padding: 0; list-style: none; }
.country-cloud li { padding: 8px 16px; border-radius: 999px; background: var(--paper); box-shadow: inset 0 0 0 1px #CFC7B6; font-weight: 600; font-size: 15px; }

/* Languages */
.langs { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0; }
.langs a { padding: 10px 18px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1px #D8D1C1; text-decoration: none; color: var(--ink); font-weight: 600; }
.langs a:hover { box-shadow: inset 0 0 0 2px var(--amber); }

/* Join */
.join { background: var(--amber); color: var(--ink); padding: clamp(64px, 8vw, 112px) 0; overflow: hidden; }
.join .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .8fr); gap: 32px; align-items: center; }
.join h2 { color: var(--ink); }
.join p { color: #3B2605; font-size: 19px; }
.join img { transform: rotate(-8deg) scale(1.15); }

/* ---------- Document pages ---------- */
article.doc { max-width: 780px; margin: 0 auto; padding: clamp(48px, 7vw, 88px) var(--gutter) 96px; }
article.doc h1 { font-size: clamp(38px, 6vw, 68px); line-height: .98; letter-spacing: -0.025em; margin: 0 0 28px; }
article.doc h2 { font-size: clamp(26px, 3.4vw, 36px); margin: 56px 0 16px; padding-top: 20px; border-top: 3px solid var(--ink); max-width: none; }
article.doc strong { color: var(--ink); }
article.doc p > strong:only-child { display: block; font: 400 clamp(20px, 2.4vw, 26px)/1.25 var(--head); background: var(--glint); padding: 22px 26px; border-left: 8px solid var(--amber); border-radius: 0 14px 14px 0; }
article.doc ul, article.doc ol { padding-left: 1.2em; }
article.doc li { margin: 8px 0; }
article.doc table { border-collapse: collapse; width: 100%; font-size: 16px; margin: 20px 0; display: block; overflow-x: auto; }
article.doc th, article.doc td { border-bottom: 1px solid #D8D1C1; padding: 12px 14px; text-align: start; vertical-align: top; }
article.doc th { background: var(--ink); color: var(--paper); font-weight: 600; }
article.doc.wide { max-width: var(--wrap); }
small { color: var(--muted); }

/* ---------- Countries page ---------- */
.countries-intro { max-width: 62ch; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 14px; color: var(--muted); margin: 18px 0 36px; }
.legend span::before { content: ""; display: inline-block; width: 26px; height: 10px; border-radius: 999px; margin-right: 8px; vertical-align: 0; background: var(--amber); }
.legend span.n::before { width: 3px; height: 16px; border-radius: 0; background: var(--ink); vertical-align: -3px; }
.legend span.p::before { background: #D9D3C4; }
.country-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 520px), 1fr)); gap: 22px; }
.country {
  background: #fff;
  border-radius: 18px;
  padding: 24px 26px 22px;
  box-shadow: inset 0 0 0 1px #E2DBCB;
}
.country header { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.country h3 { font-size: 26px; margin: 0; }
.country .norm { font-size: 14px; color: var(--muted); }
.country .norm b { font: 400 18px var(--head); color: var(--ink); }
.office { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px 0; border-top: 1px solid #EEE8DB; }
.office .who { font-size: 15px; line-height: 1.35; }
.office .who b { display: block; font-size: 16px; }
.office .who a { font-size: 13px; }
.office .age { font: 400 26px/1 var(--head); align-self: center; }
.office .age.on { color: var(--shadow); }
.track { grid-column: 1 / -1; position: relative; height: 12px; border-radius: 999px; background: var(--paper-2); }
.track i { position: absolute; inset: 0 auto 0 0; border-radius: 999px; background: linear-gradient(180deg, #FFCF73, #F5A623 50%, #C27A0C); }
.track.people i { background: #D9D3C4; }
.track u { position: absolute; top: -5px; bottom: -5px; width: 3px; background: var(--ink); text-decoration: none; }
.country .meta { font-size: 13px; color: var(--muted); margin-top: 12px; }
.tag { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--paper-2); font-size: 13px; font-weight: 600; white-space: nowrap; }
.tag.on { background: var(--amber); color: var(--ink); }

/* ---------- Footer ---------- */
footer { background: var(--ink); color: var(--on-ink-muted); padding: 40px 0; font-size: 15px; }
footer a { color: var(--amber); }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero .wrap, .join .wrap { grid-template-columns: minmax(0, 1fr); }
  .hero .baton-art { margin: 8px calc(var(--gutter) * -1) 0; }
  .hero .baton-art img { width: 112%; transform: translateX(-4%); }
  .hero::after { left: 40%; }
  .demand-grid { grid-template-columns: minmax(0, 1fr); }
  .why-grid { grid-template-columns: minmax(0, 1fr); }
  .why-grid > div, .why-grid > div:nth-child(odd), .why-grid > div:nth-child(even) { padding: 26px 0; border-left: 0; }
  .gap-row { grid-template-columns: 1fr; gap: 8px; }
  .join img { max-width: 420px; }
}
@media (max-width: 520px) {
  body { font-size: 17px; }
  nav { gap: 2px 16px; }
  nav a { font-size: 14px; }
  .country { padding: 20px 18px; }
}

/* Right-to-left pages */
[dir="rtl"] .why-grid > div:nth-child(even) { border-left: 0; border-right: 1px solid #CFC7B6; padding-left: 0; padding-right: 32px; }
[dir="rtl"] article.doc p > strong:only-child { border-left: 0; border-right: 8px solid var(--amber); border-radius: 14px 0 0 14px; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

html, body { overflow-x: hidden; }

/* Language switcher (no JavaScript: a disclosure) */
.lang-switch { position: relative; }
.lang-switch summary { list-style: none; cursor: pointer; color: var(--paper); font-weight: 600; font-size: 15px; padding: 6px 12px; border-radius: 999px; box-shadow: inset 0 0 0 1.5px rgba(246, 243, 236, .4); }
.lang-switch summary::-webkit-details-marker { display: none; }
.lang-switch summary::after { content: " ▾"; font-size: 12px; }
.lang-switch[open] summary { background: var(--paper); color: var(--ink); }
.lang-switch ul { position: absolute; right: 0; top: calc(100% + 8px); z-index: 10; list-style: none; margin: 0; padding: 8px; background: var(--paper); border-radius: 14px; box-shadow: 0 18px 40px rgba(0, 0, 0, .35); display: grid; grid-template-columns: repeat(2, minmax(130px, 1fr)); gap: 2px; min-width: 300px; }
.lang-switch li a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; border: 0; opacity: 1; }
.lang-switch li a:hover, .lang-switch li a[aria-current="page"] { background: var(--glint); color: var(--ink); }
[dir="rtl"] .lang-switch ul { right: auto; left: 0; }
@media (max-width: 860px) { .lang-switch ul { right: auto; left: 0; min-width: min(300px, calc(100vw - 32px)); } [dir="rtl"] .lang-switch ul { left: auto; right: 0; } }
.country h3 a { color: inherit; text-decoration: none; }
.country h3 a:hover { text-decoration: underline; text-decoration-color: var(--amber); }
.country:target { box-shadow: inset 0 0 0 3px var(--amber); }
.country-cloud a { color: inherit; text-decoration: none; }
.country-cloud li:hover { box-shadow: inset 0 0 0 2px var(--amber); }
[dir="rtl"] .track, [dir="rtl"] .bar i { transform: scaleX(-1); transform-origin: center; }
[dir="rtl"] .bar i { right: 0; left: auto; transform: none; }
[dir="rtl"] .bar b { right: auto; left: 18px; }

/* Navigation: only what the movement offers */
nav a.nav-cta { background: var(--amber); color: var(--ink); opacity: 1; padding: 8px 16px; border-radius: 999px; border-bottom: 0; }
nav a.nav-cta:hover { background: var(--glint); color: var(--ink); }
/* Language choice lives in the footer */
.footer-grid { display: flex; justify-content: space-between; align-items: center; gap: 16px 32px; flex-wrap: wrap; }
.footer-grid p { margin: 0; max-width: 70ch; }
footer .lang-switch ul { top: auto; bottom: calc(100% + 8px); }

/* ---------- Join page ---------- */
.join-hero { background: var(--ink); color: var(--paper); padding: clamp(48px, 7vw, 96px) 0; position: relative; overflow: hidden; isolation: isolate; }
.join-hero::before { content: ""; position: absolute; inset: -40% -20%; background: repeating-linear-gradient(-28deg, transparent 0 118px, rgba(246, 243, 236, .07) 118px 121px); z-index: -1; }
.join-hero h1 { font-size: clamp(46px, 8vw, 104px); line-height: .92; letter-spacing: -0.03em; margin: 0 0 20px; }
.join-hero .lead { font-size: clamp(18px, 2vw, 21px); color: var(--on-ink-muted); max-width: 56ch; margin: 0 0 40px; }
.channels { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 20px; }
.channel { background: var(--ink-2); border-radius: 20px; padding: 28px; box-shadow: inset 0 0 0 1px rgba(246, 243, 236, .1); }
.channel.discord { box-shadow: inset 0 0 0 2px var(--amber); }
.channel h2 { font-size: clamp(26px, 3vw, 34px); margin: 0 0 6px; color: var(--paper); }
.channel p { color: var(--on-ink-muted); margin: 12px 0 22px; }
.channel .members { display: inline-block; font-weight: 600; font-size: 14px; color: var(--ink); background: var(--amber); padding: 3px 12px; border-radius: 999px; }
.ways { list-style: none; padding: 0; margin: 32px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 0; counter-reset: way; border-top: 3px solid var(--ink); }
.ways li { counter-increment: way; padding: 28px 28px 28px 0; border-bottom: 1px solid #CFC7B6; }
.ways li::before { content: counter(way); display: block; font: 400 56px/1 var(--head); color: var(--amber); margin-bottom: 10px; }
.ways p { margin: 0; color: var(--muted); }
.wrap.safety > * { max-width: 70ch; }
