/* ============================================================
   Membersflow — single-page landing
   Design language modeled on the Nikka template:
   deep teal palette, General Sans headings, Inter body,
   Roboto Mono eyebrows, split hero, sticky rails, muted cards.
   ============================================================ */

:root {
  --bg: #fffdf9;
  --bg-muted: #f7f4ee;
  --bg-primary: #0b1220;
  --bg-primary-hover: #151f31;
  --bg-dark: #0b1220;
  --text: #111827;
  --text-muted: #5b6472;
  --text-inverse: #ffffff;
  --text-muted-inverse: rgba(255, 255, 255, 0.62);
  --border: #e6e1d9;
  --border-inverse: rgba(255, 255, 255, 0.14);
  --accent: #e86a4a;
  --accent-hover: #ce563a;
  --accent-soft: #fce4dc;

  --font-heading: "General Sans", "Inter", -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Roboto Mono", ui-monospace, "SF Mono", monospace;

  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 18px;
  --container: 1240px;
  --nav-h: 76px;

  --shadow-card: 0 20px 40px -24px rgba(11, 18, 32, 0.22);
  --shadow-pop: 0 24px 48px -20px rgba(11, 18, 32, 0.3);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- Reset & base ---------- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; }
ul { list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

::selection { background: var(--bg-primary); color: #fff; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: fixed;
  top: -100%;
  left: 16px;
  z-index: 200;
  padding: 10px 18px;
  background: var(--bg-dark);
  color: #fff;
  border-radius: 0 0 8px 8px;
  font-size: 14px;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 0; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(20px, 4.5vw, 56px);
}

/* ---------- Type ---------- */

.h2 {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: clamp(2.1rem, 4.2vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.022em;
  color: var(--text);
  text-wrap: balance;
}

.lede {
  font-size: clamp(1.05rem, 1.4vw, 1.2rem);
  line-height: 1.65;
  color: var(--text-muted);
  max-width: 58ch;
}
.lede-inverse { color: var(--text-muted-inverse); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.eyebrow-inverse {
  color: var(--text-muted-inverse);
  border-bottom-color: var(--border-inverse);
}

/* ---------- Buttons (Nikka-style slide hover) ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: var(--radius-sm);
  font-size: 0.94rem;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease),
              border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.btn-lg { padding: 17px 32px; font-size: 1rem; }
.btn-sm { padding: 10px 18px; font-size: 0.88rem; }

.btn-label {
  position: relative;
  display: block;
  overflow: hidden;
}
.btn-label span {
  display: block;
  transition: transform 0.35s var(--ease);
}
.btn-label span[aria-hidden] {
  position: absolute;
  inset: 0;
  transform: translateY(110%);
}
.btn:hover .btn-label span:first-child { transform: translateY(-110%); }
.btn:hover .btn-label span[aria-hidden] { transform: translateY(0); }

.btn-light { background: var(--accent); color: #fff; }
.btn-light:hover { background: var(--accent-hover); }

.btn-dark { background: var(--accent); color: #fff; }
.btn-dark:hover { background: var(--accent-hover); }

.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border: 1px solid var(--border-inverse);
  backdrop-filter: blur(6px);
}
.btn-ghost:hover { border-color: rgba(255, 255, 255, 0.4); background: rgba(255, 255, 255, 0.12); }

.btn-icon { flex: none; transition: transform 0.3s var(--ease); }
.btn:hover .btn-icon { transform: translateX(3px); }

/* ---------- Navbar ---------- */

.navbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--nav-h);
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease);
  border-bottom: 1px solid transparent;
}
.navbar.scrolled {
  background: rgba(12, 30, 33, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom-color: var(--border-inverse);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  height: 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
  color: #fff;
}
.brand-logo {
  display: block;
  height: 34px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 34px;
}
.nav-link {
  position: relative;
  font-size: 0.92rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.72);
  padding: 6px 0;
  transition: color 0.25s var(--ease);
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1.5px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.35s var(--ease);
}
.nav-link:hover, .nav-link.active { color: #fff; }
.nav-link:hover::after, .nav-link.active::after {
  transform: scaleX(1);
  transform-origin: left;
}
.nav-cta { margin-left: 8px; }

.nav-toggle {
  display: none;
  position: relative;
  z-index: 120;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  padding: 0;
  border: 0;
  appearance: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  position: absolute;
  left: 10px;
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transform-origin: center;
  transition: transform 0.3s var(--ease), opacity 0.2s var(--ease);
}
.nav-toggle span:nth-child(1) { top: 14px; }
.nav-toggle span:nth-child(2) { top: 21px; }
.nav-toggle span:nth-child(3) { top: 28px; }
body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: 100svh;
  background: var(--bg-dark);
  color: var(--text-inverse);
}

.hero-left {
  display: flex;
  flex-direction: column;
  padding: calc(var(--nav-h) + clamp(40px, 9vh, 88px)) clamp(24px, 5.5vw, 84px) clamp(36px, 6vh, 56px);
}

/* centers the hero block between the navbar and the trust strip */
.hero-content {
  margin-block: auto;
}

.hero-badge {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--border-inverse);
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  margin-bottom: clamp(28px, 4.5vh, 44px);
}

.hero-title {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: clamp(2.4rem, 4.35vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  max-width: 12.5em;
  margin-bottom: clamp(20px, 3.2vh, 30px);
}
.hero-title .dim { color: #d8dce5; }
.hero-title .hero-accent { color: #f3a08a; }
.cta-title .dim { color: rgba(255, 255, 255, 0.58); }

.hero-sub {
  font-size: clamp(1rem, 1.25vw, 1.13rem);
  line-height: 1.7;
  color: var(--text-muted-inverse);
  max-width: 52ch;
  margin-bottom: clamp(28px, 4.5vh, 40px);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 22px;
}

.hero-note {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.86rem;
  color: rgba(255, 255, 255, 0.55);
}
.pulse-dot {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(46, 143, 127, 0.55);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(46, 143, 127, 0.55); }
  70% { box-shadow: 0 0 0 9px rgba(46, 143, 127, 0); }
  100% { box-shadow: 0 0 0 0 rgba(46, 143, 127, 0); }
}

.hero-trust {
  display: grid;
  grid-template-columns: repeat(3, auto);
  justify-content: start;
  column-gap: clamp(18px, 2.4vw, 34px);
  row-gap: 14px;
  padding-top: clamp(26px, 4vh, 40px);
  border-top: 1px solid var(--border-inverse);
}
.hero-trust li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  white-space: nowrap;
}
.hero-trust svg { color: var(--accent); }

.hero-right {
  position: relative;
  overflow: hidden;
}
.hero-right img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-right-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(100deg, rgba(11, 18, 32, 0.68) 0%, rgba(11, 18, 32, 0.16) 48%, rgba(11, 18, 32, 0.24) 100%),
    linear-gradient(0deg, rgba(11, 18, 32, 0.18), transparent 42%);
}

/* ---------- Sections (shared) ---------- */

.section { padding-block: clamp(88px, 11vw, 148px); }

.section-grid {
  display: grid;
  grid-template-columns: minmax(180px, 280px) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
}
.section-rail { position: sticky; top: calc(var(--nav-h) + 40px); }
.section-rail .eyebrow { min-width: 200px; max-width: 240px; }

.section-head { max-width: 780px; margin-bottom: clamp(44px, 6vw, 72px); }
.section-head .eyebrow { display: inline-block; min-width: 220px; margin-bottom: 28px; }
.section-head .lede { margin-top: 22px; }

.section-body .h2 { margin-bottom: 24px; }

/* ---------- Problem ---------- */

.pain-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 clamp(24px, 4vw, 56px);
  margin-block: clamp(36px, 5vw, 56px);
}
.pain-list li {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding-block: 22px;
  border-top: 1px solid var(--border);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--text);
}
.pain-icon {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: var(--bg);
}

.callout {
  background: var(--bg-primary);
  color: #fff;
  border-radius: var(--radius);
  padding: clamp(26px, 3.4vw, 40px) clamp(28px, 3.8vw, 48px);
  box-shadow: var(--shadow-card);
}
.callout p {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  line-height: 1.45;
  letter-spacing: -0.01em;
  max-width: 34em;
}
.callout strong { font-weight: 600; color: #ffd4c6; }

/* ---------- Features ---------- */

.section-features { background: var(--bg-muted); }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}
.feature-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(28px, 3.2vw, 42px);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}
.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-card);
  border-color: rgba(232, 106, 74, 0.45);
}
.feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
  margin-bottom: 22px;
}
.feature-card h3 {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 1.32rem;
  letter-spacing: -0.012em;
  line-height: 1.25;
  margin-bottom: 12px;
}
.feature-card p {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text-muted);
}

/* ---------- How it works ---------- */

.how-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(24px, 3.4vw, 48px);
  align-items: start;
}

.how-panel {
  position: sticky;
  top: calc(var(--nav-h) + 28px);
  display: flex;
  align-items: flex-end;
  min-height: min(78vh, 720px);
  border-radius: var(--radius-lg);
  overflow: hidden;
  color: #fff;
}
.how-panel img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.how-panel-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(185deg, rgba(11, 18, 32, 0.14) 0%, rgba(11, 18, 32, 0.42) 52%, rgba(11, 18, 32, 0.9) 100%);
}
.how-panel-content {
  position: relative;
  padding: clamp(30px, 3.4vw, 48px);
}
.how-panel-content .eyebrow { margin-bottom: 22px; max-width: 220px; }
.how-panel-content .h2 { color: #fff; font-size: clamp(1.9rem, 3vw, 2.7rem); }
.how-panel-note {
  margin-top: 18px;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-muted-inverse);
  max-width: 40ch;
}

.how-steps {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.step-card {
  background: var(--bg-muted);
  border-radius: var(--radius);
  padding: clamp(28px, 3.2vw, 42px);
}
.step-label {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 22px;
}
.step-label span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.step-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}
.step-card h3, .payment-card h3 {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 1.45rem;
  letter-spacing: -0.014em;
  line-height: 1.25;
  margin-bottom: 12px;
}
.step-card p, .payment-card p {
  font-size: 0.97rem;
  line-height: 1.68;
  color: var(--text-muted);
  max-width: 58ch;
}

/* ---------- Who it's for ---------- */

.audience-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: clamp(30px, 4vw, 44px);
  max-width: 860px;
}
.audience-chips li {
  font-size: 0.93rem;
  font-weight: 500;
  padding: 12px 22px;
  border: 1px solid var(--border);
  border-radius: 500px;
  color: var(--text);
  background: var(--bg);
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.audience-chips li:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ---------- Payments ---------- */

.section-payments { background: var(--bg-muted); }

.payment-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
.payment-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(28px, 3.2vw, 40px);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}
.payment-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-card);
  border-color: rgba(232, 106, 74, 0.45);
}
.payment-card .step-label span { color: var(--text-muted); }
.payment-card p { max-width: none; }

/* ---------- Trust & security ---------- */

.section-security {
  background: var(--bg-dark);
  color: var(--text-inverse);
}
.section-security .h2 { color: #fff; }

.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(32px, 4.5vw, 56px) clamp(28px, 3.4vw, 48px);
}
.trust-item {
  padding-top: 26px;
  border-top: 1px solid var(--border-inverse);
}
.trust-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  color: #9fd8c8;
  margin-bottom: 18px;
}
.trust-item h3 {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 1.12rem;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}
.trust-item p {
  font-size: 0.93rem;
  line-height: 1.66;
  color: var(--text-muted-inverse);
}

/* ---------- Testimonials ---------- */

.section-testimonials {
  position: relative;
  padding-block: clamp(110px, 14vw, 180px);
  overflow: hidden;
  color: #fff;
}
.testimonials-bg {
  position: absolute;
  inset: 0;
  background: url("../assets/img/testimonial-members-v2.png") center / cover no-repeat;
}
.testimonials-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(11, 18, 32, 0.88) 0%, rgba(11, 18, 32, 0.74) 46%, rgba(11, 18, 32, 0.36) 100%),
    linear-gradient(180deg, rgba(11, 18, 32, 0.2), rgba(11, 18, 32, 0.7));
}
.testimonials-inner { position: relative; }

.quote-mark { color: rgba(255, 255, 255, 0.9); margin-bottom: 30px; }

.quote-featured { max-width: 900px; }
.quote-featured p {
  font-family: var(--font-heading);
  font-weight: 400;
  font-size: clamp(1.7rem, 3.6vw, 2.9rem);
  line-height: 1.22;
  letter-spacing: -0.018em;
}
.quote-attrib {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 34px;
}
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 1px solid rgba(255, 255, 255, 0.35);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
}
.stars { display: inline-flex; gap: 3px; color: #f2c14e; }
.quote-name {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
}

.quote-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-top: clamp(48px, 7vw, 80px);
  max-width: 980px;
}
.quote-card {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  padding: clamp(26px, 3vw, 38px);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.quote-card p {
  font-size: 1.02rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.88);
}
.quote-card .quote-attrib { margin-top: 24px; }
.quote-card .avatar { width: 40px; height: 40px; font-size: 0.66rem; }

/* ---------- FAQ ---------- */

.faq-list { margin-top: clamp(30px, 4vw, 44px); }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: 100%;
  padding-block: 24px;
  text-align: left;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 1.16rem;
  letter-spacing: -0.01em;
  line-height: 1.35;
  transition: color 0.25s var(--ease);
}
.faq-question:hover { color: var(--accent); }
.faq-icon {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: transform 0.35s var(--ease), background-color 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.faq-question[aria-expanded="true"] .faq-icon {
  transform: rotate(45deg);
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s var(--ease);
}
.faq-answer-inner { overflow: hidden; }
.faq-item.open .faq-answer { grid-template-rows: 1fr; }
.faq-answer p {
  padding-bottom: 26px;
  max-width: 62ch;
  font-size: 0.98rem;
  line-height: 1.7;
  color: var(--text-muted);
}

/* ---------- Final CTA ---------- */

.section-cta {
  position: relative;
  padding-block: clamp(120px, 16vw, 200px);
  overflow: hidden;
  color: #fff;
  text-align: center;
}
.cta-bg {
  position: absolute;
  inset: 0;
  background: url("../assets/img/cta-members-v2.png") center / cover no-repeat;
}
.cta-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 35%, rgba(11, 18, 32, 0.44), rgba(11, 18, 32, 0.88) 72%),
    linear-gradient(180deg, rgba(11, 18, 32, 0.48), rgba(11, 18, 32, 0.78));
}
.cta-inner { position: relative; }

.cta-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.07);
  border-radius: 500px;
  padding: 9px 18px;
  margin-bottom: 34px;
}
.cta-title {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: clamp(2.4rem, 5.4vw, 4.4rem);
  line-height: 1.06;
  letter-spacing: -0.024em;
  max-width: 16em;
  margin-inline: auto;
  margin-bottom: 26px;
}
.cta-sub {
  max-width: 58ch;
  margin-inline: auto;
  font-size: clamp(1rem, 1.3vw, 1.15rem);
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: 42px;
}
.cta-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

/* ---------- Footer ---------- */

.footer {
  background: var(--bg-dark);
  color: var(--text-inverse);
  padding-top: clamp(72px, 9vw, 110px);
}
.footer-top {
  display: grid;
  grid-template-columns: minmax(260px, 1.1fr) minmax(0, 2fr);
  gap: clamp(48px, 7vw, 110px);
  padding-bottom: clamp(56px, 7vw, 88px);
}
.footer-strapline {
  margin-top: 20px;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text-muted-inverse);
  max-width: 30ch;
}
.footer-contact {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.85);
  transition: color 0.25s var(--ease);
}
.footer-contact:hover { color: #fff; }
.footer-contact-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border-inverse);
  background: rgba(255, 255, 255, 0.05);
}
.footer-cols {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 32px;
}
.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 20px;
}
.footer-col a {
  display: block;
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.75);
  padding-block: 6px;
  transition: color 0.25s var(--ease);
}
.footer-col a:hover { color: #fff; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-block: 28px;
  border-top: 1px solid var(--border-inverse);
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
}
.footer-managed { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; }

/* ---------- Reveal animations ---------- */

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.75s var(--ease), transform 0.75s var(--ease);
  transition-delay: var(--reveal-delay, 0s);
}
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .pulse-dot { animation: none; }
  .btn-label span, .btn-icon { transition: none; }
}

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
  .trust-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .payment-grid { grid-template-columns: minmax(0, 1fr); max-width: 720px; }
  .how-grid { grid-template-columns: minmax(0, 1fr); }
  .how-panel { position: relative; top: 0; min-height: 440px; }
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
  }
  .hero-right {
    order: -1;
    min-height: 300px;
    max-height: 44vh;
  }
  .hero-left { padding-top: calc(var(--nav-h) + 40px); }
  .hero-trust { grid-template-columns: repeat(2, auto); justify-content: start; }
  .section-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .section-rail { position: static; }
  .section-rail .eyebrow { min-width: 180px; }
  .feature-grid { grid-template-columns: minmax(0, 1fr); }
  .pain-list { grid-template-columns: minmax(0, 1fr); }
  .quote-grid { grid-template-columns: minmax(0, 1fr); max-width: 640px; }
  .footer-top { grid-template-columns: minmax(0, 1fr); gap: 56px; }
  .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .brand-logo { height: 25.5px; }
  /* A backdrop filter makes fixed descendants use the navbar as their
     containing block on mobile, collapsing the full-screen menu to 76px. */
  .navbar.scrolled {
    background: rgba(12, 30, 33, 0.97);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .nav-links {
    position: fixed;
    inset: 0;
    z-index: 110;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 8px;
    padding: clamp(24px, 6vw, 56px);
    background: rgba(12, 30, 33, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s var(--ease), visibility 0.35s var(--ease);
  }
  body.nav-open .nav-links { opacity: 1; visibility: visible; }
  .nav-link {
    font-family: var(--font-heading);
    font-size: 1.9rem;
    font-weight: 500;
    letter-spacing: -0.015em;
    padding-block: 10px;
    color: #fff;
  }
  .nav-link::after { display: none; }
  .nav-cta { margin: 22px 0 0; }
  .nav-toggle { display: flex; }
  body.nav-open { overflow: hidden; }

  .btn { padding: 13px 22px; }
  .hero-title { font-size: clamp(2.35rem, 9.4vw, 3rem); }
  .hero-right { min-height: 340px; max-height: 48vh; }
  /* The fixed navigation sits over the image on small screens, not the copy. */
  .hero-left { padding-top: 32px; }
  .trust-grid { grid-template-columns: minmax(0, 1fr); }
  .footer-cols { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .footer-col { padding-block: 18px; border-top: 1px solid var(--border-inverse); }
  .footer-col h4 { margin-bottom: 10px; }
}

/* ---------- Demo request modal ---------- */

.demo-overlay {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(7, 12, 20, 0.62);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s var(--ease), visibility 0s linear 0.35s;
}
.demo-overlay.open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.35s var(--ease), visibility 0s;
}
body.demo-open { overflow: hidden; }

.demo-modal {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  width: min(940px, 100%);
  max-height: min(calc(100dvh - 44px), 880px);
  background: var(--bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-pop);
  overflow: hidden;
  transform: translateY(30px) scale(0.965);
  opacity: 0;
  transition: transform 0.45s var(--ease), opacity 0.45s var(--ease);
}
.demo-overlay.open .demo-modal { transform: none; opacity: 1; }

/* Close button — light chip on desktop (over the form side),
   translucent chip on mobile (over the dark panel header). */
.demo-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-muted);
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.25s var(--ease);
}
.demo-close:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: rotate(90deg);
}

/* Brand panel */
.demo-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: clamp(28px, 4vh, 44px);
  padding: clamp(28px, 3.4vw, 44px);
  color: #fff;
  background:
    radial-gradient(130% 90% at 100% 0%, rgba(232, 106, 74, 0.34), transparent 55%),
    linear-gradient(165deg, #131e30 0%, #0b1220 62%);
}
/* align-self stops the flex column from stretching the logo to panel width */
.demo-logo { height: 24px; width: auto; align-self: flex-start; }
.demo-panel-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #f3a08a;
  margin-bottom: 14px;
}
.demo-panel-title {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: clamp(1.3rem, 2vw, 1.6rem);
  line-height: 1.28;
  letter-spacing: -0.015em;
  max-width: 17em;
  margin-bottom: clamp(22px, 3vh, 32px);
}
.demo-perks {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: clamp(24px, 3.4vh, 34px);
}
.demo-perks li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.9rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.74);
}
.demo-perks svg { flex: none; margin-top: 2px; color: var(--accent); }
.demo-panel-note {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: clamp(20px, 3vh, 28px);
  border-top: 1px solid var(--border-inverse);
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.58);
}

/* Form side */
.demo-body {
  overflow-y: auto;
  padding: clamp(26px, 3.2vw, 44px);
  max-height: min(calc(100dvh - 44px), 880px);
}
.demo-form-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.demo-title {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: clamp(1.55rem, 2.4vw, 1.95rem);
  letter-spacing: -0.02em;
  line-height: 1.12;
  margin-bottom: 10px;
}
.demo-sub {
  font-size: 0.94rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: clamp(22px, 3vh, 30px);
  max-width: 46ch;
}

.demo-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.demo-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}
.demo-field label {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.demo-field .opt {
  text-transform: none;
  letter-spacing: 0.04em;
  font-family: var(--font-body);
  opacity: 0.75;
}
.demo-field input,
.demo-field select,
.demo-field textarea {
  font: inherit;
  font-size: 0.95rem;
  color: var(--text);
  width: 100%;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), background-color 0.25s var(--ease);
}
.demo-field textarea { resize: vertical; min-height: 84px; }
.demo-field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' stroke='%235b6472' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
  cursor: pointer;
}
.demo-field input::placeholder,
.demo-field textarea::placeholder { color: #a7a29a; }
.demo-field input:focus-visible,
.demo-field select:focus-visible,
.demo-field textarea:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.demo-field input.invalid,
.demo-field select.invalid {
  border-color: #d1523f;
  box-shadow: 0 0 0 3px rgba(209, 82, 63, 0.12);
}

/* Honeypot — offscreen, ignored by humans, tempting for bots */
.demo-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.demo-alert {
  background: #fdecea;
  border: 1px solid #f3c4bd;
  color: #8f2f24;
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-size: 0.88rem;
  line-height: 1.5;
  margin-bottom: 16px;
}

.demo-submit {
  width: 100%;
  justify-content: center;
  margin-top: 6px;
}
.demo-submit:disabled { cursor: default; opacity: 0.85; }
.demo-spinner {
  display: none;
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: demoSpin 0.7s linear infinite;
}
.demo-submit.loading .demo-spinner { display: inline-block; }
@keyframes demoSpin { to { transform: rotate(360deg); } }
.demo-fine {
  margin-top: 14px;
  font-size: 0.78rem;
  line-height: 1.55;
  text-align: center;
  color: var(--text-muted);
}

/* Success state */
.demo-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 420px;
  padding: clamp(28px, 4vh, 48px) clamp(18px, 3vw, 34px);
}
/* display: flex above would otherwise override the UA's [hidden] rule */
.demo-success[hidden] { display: none; }
.demo-success-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 14px 30px -12px rgba(232, 106, 74, 0.65);
  animation: demoPop 0.45s var(--ease) both;
}
.demo-success-icon .demo-check {
  stroke-dasharray: 30;
  stroke-dashoffset: 30;
  animation: demoDraw 0.4s 0.3s var(--ease) forwards;
}
@keyframes demoPop {
  from { transform: scale(0.35); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
@keyframes demoDraw { to { stroke-dashoffset: 0; } }
.demo-success-title {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: clamp(1.5rem, 2.4vw, 1.9rem);
  letter-spacing: -0.018em;
  margin-top: 24px;
  margin-bottom: 12px;
}
.demo-success-text {
  font-size: 0.96rem;
  line-height: 1.65;
  color: var(--text-muted);
  max-width: 40ch;
}
.demo-success-text strong { color: var(--text); }
.demo-done {
  margin-top: 28px;
  background: var(--bg-primary);
  color: #fff;
}
.demo-done:hover { background: var(--bg-primary-hover); }

@media (prefers-reduced-motion: reduce) {
  .demo-overlay, .demo-modal { transition: none; }
  .demo-close { transition: none; }
  .demo-success-icon, .demo-success-icon .demo-check { animation: none; }
  .demo-success-icon .demo-check { stroke-dashoffset: 0; }
  .demo-spinner { animation-duration: 1.2s; }
}

@media (max-width: 880px) {
  .demo-modal {
    grid-template-columns: minmax(0, 1fr);
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
  }
  .demo-body { overflow-y: visible; max-height: none; }
  .demo-close {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-inverse);
  }
  .demo-close:hover { background: var(--accent); border-color: var(--accent); }
  .demo-panel {
    flex-direction: row;
    align-items: center;
    gap: 20px;
    padding: 20px 24px;
  }
  .demo-logo { height: 21px; }
  .demo-panel-content { min-width: 0; }
  .demo-panel-eyebrow { margin-bottom: 6px; }
  .demo-panel-title { font-size: 1.02rem; margin-bottom: 0; }
  .demo-perks, .demo-panel-note { display: none; }
  .demo-row { grid-template-columns: minmax(0, 1fr); gap: 0; }
}

/* ---------- Legal inner pages (Terms / Privacy) ---------- */

.legal-page { background: var(--bg); }

.legal-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 253, 249, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.legal-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 18px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease), background-color 0.25s var(--ease);
}
.legal-back:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: #fff;
}
.legal-back svg { transition: transform 0.3s var(--ease); }
.legal-back:hover svg { transform: translateX(-3px); }

.legal-hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  padding-block: clamp(64px, 9vw, 112px);
  background:
    radial-gradient(130% 100% at 88% 0%, rgba(232, 106, 74, 0.3), transparent 55%),
    linear-gradient(165deg, #131e30 0%, #0b1220 62%);
}
.legal-hero .eyebrow { display: inline-block; min-width: 200px; margin-bottom: 30px; }
.legal-title {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  max-width: 16em;
  margin-bottom: 20px;
}
.legal-summary {
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  line-height: 1.7;
  color: var(--text-muted-inverse);
  max-width: 62ch;
  margin-bottom: 30px;
}
.legal-updated {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.07);
  border-radius: 500px;
  padding: 8px 16px;
}
.legal-updated span { color: #f3a08a; }

.legal-body {
  padding-block: clamp(56px, 7vw, 96px) clamp(72px, 9vw, 120px);
}
.legal-content { max-width: 768px; }
.legal-section { margin-bottom: clamp(40px, 5.5vh, 56px); }
.legal-section h2 {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  letter-spacing: -0.014em;
  line-height: 1.25;
  margin-bottom: 14px;
}
.legal-section p {
  font-size: 0.97rem;
  line-height: 1.75;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.legal-section p:last-child,
.legal-section ul:last-child { margin-bottom: 0; }
.legal-section strong { color: var(--text); font-weight: 600; }
.legal-section a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--accent-soft);
}
.legal-section a:hover { text-decoration-color: var(--accent); }
.legal-section ul {
  list-style: disc;
  padding-left: 1.35em;
  margin-bottom: 12px;
}
.legal-section li {
  font-size: 0.97rem;
  line-height: 1.75;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.legal-section li::marker { color: var(--accent); }

.legal-contact {
  margin-top: clamp(48px, 6vh, 64px);
  background: var(--bg-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(24px, 3vw, 36px);
}
.legal-contact h2 {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 1.2rem;
  letter-spacing: -0.012em;
  margin-bottom: 10px;
}
.legal-contact p {
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text-muted);
  margin-bottom: 18px;
}
.legal-contact-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
  color: var(--text);
  transition: color 0.25s var(--ease);
}
.legal-contact-link:hover { color: var(--accent); }
.legal-contact-link svg { color: var(--accent); }

.legal-footer { border-top: 1px solid var(--border); }
.legal-footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-block: 26px;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.legal-footer-inner nav { display: flex; gap: 22px; }
.legal-footer-inner a { color: var(--text-muted); transition: color 0.25s var(--ease); }
.legal-footer-inner a:hover { color: var(--text); }

@media (max-width: 640px) {
  .legal-header-inner { height: 60px; }
  .legal-hero .eyebrow { min-width: 160px; }
}

/* ---------- 404 error page ---------- */

.err-page { background: var(--bg-dark); }

.err-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100svh;
  padding: clamp(40px, 7vh, 80px) 22px;
  overflow: hidden;
  text-align: center;
  color: #fff;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(232, 106, 74, 0.14), transparent 55%),
    linear-gradient(165deg, #131e30 0%, #0b1220 62%);
}

/* drifting glow orbs */
.err-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  animation: errDriftGlow 14s ease-in-out infinite alternate;
}
.err-glow-a {
  width: 480px;
  height: 480px;
  left: -140px;
  top: -120px;
  background: rgba(232, 106, 74, 0.22);
}
.err-glow-b {
  width: 520px;
  height: 520px;
  right: -160px;
  bottom: -160px;
  background: rgba(19, 53, 84, 0.5);
  animation-delay: -7s;
}
@keyframes errDriftGlow {
  to { transform: translate(60px, 40px) scale(1.12); }
}

/* rising particles */
.err-particles span {
  position: absolute;
  bottom: -10px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(243, 160, 138, 0.7);
  animation: errRise linear infinite;
}
.err-particles span:nth-child(1) { left: 12%; animation-duration: 11s; }
.err-particles span:nth-child(2) { left: 25%; animation-duration: 14s; animation-delay: 2s; width: 3px; height: 3px; background: rgba(255, 255, 255, 0.4); }
.err-particles span:nth-child(3) { left: 42%; animation-duration: 9.5s; animation-delay: 4s; }
.err-particles span:nth-child(4) { left: 58%; animation-duration: 13s; animation-delay: 1s; width: 3px; height: 3px; background: rgba(255, 255, 255, 0.4); }
.err-particles span:nth-child(5) { left: 74%; animation-duration: 10.5s; animation-delay: 5s; }
.err-particles span:nth-child(6) { left: 88%; animation-duration: 12.5s; animation-delay: 3s; width: 3px; height: 3px; background: rgba(255, 255, 255, 0.4); }
@keyframes errRise {
  0% { transform: translate(0, 0); opacity: 0; }
  10% { opacity: 0.8; }
  90% { opacity: 0.35; }
  100% { transform: translate(24px, -90vh); opacity: 0; }
}

/* stage: ghost numerals + orbit + card */
.err-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(560px, 92vw);
  aspect-ratio: 1;
  margin-bottom: clamp(24px, 4.5vh, 44px);
}
.err-ghost {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: clamp(11rem, 36vmin, 19rem);
  letter-spacing: -0.04em;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.13);
  animation: errGhost 9s ease-in-out infinite;
  user-select: none;
}
@supports not (-webkit-text-stroke: 1px #fff) {
  .err-ghost { color: rgba(255, 255, 255, 0.05); }
}
@keyframes errGhost {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-14px) scale(1.025); }
}

.err-orbit {
  position: absolute;
  width: min(440px, 82%);
  aspect-ratio: 1;
  border: 1.5px dashed rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  animation: errSpin 26s linear infinite;
}
.err-orbit::after {
  content: "";
  position: absolute;
  top: -5px;
  left: calc(50% - 5px);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 14px rgba(232, 106, 74, 0.9);
}
@keyframes errSpin { to { transform: rotate(360deg); } }

/* the lost membership card */
.err-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: min(360px, 78vw);
  aspect-ratio: 1.62;
  padding: clamp(16px, 4.5vw, 24px);
  border-radius: 16px;
  background: linear-gradient(135deg, #182742 0%, #0d1526 70%);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  overflow: hidden;
  animation: errFloat 6.5s ease-in-out infinite;
}
.err-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--accent), #f3a08a);
}
@keyframes errFloat {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-14px) rotate(2deg); }
}

.err-card-sheen {
  position: absolute;
  top: -60%;
  bottom: -60%;
  left: -30%;
  width: 34%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, 0.14), transparent);
  animation: errSheen 5.5s ease-in-out infinite;
}
@keyframes errSheen {
  0%, 55% { transform: translateX(-160%); }
  85%, 100% { transform: translateX(520%); }
}

.err-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.err-card-logo { height: 22px; width: auto; }
.err-card-chip {
  width: 34px;
  height: 25px;
  border-radius: 5px;
  background: linear-gradient(135deg, #f3a08a, var(--accent));
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.15);
}

.err-card-rows {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}
.err-card-row {
  display: flex;
  align-items: baseline;
  gap: 14px;
  font-family: var(--font-mono);
}
.err-card-row span {
  flex: none;
  width: 64px;
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}
.err-card-row strong {
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.92);
}

.err-card-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}
.err-card-valid {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}
.err-card-valid span {
  display: block;
  font-size: 0.5rem;
  color: rgba(255, 255, 255, 0.3);
  margin-bottom: 2px;
}
.err-card-qr {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 4px;
  background-color: rgba(255, 255, 255, 0.06);
  background-image:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.5) 0 2px, transparent 2px 6px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.5) 0 2px, transparent 2px 6px);
}

/* copy + actions */
.err-content { position: relative; max-width: 640px; }
.err-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #f3a08a;
  margin-bottom: 18px;
}
.err-title {
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: clamp(2.1rem, 5.5vw, 3.4rem);
  line-height: 1.06;
  letter-spacing: -0.024em;
  margin-bottom: 16px;
}
.err-sub {
  font-size: clamp(0.95rem, 1.4vw, 1.08rem);
  line-height: 1.7;
  color: var(--text-muted-inverse);
  max-width: 52ch;
  margin-inline: auto;
  margin-bottom: 32px;
}
.err-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}
.err-status {
  margin-top: 30px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.4);
}
.err-cursor {
  display: inline-block;
  width: 8px;
  height: 14px;
  margin-left: 4px;
  vertical-align: -2px;
  background: var(--accent);
  animation: errBlink 1.1s steps(1) infinite;
}
@keyframes errBlink { 50% { opacity: 0; } }

@media (max-width: 640px) {
  .err-stage { margin-bottom: 20px; }
  .err-actions .btn { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .err-glow,
  .err-particles span,
  .err-ghost,
  .err-orbit,
  .err-card,
  .err-card-sheen,
  .err-cursor { animation: none; }
}
