:root {
  --paper: #f1f0e9;
  --paper-rgb: 241, 240, 233;
  --ink: #13211b;
  --muted: #505c54;
  --dark: #12261e;
  --mint: #cfee82;
  --teal: #2e6e4d;
  --lilac: #ddd1ed;
  --sky: #bddcf0;
  --coral: #edb391;
  --gold: #e4ca71;
  --line: #cbd6ce;
  --line-dark: rgba(241, 240, 233, 0.14);
  --ease: cubic-bezier(.16, 1, .3, 1);
  --wrap-max: 1280px;
  --wrap-pad: clamp(16px, 4vw, 40px);
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", system-ui, sans-serif;
}

body { animation: none; }

.skip-link {
  position: fixed;
  top: -100%;
  left: 12px;
  z-index: 1000;
  padding: 10px 20px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 0 0 12px 12px;
  font-weight: 700;
  font-size: 0.88rem;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 0;
  outline: 3px solid var(--teal);
  outline-offset: 2px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

html.lenis { scroll-behavior: auto; }
.lenis.lenis-smooth { scroll-behavior: auto; }
.lenis.lenis-stopped { overflow: hidden; }
.lenis.lenis-scrolling iframe { pointer-events: none; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(0.98rem, 1.2vw, 1.08rem);
  line-height: 1.62;
  letter-spacing: -0.012em;
  overflow-x: hidden;
  width: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11", "ss01";
  -webkit-tap-highlight-color: transparent;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 10% 4%, #e2f4c1, transparent 24%),
    radial-gradient(circle at 90% 8%, #e7ddf4, transparent 28%),
    radial-gradient(circle at 48% 84%, #d5edf1, transparent 24%);
  pointer-events: none;
  -webkit-transform: translate3d(0,0,0);
  transform: translate3d(0,0,0);
}

a {
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
}

h1, h2, h3, h4, p, blockquote, figure {
  margin: 0;
}

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--ink);
  text-rendering: optimizeLegibility;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11", "ss01";
}

h1 {
  font-size: clamp(2.4rem, 6vw + 0.5rem, 5.8rem);
  line-height: 0.96;
  letter-spacing: -0.045em;
  font-weight: 800;
}

.hero-title {
  margin-top: 20px;
}

h1 em, h2 em {
  font-family: 'Outfit', 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-style: normal;
  background: linear-gradient(135deg, #13211b 0%, #1c3c2b 30%, #3d7a5a 65%, #2b6d4b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 0.96;
}

.dark h1 em, .dark h2 em, #system h2 em, .demo h2 em {
  background: linear-gradient(135deg, #e4ff9e 0%, #cfee82 40%, #7ee8aa 80%, #52d499 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 20px rgba(207, 238, 130, 0.35));
}

/* -------------------------------------------------------------------------- */
/* SCROLL REVEAL ANIMATIONS                                                   */
/* -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  pointer-events: auto;
}

/* Hero eyebrow chip — app.js sets opacity=1 instantly; CSS transition makes it smooth */
.hero .reveal {
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1) 0.06s,
              transform 0.65s cubic-bezier(0.16, 1, 0.3, 1) 0.06s;
}

h2 {
  font-size: clamp(1.8rem, 3.8vw + 0.5rem, 3.5rem);
  line-height: 1.02;
  letter-spacing: -0.038em;
  font-weight: 800;
}

h3 {
  font-size: clamp(1.25rem, 2.2vw, 1.8rem);
  line-height: 1.2;
  letter-spacing: -0.028em;
}

p {
  color: #2e3d34;
  max-width: 65ch;
  line-height: 1.7;
  font-weight: 450;
  letter-spacing: -0.014em;
}

.dark p, #system p {
  color: #b3c5b8;
}

.stat-number, .ledger-total, .score, .big, .num {
  font-family: var(--font-display);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.045em;
}

.wrap {
  width: 100%;
  max-width: var(--wrap-max);
  padding-left: var(--wrap-pad);
  padding-right: var(--wrap-pad);
  margin-left: auto;
  margin-right: auto;
}

.eyebrow {
  font-size: clamp(0.75rem, 1vw, 0.85rem) !important;
  letter-spacing: 0.18em !important;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--teal) !important;
  background: rgba(46, 110, 77, 0.1) !important;
  border: 1px solid rgba(46, 110, 77, 0.28) !important;
  padding: 6px 16px;
  border-radius: 999px;
  margin-bottom: 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 14px rgba(46, 110, 77, 0.08);
}

.dark .eyebrow, #system .eyebrow, .demo .eyebrow {
  color: var(--mint) !important;
  background: rgba(207, 238, 130, 0.1) !important;
  border-color: rgba(207, 238, 130, 0.28) !important;
  box-shadow: 0 2px 14px rgba(207, 238, 130, 0.18) !important;
}

/* -------------------------------------------------------------------------- */
/* NAVIGATION                                                                 */
/* -------------------------------------------------------------------------- */
.nav {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 50%;
  -webkit-transform: translateX(-50%) translateZ(0);
  transform: translateX(-50%) translateZ(0);
  width: calc(100% - 24px);
  max-width: var(--wrap-max);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px 8px 16px;
  background: rgba(var(--paper-rgb), 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
  box-shadow: 0 8px 32px rgba(19, 33, 27, 0.06);
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
}

.mark {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--dark);
  color: var(--mint);
  font-family: Georgia, serif;
  font-size: 18px;
  flex-shrink: 0;
}

.links {
  display: none;
  gap: clamp(16px, 2vw, 28px);
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 500;
}

.links a {
  transition: color 0.2s ease;
  padding: 6px 0;
}

.links a:hover {
  color: var(--ink);
}

.navcta, .btn {
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  white-space: nowrap;
}

.navcta {
  background: var(--dark);
  color: var(--paper);
}

.btn {
  background: linear-gradient(135deg, #13211b 0%, #1c3329 100%);
  color: var(--paper);
  padding: 0 28px;
  min-height: 52px;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(19, 33, 27, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background 0.3s ease;
}

.btn:hover {
  background: linear-gradient(135deg, #1c3329 0%, #27473a 100%);
  box-shadow: 0 14px 32px rgba(19, 33, 27, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transform: translateY(-2px) scale(1.02);
}

.btn.alt {
  background: rgba(19, 33, 27, 0.04);
  border: 1px solid rgba(19, 33, 27, 0.16);
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(19, 33, 27, 0.04);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.btn.alt:hover {
  background: rgba(19, 33, 27, 0.08);
  border-color: rgba(19, 33, 27, 0.28);
  color: var(--ink);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 20px rgba(19, 33, 27, 0.08);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.menu {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  width: 44px;
  height: 44px;
  font-size: 20px;
  color: var(--ink);
  border-radius: 50%;
  transition: background 0.2s ease;
}

.menu:active {
  background: rgba(19, 33, 27, 0.08);
}

/* Mobile Nav Dropdown */
.nav-overlay {
  position: fixed;
  top: 66px;
  left: 12px;
  right: 12px;
  background: rgba(241, 240, 233, 0.97);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 20px 50px rgba(19, 33, 27, 0.18);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px) scale(0.98);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0.25s ease;
  z-index: 99;
}

.nav.mobile-active .nav-overlay {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.nav-overlay a {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  padding: 12px 16px;
  border-radius: 14px;
  transition: background 0.2s ease;
  display: flex;
  align-items: center;
}

.nav-overlay a:active, .nav-overlay a:hover {
  background: rgba(19, 33, 27, 0.06);
}

@media (min-width: 768px) {
  .nav {
    top: 16px;
    padding: 9px 12px 9px 16px;
  }

  .links {
    display: flex;
  }

  .menu, .nav-overlay {
    display: none !important;
  }
}

/* -------------------------------------------------------------------------- */
/* HERO SECTION                                                               */
/* -------------------------------------------------------------------------- */
.hero {
  padding: 110px 0 60px;
  overflow: hidden;
  position: relative;
}

.hero-grid {
  display: flex;
  flex-direction: column;
  gap: clamp(28px, 5vw, 60px);
}

.hero p {
  font-size: clamp(1rem, 1.8vw, 1.18rem);
  line-height: 1.5;
  margin: clamp(20px, 4vw, 32px) 0;
  max-width: 44ch;
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  margin-top: clamp(4px, 1vw, 8px);
}

.actions .btn {
  width: 100%;
  text-align: center;
}

@media (min-width: 540px) {
  .actions {
    flex-direction: row;
    width: auto;
  }
  .actions .btn {
    width: auto;
  }
}

@media (min-width: 1024px) {
  .actions {
    margin-top: 0;
  }
}

.hero-art {
  width: 100%;
  max-width: 580px;
  margin: 0 auto;
  min-height: auto;
  position: relative;
  overflow: visible;
  padding-bottom: 28px;
  opacity: 0;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

@media (min-width: 1024px) {
  .hero-art {
    overflow: visible;
  }
}

.halo {
  position: absolute;
  inset: 7% 0 3% 7%;
  border-radius: 50%;
  background: radial-gradient(circle at 68% 28%, #d8ccec, transparent 66%);
}

.orbit {
  position: absolute;
  inset: 0;
  border: 1px solid #5e9f7b55;
  border-radius: 50%;
  transform: rotate(18deg) scale(.89);
  animation: spin 25s linear infinite;
}

.orbit::after {
  content: "";
  position: absolute;
  right: 13%;
  top: 12%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 9px #5e9f7b22;
}

@keyframes spin {
  to { transform: rotate(378deg) scale(.89); }
}

.app {
  position: absolute;
  left: 2%;
  right: 2%;
  top: 4%;
  bottom: 2%;
  padding: clamp(12px, 3vw, 20px);
  border: 1px solid #13211b2c;
  border-radius: clamp(20px, 4vw, 30px);
  background: #fafbf6ee;
  box-shadow: 0 20px 60px rgba(19, 33, 27, 0.15);
  transform: rotate(1deg);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-transform-style: preserve-3d;
  transform-style: preserve-3d;
  transition: transform .45s var(--ease);
}

.hero-art:hover .app {
  transform: rotate(0) translateY(-6px);
}

.app-head {
  display: flex;
  justify-content: space-between;
  padding: 4px 7px 12px;
  border-bottom: 1px solid var(--line);
  font-weight: 800;
  font-size: 0.85rem;
}

.app-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(8px, 2vw, 13px);
  margin-top: 12px;
}

.tile {
  padding: clamp(10px, 2.5vw, 16px);
  border-radius: 16px;
  min-height: 110px;
  background: #edf2eb;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.tile.mint { background: var(--mint); }
.tile.sky { background: var(--sky); }
.tile.dark { background: var(--dark); color: var(--paper); }

.wide {
  grid-column: 1 / -1;
  min-height: 140px;
}

.kicker {
  font-size: clamp(0.7rem, 1.2vw, 0.75rem);
  text-transform: uppercase;
  letter-spacing: .1em;
  font-weight: 800;
  opacity: .75;
}

.big {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 500;
  line-height: 1;
  margin: 8px 0 4px;
}

.row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  font-size: clamp(0.75rem, 1.2vw, 0.82rem);
}

.meter {
  height: 7px;
  background: #13211b22;
  border-radius: 9px;
  overflow: hidden;
  margin-top: 10px;
}

.meter span {
  display: block;
  width: 76%;
  height: 100%;
  background: var(--teal);
  border-radius: inherit;
  animation: fill 1.4s var(--ease) both;
}

@keyframes fill {
  from { width: 0; }
}

.float {
  position: absolute;
  right: 10px;
  bottom: -62px;
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--dark);
  color: var(--paper);
  box-shadow: 0 12px 30px rgba(19, 33, 27, 0.35);
  animation: float 4s ease-in-out infinite;
  font-size: 0.78rem;
  z-index: 20;
}

.float b {
  display: block;
  color: var(--mint);
  font-size: 1.1rem;
  line-height: 1.1;
}

@keyframes float {
  50% { transform: translateY(-8px); }
}

@media (min-width: 1024px) {
  .hero {
    min-height: 100vh;
    padding: 140px 0 80px;
    display: grid;
    align-items: center;
    overflow: visible;
  }

  .hero-grid {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: clamp(40px, 5vw, 90px);
    align-items: center;
  }

  .hero-art {
    height: auto;
    max-width: 100%;
    overflow: visible;
    padding-bottom: 30px;
  }

  .app {
    position: relative;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    padding: 20px;
    border-radius: 30px;
    transform: rotate(2deg);
  }

  .float {
    right: 12px;
    bottom: -68px;
    padding: 11px 15px;
  }

  .tile {
    min-height: 132px;
    padding: 16px;
  }
}

/* -------------------------------------------------------------------------- */
/* MARQUEE RIBBON                                                             */
/* -------------------------------------------------------------------------- */
.ribbon {
  padding: 16px 0;
  border-block: 1px solid var(--line);
  overflow: hidden;
  background: rgba(var(--paper-rgb), 0.5);
}

.track-wrapper {
  display: flex;
  overflow: hidden;
  user-select: none;
  width: 100%;
}

.track {
  display: flex;
  gap: clamp(24px, 4vw, 48px);
  white-space: nowrap;
  animation: marquee 30s linear infinite;
  will-change: transform;
  color: var(--muted);
  font-size: clamp(0.7rem, 1.2vw, 0.76rem);
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 800;
  flex-shrink: 0;
}

.track span::after {
  content: '·';
  color: var(--teal);
  margin-left: clamp(24px, 4vw, 48px);
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.ribbon:hover .track {
  animation-play-state: paused;
}

/* -------------------------------------------------------------------------- */
/* STATS BAR                                                                  */
/* -------------------------------------------------------------------------- */
.stats-bar {
  padding: 48px 0;
  border-bottom: 1px solid var(--line);
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px 24px;
  text-align: center;
}

.stat-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-number {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.4rem, 4.5vw, 3.4rem);
  line-height: 1;
  background: linear-gradient(135deg, #184430 0%, #3d7a5a 60%, #529671 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
}

.stat-label {
  font-size: clamp(0.78rem, 1vw, 0.85rem);
  color: var(--muted);
  font-weight: 500;
}

@media (min-width: 640px) {
  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* -------------------------------------------------------------------------- */
/* SECTIONS COMMON                                                            */
/* -------------------------------------------------------------------------- */
section {
  padding: clamp(50px, 8vw, 130px) 0;
}

/* Skip rendering of below-fold sections until scrolled near (perf: cuts style/layout work) */
section:not(.hero) {
  content-visibility: auto;
  contain-intrinsic-size: auto 900px;
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: clamp(36px, 6vw, 74px);
}

.section-head h2 {
  max-width: 12ch;
  margin-top: 8px;
}

.section-head p {
  font-size: clamp(1rem, 1.8vw, 1.18rem);
  line-height: 1.5;
  max-width: 44ch;
}

@media (min-width: 900px) {
  .section-head {
    display: grid;
    grid-template-columns: 0.75fr 1.25fr;
    gap: clamp(40px, 6vw, 90px);
    align-items: start;
  }
}

/* -------------------------------------------------------------------------- */
/* SECTION 01: MANIFEST                                                       */
/* -------------------------------------------------------------------------- */
.manifest {
  display: grid;
  grid-template-columns: 1fr;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.manifest article {
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
}

.manifest article:last-child {
  border-bottom: 0;
}

.manifest b {
  display: block;
  color: var(--teal);
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.2rem);
  font-weight: 500;
  margin-bottom: 4px;
}

.manifest h3 {
  font-size: 1.15rem;
  margin-bottom: 6px;
}

.manifest p {
  font-size: 0.9rem;
  line-height: 1.5;
}

@media (min-width: 540px) and (max-width: 1023px) {
  .manifest {
    grid-template-columns: 1fr 1fr;
  }

  .manifest article {
    padding: 24px 18px;
  }

  .manifest article:nth-child(1), .manifest article:nth-child(2) {
    border-bottom: 1px solid var(--line);
  }

  .manifest article:nth-child(3), .manifest article:nth-child(4) {
    border-bottom: 0;
  }

  .manifest article:nth-child(1), .manifest article:nth-child(3) {
    border-right: 1px solid var(--line);
  }

  .manifest article:nth-child(2), .manifest article:nth-child(4) {
    padding-left: 18px;
  }

  .manifest article:nth-child(1), .manifest article:nth-child(3) {
    padding-left: 0;
  }
}

@media (min-width: 1024px) {
  .manifest {
    grid-template-columns: repeat(4, 1fr);
  }

  .manifest article {
    padding: 28px 20px 28px 0;
    border-bottom: 0;
    border-right: 1px solid var(--line);
  }

  .manifest article:not(:first-child) {
    padding-left: 20px;
  }

  .manifest article:last-child {
    border-right: 0;
  }
}

/* -------------------------------------------------------------------------- */
/* SECTION 02: SYSTEM MODULES                                                 */
/* -------------------------------------------------------------------------- */
.dark {
  background: var(--dark);
  color: var(--paper);
}

.dark h2, .dark h3, .demo h2, .demo h3 {
  color: var(--paper);
}

.dark p {
  color: #b9c7bd;
}

.dark-grid, .feature-grid, .analysis-grid, .demo-grid, .faq-grid {
  display: flex;
  flex-direction: column;
  gap: clamp(32px, 6vw, 80px);
}

@media (max-width: 959px) {
  .feature-grid > .feature-copy,
  .analysis-grid > .feature-copy {
    order: -1;
  }
}

@media (min-width: 960px) {
  .dark-grid, .feature-grid, .analysis-grid, .demo-grid, .faq-grid {
    display: grid;
    grid-template-columns: 0.75fr 1.25fr;
    gap: clamp(40px, 6vw, 90px);
    align-items: center;
  }
}

.system {
  border-top: 1px solid var(--line-dark);
}

.system-row {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 8px 14px;
  padding: 20px 14px;
  margin: 0 -14px;
  border-bottom: 1px solid var(--line-dark);
  border-radius: 16px;
  transition: transform 0.35s var(--ease), background 0.3s ease, border-color 0.3s ease;
  align-items: baseline;
}

.system-row p {
  grid-column: 2 / -1;
  font-size: 0.92rem;
  line-height: 1.45;
}

@media (min-width: 640px) {
  .system-row {
    grid-template-columns: 48px 1fr 1.3fr;
    gap: 18px;
  }

  .system-row p {
    grid-column: auto;
  }
}

.system-row h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  color: var(--paper);
  transition: color 0.3s ease;
}

.num {
  color: var(--mint);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.2rem, 2vw, 1.7rem);
  transition: transform 0.3s var(--ease), color 0.3s ease;
  display: inline-block;
}


/* -------------------------------------------------------------------------- */
/* FEATURE VISUAL CARDS (CLEAN DUAL-COLUMN FLEX ARCHITECTURE)                */
/* -------------------------------------------------------------------------- */
.feature-copy p, .analysis-copy p {
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  line-height: 1.5;
  margin: clamp(16px, 3vw, 26px) 0;
}

.visual {
  min-height: clamp(230px, 35vh, 320px);
  padding: clamp(20px, 3.5vw, 32px);
  border: 1px solid var(--line);
  border-radius: clamp(22px, 3vw, 30px);
  position: relative;
  overflow: hidden;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(16px, 3vw, 28px);
}

.analysis-board, .profile-card {
  min-height: clamp(300px, 40vh, 380px);
  padding: clamp(20px, 3.5vw, 32px);
  border: 1px solid var(--line);
  border-radius: clamp(22px, 3vw, 30px);
  position: relative;
  overflow: hidden;
  width: 100%;
}

.v-info {
  flex: 1;
  min-width: 0;
  z-index: 2;
}

.v-info h3 {
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  line-height: 1.18;
  margin-top: 10px;
}

.v-info p {
  font-size: clamp(0.86rem, 1.15vw, 1rem);
  line-height: 1.48;
  margin-top: 10px;
}

.v-art {
  width: clamp(110px, 20vw, 165px);
  height: clamp(110px, 20vw, 165px);
  flex-shrink: 0;
  position: relative;
  display: grid;
  place-items: center;
  z-index: 2;
}

/* Animations */
@keyframes spin-ring {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes counter-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(-360deg); }
}

@keyframes breathe {
  0%, 100% { transform: scale(.88); }
  50% { transform: scale(1.02); }
}

/* Salah Visual */
.salah {
  background: #173329;
  color: var(--paper);
}

.salah p {
  color: #b9c7bd;
}

.heatmap {
  display: grid;
  grid-template-columns: repeat(7, clamp(11px, 2vw, 17px));
  gap: clamp(3px, 0.6vw, 5px);
  transform: rotate(-6deg);
}

.heatmap i {
  aspect-ratio: 1;
  border-radius: 4px;
  background: #2b5140;
  transition: all 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  position: relative;
}
.heatmap i:nth-child(3n) { background: var(--teal); }
.heatmap i:nth-child(5n) { background: var(--mint); }

.heatmap i:hover {
  transform: scale(1.35) rotate(4deg);
  background: #cfee82 !important;
  box-shadow: 0 0 14px rgba(207, 238, 130, 0.85);
  z-index: 10;
}

/* Nafl Visual */
.nafl {
  background: var(--gold);
}

.nafl-orbit-ring {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(19, 33, 27, 0.35);
  border-radius: 50%;
  animation: spin-ring 20s linear infinite;
  will-change: transform;
}

.nafl-badge {
  position: absolute;
  padding: 3px 8px;
  border-radius: 99px;
  font-size: clamp(0.6rem, 1.1vw, 0.68rem);
  font-weight: 700;
  box-shadow: 0 3px 8px rgba(19, 33, 27, 0.14);
  white-space: nowrap;
  z-index: 3;
  animation: counter-spin 20s linear infinite;
  will-change: transform;
}

.nafl-badge.witr {
  top: 4px;
  right: 2px;
  background: var(--dark);
  color: var(--paper);
}

.nafl-badge.tahajjud {
  bottom: 4px;
  left: 2px;
  background: var(--teal);
  color: var(--paper);
}

.nafl-center-text {
  text-align: center;
  z-index: 3;
}

.nafl-center-text b {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3.2vw, 2.2rem);
  font-weight: 500;
  line-height: 1;
}

.nafl-center-text span {
  font-size: clamp(0.58rem, 1vw, 0.68rem);
  color: rgba(19, 33, 27, 0.75);
  display: block;
  margin-top: 1px;
}

/* Dhikr Visual */
.dhikr {
  background: var(--mint);
}

.dhikr-ring {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 1px solid rgba(19, 33, 27, 0.35);
  display: grid;
  place-items: center;
}

.count {
  text-align: center;
}

.count b {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.8vw, 2.8rem);
  font-weight: 500;
  line-height: 1;
}

.count span {
  font-size: clamp(0.6rem, 1.1vw, 0.7rem);
  color: var(--muted);
  display: block;
  margin-top: 1px;
}

/* Mujahid Visual */
.mujahid {
  background: var(--lilac);
}

.breath {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: rgba(250, 251, 246, 0.65);
  display: grid;
  place-items: center;
  animation: breathe 6s ease-in-out infinite;
  position: relative;
}

.breath::before {
  content: '4 · 7 · 8';
  position: absolute;
  inset: clamp(8px, 1.8vw, 16px);
  border-radius: 50%;
  border: 1px solid rgba(19, 33, 27, 0.25);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: clamp(0.68rem, 1.4vw, 0.85rem);
}

/* Gym Visual */
.gym {
  background: var(--sky);
}

.gym-ring {
  width: 100%;
  height: 100%;
  border: 1px solid rgba(19, 33, 27, 0.35);
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.gym-stat {
  text-align: center;
}

.gym-stat b {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.5vw, 2.6rem);
  font-weight: 500;
  line-height: 1;
  color: var(--ink);
}

.gym-stat span {
  font-size: clamp(0.6rem, 1.1vw, 0.7rem);
  color: var(--muted);
  display: block;
  margin-top: 1px;
}

/* Career Visual */
.career {
  background: var(--coral);
}

.career-bars {
  position: absolute;
  left: clamp(16px, 4vw, 30px);
  right: clamp(16px, 4vw, 30px);
  bottom: clamp(20px, 4vw, 32px);
  height: 135px;
  display: flex;
  align-items: flex-end;
  gap: clamp(6px, 1.5vw, 9px);
}

.career-bars i {
  flex: 1;
  background: var(--dark);
  border-radius: 8px 8px 2px 2px;
}

.career-bars i:nth-child(1) { height: 30px; }
.career-bars i:nth-child(2) { height: 68px; }
.career-bars i:nth-child(3) { height: 50px; }
.career-bars i:nth-child(4) { height: 105px; background: var(--teal); }
.career-bars i:nth-child(5) { height: 135px; }

/* Finance Ledger */
.ledger {
  background: #fafbf6;
  color: var(--dark);
  box-shadow: 0 20px 60px rgba(19, 33, 27, 0.12);
  transform: rotate(-1deg);
}

.ledger-top, .analysis-top {
  display: flex;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  font-size: 0.78rem;
  font-weight: 800;
}

.ledger-total, .score {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 3.3rem);
  font-weight: 500;
  line-height: 1;
  margin: 20px 0;
}

.ledger-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: clamp(0.8rem, 1.5vw, 0.88rem);
}

.green { color: var(--teal); }

/* Analysis Board */
.analysis-board {
  background: #fafbf6;
  color: var(--dark);
  transform: rotate(1deg);
}

.score {
  font-size: clamp(3.2rem, 8vw, 5rem);
}

.chart {
  height: 130px;
  display: flex;
  align-items: flex-end;
  gap: clamp(6px, 1.5vw, 11px);
  border-bottom: 1px solid var(--line);
  padding: 0 6px 4px;
  margin: 16px 0;
}

.chart i {
  flex: 1;
  background: var(--teal);
  border-radius: 6px 6px 0 0;
}

.chart i:nth-child(1) { height: 40%; }
.chart i:nth-child(2) { height: 61%; }
.chart i:nth-child(3) { height: 48%; }
.chart i:nth-child(4) { height: 75%; }
.chart i:nth-child(5) { height: 68%; }
.chart i:nth-child(6) { height: 90%; background: var(--mint); }

/* Profile Card */
.profile { background: var(--lilac); }

.profile-card {
  background: #fafbf6;
  color: var(--dark);
  transform: rotate(-1deg);
}

.profile-top {
  display: flex;
  gap: 14px;
  align-items: center;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--mint);
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 500;
  flex-shrink: 0;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(6px, 1.5vw, 10px);
  padding: 18px 0;
}

.stat {
  padding: 10px 8px;
  border-radius: 14px;
  background: rgba(19, 33, 27, 0.04);
  text-align: center;
}

.stat b {
  display: block;
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  line-height: 1.1;
}

.stat span {
  font-size: clamp(0.7rem, 1vw, 0.75rem);
  color: var(--muted);
  display: block;
  margin-top: 3px;
}

.profile-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  font-size: clamp(0.8rem, 1.5vw, 0.85rem);
}

/* -------------------------------------------------------------------------- */
/* DEMO SECTION                                                               */
/* -------------------------------------------------------------------------- */
.demo {
  background: var(--dark);
  color: var(--paper);
}

.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.tab {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid #f1f0e944;
  border-radius: 999px;
  background: transparent;
  color: var(--paper);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab[aria-selected="true"] {
  background: var(--mint);
  color: var(--dark);
  border-color: var(--mint);
}

.phone {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  padding: 10px;
  border-radius: 28px;
  background: #08100d;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.4);
  transform: rotate(1deg);
  transition: transform 0.3s ease;
}

@media (min-width: 768px) {
  .phone {
    transform: rotate(2deg);
  }
}

.screen {
  min-height: 440px;
  padding: clamp(20px, 4vw, 28px);
  border-radius: 20px;
  background: #234238;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.screen small {
  color: #b9c7bd;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-size: 0.72rem;
}

.screen h3 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 2.7rem);
  font-weight: 500;
  margin: 24px 0 18px;
  color: var(--paper);
}

.screen .meter {
  height: 9px;
  background: #f1f0e933;
}

.screen .meter span {
  background: var(--mint);
}

.screen-row {
  display: flex;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid #f1f0e826;
  font-size: 0.88rem;
}

.screen-row strong {
  color: var(--mint);
}

/* -------------------------------------------------------------------------- */
/* FAQ SECTION                                                                */
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
/* SECTION 13: FAQ (CLEAN EDITORIAL)                                         */
/* -------------------------------------------------------------------------- */
.faq-list {
  border-top: 1px solid var(--line);
}

details {
  border-bottom: 1px solid var(--line);
  transition: background-color 0.25s ease;
}

summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-weight: 800;
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  padding: 20px 0;
  user-select: none;
  color: var(--ink);
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: '+';
  font-size: 1.5rem;
  color: var(--teal);
  font-weight: 400;
  flex-shrink: 0;
  transition: transform 0.3s ease, color 0.3s ease;
}

details[open] summary::after {
  content: '−';
  color: var(--mint);
  transform: rotate(180deg);
}

details p {
  padding: 0 20px 22px 0;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--muted);
}

/* -------------------------------------------------------------------------- */
/* SECTION 14: FINAL CTA (CLEAN MINIMAL)                                     */
/* -------------------------------------------------------------------------- */
.final {
  background: var(--mint);
}

.final-wrap {
  display: flex;
  flex-direction: column;
  gap: 24px;
  align-items: center;
  text-align: center;
}

.final h2 {
  max-width: 14ch;
  margin: 0 auto;
  color: #13211b;
  font-weight: 800;
}

.final p {
  color: #50654f;
  margin-bottom: 24px;
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  max-width: 52ch;
  margin-left: auto;
  margin-right: auto;
}

.final .btn {
  min-height: 52px;
  padding: 0 36px;
  font-size: 1rem;
  background: var(--dark);
  color: var(--paper);
  border-radius: 99px;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.final .btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(19, 33, 27, 0.25);
}

@media (min-width: 768px) {
  .final-wrap {
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-end;
    gap: 40px;
    text-align: left;
  }
  .final h2 {
    margin: 0;
  }
  .final p {
    margin-left: 0;
    margin-right: 0;
  }
  .final .btn {
    min-height: 48px;
    padding: 0 32px;
  }
}

/* -------------------------------------------------------------------------- */
/* FOOTER                                                                     */
/* -------------------------------------------------------------------------- */
.footer {
  padding: 72px 0 0;
  background: #080f0c;
  color: var(--paper);
  border-top: 1px solid rgba(207, 238, 130, 0.12);
  position: relative;
  overflow: hidden;
}

/* Subtle radial glow in top-left */
.footer::before {
  content: '';
  position: absolute;
  top: -120px;
  left: -80px;
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, rgba(207, 238, 130, 0.055) 0%, transparent 65%);
  pointer-events: none;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px 24px;
  align-items: start;
  padding-bottom: 56px;
}

.footer-brand {
  grid-column: 1 / -1;
  margin: 0;
  padding: 0;
}

.footer-brand .brand {
  font-size: clamp(1.85rem, 3vw, 2.5rem) !important;
  gap: 12px !important;
  font-weight: 900 !important;
  letter-spacing: -0.035em !important;
  display: inline-flex !important;
  align-items: center !important;
  line-height: 1 !important;
  margin: 0 !important;
}

.footer-brand .brand-icon {
  height: clamp(36px, 3.2vw, 46px) !important;
  width: auto !important;
  object-fit: contain !important;
  transition: transform 0.35s var(--ease), filter 0.35s var(--ease);
  filter: drop-shadow(0 3px 12px rgba(207, 238, 130, 0.28));
}

.footer-brand .brand:hover .brand-icon {
  transform: scale(1.08) rotate(-4deg);
  filter: drop-shadow(0 5px 18px rgba(207, 238, 130, 0.45));
}

.footer-brand p {
  color: #8fa89a;
  font-size: clamp(0.85rem, 1vw, 0.95rem);
  margin-top: 12px;
  line-height: 1.5;
  max-width: 24ch;
}

/* Column heading */
.footer h3 {
  color: #cfee82;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-top: 6px;
  margin-bottom: 18px;
  line-height: 1;
}

/* Link list */
.footer-links {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  margin-top: 14px !important;
}

.footer-links a {
  color: #7d9e8d;
  font-size: 0.875rem;
  padding: 7px 0;
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  position: relative;
  width: fit-content;
  transition: color 0.22s ease;
  text-decoration: none;
}

/* Slide-underline hover effect */
.footer-links a::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 0;
  width: 0;
  height: 1px;
  background: #cfee82;
  transition: width 0.28s cubic-bezier(.16, 1, .3, 1);
}

.footer-links a:hover {
  color: #e8f5d0;
}

.footer-links a:hover::after {
  width: 100%;
}

.footer-links-2col {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 8px 28px !important;
}

/* Divider line */
.footer-divider {
  border: none;
  border-top: 1px solid rgba(241, 240, 233, 0.07);
  margin: 0;
}

/* Bottom bar */
.bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding: 22px 0;
  color: #4d6b5c;
  font-size: 0.775rem;
  letter-spacing: 0.01em;
}

@media (min-width: 640px) {
  .bottom {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

/* Desktop grid */
@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 1.8fr 1fr 1.5fr 1fr;
    gap: 0 40px;
    align-items: start;
  }

  .footer-brand {
    grid-column: auto;
  }

  .footer-links-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 28px;
  }
}


/* -------------------------------------------------------------------------- */
/* ANIMATIONS & UTILS                                                         */
/* -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  pointer-events: auto;
}

/* Interactive hover polish */
.btn, .navcta {
  pointer-events: auto !important;
  transition: transform .45s var(--ease), box-shadow .45s var(--ease), background .2s ease;
  will-change: transform;
}

@media (hover: hover) {
  .btn:hover, .navcta:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 16px 40px rgba(19,33,27,0.14);
  }
}

.btn:active, .navcta:active {
  transform: translateY(0) scale(1);
}

.visual, .analysis-board, .profile-card, .phone, .system-row {
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.visual.mujahid { transform: rotate(-2deg); }
.visual.career { transform: rotate(2deg); }
.visual.nafl, .visual.mujahid, .visual.career, .visual.ledger {
  background: rgba(255,255,255,0.88);
  box-shadow: 0 8px 32px rgba(19,33,27,0.06);
}

@media (hover: hover) {
  .visual:not(.ledger):hover, .analysis-board:hover, .profile-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 60px rgba(19,33,27,0.08);
  }
  .analysis-board:hover {
    transform: rotate(1deg) translateY(-4px);
  }
  .profile-card:hover {
    transform: rotate(-1deg) translateY(-4px);
  }
  .system-row:hover {
    transform: translateX(8px);
    background: rgba(241, 240, 233, 0.04);
    border-color: rgba(207, 238, 130, 0.25);
  }
  .system-row:hover h3 {
    color: var(--mint);
  }
  .system-row:hover .num {
    transform: scale(1.12);
  }
}

.phone {
  transition: transform .5s var(--ease);
}
.phone:hover {
  transform: rotate(0) scale(1.01) translateY(-4px);
}

:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
  .lenis { scroll-behavior: auto; }
  .orbit, .float, .track, .breath, .nafl-orbit-ring, .nafl-badge { animation: none !important; }
  .reveal { opacity: 1; transform: none; }
}
/* === Accessibility: Reduced Motion === */
@media (prefers-reduced-motion: reduce) {
  .track { animation: none; }
  .reveal { opacity: 1; transform: none; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* === Accessibility: Focus Visible === */
:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
  border-radius: 4px;
}


/* === Brand Essence Section === */
.brand-essence { padding: 90px 0 60px; text-align: center; }
.essence-head { max-width: 680px; margin: 0 auto 48px; }
.essence-head .eyebrow { margin-bottom: 12px; color: var(--teal); letter-spacing: .14em; font-weight: 800; font-size: .78rem; }
.essence-head h2 { font-size: clamp(2rem, 3.8vw, 3.2rem); font-weight: 800; margin-bottom: 16px; letter-spacing: -.035em; color: var(--ink); }
.essence-head p { margin: 0 auto; font-size: 1.05rem; color: var(--muted); line-height: 1.6; }
.essence-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 22px; }
.essence-card { background: #ffffff; border: 1px solid rgba(19, 33, 27, .09); border-radius: 24px; padding: 36px 24px; display: flex; flex-direction: column; align-items: center; text-align: center; box-shadow: 0 10px 30px rgba(19, 33, 27, .03); transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease); }
.essence-card:hover { transform: translateY(-6px); border-color: var(--teal); box-shadow: 0 20px 45px rgba(19, 33, 27, .08); }
/* essence-card active removed for uniform professional design */
.essence-icon-badge { width: 58px; height: 58px; border-radius: 18px; background: #f0f8e8; display: flex; align-items: center; justify-content: center; margin-bottom: 20px; box-shadow: inset 0 2px 4px rgba(255, 255, 255, .8); transition: transform .35s var(--ease), background .35s ease; }
.essence-card:hover .essence-icon-badge { transform: scale(1.08); background: #e2f4c1; }
.essence-card h3 { font-size: 1.25rem; font-weight: 800; color: var(--ink); margin-bottom: 6px; letter-spacing: -.02em; }
.essence-card p { font-size: .92rem; color: var(--muted); margin: 0; }


/* === RESTORED FIXES FROM PREVIOUS SESSION === */

/* 0. Fix Finance Ledger Card — column layout on all screens */
.visual.ledger { flex-direction: column; align-items: stretch; min-height: auto; padding: clamp(20px, 3vw, 32px); }
.ledger-top { flex-wrap: wrap; gap: 4px; }
.ledger-total { font-size: clamp(1.8rem, 4vw, 2.8rem); margin: 12px 0; }
.ledger-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: clamp(0.8rem, 1.2vw, 0.9rem); }
.ledger-row span { color: var(--muted); }
.ledger-row b { flex-shrink: 0; margin-left: 12px; }

/* 1. Fix Salah Text Visibility */
.visual.salah h3, .visual.salah p { color: var(--paper) !important; }

/* 2. Fix Demo Text Visibility */
.demo p { color: var(--paper) !important; opacity: 0.9; }

/* 3. Contrast Fixes for WCAG compliance */
#feature-nafl .feature-copy .eyebrow { color: #5b4907 !important; }
#feature-nafl .feature-copy p { color: #5a4d14 !important; }
#feature-career .feature-copy .eyebrow { color: #612705 !important; }
#feature-career .feature-copy p { color: #6b3a15 !important; }
.cta .eyebrow { color: #1a3a28 !important; }

/* 5. Accessibility Focus Ring & Ultra-Small Screen Safeguards */
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--teal) !important;
  outline-offset: 3px !important;
}

@media (max-width: 340px) {
  .wrap { padding: 0 12px !important; }
}

/* === Landing Page Mobile Optimization === */
@media (max-width: 767px) {
  /* Hero */
  .hero { padding: 90px 0 40px; }
  .hero p { font-size: 1rem; line-height: 1.55; }
  .hero-art { min-height: 420px; overflow: visible; }
  .app { position: relative; left: auto; right: auto; top: auto; bottom: auto; padding: 14px; border-radius: 20px; }
  .float { position: relative; right: auto; bottom: auto; display: inline-block; margin-top: 12px; }
  .app-grid { gap: 8px; margin-top: 10px; }
  .tile { padding: 12px; min-height: 90px; border-radius: 14px; }
  .tile .big { font-size: 1.3rem; }
  .tile .kicker { font-size: 0.6rem; }
  .halo, .orbit { display: none; }

  /* Feature Sections */
  section { padding: clamp(36px, 6vw, 60px) 0; }
  .feature-grid { gap: clamp(24px, 5vw, 40px); }
  .feature-copy { order: -1; }
  .feature-copy h2 { font-size: clamp(1.6rem, 5vw, 2.4rem); line-height: 1.05; }
  .feature-copy p { font-size: 0.92rem; line-height: 1.55; }

  /* Visual Cards — stack vertically, full width */
  .visual {
    flex-direction: column;
    min-height: auto;
    padding: clamp(16px, 4vw, 24px);
    gap: 16px;
  }
  .v-info { width: 100%; }
  .v-info h3 { font-size: clamp(1.1rem, 3vw, 1.4rem); }
  .v-info p { font-size: 0.85rem; }
  .v-art { width: clamp(100px, 40vw, 140px); height: clamp(100px, 40vw, 140px); }

  /* Colored Section Cards — ensure separation */
  .visual.nafl, .visual.mujahid, .visual.career, .visual.ledger {
    background: rgba(255,255,255,0.92);
    box-shadow: 0 4px 20px rgba(19,33,27,0.06);
  }

  /* Dark Sections */
  section.dark { padding: clamp(36px, 6vw, 60px) 0; }
  .system { gap: 0; }
  .system-row { padding: clamp(14px, 3vw, 20px) 0; border-bottom: 1px solid rgba(255,255,255,0.08); }
  .system-row:last-child { border-bottom: none; }

  /* Stats Bar */
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 16px; text-align: center; }
  .stat-number { font-size: clamp(1.4rem, 4vw, 2rem); }
  .stat-label { font-size: 0.72rem; }

  /* FAQ */
  .faq-grid { gap: 24px; }
  .faq-list { gap: 0; }
  .faq-list details { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .faq-list summary { font-size: 0.95rem; font-weight: 600; }

  /* Profile Card */
  .profile-card { padding: clamp(16px, 4vw, 24px); min-height: auto; }
  .profile-top { flex-direction: column; text-align: center; gap: 12px; }
  .stats { gap: 12px; }

  /* Demo */
  .demo-grid { gap: 24px; }
  .demo-copy .tabs { flex-wrap: wrap; gap: 8px; }
  .phone { min-height: 280px; }

  /* Final CTA */
  .final-wrap { flex-direction: column; text-align: center; gap: 20px; }
  .final-wrap .btn { width: 100%; }

  /* Footer */
  .footer { padding: 40px 0 0; overflow: visible; }
  .footer::before { display: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 0; padding-bottom: 0; }
  .footer-brand { text-align: center; padding: 0 0 24px; border-bottom: 1px solid rgba(207,238,130,0.1); }
  .footer-brand .brand { justify-content: center; font-size: clamp(1.8rem, 6vw, 2.5rem) !important; letter-spacing: -.03em; }
  .footer-brand p { margin: 8px auto 0; font-size: 0.82rem; color: #8fa89a; line-height: 1.45; max-width: 24ch; }
  .footer-grid > div:not(.footer-brand) { padding: 20px 0; border-bottom: 1px solid rgba(241,240,233,0.05); }
  .footer-grid > div:last-child { border-bottom: none; }
  .footer-grid h3 { font-size: 0.6rem; letter-spacing: 0.2em; text-transform: uppercase; color: #cfee82; margin-bottom: 2px; font-weight: 700; }
  .footer-links { gap: 0; margin-top: 8px; }
  .footer-links a { font-size: 0.82rem; color: #9cb5a8; padding: 4px 0; min-height: auto; transition: color 0.2s; display: block; }
  .footer-links a::after { display: none; }
  .footer-links a:hover { color: var(--paper); }
  .footer-links-2col { grid-template-columns: 1fr 1fr; gap: 0 20px; }
  .footer-divider { display: none; }
  .bottom { flex-direction: column; align-items: center; text-align: center; padding: 18px 0; gap: 4px; border-top: 1px solid rgba(241,240,233,0.06); margin-top: 8px; }
  .bottom span { font-size: 0.66rem; color: #4a6558; letter-spacing: .01em; }

  /* Marquee */
  .ribbon { overflow: hidden; }
  .track { animation-duration: 25s; }
}

/* Accessibility: reduced motion — show all content immediately */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; }
}
.ledger-row b { flex-shrink: 0; }
