/* =============================================================
   JTBills — Public landing page
   -------------------------------------------------------------
   Mobile-first. The base rules below describe the SMALL PHONE
   layout; every breakpoint is min-width and only ever adds to it.
   (The stylesheet this replaces was desktop-first with two
   max-width breakpoints, so tablets inherited a desktop grid.)

   Depends on, and must be loaded after:
     core/assets/css/design-system.css   tokens + reset
     core/assets/css/components.css      .btn, .form-*, .card
   Brand palette is injected by brand_css() from core/brand.php.

   No raw hex values below — everything resolves to a token.
   ============================================================= */

/* ============================================================
   0. LAYOUT PRIMITIVES
   ============================================================ */

/* Breakpoint ladder used throughout this file:
     (base)    320px+   small phones
     480px+            large phones
     768px+            tablets
     1024px+           laptops
     1280px+           desktop monitors
     1440px            container ceiling for large displays      */

.container {
  width: 100%;
  max-width: 1280px;
  margin-inline: auto;
  padding-inline: var(--sp-5);
}

@media (min-width: 768px) {
  .container { padding-inline: var(--sp-8); }
}

@media (min-width: 1280px) {
  .container { padding-inline: var(--sp-10); }
}

.section {
  padding-block: var(--sp-16);
}

@media (min-width: 768px) {
  .section { padding-block: var(--sp-20); }
}

@media (min-width: 1024px) {
  .section { padding-block: 6rem; }
}

.section-head {
  margin-bottom: var(--sp-10);
}

.section-head--center {
  text-align: center;
}

.section-head--center .section-sub {
  margin-inline: auto;
}

/* Surface variants */
.bg-alt    { background: var(--c-surface-alt); }
.bg-tinted { background: var(--c-primary-bg); }
.bg-dark   { background: var(--c-gray-900); color: var(--c-gray-100); }

/* Skip link — first focusable element on the page */
.skip-link {
  position: absolute;
  left: var(--sp-4);
  top: -100px;
  z-index: var(--z-toast);
  padding: var(--sp-3) var(--sp-5);
  border-radius: var(--radius-md);
  background: var(--c-primary);
  color: var(--c-text-inverse);
  font-weight: var(--fw-semibold);
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: var(--sp-4);
  color: var(--c-text-inverse);
}

/* ============================================================
   1. TYPOGRAPHY
   Fluid scale: clamp() lets type grow with the viewport instead
   of stepping at breakpoints, and keeps rem units so it still
   respects the reader's browser font-size setting.
   ============================================================ */

h1, h2, h3, h4 {
  line-height: var(--leading-tight);
  color: var(--c-text);
  text-wrap: balance;
}

.hero-title {
  font-size: clamp(2.125rem, 1.5rem + 3.1vw, 4rem);
  font-weight: var(--fw-extrabold);
  letter-spacing: -0.02em;
}

.hero-title span { color: var(--c-primary); }

.section-title {
  font-size: clamp(1.75rem, 1.35rem + 2vw, 3rem);
  font-weight: var(--fw-extrabold);
  letter-spacing: -0.02em;
  margin-bottom: var(--sp-4);
}

.section-title .accent { color: var(--c-accent, var(--c-primary-light)); }

.section-sub {
  font-size: clamp(var(--text-base), 0.95rem + 0.3vw, var(--text-lg));
  color: var(--c-text-muted);
  max-width: 44ch;
  line-height: var(--leading-loose);
}

.section-tag {
  display: inline-block;
  margin-bottom: var(--sp-4);
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--radius-full);
  background: var(--c-primary-bg);
  color: var(--c-primary);
  font-size: var(--text-xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* On dark sections the tinted pill and body copy need to invert */
.on-dark,
.on-dark h2,
.on-dark h3 { color: var(--c-gray-100); }

.on-dark .section-sub,
.on-dark p { color: var(--c-gray-300); }

.on-dark .section-tag {
  background: rgba(255, 255, 255, 0.1);
  color: var(--c-accent, var(--c-primary-light));
}

/* ============================================================
   2. NAVIGATION
   Base = mobile: logo + hamburger, panel hidden.
   The desktop link row only appears from 1024px, so tablets get
   the touch-friendly panel rather than a cramped inline row.
   ============================================================ */

.site-nav {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background: color-mix(in srgb, var(--c-surface) 92%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--c-border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  min-height: 60px;
}

.nav-logo {
  display: flex;
  align-items: center;
  font-size: var(--text-xl);
  font-weight: var(--fw-extrabold);
  color: var(--c-primary);
  letter-spacing: -0.02em;
}

.nav-logo:hover { color: var(--c-primary); }

/* Hamburger — 44px hit area, meets the touch-target minimum */
.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  border-radius: 2px;
  background: var(--c-text);
  transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-toggle:focus-visible {
  outline: 2px solid var(--c-primary);
  outline-offset: 2px;
}

/* Mobile panel */
.nav-panel {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  display: none;
  flex-direction: column;
  padding: var(--sp-2) var(--sp-5) var(--sp-6);
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  box-shadow: var(--shadow-lg);
}

.nav-panel.is-open {
  display: flex;
  animation: navDrop var(--transition-fast) ease;
}

@keyframes navDrop {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.nav-list {
  display: flex;
  flex-direction: column;
}

.nav-link {
  display: block;
  padding: var(--sp-4) 0;
  border-bottom: 1px solid var(--c-border);
  color: var(--c-text);
  font-weight: var(--fw-semibold);
}

.nav-link:hover { color: var(--c-primary); }

.nav-link:focus-visible {
  outline: 2px solid var(--c-primary);
  outline-offset: -2px;
}

.nav-actions {
  display: flex;
  gap: var(--sp-3);
  margin-top: var(--sp-5);
}

.nav-actions .btn { flex: 1; }

@media (min-width: 1024px) {
  .nav-inner { min-height: 70px; }

  .nav-toggle { display: none; }

  /* Panel becomes the inline desktop bar */
  .nav-panel {
    position: static;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: var(--sp-8);
    flex: 1;
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
  }

  .nav-list {
    flex-direction: row;
    gap: var(--sp-6);
  }

  .nav-link {
    padding: 0;
    border: 0;
    font-size: var(--text-sm);
    color: var(--c-text-muted);
  }

  .nav-actions {
    margin-top: 0;
    gap: var(--sp-3);
  }

  .nav-actions .btn { flex: initial; }
}

/* ============================================================
   3. HERO
   ============================================================ */

.hero {
  padding-block: var(--sp-12) var(--sp-16);
  text-align: center;
  background:
    radial-gradient(ellipse 90% 60% at 50% 0%,
      var(--c-primary-bg) 0%, transparent 70%);
}

.hero-badge {
  display: inline-block;
  margin-bottom: var(--sp-5);
  padding: var(--sp-2) var(--sp-4);
  border: 1px solid var(--c-primary-border);
  border-radius: var(--radius-full);
  background: var(--c-surface);
  color: var(--c-primary);
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
}

.hero-sub {
  max-width: 52ch;
  margin: var(--sp-5) auto var(--sp-8);
  font-size: clamp(var(--text-base), 0.95rem + 0.35vw, var(--text-lg));
  color: var(--c-text-muted);
  line-height: var(--leading-loose);
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

/* The hero is a single centred column — the phone screenshots that used
   to sit beside it were removed, so there is no second grid track. */
.hero-inner {
  max-width: 46rem;
  margin-inline: auto;
}

@media (min-width: 480px) {
  .hero-actions {
    flex-direction: row;
    justify-content: center;
  }
}

@media (min-width: 1024px) {
  .hero { padding-block: var(--sp-20) 6rem; }
}

/* ============================================================
   4. TRUST BAR
   ============================================================ */

.trust {
  padding-block: var(--sp-10);
  border-block: 1px solid var(--c-border);
  background: var(--c-surface);
}

.trust-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-6) var(--sp-4);
  text-align: center;
}

.trust-num {
  font-size: clamp(var(--text-xl), 1rem + 1.6vw, var(--text-3xl));
  font-weight: var(--fw-extrabold);
  color: var(--c-primary);
  line-height: var(--leading-tight);
}

.trust-num.is-accent { color: var(--c-accent, var(--c-primary-light)); }

.trust-label {
  margin-top: var(--sp-1);
  font-size: var(--text-xs);
  color: var(--c-text-muted);
  font-weight: var(--fw-medium);
}

.trust-logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-4) var(--sp-8);
  margin-top: var(--sp-8);
  padding-top: var(--sp-8);
  border-top: 1px solid var(--c-border);
}

.network-logo {
  font-size: var(--text-sm);
  font-weight: var(--fw-bold);
  letter-spacing: 0.08em;
  color: var(--c-text-subtle);
}

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

/* ============================================================
   5. CARD GRIDS  (features / services / why)
   One column on phones, two on large phones and tablets,
   three from laptop width.
   ============================================================ */

.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-5);
}

@media (min-width: 560px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}

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

.info-card {
  padding: var(--sp-6);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  background: var(--c-surface);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.info-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.info-card.is-highlight {
  border-color: var(--c-primary-border);
  background: linear-gradient(160deg, var(--c-primary-bg) 0%, var(--c-surface) 55%);
}

.info-card__icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: var(--sp-4);
  border-radius: var(--radius-md);
  background: var(--c-primary-bg);
  font-size: var(--text-2xl);
  line-height: 1;
}

.info-card h3 {
  margin-bottom: var(--sp-2);
  font-size: var(--text-lg);
  font-weight: var(--fw-bold);
}

.info-card p {
  color: var(--c-text-muted);
  font-size: var(--text-sm);
  line-height: var(--leading-loose);
}

.info-card__badge {
  display: inline-block;
  margin-top: var(--sp-4);
  padding: var(--sp-1) var(--sp-3);
  border-radius: var(--radius-full);
  background: var(--c-primary);
  color: var(--c-text-inverse);
  font-size: 0.6875rem;
  font-weight: var(--fw-bold);
}

/* ============================================================
   6. SPLIT SECTIONS  (text beside a product mockup)
   Stacked on mobile; side-by-side from 1024px. The `reverse`
   variant only flips on desktop — on mobile the text must stay
   first in visual order regardless of source order.
   ============================================================ */

.split {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-10);
  align-items: center;
}

@media (min-width: 1024px) {
  .split { grid-template-columns: 1fr 1fr; gap: var(--sp-16); }
  .split--reverse .split__text   { order: 2; }
  .split--reverse .split__visual { order: 1; }
}

.split__text p {
  margin-bottom: var(--sp-6);
  color: var(--c-text-muted);
  line-height: var(--leading-loose);
}

.check-list {
  margin-bottom: var(--sp-8);
  display: grid;
  gap: var(--sp-4);
}

.check-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
  font-size: var(--text-sm);
  line-height: var(--leading-snug);
}

.check-list .check {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: var(--radius-full);
  background: var(--c-success);
  color: var(--c-text-inverse);
  font-size: var(--text-xs);
  font-weight: var(--fw-bold);
}

.on-dark .check-list li { color: var(--c-gray-200); }

.split__visual {
  display: flex;
  justify-content: center;
}

/* ---- Shared mockup shell ---- */
.mockup {
  width: 100%;
  max-width: 360px;
  padding: var(--sp-5);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-xl);
  background: var(--c-surface);
  box-shadow: var(--shadow-xl);
}

/* ---- Wallet mockup ---- */
.wallet-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-5);
}

.wallet-label {
  font-size: var(--text-xs);
  font-weight: var(--fw-bold);
  letter-spacing: 0.1em;
  color: var(--c-text-subtle);
}

.wallet-chip {
  width: 34px;
  height: 24px;
  border-radius: var(--radius-sm);
  background: var(--gradient-brand);
}

.wallet-balance {
  padding: var(--sp-5);
  margin-bottom: var(--sp-5);
  border-radius: var(--radius-lg);
  background: var(--gradient-brand);
  color: var(--c-text-inverse);
}

.bal-label {
  font-size: var(--text-xs);
  opacity: 0.85;
}

.bal-amount {
  font-size: var(--text-3xl);
  font-weight: var(--fw-extrabold);
  line-height: var(--leading-tight);
}

.bal-change {
  margin-top: var(--sp-1);
  font-size: var(--text-xs);
  opacity: 0.9;
}

.wallet-goal { margin-bottom: var(--sp-4); }

.goal-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--sp-2);
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
  color: var(--c-text-muted);
}

.goal-pct { color: var(--c-primary); }

.progress-bar {
  height: 7px;
  border-radius: var(--radius-full);
  background: var(--c-surface-alt);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--gradient-brand);
}

.wallet-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-2);
  margin-top: var(--sp-5);
}

.wallet-action {
  padding: var(--sp-3) var(--sp-2);
  border-radius: var(--radius-md);
  background: var(--c-surface-alt);
  color: var(--c-text-muted);
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
  text-align: center;
}

/* ---- Commission mockup ---- */
.mockup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-5);
}

.mockup-header .title {
  font-weight: var(--fw-bold);
  font-size: var(--text-sm);
}

.mockup-header .period {
  font-size: var(--text-xs);
  color: var(--c-text-subtle);
}

.commission-total {
  padding: var(--sp-5);
  margin-bottom: var(--sp-5);
  border-radius: var(--radius-lg);
  background: var(--c-primary-bg);
  text-align: center;
}

.ct-label {
  font-size: var(--text-xs);
  color: var(--c-text-muted);
}

.ct-amount {
  font-size: var(--text-3xl);
  font-weight: var(--fw-extrabold);
  color: var(--c-primary);
  line-height: var(--leading-tight);
}

.ct-sub {
  font-size: var(--text-xs);
  color: var(--c-text-muted);
}

.commission-item,
.borrower-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding-block: var(--sp-3);
  border-bottom: 1px solid var(--c-border);
}

.commission-item:last-child,
.borrower-item:last-child { border-bottom: 0; }

.ci-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  background: var(--c-surface-alt);
}

/* These rows are built from spans, so the stacked labels need an
   explicit block display — they would otherwise run together inline. */
.ci-info { display: block; flex: 1; min-width: 0; }

.ci-name {
  display: block;
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ci-date,
.bi-due {
  display: block;
  font-size: var(--text-xs);
  color: var(--c-text-subtle);
}

.ci-amount {
  flex-shrink: 0;
  font-size: var(--text-sm);
  font-weight: var(--fw-bold);
  color: var(--c-success);
}

.earn-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  margin-top: var(--sp-4);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--c-border);
  font-size: var(--text-xs);
  color: var(--c-text-muted);
}

.earn-badge .dot {
  width: 7px;
  height: 7px;
  border-radius: var(--radius-full);
  background: var(--c-success);
}

/* ---- Borrowers mockup ---- */
.bh-total {
  font-size: var(--text-xs);
  color: var(--c-text-muted);
}

.bh-total span {
  font-weight: var(--fw-bold);
  color: var(--c-text);
}

.borrower-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}

.bs-card {
  padding: var(--sp-4);
  border-radius: var(--radius-md);
  text-align: center;
}

.bs-card.is-owed    { background: var(--c-info-bg); }
.bs-card.is-overdue { background: var(--c-danger-bg); }

.bs-label {
  font-size: var(--text-xs);
  color: var(--c-text-muted);
}

.bs-amount {
  font-size: var(--text-lg);
  font-weight: var(--fw-extrabold);
}

.bi-avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: var(--radius-full);
  color: var(--c-text-inverse);
  font-size: var(--text-sm);
  font-weight: var(--fw-bold);
}

.bi-avatar.is-green  { background: var(--c-success); }
.bi-avatar.is-red    { background: var(--c-danger); }
.bi-avatar.is-orange { background: var(--c-warning); }

.bi-info { display: block; flex: 1; min-width: 0; }

.bi-name {
  display: block;
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
}

.bi-right {
  display: block;
  flex-shrink: 0;
  text-align: right;
}

.bi-amount {
  display: block;
  font-size: var(--text-sm);
  font-weight: var(--fw-bold);
}

.bi-status {
  display: inline-block;
  margin-top: 2px;
  padding: 2px var(--sp-2);
  border-radius: var(--radius-full);
  font-size: 0.625rem;
  font-weight: var(--fw-bold);
}

.bi-status.is-pending { background: var(--c-warning-bg); color: var(--c-warning); }
.bi-status.is-overdue { background: var(--c-danger-bg);  color: var(--c-danger); }
.bi-status.is-paid    { background: var(--c-success-bg); color: var(--c-success); }

/* ============================================================
   7. STEPS
   ============================================================ */

.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-8);
  text-align: center;
}

.step__num {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin: 0 auto var(--sp-4);
  border-radius: var(--radius-full);
  background: var(--gradient-brand);
  color: var(--c-text-inverse);
  font-size: var(--text-xl);
  font-weight: var(--fw-extrabold);
}

.step h3 {
  margin-bottom: var(--sp-2);
  font-size: var(--text-lg);
}

.step p {
  font-size: var(--text-sm);
  color: var(--c-text-muted);
  line-height: var(--leading-loose);
}

@media (min-width: 560px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
}

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

/* ============================================================
   8. APP SHOWCASE
   ============================================================ */

.store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  margin-top: var(--sp-6);
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-5);
  border: 1px solid var(--c-gray-800);
  border-radius: var(--radius-md);
  background: var(--c-gray-900);
  color: var(--c-gray-100);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.store-badge:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  color: var(--c-gray-100);
}

.store-badge:focus-visible {
  outline: 2px solid var(--c-primary);
  outline-offset: 3px;
}

.store-badge svg {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  fill: currentColor;
}

.store-badge__text { line-height: 1.15; }

.store-badge__sm {
  display: block;
  font-size: 0.625rem;
  opacity: 0.75;
}

.store-badge__lg {
  display: block;
  font-size: var(--text-base);
  font-weight: var(--fw-semibold);
}

/* ============================================================
   9. TESTIMONIALS
   ============================================================ */

.testi-card {
  padding: var(--sp-6);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  background: var(--c-surface);
}

.stars {
  margin-bottom: var(--sp-3);
  color: var(--c-warning);
  letter-spacing: 0.1em;
}

.testi-card blockquote {
  margin-bottom: var(--sp-5);
  color: var(--c-text-muted);
  font-size: var(--text-sm);
  line-height: var(--leading-loose);
}

.testi-author {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.testi-avatar {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: var(--radius-full);
  background: var(--gradient-brand);
  color: var(--c-text-inverse);
  font-weight: var(--fw-bold);
}

.testi-name {
  display: block;
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
  color: var(--c-text);
}

.testi-loc {
  display: block;
  font-size: var(--text-xs);
  color: var(--c-text-subtle);
}

/* ============================================================
   10. FAQ  (accordion, driven by aria-expanded)
   ============================================================ */

.faq {
  max-width: 780px;
  margin-inline: auto;
}

.faq-item {
  border-bottom: 1px solid var(--c-border);
}

.faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  width: 100%;
  padding: var(--sp-5) 0;
  border: 0;
  background: none;
  color: var(--c-text);
  font-size: var(--text-base);
  font-weight: var(--fw-semibold);
  text-align: left;
  cursor: pointer;
}

.faq-q:hover { color: var(--c-primary); }

.faq-q:focus-visible {
  outline: 2px solid var(--c-primary);
  outline-offset: -2px;
}

/* Chevron rotates from the aria state — no extra class to keep in sync */
.faq-q::after {
  content: "";
  flex-shrink: 0;
  width: 9px;
  height: 9px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform var(--transition-fast);
}

.faq-q[aria-expanded="true"]::after {
  transform: rotate(225deg) translate(-2px, -2px);
}

/* grid-template-rows animates to a height the browser computes,
   so the panel can grow with its content without a magic max-height.

   The open state is read from .faq-item[data-open], not from an adjacent
   sibling of the button: the button is wrapped in an <h3> for screen-reader
   navigation, so `.faq-q[aria-expanded="true"] + .faq-a` would never match.
   The same JS handler writes both this attribute and aria-expanded, so the
   visual state and the announced state cannot drift apart. */
.faq-a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--transition-base);
}

.faq-a > div { overflow: hidden; }

.faq-item[data-open="true"] .faq-a { grid-template-rows: 1fr; }

.faq-a p {
  padding-bottom: var(--sp-5);
  color: var(--c-text-muted);
  font-size: var(--text-sm);
  line-height: var(--leading-loose);
}

/* ============================================================
   11. CONTACT
   ============================================================ */

.contact-wrap {
  max-width: 720px;
  margin-inline: auto;
  padding: var(--sp-6);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-lg);
  background: var(--c-surface);
  box-shadow: var(--shadow-md);
}

@media (min-width: 768px) {
  .contact-wrap { padding: var(--sp-10); }
}

.contact-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-4);
}

@media (min-width: 560px) {
  .contact-row { grid-template-columns: 1fr 1fr; }
}

.contact-submit {
  margin-top: var(--sp-6);
  text-align: center;
}

.contact-alert {
  display: none;
  margin-top: var(--sp-5);
  padding: var(--sp-4);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  text-align: center;
}

.contact-alert.is-success {
  display: block;
  background: var(--c-success-bg);
  color: var(--c-success);
}

.contact-alert.is-error {
  display: block;
  background: var(--c-danger-bg);
  color: var(--c-danger);
}

/* ============================================================
   12. FINAL CTA
   ============================================================ */

.final-cta {
  padding-block: var(--sp-20);
  background: var(--gradient-brand);
  color: var(--c-text-inverse);
  text-align: center;
}

.final-cta h2 {
  font-size: clamp(var(--text-2xl), 1.4rem + 2.2vw, var(--text-4xl));
  font-weight: var(--fw-extrabold);
  color: var(--c-text-inverse);
}

.final-cta p {
  max-width: 46ch;
  margin: var(--sp-4) auto var(--sp-8);
  opacity: 0.92;
  line-height: var(--leading-loose);
}

.btn-white {
  display: inline-block;
  padding: var(--sp-4) var(--sp-8);
  border-radius: var(--radius-full);
  background: var(--c-surface);
  color: var(--c-primary);
  font-weight: var(--fw-bold);
  box-shadow: var(--shadow-lg);
  transition: transform var(--transition-fast);
}

.btn-white:hover {
  transform: translateY(-2px);
  color: var(--c-primary);
}

.btn-white:focus-visible {
  outline: 3px solid var(--c-surface);
  outline-offset: 3px;
}

/* ============================================================
   13. FOOTER
   ============================================================ */

.site-footer {
  padding-block: var(--sp-16) var(--sp-8);
  background: var(--c-gray-900);
  color: var(--c-gray-400);
}

.footer-top {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-10);
}

@media (min-width: 560px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 1024px) {
  .footer-top { grid-template-columns: 2fr 1fr 1fr; gap: var(--sp-16); }
}

.footer-logo {
  margin-bottom: var(--sp-4);
  font-size: var(--text-xl);
  font-weight: var(--fw-extrabold);
  color: var(--c-gray-100);
}

.footer-brand p {
  font-size: var(--text-sm);
  line-height: var(--leading-loose);
  max-width: 42ch;
}

.footer-col h4 {
  margin-bottom: var(--sp-4);
  font-size: var(--text-sm);
  font-weight: var(--fw-bold);
  color: var(--c-gray-100);
}

.footer-col li { margin-bottom: var(--sp-3); }

.footer-col a {
  color: var(--c-gray-400);
  font-size: var(--text-sm);
}

.footer-col a:hover { color: var(--c-accent, var(--c-primary-light)); }

.footer-col a:focus-visible {
  outline: 2px solid var(--c-accent, var(--c-primary-light));
  outline-offset: 2px;
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  margin-top: var(--sp-12);
  padding-top: var(--sp-6);
  border-top: 1px solid var(--c-gray-800);
  font-size: var(--text-xs);
  text-align: center;
}

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

/* ============================================================
   14. FLOATING ACTIONS
   Stacked above the thumb zone, clear of the safe-area inset.
   ============================================================ */

.whatsapp-fab {
  position: fixed;
  right: var(--sp-4);
  bottom: calc(var(--sp-4) + env(safe-area-inset-bottom, 0px));
  z-index: var(--z-fixed);
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-full);
  background: var(--c-success);
  box-shadow: var(--shadow-lg);
  transition: transform var(--transition-fast);
}

.whatsapp-fab:hover { transform: scale(1.06); }

.whatsapp-fab:focus-visible {
  outline: 3px solid var(--c-success);
  outline-offset: 3px;
}

.whatsapp-fab svg {
  width: 28px;
  height: 28px;
  fill: var(--c-text-inverse);
}

/* ============================================================
   15. COMING SOON MODAL
   Shown by landing.js when a control marked [data-coming-soon]
   is activated — a store badge whose BRAND_* link is blank.
   The dialog carries the `hidden` attribute in the markup, so
   without JS it never appears and the badge is simply inert.
   ============================================================ */

.modal {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-4);
}

.modal[hidden] { display: none; }

/* Page behind the dialog must not scroll while it is open. */
.is-modal-open,
.is-modal-open body { overflow: hidden; }

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  animation: modal-fade 0.2s ease-out;
}

.modal__panel {
  position: relative;
  z-index: 1;
  width: min(100%, 26rem);
  padding: var(--sp-8) var(--sp-6) var(--sp-6);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-xl);
  background: var(--c-surface);
  box-shadow: var(--shadow-xl);
  text-align: center;
  animation: modal-rise 0.24s ease-out;
}

.modal__close {
  position: absolute;
  top: var(--sp-3);
  right: var(--sp-3);
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: var(--radius-full);
  background: none;
  color: var(--c-text-muted);
  font-size: var(--text-xl);
  line-height: 1;
  cursor: pointer;
}

.modal__close:hover { background: var(--c-surface-alt); }

.modal__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin-bottom: var(--sp-4);
  border-radius: var(--radius-full);
  background: var(--c-primary-bg);
  font-size: 1.75rem;
}

.modal__title {
  margin-bottom: var(--sp-2);
  font-size: var(--text-2xl);
  font-weight: var(--fw-bold);
}

.modal__text {
  margin-bottom: var(--sp-6);
  color: var(--c-text-muted);
  line-height: var(--leading-loose);
}

.modal__actions {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

@media (min-width: 420px) {
  .modal__actions { flex-direction: row; justify-content: center; }
}

@keyframes modal-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes modal-rise {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}

/* A badge with no listing yet is still a button — make it obviously
   pressable but a shade quieter than the ones that go somewhere. */
.store-badge.is-soon {
  border-style: dashed;
  cursor: pointer;
  font: inherit;
}

/* ============================================================
   16. SCROLL REVEAL
   Replaces the AOS library (14KB CSS + 14KB JS from a CDN).
   Elements start hidden only when JS is available to reveal
   them — the .has-js guard keeps content visible without JS.
   ============================================================ */

.has-js [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  transition-delay: var(--reveal-delay, 0ms);
}

.has-js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* Motion is a preference, not a default. Everything above becomes
   a no-op for readers who ask for reduced motion. */
@media (prefers-reduced-motion: reduce) {
  .has-js [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
