/* Kanga Card waitlist — shared styles for every page */
/* Self-hosted fonts: no request to Google before consent */
@import url("/fonts/fonts.css");
:root {
  --bg: #0f0e0e;
  --surface: #1a1818;
  --line: rgba(255,255,255,0.09);
  --text: #f5f1ee;
  --muted: rgba(245,241,238,0.62);
  --accent: #E65321;
  --accent-hot: #ff6a33;
}
* { box-sizing: border-box; }
/* The hidden attribute must win over component display rules (e.g. the form is display:grid). */
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  overflow-x: hidden;
}
/* Glow echoing the orange gradient in the promo video */
body::before {
  content: "";
  position: fixed;
  inset: -20vmax auto auto -20vmax;
  width: 70vmax; height: 70vmax;
  background: radial-gradient(circle, rgba(230,83,33,0.28), transparent 60%);
  pointer-events: none;
  z-index: 0;
}
a { color: var(--accent-hot); }

.wrap {
  position: relative; z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  padding: 20px 16px 32px;
}
header { display: flex; justify-content: center; padding: 6px 0 22px; }
header img { height: 34px; width: auto; }

.grid { display: grid; gap: 28px; }
@media (min-width: 900px) {
  .grid { grid-template-columns: 1.15fr 1fr; gap: 48px; align-items: start; }
  header { justify-content: flex-start; padding-bottom: 40px; }
  .intro { text-align: left !important; }
  .intro p { margin-left: 0 !important; }
}

.intro { text-align: center; }
.eyebrow {
  display: inline-block;
  font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent-hot);
  margin-bottom: 12px;
}
h1 {
  font-family: Manrope, sans-serif; font-weight: 800;
  font-size: clamp(30px, 6vw, 48px); line-height: 1.08; letter-spacing: -0.02em;
  margin: 0 0 12px;
}
.intro p {
  color: var(--muted); font-size: 16px; line-height: 1.55;
  max-width: 440px; margin: 0 auto 22px;
}

.video {
  position: relative;
  border-radius: 18px; overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #000 url("/assets/kanga-card-promo-poster.jpg") center / cover;
  box-shadow: 0 30px 60px -25px rgba(230,83,33,0.45), 0 0 0 1px var(--line);
}
.video video { width: 100%; height: 100%; object-fit: cover; display: block; }

.perks { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 12px; }
.perks li { display: flex; gap: 12px; font-size: 14.5px; line-height: 1.45; color: var(--muted); }
.perks li::before {
  content: ""; flex: none; width: 7px; height: 7px; margin-top: 7px;
  border-radius: 50%; background: var(--accent);
}

.form-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
}
.form-card h2 {
  font-family: Manrope, sans-serif; font-weight: 800; font-size: 20px;
  margin: 0; padding: 20px 22px 0;
}
.form-card .sub { color: var(--muted); font-size: 13.5px; margin: 6px 22px 0; }
form { display: grid; gap: 14px; padding: 18px 22px 22px; }
form label, legend { display: grid; gap: 6px; font-size: 13px; font-weight: 600; }
form em { color: var(--accent-hot); font-style: normal; }
.opt { color: var(--muted); font-weight: 400; }
input[type=text], input[type=email], select {
  width: 100%; padding: 13px 14px; border-radius: 10px;
  border: 1.5px solid rgba(255,255,255,0.12); background: #0f0e0e;
  color: var(--text); font: 400 15px Inter, sans-serif; outline: none;
}
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #999 50%), linear-gradient(135deg, #999 50%, transparent 50%); background-position: calc(100% - 18px) 55%, calc(100% - 13px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }
input::placeholder { color: rgba(245,241,238,0.35); }
input:focus, select:focus { border-color: var(--accent); }
.invalid { border-color: #ff5a4f !important; }
fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }
legend { width: 100%; margin-bottom: 8px; }
label.choice { display: flex; align-items: center; gap: 8px; font-weight: 500; font-size: 14px; cursor: pointer; }
label.choice input { accent-color: var(--accent); width: 17px; height: 17px; margin: 0; }
.error { color: #ff7a6f; font-size: 13px; }
form button {
  margin-top: 4px; padding: 15px 0; border: 0; border-radius: 12px;
  background: var(--accent); color: #fff; font: 700 15px Inter, sans-serif; cursor: pointer;
}
form button:hover { background: var(--accent-hot); }
form button:disabled { opacity: 0.6; cursor: default; }
.fine { margin: 0; font-size: 12px; color: var(--muted); text-align: center; }
.done { padding: 28px 22px 32px; text-align: center; }
.done .check {
  width: 46px; height: 46px; margin: 0 auto 14px; border-radius: 50%;
  background: var(--accent); display: flex; align-items: center; justify-content: center;
}
.done h3 { font-family: Manrope, sans-serif; font-weight: 800; font-size: 19px; margin: 0 0 6px; }
.done p { color: var(--muted); font-size: 14px; line-height: 1.5; margin: 0; }
.done strong { color: var(--text); }


footer {
  margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line);
  display: flex; gap: 14px; justify-content: center;
}
footer .icon {
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text); background: var(--surface); border: 1px solid var(--line);
  transition: color .15s, border-color .15s;
}
footer .icon:hover { color: var(--accent-hot); border-color: var(--accent); }

/* Intro takeover: card spins in, settles, pulses twice, then fades out (~2.9s) */
.splash {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 50%, #2a1410, var(--bg) 65%);
  cursor: pointer;
  animation: splash-out .5s ease-in 2.4s forwards;
}
html.no-splash .splash { display: none; }
html.splashing { overflow: hidden; }
/* Perspective sits on the spinning card's direct parent, and the fade-in happens here rather
   than on the 3D element: Safari flattens a preserve-3d element while its opacity is below 1,
   which showed both faces at once on iPhone. */
.card3d {
  width: min(78vw, 420px); aspect-ratio: 1.586;
  border-radius: 4.5% / 7%;
  perspective: 1400px; -webkit-perspective: 1400px;
  animation: card-fade-in .25s ease-out both, card-pulse .5s ease-in-out 1.4s 2, card-vanish .5s ease-in 2.4s forwards;
}
.card-inner {
  position: relative; width: 100%; height: 100%;
  transform-style: preserve-3d; -webkit-transform-style: preserve-3d;
  will-change: transform;
  animation: card-spin 1.4s cubic-bezier(.2,.65,.25,1) both;
}
.face {
  position: absolute; inset: 0;
  border-radius: 4.5% / 7%; overflow: hidden;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.06);
}
.face.front img { width: 100%; height: 100%; object-fit: cover; display: block; }
.face.back {
  transform: rotateY(180deg);
  background: linear-gradient(135deg, #1c1b1b, #0b0a0a);
}
.face.back .stripe { position: absolute; left: 0; right: 0; top: 14%; height: 18%; background: #050505; }
.face.back img { position: absolute; right: 7%; bottom: 9%; height: 14%; width: auto; }
@keyframes card-spin {
  from { transform: rotateY(-720deg) rotateX(18deg) scale(.55); }
  to   { transform: rotateY(0deg) rotateX(0deg) scale(1); }
}
@keyframes card-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes card-pulse {
  0%, 100% { transform: scale(1);    box-shadow: 0 0 0 0 rgba(230,83,33,0); }
  50%      { transform: scale(1.05); box-shadow: 0 0 70px 12px rgba(230,83,33,.55); }
}
@keyframes card-vanish { to { transform: scale(.85); opacity: 0; } }
@keyframes splash-out  { to { opacity: 0; visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { .splash { display: none; } }


/* Consent checkbox + Turnstile */
label.consent { display: flex; align-items: flex-start; gap: 10px; font-weight: 400; font-size: 13px; line-height: 1.45; color: var(--muted); cursor: pointer; }
label.consent input { accent-color: var(--accent); width: 17px; height: 17px; margin: 1px 0 0; flex: none; }
label.consent a, .legend-link { color: var(--accent-hot); }
.legend-link { font-weight: 400; font-size: 12.5px; }
#turnstile:empty { display: none; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* Footer: icons + small links */
footer { flex-direction: column; align-items: center; }
footer .icons { display: flex; gap: 14px; }
footer .links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; font-size: 12.5px; }
footer .links a, footer .links button {
  color: var(--muted); text-decoration: none; background: none; border: 0; padding: 0;
  font: inherit; cursor: pointer;
}
footer .links a:hover, footer .links button:hover { color: var(--text); }

/* Cookie banner */
.consent-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  padding: 10px; pointer-events: none;
  background: linear-gradient(to top, rgba(0,0,0,.35), transparent);
}
.consent-card {
  pointer-events: auto; position: relative;
  max-width: 1120px; margin: 0 auto;
  display: grid; gap: 12px; align-items: center;
  background: var(--surface); border: 1px solid rgba(255,255,255,.14); border-radius: 14px;
  padding: 14px 16px; box-shadow: 0 12px 32px rgba(0,0,0,.45);
}
.consent-card p { margin: 0; font-size: 13px; line-height: 1.45; color: var(--muted); padding-right: 32px; }
.consent-card strong { display: block; color: var(--text); font-size: 14.5px; margin-bottom: 3px; }
.consent-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
/* Decline and Accept are the same size and weight on purpose (Privacy Policy § 12). */
.consent-actions button {
  height: 46px; border-radius: 10px; font: 700 15px Inter, sans-serif; cursor: pointer;
  border: 1px solid rgba(255,255,255,.2); background: transparent; color: var(--text);
}
.consent-actions button.accept { background: var(--accent); border-color: var(--accent); color: #fff; }
.consent-close {
  position: absolute; top: 6px; right: 6px; width: 36px; height: 36px; border: 0; border-radius: 8px;
  background: none; color: var(--muted); cursor: pointer; font-size: 20px; line-height: 1;
}
.consent-close:hover { color: var(--text); background: rgba(255,255,255,.06); }
@media (min-width: 760px) {
  .consent-banner { padding: 20px; }
  .consent-card { grid-template-columns: 1fr auto; gap: 24px; padding: 16px 18px; }
  .consent-actions { min-width: 300px; }
  .consent-card p { padding-right: 0; }
  .consent-close { top: 8px; right: 8px; }
  .consent-card { padding-right: 56px; }
}

/* Legal pages */
.legal { max-width: 760px; margin: 0 auto; }
.legal h1 { font-size: clamp(28px, 5vw, 38px); margin: 8px 0 18px; }
.legal h2 { font-family: Manrope, sans-serif; font-size: 18px; margin: 32px 0 10px; }
.legal p, .legal li { color: #d9d2cd; font-size: 15px; line-height: 1.65; }
.legal .back { display: inline-block; margin-bottom: 8px; font-size: 14px; text-decoration: none; }

/* Coming-soon home page */
.soon {
  position: relative; z-index: 1;
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 32px 16px; text-align: center;
}
.soon-logo { height: 44px; width: auto; margin-bottom: 28px; }
.soon-video { width: min(100%, 880px); margin-bottom: 28px; }
.soon h1 { margin: 0; font-size: clamp(34px, 7vw, 60px); }

/* Sound toggle on the promo video (starts muted: browsers block autoplay with sound) */
.sound {
  position: absolute; right: 12px; bottom: 12px; z-index: 2;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 12px; border-radius: 999px; border: 1px solid rgba(255,255,255,.18);
  background: rgba(0,0,0,.55); color: #fff; cursor: pointer;
  font: 600 12.5px Inter, sans-serif;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.sound:hover { background: rgba(0,0,0,.75); }
.sound .ic-on, .sound[aria-pressed="true"] .ic-off { display: none; }
.sound[aria-pressed="true"] .ic-on { display: inline; }
.soon-video { position: relative; }

/* Server-rendered notices (unsubscribe, admin) */
.notice { padding-top: 12px; }
.notice h1 { font-family: Manrope, sans-serif; font-size: clamp(26px, 5vw, 34px); }
.btn {
  display: inline-block; padding: 13px 22px; border: 0; border-radius: 12px; cursor: pointer;
  background: var(--accent); color: #fff; text-decoration: none; font: 700 15px Inter, sans-serif;
}
.btn:hover { background: var(--accent-hot); }
.stats { list-style: none; padding: 0; margin: 18px 0 8px; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stats li { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; color: var(--muted); }
.stats strong { display: block; font: 800 26px Manrope, sans-serif; color: var(--text); }
.data { width: 100%; border-collapse: collapse; margin: 8px 0 20px; font-size: 14px; }
.data th, .data td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.data th { color: var(--muted); font-weight: 600; }

.tabs { font-size: 14px; color: var(--muted); }
.tabs strong { color: var(--text); }
.table-scroll { overflow-x: auto; }
.cols { display: grid; gap: 0 24px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); align-items: start; }
.notice.wide { max-width: 1060px; }
.notice.wide p { text-align: left; }

/* The free-card drawing is not offered in the EEA: hidden for EEA IPs (set by /config.js
   before first paint) and when an EEA country is picked in the form. */
html.no-drawing [data-drawing] { display: none !important; }

/* ── Join button: card pack shuffling while joining, then "Joined" ───────── */
#submit { display: flex; align-items: center; justify-content: center; gap: 10px; transition: background .25s; }
#submit .deck, #submit .tick { display: none; }
#submit.is-loading { opacity: 1 !important; }
#submit.is-loading .deck { display: inline-block; }
.deck { position: relative; width: 30px; height: 19px; }
.deck i {
  position: absolute; inset: 0; border-radius: 3px;
  background: #141313 url("/assets/kanga-card-front.jpg") center / cover;
  box-shadow: 0 0 0 1px rgba(255,255,255,.7), 0 2px 4px rgba(0,0,0,.35);
  animation: deck-shuffle 1.05s ease-in-out infinite;
}
.deck i:nth-child(2) { animation-delay: .35s; }
.deck i:nth-child(3) { animation-delay: .7s; }
@keyframes deck-shuffle {
  0%, 100% { transform: translate(0, 0) rotate(0deg); z-index: 1; }
  25%      { transform: translate(9px, -6px) rotate(14deg); z-index: 3; }
  50%      { transform: translate(-7px, -2px) rotate(-10deg); z-index: 2; }
  75%      { transform: translate(0, 1px) rotate(0deg); z-index: 1; }
}
#submit.is-joined { background: #1f7a4a; opacity: 1 !important; cursor: default; animation: joined-pop .35s ease-out; }
#submit.is-joined .tick { display: inline-block; }
@keyframes joined-pop { 0% { transform: scale(.96); } 60% { transform: scale(1.03); } 100% { transform: scale(1); } }

/* After joining: the fields fold away, leaving the "Joined" button and the confirmation. */
form.joined > *:not(#submit) { display: none; }

/* Confirmation: three Kanga Cards fan out */
.pack { position: relative; width: 120px; height: 76px; margin: 4px auto 18px; }
.pack img {
  position: absolute; left: 50%; top: 0; width: 104px; height: auto; margin-left: -52px;
  border-radius: 7px; box-shadow: 0 10px 22px -8px rgba(0,0,0,.7), 0 0 0 1px rgba(255,255,255,.08);
  transform-origin: 50% 110%;
  animation: pack-in .5s cubic-bezier(.2,.8,.25,1) both;
}
.pack img:nth-child(1) { --r: -14deg; --x: -26px; animation-delay: .05s; }
.pack img:nth-child(2) { --r: 14deg;  --x: 26px;  animation-delay: .15s; }
.pack img:nth-child(3) { --r: 0deg;   --x: 0px;   animation-delay: .25s; }
@keyframes pack-in {
  from { transform: translate(0, 40px) rotate(0deg) scale(.6); opacity: 0; }
  to   { transform: translate(var(--x), 0) rotate(var(--r)) scale(1); opacity: 1; }
}
.done { animation: done-in .4s ease-out both; }
@keyframes done-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .deck i, .pack img, .done, #submit.is-joined { animation: none !important; }
  .pack img { transform: translate(var(--x), 0) rotate(var(--r)); }
}

/* ── Admin: traffic map, country table, access rules ─────────────────────── */
.mapbox { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 8px; margin: 10px 0 6px; }
.worldmap { display: block; width: 100%; height: auto; }
.worldmap path:hover { stroke: #fff; stroke-width: 1; }
.legend { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); margin: 0 0 16px; }
.legend span { margin: 0 4px; }
.data tr.sel td { background: rgba(230, 83, 33, 0.14); }
.data td a { color: var(--accent-hot); }
.tabs a { color: var(--accent-hot); }
.ok { color: #6fd39b; font-size: 14px; }
.notice .error { font-size: 14px; }
.access-form { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; margin: 12px 0; }
.access-form textarea {
  width: 100%; padding: 10px 12px; border-radius: 10px; border: 1.5px solid rgba(255,255,255,0.12);
  background: #0f0e0e; color: var(--text); font: 400 14px/1.4 ui-monospace, Consolas, monospace; outline: none; resize: vertical;
}
.access-form textarea:focus { border-color: var(--accent); }
.access-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.access-actions button { padding: 12px 18px; margin: 0; }
.access-form .btn-ghost { background: transparent; border: 1.5px solid var(--line); color: var(--text); }
.access-form .btn-ghost:hover { background: rgba(255,255,255,0.06); }
.access-form fieldset.countries { display: block; }
.country-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.country-tools input[type=search] {
  flex: 1 1 200px; padding: 9px 12px; border-radius: 10px; border: 1.5px solid rgba(255,255,255,0.12);
  background: #0f0e0e; color: var(--text); font: 400 14px Inter, sans-serif; outline: none;
}
.country-tools button { margin: 0; padding: 8px 12px; font-size: 13px; font-weight: 600; background: transparent; border: 1.5px solid var(--line); color: var(--text); border-radius: 10px; }
.country-tools button:hover { background: rgba(255,255,255,0.06); }
.country-list {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px 14px;
  max-height: 300px; overflow-y: auto; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: #0f0e0e;
}
.country-list label.choice { font-size: 13px; }
.access-form fieldset.tg-chats { display: grid; gap: 8px; }
.access-form input[type=password] {
  width: 100%; padding: 11px 12px; border-radius: 10px; border: 1.5px solid rgba(255,255,255,0.12);
  background: #0f0e0e; color: var(--text); font: 400 14px Inter, sans-serif; outline: none;
}
.access-form select { width: auto; padding: 9px 36px 9px 12px; }
.access-form .opt a, .fine a { color: var(--accent-hot); }
.access-form input.secret {
  width: 100%; padding: 11px 12px; border-radius: 10px; border: 1.5px solid rgba(255,255,255,0.12);
  background: #0f0e0e; color: var(--text); font: 400 14px Inter, sans-serif; outline: none;
  -webkit-text-security: disc;
}
.map-toggle { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.seg { display: inline-flex; border: 1.5px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg a { padding: 7px 14px; color: var(--text) !important; text-decoration: none; font-weight: 600; }
.seg a + a { border-left: 1.5px solid var(--line); }
.seg a:hover { background: rgba(255,255,255,0.06); }
.seg a.on { background: var(--accent); color: #fff !important; }
.access-form input.plain {
  width: 100%; padding: 11px 12px; border-radius: 10px; border: 1.5px solid rgba(255,255,255,0.12);
  background: #0f0e0e; color: var(--text); font: 400 14px Inter, sans-serif; outline: none;
}

/* ── Form on phones: drawing opt-in and consent as separate, roomy tap targets ──
   The drawing box is display:none for EEA visitors; spacing comes only from the form's grid
   gap, so hiding it leaves no extra space. */
label.consent {
  padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,0.02);
}
label.consent input { width: 20px; height: 20px; }
label.consent.drawing-opt:has(input:checked) { border-color: var(--accent); background: rgba(230,83,33,0.08); }
#submit:disabled:not(.is-loading):not(.is-joined) { opacity: .45; cursor: not-allowed; }
.consent-hint { color: var(--accent-hot); margin: -4px 0 0; }
.form-card.is-joined > h2, .form-card.is-joined > .sub { display: none; }
.import-result .result { border-radius: 12px; padding: 12px 14px; margin: 10px 0; font-size: 14px; line-height: 1.5; border: 1.5px solid var(--line); }
.import-result .result.running { border-color: var(--accent); background: rgba(230,83,33,0.08); }
.import-result .result.ok { border-color: #2f9e64; background: rgba(47,158,100,0.12); }
.import-result .result.warn { border-color: #d9a21b; background: rgba(217,162,27,0.12); }
.import-result .result.err { border-color: #ff5a4f; background: rgba(255,90,79,0.12); }
.stats li.primary { border-color: var(--accent); background: rgba(230,83,33,0.10); }
