:root {
  /* `only light` is the strong opt-out signal: tells browsers (incl. Samsung Internet,
     Chrome auto-dark) that this page only renders in light mode and should NOT be
     auto-recolored. Paired with <meta name="color-scheme" content="light">. */
  color-scheme: only light;
  --cream: #fff8f0;
  --cream-tint: #fdf1f0;
  --cream-cool: #f6f2ef;
  --terracotta: #b93f37;
  --terracotta-dark: #8c2d27;
  --terracotta-light: #e57368;
  --terracotta-glow: #e35436;
  --ink: #170d03;
  --ink-soft: #6b4423;
  --ink-secondary: #8b6f47;
  --ink-taupe: #a19790;
  --hairline: rgba(185, 63, 55, 0.18);
  --shadow: 0 20px 60px -24px rgba(85, 27, 23, 0.14);
  --shadow-warm-lg: 0 28px 70px -28px rgba(85, 27, 23, 0.18);
  --radius: 16px;
  --radius-lg: 20px;
  --radius-pill: 64px;
  --serif-display: "Young Serif", "Cormorant Garamond", Georgia, serif;
  --serif-prose: "Noto Serif", Georgia, "Times New Roman", serif;
  --sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100%;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

/* ---------- home (V3-inspired: warm photo + terracotta gradient) ---------- */
.page-home {
  --v3-terracotta: #c65d3b;
  --v3-terracotta-dark: #a94438;
  --v3-gold: #d4af37;
  --v3-gold-light: #f4e4c1;
  --v3-cream: #fdf8f4;
  --v3-warm-white: #f5ebe0;
  --font-display: "Playfair Display", "Cormorant Garamond", Georgia, serif;
  --font-sans-v3: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  background: linear-gradient(135deg, var(--v3-terracotta) 0%, var(--v3-terracotta-dark) 100%);
  color: var(--v3-cream);
  font-family: var(--font-sans-v3);
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  overflow: hidden;
}
.page-home .backdrop { display: none; }

/* layered backdrop: photo → tint → grain */
.home-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.home-bg__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.22;
  filter: saturate(1.05);
}
.home-bg__tint {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(198, 93, 59, 0.78) 0%,
    rgba(198, 93, 59, 0.28) 48%,
    rgba(169, 68, 56, 0.88) 100%
  );
}
.home-bg__grain {
  position: absolute;
  inset: 0;
  opacity: 0.12;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* soft gold hairlines at top + bottom */
.home-accent {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(212, 175, 55, 0.35) 50%, transparent 100%);
  z-index: 2;
}
.home-accent--top { top: 0; }
.home-accent--bottom { bottom: 0; }

/* bottom-anchored asymmetric layout */
.home-layout {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 48px;
  padding: 56px 40px 56px 80px;
}

.home-hero {
  max-width: 680px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 22px;
  text-align: left;
}
.home-hero__divider {
  width: 72px;
  height: 2px;
  background: linear-gradient(90deg, var(--v3-gold), transparent);
  border-radius: 2px;
  margin-bottom: 4px;
}
.home-hero__eyebrow {
  font-family: var(--font-sans-v3);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--v3-gold-light);
  opacity: 0.88;
}
.home-hero__wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(72px, 14vw, 160px);
  line-height: 0.88;
  letter-spacing: -0.04em;
  margin: 0;
  color: var(--v3-cream);
  text-shadow: 0 4px 40px rgba(85, 27, 23, 0.55);
}
.home-hero__tag {
  font-family: var(--font-sans-v3);
  font-weight: 300;
  font-size: clamp(19px, 2.4vw, 28px);
  line-height: 1.4;
  letter-spacing: 0.01em;
  color: var(--v3-gold-light);
  margin: 0;
  max-width: 22ch;
}
.home-hero__message {
  font-family: var(--font-sans-v3);
  font-weight: 400;
  font-size: clamp(15px, 1.6vw, 17px);
  line-height: 1.65;
  color: rgba(245, 235, 224, 0.82);
  margin: 6px 0 0;
  max-width: 46ch;
}

/* BTL signature, bottom-right — white logo pushed toward the edge */
.home-btl {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 18px;
  text-align: right;
  max-width: 340px;
}
.home-btl__logo {
  display: block;
  width: 300px;
  height: auto;
  opacity: 0.95;
  filter: drop-shadow(0 8px 22px rgba(0, 0, 0, 0.3));
  /* PNG has transparent padding around the mark — pull it visually flush to the right edge */
  margin-right: -40px;
}
.home-btl__note {
  font-family: var(--font-sans-v3);
  font-weight: 400;
  font-size: 13px;
  line-height: 1.55;
  letter-spacing: 0.02em;
  color: rgba(244, 228, 193, 0.72);
  margin: 0;
}
.home-btl__note em {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  color: var(--v3-gold-light);
  opacity: 0.95;
  letter-spacing: 0.01em;
}
.home-btl__copy {
  font-family: var(--font-sans-v3);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
  color: rgba(244, 228, 193, 0.5);
  margin-top: 2px;
}

@media (max-width: 820px) {
  .home-layout {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 40px;
    padding: 48px 24px 40px;
  }
  .home-hero__wordmark { font-size: clamp(64px, 22vw, 120px); }
  .home-btl { align-items: flex-end; max-width: none; }
  .home-btl__logo { width: 220px; margin-right: -40px; }
}
@media (max-width: 420px) {
  .home-layout { padding: 36px 20px 32px; gap: 32px; }
  .home-hero { gap: 18px; }
  .home-btl__logo { width: 180px; margin-right: -32px; }
}

/* ---------- ambient nature backdrop ---------- */
.backdrop {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.backdrop::before {
  content: "";
  position: absolute;
  inset: -10% -10% 40% -10%;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(229, 115, 104, 0.18), transparent 55%),
    radial-gradient(ellipse at 90% 10%, rgba(212, 160, 84, 0.12), transparent 60%);
}
.backdrop .hill {
  position: absolute;
  left: 50%;
  bottom: -2%;
  width: 200vw;
  min-width: 2560px;
  height: 42vh;
  background: linear-gradient(180deg, transparent, rgba(185, 63, 55, 0.08) 40%, rgba(140, 45, 39, 0.16));
  clip-path: path("M0,220 C240,120 480,200 760,140 C1040,80 1320,200 1640,160 C1960,120 2280,220 2560,180 L2560,320 L0,320 Z");
  transform: translateX(-50%);
  transform-origin: bottom center;
}
.backdrop .nature-trees {
  position: absolute;
  left: 6%;
  bottom: 6vh;
  width: 90px;
  height: auto;
  opacity: 0.22;
  transform: scaleX(-1);
  filter: saturate(0.85);
  pointer-events: none;
}
.backdrop .nature-bush {
  position: absolute;
  right: 4%;
  bottom: 5vh;
  width: 70px;
  height: auto;
  opacity: 0.2;
  filter: saturate(0.85);
  pointer-events: none;
}

/* ---------- layout ---------- */
main {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 36px 20px 140px;
  gap: 28px;
  animation: fadeUp 700ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: 120ms;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--serif-display);
  font-size: 20px;
  letter-spacing: 0.01em;
}
.brand img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  box-shadow: 0 6px 16px -8px rgba(85, 27, 23, 0.45);
}
.brand span { color: var(--terracotta); }

/* ---------- terracotta banner (card-over-nature hero) ---------- */
.banner {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 48px 24px 96px;
  background:
    radial-gradient(ellipse at 15% 0%, rgba(255, 255, 255, 0.12), transparent 55%),
    linear-gradient(180deg, var(--terracotta) 0%, #a7362e 100%);
  color: #fff;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  box-shadow: var(--shadow-warm-lg);
  border-bottom-left-radius: 50% 48px;
  border-bottom-right-radius: 50% 48px;
}
.banner--tall { padding: 56px 24px 110px; gap: 22px; }

.brand--on-terracotta { color: #fff; }
.brand--on-terracotta span { color: #fff; }
.brand--on-terracotta img {
  background: #fff;
  padding: 4px;
  box-shadow: 0 10px 24px -10px rgba(85, 27, 23, 0.45);
}

.eyebrow {
  display: inline-block;
  padding: 8px 16px;
  border: 1.5px solid var(--terracotta);
  border-radius: 999px;
  color: var(--terracotta);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--cream-tint);
  font-family: var(--sans);
}
.eyebrow--on-terracotta {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(2px);
}

.banner__title {
  font-family: var(--serif-display);
  font-weight: 400;
  font-size: clamp(32px, 7vw, 52px);
  line-height: 1.08;
  margin: 4px 0 0;
  color: #fff;
  max-width: 16ch;
  animation: fadeUp 800ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: 80ms;
}
.banner__title em {
  font-family: var(--serif-prose);
  font-style: italic;
  color: #fdecea;
}
.banner__lede {
  font-family: var(--serif-prose);
  font-style: italic;
  font-size: clamp(15px, 2vw, 18px);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.92);
  max-width: 42ch;
  margin: 0 auto;
  animation: fadeUp 800ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: 180ms;
}

.hero {
  max-width: 620px;
  width: 100%;
  text-align: center;
  margin-top: 6vh;
}
.hero--below-banner { margin-top: 0; }
.hero h1 {
  font-family: var(--serif-display);
  font-weight: 400;
  font-size: clamp(40px, 8vw, 68px);
  line-height: 1.05;
  margin: 24px 0 18px;
  color: var(--ink);
}
.hero h1 em {
  font-family: var(--serif-prose);
  font-style: italic;
  color: var(--terracotta);
}
.hero p {
  font-family: var(--serif-prose);
  font-style: italic;
  font-size: clamp(16px, 2.2vw, 19px);
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 46ch;
  margin: 0 auto;
}

/* ---------- card (used on download page) ---------- */
.card {
  background: #ffffff;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  box-shadow: var(--shadow);
  width: min(480px, 100%);
  margin: 0 auto;
  animation: fadeUp 700ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.download-flow .card + .card { animation-delay: 160ms; }
.card.is-visible {
  animation: fadeUp 700ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.card.tint {
  background: var(--cream-tint);
  border-color: rgba(185, 63, 55, 0.28);
}
.card h2 {
  font-family: var(--serif-display);
  font-weight: 400;
  font-size: 24px;
  margin: 0 0 8px;
  color: var(--ink);
}
.card .lede {
  font-family: var(--serif-prose);
  font-style: italic;
  color: var(--ink-secondary);
  margin: 0 0 22px;
  line-height: 1.55;
  font-size: 15px;
}

/* ---------- form ---------- */
.field {
  display: block;
  margin-bottom: 20px;
}
.field label {
  display: block;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-secondary);
  margin-bottom: 8px;
}
.field input {
  width: 100%;
  padding: 14px 16px;
  font-family: var(--sans);
  font-size: 16px;
  color: var(--ink);
  background: var(--cream);
  border: 1.5px solid var(--hairline);
  border-radius: var(--radius);
  outline: none;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}
.field input:focus {
  border-color: var(--terracotta);
  box-shadow: 0 0 0 4px rgba(185, 63, 55, 0.12);
}
.field input::placeholder { color: #bfa68a; }
.field .hint {
  font-size: 13px;
  color: var(--ink-secondary);
  margin-top: 6px;
  font-style: italic;
  font-family: var(--serif-prose);
}

/* ---------- pill button ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 56px;
  padding: 0 24px;
  background: var(--terracotta);
  color: #fff;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.01em;
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: transform 140ms ease, background 140ms ease, box-shadow 200ms ease;
}
.pill:hover { background: var(--terracotta-glow); }
.pill:active { transform: translateY(1px); }
.pill:disabled {
  background: #d9c4c0;
  box-shadow: none;
  cursor: not-allowed;
}

.pill.ghost {
  background: transparent;
  color: var(--terracotta);
  border: 1.5px solid var(--terracotta);
  box-shadow: none;
}
.pill.ghost:hover { background: var(--cream-tint); }

/* ---------- status ---------- */
.status {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 12px;
  font-size: 15px;
  line-height: 1.5;
  display: none;
  font-family: var(--sans);
}
.status.show { display: block; animation: fadeUp 300ms ease both; }
.status.error {
  background: #fdecea;
  color: var(--terracotta-dark);
  border: 1px solid rgba(140, 45, 39, 0.2);
}
.status.success {
  background: #ecf5ee;
  color: #1a6b32;
  border: 1px solid rgba(26, 107, 50, 0.2);
}

/* ---------- success state ---------- */
.success-block {
  text-align: center;
  animation: fadeUp 600ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.success-block .checkmark {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--terracotta);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin-bottom: 14px;
  animation: pop 700ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
  animation-delay: 200ms;
}
@keyframes pop {
  0% { transform: scale(0.2); opacity: 0; }
  60% { transform: scale(1.12); opacity: 1; }
  100% { transform: scale(1); }
}

/* Isolated version plate — sits on its own with breathing room above/below */
.version-plate {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin: 28px auto;
  padding: 18px 28px;
  background: #fff;
  border: 1.5px solid rgba(185, 63, 55, 0.22);
  border-radius: var(--radius-lg);
  box-shadow: 0 14px 36px -24px rgba(85, 27, 23, 0.18);
  width: fit-content;
  min-width: 180px;
  position: relative;
}
.version-plate::before,
.version-plate::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 28px;
  height: 1px;
  background: rgba(185, 63, 55, 0.3);
}
.version-plate::before { right: calc(100% + 14px); }
.version-plate::after { left: calc(100% + 14px); }
.version-plate__label {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-secondary);
}
.version-plate__number {
  font-family: var(--serif-display);
  font-weight: 400;
  font-size: 28px;
  color: var(--terracotta);
  letter-spacing: 0.01em;
  line-height: 1;
}

.install-note {
  font-size: 15px;
  color: var(--ink-secondary);
  line-height: 1.55;
  margin-top: 18px;
  font-style: italic;
  font-family: var(--serif-prose);
}

/* ---------- desktop block ---------- */
.desktop-block {
  display: none;
}
@media (min-width: 820px) and (hover: hover) and (pointer: fine) {
  .desktop-block { display: flex; }
  .download-flow { display: none; }
}
.desktop-block {
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
}
.desktop-block svg { opacity: 0.85; margin-bottom: 8px; }
.desktop-block h2 { margin: 0 0 4px; font-family: var(--serif-display); font-weight: 400; font-size: 24px; }
.desktop-block p { font-family: var(--serif-prose); font-style: italic; color: var(--ink-secondary); max-width: 40ch; margin: 0; }

/* ---------- QR code section ---------- */
.qr-section {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.qr-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  color: var(--ink-secondary);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-family: var(--sans);
}
.qr-divider::before,
.qr-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--hairline);
}
#qr-code {
  padding: 16px;
  background: #fff;
  border-radius: var(--radius);
  border: 1.5px solid var(--hairline);
  box-shadow: 0 8px 24px -12px rgba(85, 27, 23, 0.14);
}

/* ---------- footer ---------- */
footer {
  position: relative;
  z-index: 1;
  padding: 24px 20px 32px;
  text-align: center;
  font-size: 13px;
  color: var(--ink-secondary);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
footer img { width: 96px; opacity: 0.75; }
footer a { color: var(--terracotta); text-decoration: none; }

/* ---------- impact page (V3-aligned: terracotta gradient, no cards) ---------- */
.page-impact {
  --v3-terracotta: #c65d3b;
  --v3-terracotta-dark: #a94438;
  --v3-gold: #d4af37;
  --v3-gold-light: #f4e4c1;
  --v3-cream: #fdf8f4;
  --font-display: "Playfair Display", "Cormorant Garamond", Georgia, serif;
  --font-sans-v3: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  background: linear-gradient(135deg, var(--v3-terracotta) 0%, var(--v3-terracotta-dark) 100%);
  color: var(--v3-cream);
  font-family: var(--font-sans-v3);
  min-height: 100vh;
  min-height: 100dvh;
  position: relative;
  overflow-x: hidden;
}
.page-impact .backdrop { display: none; }

.impact-layout {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 72px 40px 64px;
  display: flex;
  flex-direction: column;
  gap: 72px;
}

.impact-divider {
  width: 72px;
  height: 2px;
  background: linear-gradient(90deg, var(--v3-gold), transparent);
  border-radius: 2px;
}
.impact-divider--center {
  margin: 0 auto;
  background: linear-gradient(90deg, transparent, var(--v3-gold), transparent);
}

.impact-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 22px;
  max-width: 780px;
  animation: fadeUp 700ms cubic-bezier(0.22, 1, 0.36, 1) both;
}
.impact-eyebrow {
  font-family: var(--font-sans-v3);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--v3-gold-light);
  opacity: 0.88;
}
.impact-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(44px, 7vw, 92px);
  line-height: 0.98;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--v3-cream);
  text-shadow: 0 4px 40px rgba(85, 27, 23, 0.5);
}
.impact-title em {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  color: var(--v3-gold-light);
}
.impact-lede {
  font-family: var(--font-sans-v3);
  font-weight: 300;
  font-size: clamp(16px, 1.7vw, 19px);
  line-height: 1.6;
  margin: 0;
  max-width: 56ch;
  color: rgba(245, 235, 224, 0.82);
}

.impact-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 56px 48px;
  animation: fadeUp 800ms cubic-bezier(0.22, 1, 0.36, 1) 120ms both;
}
@media (max-width: 880px) {
  .impact-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 44px 36px; }
}
@media (max-width: 520px) {
  .impact-stats { grid-template-columns: 1fr; gap: 36px; }
}

.impact-stat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid rgba(244, 228, 193, 0.18);
}
.impact-stat__value {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(40px, 5.4vw, 64px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--v3-gold-light);
  text-shadow: 0 4px 30px rgba(85, 27, 23, 0.4);
}
.impact-stat__label {
  font-family: var(--font-sans-v3);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(244, 228, 193, 0.72);
}

.impact-quote {
  margin: 0 auto;
  max-width: 720px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  animation: fadeUp 800ms cubic-bezier(0.22, 1, 0.36, 1) 220ms both;
}
.impact-quote blockquote {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(18px, 2.2vw, 24px);
  line-height: 1.5;
  color: rgba(253, 248, 244, 0.94);
  max-width: 60ch;
}
.impact-quote cite {
  font-style: normal;
  font-family: var(--font-sans-v3);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--v3-gold-light);
  opacity: 0.85;
}

.impact-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding-top: 28px;
  border-top: 1px solid rgba(244, 228, 193, 0.14);
  font-family: var(--font-sans-v3);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: rgba(244, 228, 193, 0.6);
}
.impact-foot__copy {
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(244, 228, 193, 0.5);
}

@media (max-width: 640px) {
  .impact-layout { padding: 48px 24px 40px; gap: 56px; }
  .impact-foot { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* ---------- entrance animations ---------- */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- responsive tweaks ---------- */
@media (max-width: 420px) {
  main { padding-top: 24px; }
  .card { padding: 26px 20px; border-radius: var(--radius-lg); }
  .hero { margin-top: 2vh; }
  .banner { padding: 40px 20px 80px; gap: 14px; }
  .banner--tall { padding: 48px 20px 96px; }
  .banner__title { font-size: clamp(28px, 9vw, 40px); }
  .version-plate::before,
  .version-plate::after { display: none; }
}

/* ========================================================
   Download page — invite-code mockup (three flows)
   Kills the nature backdrop; keeps DESIGN.md palette + fonts.
   ======================================================== */

.page-download {
  background: var(--cream);
  color-scheme: only light;
}
.page-download .backdrop { display: none !important; }
/* NOTE: don't override `main` padding here — `.invite-main` sets its own,
   and `.page-download main` would beat it on specificity. */

/* ── Dev flow toggle (mockup only) ───────────────────────── */
.flow-toggle {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 50;
  background: rgba(23, 13, 3, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  padding: 4px;
  display: inline-flex;
  gap: 2px;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  box-shadow: 0 12px 28px -14px rgba(0, 0, 0, 0.45);
}
.flow-toggle__btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.75);
  padding: 7px 13px;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  transition: background 160ms ease, color 160ms ease;
}
.flow-toggle__btn:hover { color: #fff; }
.flow-toggle__btn.is-active {
  background: #fff;
  color: var(--terracotta);
}
/* Secondary toggle: post-media variants. Only visible when Post is selected. */
.flow-toggle--media {
  top: 60px;
  font-size: 10px;
  display: none;
}
.flow-toggle--media.is-visible { display: inline-flex; }
.flow-toggle--media .flow-toggle__btn { padding: 6px 11px; }

/* ── Hero band: terracotta + warm photo ──────────────────── */
.invite-hero {
  position: relative;
  min-height: 50vh;
  min-height: 50dvh;
  padding: 56px 24px 120px; /* extra bottom so main overlaps cleanly */
  color: #fff;
  text-align: center;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-bottom-left-radius: 50% 56px;
  border-bottom-right-radius: 50% 56px;
  box-shadow: 0 28px 60px -40px rgba(85, 27, 23, 0.55);
}
.invite-hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  border-bottom-left-radius: inherit;
  border-bottom-right-radius: inherit;
}
.invite-hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.26;
}
.invite-hero__tint {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #c65d3b 0%, #a94438 100%);
  mix-blend-mode: multiply;
  opacity: 0.92;
}
.invite-hero__grain {
  position: absolute;
  inset: 0;
  opacity: 0.1;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

.invite-hero__inner {
  position: relative;
  z-index: 1;
  max-width: 540px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.invite-hero__avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  border: 2px solid rgba(255, 255, 255, 0.55);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif-display);
  font-weight: 400;
  font-size: 22px;
  color: #fff;
  letter-spacing: 0.02em;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.invite-hero__headline {
  font-family: var(--serif-display);
  font-weight: 400;
  font-size: clamp(26px, 5.2vw, 38px);
  line-height: 1.15;
  margin: 0;
  max-width: 22ch;
  letter-spacing: -0.005em;
}

.invite-hero__sub {
  font-family: var(--serif-prose);
  font-style: italic;
  font-size: clamp(14px, 1.8vw, 16px);
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
  max-width: 32ch;
  line-height: 1.5;
}

/* ── Main content under the band (overlaps upward into hero) ───── */
.invite-main {
  position: relative;
  z-index: 2; /* float above the hero's drape */
  max-width: 520px;
  margin: -72px auto 0; /* pull up into terracotta */
  padding: 0 24px 48px;
  display: flex;
  flex-direction: column;
  gap: 26px;
  align-items: center;
}

/* ── Flow preview — post card ────────────────────────────── */
.flow-preview { width: 100%; }

.post-preview {
  background: #fff;
  border: 1.5px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 22px 22px 18px;
  box-shadow: var(--shadow);
  position: relative;
}
.post-preview__tag {
  display: inline-block;
  background: var(--cream-tint);
  color: var(--terracotta);
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 5px 11px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.post-preview__content { position: relative; }
.post-preview__prefix {
  display: block;
  font-family: var(--serif-prose);
  font-style: italic;
  font-size: 13px;
  font-weight: 400;
  color: var(--ink-soft);
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}
.post-preview__body {
  font-family: var(--serif-display);
  font-weight: 400;
  font-size: 18px;
  color: var(--ink);
  line-height: 1.45;
  margin: 0;
  letter-spacing: -0.005em;
}
.post-preview__body--blurred {
  filter: blur(6px);
  user-select: none;
  pointer-events: none;
  color: rgba(23, 13, 3, 0.55);
}
.post-preview__body--text-only {
  margin-bottom: 4px;
}

/* ── Heavily-blurred media placeholders (image / video) ───
   The play icon is intentionally muted/glassy so it reads as part of
   the blurred preview, not as a tappable control. */
.post-media-tile {
  position: relative;
  aspect-ratio: 4 / 3;
  margin-top: 14px;
  border-radius: 14px;
  border: 1.5px solid var(--hairline);
  background: var(--cream-tint); /* fallback if image fails */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  isolation: isolate;
  pointer-events: none; /* no clicks */
  user-select: none;
}
.post-media-tile__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* heavy blur — preview never reveals real content */
  filter: blur(18px) saturate(1.05) brightness(0.95);
  /* scale up so blurred edges don't expose the rectangle border */
  transform: scale(1.18);
  z-index: 0;
}
.post-media-tile::after {
  /* warm wash so the blur ties into our palette */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(185, 63, 55, 0.18) 0%, rgba(85, 27, 23, 0.12) 100%);
  z-index: 0;
  pointer-events: none;
}
.post-media-tile__chip {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.85);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 999px;
  z-index: 2;
  /* slight blur ties chip into the frosted look */
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.post-media-tile--video .post-media-tile__play {
  position: relative;
  z-index: 1;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  color: rgba(23, 13, 3, 0.7);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  /* glassy + blurred so it reads as part of the preview, not a button */
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  filter: blur(0.4px);
  box-shadow: none;
  border: 1px solid rgba(255, 255, 255, 0.4);
}
.post-media-tile--video .post-media-tile__play svg {
  width: 24px;
  height: 24px;
  margin-left: 3px; /* optical center of the triangle */
  opacity: 0.85;
}

/* Compact voice-note row (no 4:3 tile) */
.post-media-voice {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
  padding: 12px 16px;
  background: linear-gradient(135deg, var(--cream-tint) 0%, #ecd9cf 100%);
  border: 1.5px solid var(--hairline);
  border-radius: 14px;
  pointer-events: none;
  user-select: none;
  overflow: hidden;
  isolation: isolate;
}
.post-media-voice__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(18px) saturate(1.08) brightness(0.96);
  transform: scale(1.2);
  z-index: 0;
}
.post-media-voice::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(135deg, rgba(244, 220, 214, 0.9) 0%, rgba(241, 224, 216, 0.85) 100%);
}
.post-media-voice__play {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(185, 63, 55, 0.35);
  color: rgba(255, 255, 255, 0.9);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  filter: blur(0.4px);
  position: relative;
  z-index: 1;
}
.post-media-voice__play svg { margin-left: 2px; opacity: 0.9; }
.post-media-voice__waveform {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 3px;
  height: 28px;
  position: relative;
  z-index: 1;
}
.post-media-voice__waveform span {
  flex: 1;
  background: var(--terracotta);
  opacity: 0.38;
  border-radius: 2px;
  min-height: 4px;
}
.post-media-voice__duration {
  font-family: var(--sans);
  font-size: 12px;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  position: relative;
  z-index: 1;
}
.post-media-tile__chip--voice {
  position: static;
  box-shadow: none;
  background: rgba(185, 63, 55, 0.1);
  color: var(--terracotta);
  padding: 3px 8px;
  z-index: 1;
}

.post-preview__attr {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--hairline);
}
.post-preview__avatar {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--cream-tint);
  border: 1.5px solid var(--hairline);
  color: var(--terracotta);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif-display);
  font-size: 12.5px;
  letter-spacing: 0.02em;
}
.post-preview__author {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink);
  flex-wrap: wrap;
}
.post-preview__name { font-weight: 700; }
.post-preview__context {
  color: var(--ink-soft);
  font-weight: 400;
}

/* ── Flow preview — gathering badge ──────────────────────── */
.gathering-badge {
  background: #fff;
  border: 1.5px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow);
}
.gathering-badge__icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--cream-tint);
  border: 1.5px solid var(--hairline);
  color: var(--terracotta);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.gathering-badge__body { min-width: 0; }
.gathering-badge__name {
  font-family: var(--serif-display);
  font-weight: 400;
  font-size: 18px;
  color: var(--ink);
  margin-bottom: 2px;
}
.gathering-badge__note {
  font-family: var(--serif-prose);
  font-style: italic;
  font-size: 12px;
  color: var(--ink-soft);
}

/* ── Invite code plate — the hero of this page ───────────── */
.code-plate {
  width: 100%;
  background: linear-gradient(180deg, #fff 0%, var(--cream-tint) 100%);
  border: 2px solid rgba(185, 63, 55, 0.22);
  border-radius: 24px;
  padding: 24px 20px 20px;
  text-align: center;
  box-shadow: 0 20px 50px -28px rgba(185, 63, 55, 0.35);
}
.code-plate__label {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 14px;
}
/* Single text block — tap to copy */
.code-plate__code {
  display: inline-block;
  position: relative;
  background: #fff;
  border: 1.5px solid var(--hairline);
  border-radius: 16px;
  padding: 18px 28px 16px 32px; /* extra left = compensate letter-spacing */
  margin: 0 auto 4px;
  font-family: var(--serif-display);
  font-weight: 400;
  font-size: clamp(36px, 9vw, 46px);
  color: var(--terracotta);
  letter-spacing: 0.22em;
  line-height: 1;
  cursor: pointer;
  user-select: all;
  -webkit-user-select: all;
  transition: transform 160ms ease, box-shadow 200ms ease;
  box-shadow: 0 8px 20px -10px rgba(185, 63, 55, 0.22);
  font-variant-ligatures: none;
}
.code-plate__code:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px -12px rgba(185, 63, 55, 0.32);
}
.code-plate__code:active { transform: translateY(0); }

.code-plate__copied {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  background: var(--terracotta);
  color: #fff;
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease, transform 220ms ease;
  box-shadow: 0 6px 16px -6px rgba(185, 63, 55, 0.5);
}
.code-plate__code[data-state="copied"] .code-plate__copied {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.code-plate__note {
  font-family: var(--serif-prose);
  font-style: italic;
  color: var(--ink-soft);
  font-size: 12.5px;
  margin: 10px 0 14px;
  line-height: 1.5;
}

/* Phone constraint lives inside the plate, under a hairline divider */
/* ── Gathering flow: phone-entry card (step 1) ───────────── */
.gathering-entry {
  width: 100%;
  background: linear-gradient(180deg, #fff 0%, var(--cream-tint) 100%);
  border: 2px solid rgba(185, 63, 55, 0.22);
  border-radius: 24px;
  padding: 24px 22px 22px;
  text-align: center;
  box-shadow: 0 20px 50px -28px rgba(185, 63, 55, 0.35);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.gathering-entry__label {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.gathering-entry__form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 360px;
}
.gathering-entry__form input {
  width: 100%;
  height: 52px;
  padding: 0 18px;
  background: #fff;
  border: 1.5px solid var(--hairline);
  border-radius: 14px;
  font-family: var(--sans);
  font-size: 16px; /* iOS zoom-prevention */
  color: var(--ink);
  text-align: center;
  letter-spacing: 0.02em;
  outline: none;
  transition: border-color 160ms ease, box-shadow 200ms ease;
}
.gathering-entry__form input::placeholder { color: var(--ink-taupe); }
.gathering-entry__form input:focus {
  border-color: var(--terracotta);
  box-shadow: 0 0 0 4px rgba(185, 63, 55, 0.12);
}
.gathering-entry__form input[aria-invalid="true"] {
  border-color: var(--terracotta-dark);
  box-shadow: 0 0 0 4px rgba(140, 45, 39, 0.15);
}
.gathering-entry__form .pill {
  height: 52px;
  font-size: 15px;
  width: 100%;
}
.gathering-entry__note {
  font-family: var(--serif-prose);
  font-style: italic;
  color: var(--ink-soft);
  font-size: 12.5px;
  line-height: 1.55;
  margin: 2px 0 0;
  max-width: 38ch;
}

/* State gates: default vs. gathering-entry vs. gathering-revealed */
.gathering-entry { display: none; }
body[data-state="gathering-entry"] .gathering-entry { display: flex; }
body[data-state="gathering-entry"] .code-plate,
body[data-state="gathering-entry"] #download-btn,
body[data-state="gathering-entry"] .install-note {
  display: none;
}

/* ── XL download pill ────────────────────────────────────── */
.pill--xl {
  height: 60px;
  font-size: 17px;
  width: 100%;
  max-width: 440px;
  padding: 0 32px;
  font-weight: 700;
  text-align: center;
  margin: 0 auto;
  letter-spacing: 0.01em;
}

.install-note {
  font-family: var(--serif-prose);
  font-style: italic;
  font-size: 13px;
  color: var(--ink-soft);
  text-align: center;
  max-width: 38ch;
  line-height: 1.55;
  margin: 0;
}
.install-note strong {
  color: var(--terracotta);
  font-style: normal;
  font-family: var(--sans);
  font-weight: 700;
}

/* ── Footer (bigger BTL logo) ────────────────────────────── */
.download-footer {
  padding: 32px 24px 48px;
  text-align: center;
  color: var(--ink-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-size: 12px;
  line-height: 1.6;
}
.download-footer img {
  width: 240px;
  height: auto;
  opacity: 0.9;
  margin-bottom: 4px;
}
.download-footer em {
  font-family: var(--serif-prose);
  font-style: italic;
  color: var(--terracotta);
}
.download-footer__copy {
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.55;
  margin-top: 2px;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 480px) {
  .invite-hero {
    min-height: 44vh;
    min-height: 44dvh;
    padding: 44px 20px 104px;
    border-bottom-left-radius: 50% 40px;
    border-bottom-right-radius: 50% 40px;
  }
  .invite-main {
    margin-top: -64px;
    padding: 0 20px 36px;
    gap: 22px;
  }
  .code-plate { padding: 22px 18px 18px; }
  .code-plate__boxes { gap: 6px; }
  .code-plate__boxes span { width: 40px; height: 52px; font-size: 26px; }
  .flow-toggle { top: 10px; right: 10px; font-size: 10px; }
  .flow-toggle__btn { padding: 6px 10px; }
  .flow-toggle--media { top: 48px; font-size: 9.5px; }
  .download-footer { padding: 28px 20px 40px; }
  .download-footer img { width: 200px; }
}
@media (max-width: 360px) {
  .invite-main { padding: 0 16px 32px; }
  .code-plate__boxes span { width: 36px; height: 48px; font-size: 22px; }
}

/* ── High-contrast / forced-colors: keep our styling ─────── */
@media (forced-colors: active) {
  /* Broad opt-out: user wants the lighter styled elements preserved in
     Windows high-contrast, iOS Smart Invert, etc. `none` has to be set
     per-element (it doesn't inherit), so we hit everything under the
     page scope. */
  .page-home,
  .page-home *,
  .page-download,
  .page-download * {
    forced-color-adjust: none;
  }
}

/* ── Samsung Internet / Chrome auto-dark pushback ───────────
   These browsers algorithmically recolor pages they think are "light".
   When the user's OS is in dark mode we RE-ASSERT our palette so nothing
   gets auto-inverted. Paired with <meta name="color-scheme" content="light">
   and color-scheme: only light at :root. */
@media (prefers-color-scheme: dark) {
  /* Home page: re-assert terracotta gradient + cream foreground text */
  .page-home {
    background: linear-gradient(135deg, var(--v3-terracotta) 0%, var(--v3-terracotta-dark) 100%) !important;
    color: var(--v3-cream) !important;
  }

  /* Download page: re-assert cream body + white cards + dark ink */
  body.page-download {
    background: var(--cream) !important;
    color: var(--ink) !important;
  }

  .page-download,
  .page-download .code-plate,
  .page-download .post-preview,
  .page-download .gathering-badge {
    background: var(--cream);
  }
  .page-download .code-plate {
    background: linear-gradient(180deg, #fff 0%, var(--cream-tint) 100%) !important;
    color: var(--ink) !important;
  }
  .page-download .code-plate__code {
    background: #fff !important;
    color: var(--terracotta) !important;
    border-color: var(--hairline) !important;
  }
  .page-download .code-plate__label,
  .page-download .code-plate__note {
    color: var(--ink-soft) !important;
  }
  .page-download .post-preview,
  .page-download .gathering-badge {
    background: #fff !important;
    color: var(--ink) !important;
    border-color: var(--hairline) !important;
  }
  .page-download .post-preview__title,
  .page-download .gathering-badge__name { color: var(--ink) !important; }
  .page-download .post-preview__body,
  .page-download .gathering-badge__note { color: var(--ink-soft) !important; }
  .page-download .install-note { color: var(--ink-soft) !important; }
  .page-download .download-footer,
  .page-download .download-footer__copy { color: var(--ink-soft) !important; }
}
