:root {
      --canvas: #EBE8DF;
      --ink: #0F1411;
      --sayal: #1C5E3B;
      --sayal-bright: #26B84C;
    }

    * {
      box-sizing: border-box;
      -webkit-font-smoothing: antialiased;
      -moz-osx-font-smoothing: grayscale;
    }

    html, body {
      background-color: var(--canvas);
      color: var(--ink);
      overflow-x: clip;
    }

    /* Swift Cash / Memora Framer Rounded Hero Stage */
    .hero-stage {
      position: relative;
      background:
        radial-gradient(56% 52% at 14% 96%, rgba(28, 94, 59, 0.28) 0%, rgba(46, 158, 91, 0.11) 44%, rgba(246, 244, 239, 0) 78%),
        radial-gradient(56% 52% at 88% 95%, rgba(226, 200, 128, 0.52) 0%, rgba(28, 94, 59, 0.08) 50%, rgba(246, 244, 239, 0) 78%),
        linear-gradient(180deg, #FAF9F6 0%, #F4F1EA 62%, #ECE8DE 100%);
      border: 2px solid rgba(255, 255, 255, 0.92);
      box-shadow:
        0 30px 80px -24px rgba(15, 20, 17, 0.08),
        inset 0 1px 0 0 #FFFFFF;
      overflow: hidden;
    }

    /* Dotted World Map Watermark (Matches Swift Cash reference) */
    .hero-world-dots {
      position: absolute;
      inset: 0;
      background-image: radial-gradient(rgba(15, 20, 17, 0.065) 1.25px, transparent 1.25px);
      background-size: 16px 16px;
      mask-image: radial-gradient(ellipse 74% 55% at 50% 42%, rgba(0,0,0,0.7) 10%, transparent 74%);
      -webkit-mask-image: radial-gradient(ellipse 74% 55% at 50% 42%, rgba(0,0,0,0.7) 10%, transparent 74%);
      pointer-events: none;
    }

    /* 3D iPhone 16 Pro Stage */
    .phone-3d-stage {
      perspective: 1800px;
      transform-style: preserve-3d;
    }

    .iphone-rig {
      position: relative;
      width: 342px;
      max-width: 90vw;
      margin: 0 auto;
      transform-style: preserve-3d;
      will-change: transform;
    }

    /* Titanium Bezel */
    .iphone-bezel {
      position: relative;
      background: linear-gradient(145deg, #2A2E2C 0%, #0E1110 38%, #060807 100%);
      border-radius: 54px;
      padding: 11px;
      box-shadow:
        0 44px 100px -18px rgba(10, 12, 11, 0.52),
        0 16px 36px -10px rgba(10, 12, 11, 0.30),
        inset 0 0 0 1.5px rgba(255, 255, 255, 0.24),
        inset 0 0 0 4px #080A09;
    }

    /* Side Hardware Buttons */
    .iphone-bezel::before {
      content: '';
      position: absolute;
      left: -3px;
      top: 110px;
      width: 3px;
      height: 54px;
      background: linear-gradient(180deg, #3A3F3D, #151816);
      border-radius: 3px 0 0 3px;
      box-shadow: 0 68px 0 0 #262A28;
    }
    .iphone-bezel::after {
      content: '';
      position: absolute;
      right: -3px;
      top: 144px;
      width: 3px;
      height: 78px;
      background: linear-gradient(180deg, #3A3F3D, #151816);
      border-radius: 0 3px 3px 0;
    }

    /* Specular Glass Glare Overlay */
    .iphone-glare {
      position: absolute;
      inset: 0;
      border-radius: 44px;
      background: linear-gradient(125deg, rgba(255,255,255,0.09) 0%, rgba(255,255,255,0.02) 32%, transparent 52%);
      pointer-events: none;
      z-index: 30;
    }

    /* Authentic Dark App Viewport (#0B0C0E) */
    .iphone-viewport {
      position: relative;
      background: #0B0C0E;
      border-radius: 44px;
      height: 676px;
      overflow: hidden;
      color: #F3F4F6;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      user-select: none;
      box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
    }

    /* Dynamic Island */
    .dynamic-island {
      width: 92px;
      height: 25px;
      background: #000000;
      border-radius: 999px;
      display: flex;
      align-items: center;
      justify-content: flex-end;
      padding-right: 8px;
      box-shadow: inset 0 0 0 1px rgba(255,255,255,0.07);
    }
    .dynamic-island::after {
      content: '';
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: radial-gradient(circle at 35% 35%, #273B69 0%, #090E1A 65%, #040608 100%);
    }

    /* 1:1 Practice Mode Pill from main_screen.jpg */
    .practice-mode-pill {
      display: inline-flex;
      align-items: center;
      gap: 5px;
      padding: 4px 10px;
      border-radius: 999px;
      background: rgba(24, 118, 67, 0.14);
      border: 1px solid rgba(46, 160, 95, 0.30);
      color: #2E9E5B;
      font-size: 10.5px;
      font-weight: 500;
      line-height: 1;
      white-space: nowrap;
      letter-spacing: -0.01em;
    }

    /* 1:1 Market Closed Pill from main_screen.jpg */
    .market-closed-pill {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 5px 11px;
      border-radius: 999px;
      background: #151619;
      border: 1px solid #23252A;
      color: #E5E7EB;
      font-size: 10.2px;
      font-weight: 500;
      line-height: 1;
      white-space: nowrap;
    }

    /* Floating Glass Badges around the 3D Phone */
    .floating-glass-pill {
      background: rgba(255, 255, 255, 0.82);
      backdrop-filter: blur(16px);
      -webkit-backdrop-filter: blur(16px);
      border: 1px solid rgba(255, 255, 255, 0.95);
      box-shadow: 0 18px 40px -12px rgba(15, 20, 17, 0.12);
    }

    /* App Screen Panes */
    .app-pane {
      display: none;
      animation: paneFadeIn 0.24s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    }
    .app-pane.active {
      display: flex;
      flex-direction: column;
      flex: 1;
      overflow: hidden;
    }
    @keyframes paneFadeIn {
      from { opacity: 0; transform: translateY(5px); }
      to { opacity: 1; transform: translateY(0); }
    }

    /* Minimal Bento Card */
    .minimal-card {
      background: #FAF9F5;
      border: 1px solid rgba(15, 20, 17, 0.06);
      border-radius: 28px;
      transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease, border-color 0.35s ease;
    }
    .minimal-card:hover {
      transform: translateY(-4px);
      box-shadow: 0 24px 48px -18px rgba(15, 20, 17, 0.08);
      border-color: rgba(28, 94, 59, 0.22);
    }

    /* Store Button Hover */
    .store-btn {
      transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.22s ease;
    }
    .store-btn:hover {
      transform: translateY(-2px);
      box-shadow: 0 14px 28px -8px rgba(10, 12, 11, 0.28);
    }
    .store-btn:active {
      transform: scale(0.98);
    }

    /* Chart draw animation */
    .draw-chart-path {
      stroke-dasharray: 680;
      stroke-dashoffset: 680;
      animation: drawStroke 1.5s cubic-bezier(0.22, 1, 0.36, 1) 0.35s forwards;
    }
    @keyframes drawStroke {
      to { stroke-dashoffset: 0; }
    }

    /* Hide scrollbars inside phone */
    .no-scrollbar::-webkit-scrollbar { display: none; }
    .no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }

    /* Preserved Honeypot & Form Error Classes */
    .honeypot {
      position: absolute;
      left: -9999px;
      opacity: 0;
      pointer-events: none;
    }
    .has-error input, .has-error textarea {
      border-color: #E04F44 !important;
    }

/* ==========================================================================
   MOBILE RESPONSIVENESS + 3D DEPTH UPGRADES
   ========================================================================== */

/* Fluid rig: zero horizontal overflow 320px -> 430px */
.iphone-rig {
  width: min(342px, calc(100vw - 40px));
  max-width: none;
}

/* Negative margin scoped to md+ only (was clipping on mobile) */
.phone-3d-stage { margin-bottom: 0; padding-bottom: 1rem; }
@media (min-width: 768px) {
  .phone-3d-stage { margin-bottom: -115px; }
}
.hero-stage { padding-bottom: 1.5rem; }
@media (min-width: 768px) {
  .hero-stage { padding-bottom: 0; }
}

/* Fluid viewport height so the screen never squishes */
.iphone-viewport { height: min(676px, calc((100vw - 62px) * 1.975)); }
@media (min-width: 420px) { .iphone-viewport { height: 676px; } }

/* True 3D depth layers */
.iphone-bezel { transform-style: preserve-3d; }
.depth-layer { transform: translateZ(28px); transform-style: preserve-3d; }
.floating-glass-pill { transform: translateZ(42px); transform-style: preserve-3d; }

/* Dynamic specular sweep across bezel + glass */
.iphone-glare {
  background: linear-gradient(
    var(--glare-angle, 125deg),
    rgba(255,255,255,0.14) 0%,
    rgba(255,255,255,0.04) 30%,
    transparent 54%);
  transition: background 240ms linear;
}

/* Bento 3D hover depth (desktop) / crisp active (mobile) */
.minimal-card { transform-style: preserve-3d; }
@media (hover: hover) and (pointer: fine) {
  .minimal-card:hover .card-visual { transform: translateZ(22px) scale(1.015); }
  .card-visual { transition: transform 0.4s cubic-bezier(0.16,1,0.3,1); }
}
@media (hover: none) {
  .minimal-card:active { transform: scale(0.985); border-color: rgba(28,94,59,0.3); }
}

/* Mobile menu drawer */
.mobile-drawer {
  display: none;
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 90;
  padding: 84px 20px 24px;
  background: rgba(235,232,223,0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(15,20,17,0.08);
  box-shadow: 0 24px 60px -18px rgba(15,20,17,0.18);
}
.mobile-drawer.open { display: block; }
.mobile-drawer a {
  display: block;
  padding: 14px 4px;
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid rgba(15,20,17,0.07);
}
.mobile-drawer a:last-child { border-bottom: 0; }
body.drawer-open { overflow: hidden; }

/* RTL alignment keeps phone chrome LTR-correct */
[dir='rtl'] .iphone-viewport { direction: ltr; }
[dir='rtl'] .site-header,
[dir='rtl'] .site-footer { direction: rtl; }

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

/* ==========================================================================
   FIX 1 - Full-bleed stage on wide monitors (no narrow alley)
   ========================================================================== */
.site-shell {
  width: 100%;
  max-width: 2200px;
  margin-inline: auto;
  padding: 12px 12px 0;
}
@media (min-width: 1024px) { .site-shell { padding: 16px 16px 0; } }
@media (min-width: 1600px) { .site-shell { padding: 20px 24px 0; } }

/* Let inner content breathe on ultra-wide while the stage spans the viewport */
.hero-stage > nav,
.hero-stage > .mobile-drawer { max-width: 1400px; margin-inline: auto; }
@media (min-width: 1600px) {
  .hero-stage > nav { max-width: 1600px; }
}

/* ==========================================================================
   FIX 6 - Legal page typography (was completely unstyled)
   ========================================================================== */
.legal-body { color: #2B3230; font-size: 15.5px; line-height: 1.78; }
.legal-body > *:first-child { margin-top: 0; }
.legal-body h2 {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 2.6em 0 0.75em;
  padding-top: 1.5em;
  border-top: 1px solid rgba(15, 20, 17, 0.08);
  scroll-margin-top: 90px;
}
.legal-body h2:first-of-type { border-top: 0; padding-top: 0; margin-top: 0.5em; }
.legal-body h3 {
  font-size: 16.5px;
  font-weight: 700;
  color: var(--ink);
  margin: 1.9em 0 0.6em;
  scroll-margin-top: 90px;
}
.legal-body p { margin: 0 0 1.15em; max-width: 68ch; }
.legal-body ul,
.legal-body ol { margin: 0 0 1.35em; padding-inline-start: 1.35em; max-width: 68ch; }
.legal-body li { margin-bottom: 0.65em; padding-inline-start: 0.2em; }
.legal-body li::marker { color: var(--sayal); }
.legal-body strong { color: var(--ink); font-weight: 650; }
.legal-body a {
  color: var(--sayal);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(28, 94, 59, 0.3);
}
.legal-body a:hover { text-decoration-color: var(--sayal); }
.legal-body .notice {
  background: #F3F1EA;
  border: 1px solid rgba(15, 20, 17, 0.07);
  border-inline-start: 3px solid var(--sayal);
  border-radius: 14px;
  padding: 16px 20px;
  margin: 0 0 2em;
  font-size: 14.5px;
}
.legal-body ol.steps { list-style: none; padding-inline-start: 0; counter-reset: step; }
.legal-body ol.steps li {
  position: relative;
  padding-inline-start: 44px;
  min-height: 30px;
  margin-bottom: 0.9em;
}
.legal-body ol.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(28, 94, 59, 0.1);
  border: 1px solid rgba(28, 94, 59, 0.25);
  color: var(--sayal);
  font-size: 13px;
  font-weight: 700;
}

/* ==========================================================================
   FIX 4 - Sticky mobile download bar
   ========================================================================== */
.sticky-dl {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 9px 9px 16px;
  border-radius: 999px;
  background: rgba(10, 12, 11, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 14px 34px -10px rgba(10, 12, 11, 0.42);
  transform: translateY(150%);
  transition: transform 380ms cubic-bezier(0.16, 1, 0.3, 1);
}
.sticky-dl.show { transform: translateY(0); }
.sticky-dl-text { color: #fff; font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.sticky-dl-btn {
  flex: none;
  padding: 9px 18px;
  border-radius: 999px;
  background: var(--sayal-bright);
  color: #06240F;
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.sticky-dl-btn:active { transform: scale(0.97); }
@media (max-width: 767px) { .sticky-dl { display: flex; } }
body.drawer-open .sticky-dl { transform: translateY(150%); }
