/* ==========================================================================
   Prestix — landing page styles

   The palette is a 1:1 port of the Flutter app's `BrandColors` / `AppTheme`
   (prestix-app/lib/core/theme/app_theme.dart). Keep the two in sync: every
   custom property below has a named counterpart in that file.
   ========================================================================== */

/* --- Theme tokens -------------------------------------------------------- */

:root {
  /* Brand constants — identical in both themes */
  --brand-navy: #1a2138;
  --brand-navy-deep: #12172a;
  --brand-blue: #2f5bd7;
  --brand-blue-light: #8aa6ff;
  --brand-orange: #ef5340;
  --brand-orange-dark: #d8412f;

  /* Light theme (the app's default) */
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-lowest: #f5f6f9;
  --surface-low: #f2f4f7;
  --surface-container: #eff1f5;
  --ink: #14161c;
  --muted: #5b6170;
  --outline: #c7ccd6;
  --outline-variant: #e6e8ee;
  --primary: var(--brand-blue);
  --on-primary: #ffffff;
  --primary-container: #dce6ff;
  --on-primary-container: #10204c;
  --accent: var(--brand-orange);
  --on-accent: #ffffff;
  --accent-container: #ffe1db;
  --on-accent-container: #5a1810;

  --header-bg: rgba(255, 255, 255, 0.82);
  --shadow-sm: 0 1px 2px rgba(20, 22, 28, 0.06);
  --shadow-md: 0 8px 24px rgba(20, 22, 28, 0.08);
  --shadow-lg: 0 24px 60px rgba(20, 22, 28, 0.14);
  --hero-glow-a: rgba(47, 91, 215, 0.13);
  --hero-glow-b: rgba(239, 83, 64, 0.12);

  /* Shape — mirrors the app: 10px buttons/inputs, 12px cards */
  --radius-btn: 10px;
  --radius-card: 12px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  --maxw: 1120px;
  --gutter: clamp(1.25rem, 5vw, 2.5rem);
  --section-y: clamp(4rem, 9vw, 7rem);

  color-scheme: light;
}

:root[data-theme='dark'] {
  --bg: var(--brand-navy);
  --surface: var(--brand-navy);
  --surface-lowest: var(--brand-navy-deep);
  --surface-low: #1f2740;
  --surface-container: #232b45;
  --ink: #f4f6fb;
  --muted: #aeb6cc;
  --outline: #44506e;
  --outline-variant: #333c57;
  --primary: var(--brand-blue-light);
  --on-primary: #0c1430;
  --primary-container: #2a3658;
  --on-primary-container: #dce6ff;
  --accent: var(--brand-orange);
  --on-accent: #ffffff;
  --accent-container: #5a1810;
  --on-accent-container: #ffe1db;

  --header-bg: rgba(26, 33, 56, 0.82);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.5);
  --hero-glow-a: rgba(138, 166, 255, 0.16);
  --hero-glow-b: rgba(239, 83, 64, 0.16);

  color-scheme: dark;
}

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

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Segoe UI', Roboto, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial,
    sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.25s ease, color 0.25s ease;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.18;
  letter-spacing: -0.02em;
  font-weight: 700;
}

p {
  margin: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--accent);
  color: var(--on-accent);
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 var(--radius-btn) 0;
  font-weight: 600;
}

.skip-link:focus {
  left: 0;
}

/* --- Layout primitives --------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

/* Keep in-page nav targets clear of the sticky header (68px + breathing room)
   instead of landing underneath it. */
section[id] {
  scroll-margin-top: 88px;
}

.section--tint {
  background: var(--surface-lowest);
  border-block: 1px solid var(--outline-variant);
}

.section-head {
  max-width: 40rem;
  margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
}

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

.eyebrow {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.875rem;
}

h2.section-title {
  font-size: clamp(1.85rem, 4.2vw, 2.6rem);
}

.section-sub {
  margin-top: 1rem;
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.125rem);
}

/* --- Buttons ------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  padding: 0.8125rem 1.5rem;
  min-height: 48px;
  border: 1px solid transparent;
  border-radius: var(--radius-btn);
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease,
    transform 0.18s ease, box-shadow 0.18s ease;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

/* Action buttons are pinned to the brand orange in both themes — the same
   rule the app's `_buildTheme` applies, keeping blue for active/focus states. */
.btn--primary {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: var(--shadow-sm);
}

.btn--primary:hover {
  background: var(--brand-orange-dark);
  box-shadow: var(--shadow-md);
}

.btn--outline {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}

.btn--outline:hover {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.btn--ghost {
  background: var(--surface-low);
  color: var(--ink);
  border-color: var(--outline-variant);
}

.btn--ghost:hover {
  border-color: var(--outline);
}

.btn--sm {
  min-height: 40px;
  padding: 0.5rem 1.05rem;
  font-size: 0.9375rem;
}

/* --- Header -------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, background-color 0.25s ease;
}

.site-header.is-stuck {
  border-bottom-color: var(--outline-variant);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  flex-shrink: 0;
}

.brand:hover {
  text-decoration: none;
}

.brand img.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.brand img.brand-word {
  height: 19px;
  width: auto;
}

/* The wordmark ships in two inks — swap by theme instead of recoloring.
   The suffix names the background the file is drawn for, not the ink:
   `--on-light` is the navy wordmark, `--on-dark` the reversed white one. */
:root[data-theme='dark'] .brand-word--on-light,
:root:not([data-theme='dark']) .brand-word--on-dark {
  display: none;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  margin-left: auto;
}

.nav a {
  color: var(--muted);
  font-size: 0.9375rem;
  font-weight: 500;
}

.nav a:hover {
  color: var(--ink);
  text-decoration: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin-left: 1.5rem;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--outline-variant);
  border-radius: var(--radius-btn);
  background: var(--surface-low);
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.18s ease, background-color 0.18s ease;
}

.theme-toggle:hover {
  border-color: var(--outline);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
}

:root[data-theme='dark'] .theme-toggle .icon-moon,
:root:not([data-theme='dark']) .theme-toggle .icon-sun {
  display: none;
}

@media (max-width: 860px) {
  .nav {
    display: none;
  }
  .header-actions {
    margin-left: auto;
  }
  .header-actions .btn {
    display: none;
  }
}

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

.hero {
  position: relative;
  padding-top: clamp(3rem, 7vw, 5.5rem);
  padding-bottom: clamp(3.5rem, 8vw, 6rem);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: -30% -10% auto -10%;
  height: 70vh;
  background: radial-gradient(45% 55% at 22% 30%, var(--hero-glow-a) 0%, transparent 70%),
    radial-gradient(40% 50% at 82% 20%, var(--hero-glow-b) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero .wrap {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.hero-copy h1 {
  font-size: clamp(2.25rem, 5.6vw, 3.65rem);
}

.hero-copy h1 .accent {
  color: var(--accent);
}

.hero-lead {
  margin-top: 1.25rem;
  font-size: clamp(1.0625rem, 1.9vw, 1.25rem);
  color: var(--muted);
  max-width: 32rem;
}

.badge-row {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4375rem 0.9375rem 0.4375rem 0.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--outline-variant);
  border-radius: var(--radius-pill);
  background: var(--surface-low);
  font-size: 0.875rem;
  color: var(--muted);
}

.badge-row .dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  margin-left: 0.375rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
  margin-top: 2rem;
}

.hero-note {
  margin-top: 1.125rem;
  font-size: 0.9375rem;
  color: var(--muted);
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-top: 2.25rem;
  padding-top: 2rem;
  border-top: 1px solid var(--outline-variant);
}

.hero-points li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9375rem;
  color: var(--muted);
}

.hero-points svg {
  width: 18px;
  height: 18px;
  color: var(--primary);
  flex-shrink: 0;
}

@media (max-width: 900px) {
  .hero .wrap {
    grid-template-columns: 1fr;
    text-align: left;
  }
  /* The mockup stays *below* the copy on narrow screens. It's ~610px tall —
     putting it first would push the headline and the CTA off the first
     screen, which is the one thing the hero exists to show. */
  .hero-visual {
    justify-self: center;
    margin-top: 3rem;
  }
}

/* --- Phone mockup (CSS-drawn app preview) -------------------------------- */

.hero-visual {
  display: flex;
  justify-content: center;
  /* Not `stretch`: the phone sizes itself from `aspect-ratio`, and stretching
     it against an auto-height flex line collapses it to nothing. */
  align-items: center;
}

.phone {
  position: relative;
  width: min(300px, 78vw);
  aspect-ratio: 300 / 610;
  padding: 11px;
  border-radius: 42px;
  background: linear-gradient(160deg, #2b3450, #12172a);
  box-shadow: var(--shadow-lg);
}

.phone::after {
  content: '';
  position: absolute;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  width: 92px;
  height: 22px;
  border-radius: var(--radius-pill);
  background: #12172a;
  z-index: 2;
}

.phone-screen {
  height: 100%;
  border-radius: 32px;
  background: var(--bg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--outline-variant);
}

.mock-appbar {
  padding: 2.75rem 1rem 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.875rem;
  font-weight: 600;
}

.mock-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary-container);
  color: var(--on-primary-container);
  display: grid;
  place-items: center;
  font-size: 0.6875rem;
  font-weight: 700;
}

.mock-body {
  flex: 1;
  padding: 0.25rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  overflow: hidden;
}

.mock-field {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 0.75rem;
  border-radius: var(--radius-btn);
  background: var(--surface-lowest);
  border: 1px solid var(--outline-variant);
  font-size: 0.75rem;
  color: var(--muted);
}

.mock-field--active {
  border-color: var(--primary);
  border-width: 2px;
  padding: calc(0.625rem - 1px) calc(0.75rem - 1px);
  color: var(--primary);
  font-weight: 600;
}

.mock-field svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.mock-btn {
  margin-top: 0.125rem;
  padding: 0.625rem;
  border-radius: var(--radius-btn);
  background: var(--accent);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  text-align: center;
  letter-spacing: 0.03em;
}

.mock-label {
  margin-top: 0.375rem;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
}

.mock-card {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.625rem;
  border-radius: var(--radius-card);
  background: var(--surface-low);
  border: 1px solid var(--outline-variant);
}

.mock-card .mock-photo {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--accent-container);
  color: var(--on-accent-container);
}

.mock-card .mock-name {
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.3;
}

.mock-card .mock-meta {
  font-size: 0.6875rem;
  color: var(--muted);
  line-height: 1.4;
}

.mock-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.25rem;
  padding: 0.125rem 0.4375rem;
  border-radius: 6px;
  background: var(--primary-container);
  color: var(--on-primary-container);
  font-size: 0.625rem;
  font-weight: 600;
}

.mock-chip svg {
  width: 11px;
  height: 11px;
}

/* --- Cards --------------------------------------------------------------- */

.grid {
  display: grid;
  gap: 1.25rem;
}

.grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid--4 {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 900px) {
  .grid--3,
  .grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .grid--3,
  .grid--4 {
    grid-template-columns: 1fr;
  }
}

.card {
  padding: 1.75rem;
  background: var(--surface-low);
  border: 1px solid var(--outline-variant);
  border-radius: var(--radius-card);
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.section--tint .card {
  background: var(--surface);
}

.card:hover {
  border-color: var(--outline);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.card h3 {
  font-size: 1.1875rem;
  margin-bottom: 0.625rem;
}

.card p {
  color: var(--muted);
  font-size: 0.9688rem;
}

.card-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 1.125rem;
  border-radius: var(--radius-btn);
  background: var(--primary-container);
  color: var(--on-primary-container);
}

.card-icon svg {
  width: 24px;
  height: 24px;
}

.card-icon--accent {
  background: var(--accent-container);
  color: var(--on-accent-container);
}

/* --- Steps --------------------------------------------------------------- */

.step-num {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 1.125rem;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 700;
}

/* --- Services ------------------------------------------------------------ */

.service-group {
  padding: 1.75rem;
  border: 1px solid var(--outline-variant);
  border-radius: var(--radius-card);
  background: var(--surface-low);
}

.section--tint .service-group {
  background: var(--surface);
}

.service-group h3 {
  font-size: 1.125rem;
  margin-bottom: 0.375rem;
}

.service-group > p {
  color: var(--muted);
  font-size: 0.875rem;
  margin-bottom: 1.125rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  padding: 0.3125rem 0.75rem;
  border: 1px solid var(--outline-variant);
  border-radius: 8px;
  background: var(--surface-container);
  color: var(--ink);
  font-size: 0.8125rem;
}

.tag--more {
  background: transparent;
  color: var(--muted);
  border-style: dashed;
}

/* --- Split (workers section) --------------------------------------------- */

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

@media (max-width: 900px) {
  .split {
    grid-template-columns: 1fr;
  }
}

.check-list li {
  display: flex;
  gap: 0.875rem;
  padding-block: 0.875rem;
  border-bottom: 1px solid var(--outline-variant);
}

.check-list li:last-child {
  border-bottom: 0;
}

.check-list svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  color: var(--primary);
  margin-top: 0.1875rem;
}

.check-list strong {
  display: block;
  font-size: 1rem;
}

.check-list span {
  color: var(--muted);
  font-size: 0.9375rem;
}

/* --- Plan card ----------------------------------------------------------- */

.plan-card {
  padding: 2rem;
  border: 1px solid var(--outline-variant);
  border-radius: var(--radius-lg);
  background: var(--surface-low);
  box-shadow: var(--shadow-md);
}

.section--tint .plan-card {
  background: var(--surface);
}

.plan-flag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-pill);
  background: var(--accent-container);
  color: var(--on-accent-container);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.plan-price {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin: 1.125rem 0 0.375rem;
}

.plan-price .amount {
  font-size: 2.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.plan-price .unit {
  color: var(--muted);
  font-size: 1rem;
}

.plan-card > p {
  color: var(--muted);
  font-size: 0.9375rem;
}

.plan-list {
  margin: 1.5rem 0;
  display: grid;
  gap: 0.75rem;
}

.plan-list li {
  display: flex;
  gap: 0.625rem;
  align-items: flex-start;
  font-size: 0.9375rem;
}

.plan-list svg {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
  margin-top: 0.1875rem;
  color: var(--accent);
}

.plan-foot {
  margin-top: 1rem;
  font-size: 0.8125rem;
  color: var(--muted);
  text-align: center;
}

/* --- Trust badges -------------------------------------------------------- */

.badge-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.625rem;
  margin-top: 1.5rem;
}

.badge-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4375rem;
  padding: 0.4375rem 0.875rem;
  border-radius: 8px;
  border: 1px solid var(--outline-variant);
  background: var(--primary-container);
  color: var(--on-primary-container);
  font-size: 0.8125rem;
  font-weight: 600;
}

.badge-chip svg {
  width: 16px;
  height: 16px;
}

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

.faq {
  max-width: 46rem;
  margin-inline: auto;
}

.faq details {
  border: 1px solid var(--outline-variant);
  border-radius: var(--radius-card);
  background: var(--surface-low);
  margin-bottom: 0.75rem;
  overflow: hidden;
  transition: border-color 0.2s ease;
}

.section--tint .faq details {
  background: var(--surface);
}

.faq details[open] {
  border-color: var(--outline);
}

.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.125rem 1.375rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  list-style: none;
}

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

.faq summary::after {
  content: '';
  width: 10px;
  height: 10px;
  flex-shrink: 0;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 0.2s ease;
}

.faq details[open] summary::after {
  transform: rotate(-135deg) translate(-2px, -2px);
}

.faq .faq-body {
  padding: 0 1.375rem 1.25rem;
  color: var(--muted);
  font-size: 0.9688rem;
}

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

.cta-panel {
  position: relative;
  overflow: hidden;
  padding: clamp(2.5rem, 6vw, 4rem);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, #232b45 0%, var(--brand-navy) 55%, var(--brand-navy-deep) 100%);
  color: #f4f6fb;
  text-align: center;
  box-shadow: var(--shadow-md);
}

/* In light mode the navy panel is the contrast. In dark mode it would sit at
   almost exactly the page background, so lift it and give it an edge. */
:root[data-theme='dark'] .cta-panel {
  background: linear-gradient(145deg, #2f3a5c 0%, #262f4c 55%, #1f2740 100%);
  border: 1px solid var(--outline);
}

.cta-panel::before {
  content: '';
  position: absolute;
  inset: auto -20% -60% -20%;
  height: 320px;
  background: radial-gradient(50% 60% at 50% 50%, rgba(239, 83, 64, 0.25) 0%, transparent 70%);
  pointer-events: none;
}

.cta-panel > * {
  position: relative;
}

.cta-panel h2 {
  font-size: clamp(1.75rem, 4vw, 2.4rem);
}

.cta-panel p {
  margin: 1rem auto 0;
  max-width: 34rem;
  color: #aeb6cc;
}

.cta-panel .hero-cta {
  justify-content: center;
}

.cta-panel .btn--outline {
  color: #f4f6fb;
  border-color: rgba(244, 246, 251, 0.35);
}

.cta-panel .btn--outline:hover {
  background: rgba(244, 246, 251, 0.1);
  border-color: rgba(244, 246, 251, 0.6);
}

/* --- Download page (download.html) ------------------------------------- */

.download {
  position: relative;
  overflow: hidden;
  padding-block: clamp(2.5rem, 6vw, 4.5rem) var(--section-y);
}

.download::before {
  content: '';
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 60vh;
  background: radial-gradient(45% 55% at 25% 30%, var(--hero-glow-a) 0%, transparent 70%),
    radial-gradient(40% 50% at 78% 20%, var(--hero-glow-b) 0%, transparent 70%);
  pointer-events: none;
}

.download .wrap {
  position: relative;
}

.download-head {
  max-width: 36rem;
  margin-inline: auto;
  text-align: center;
}

.download-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.25rem;
  border-radius: 20px;
  box-shadow: var(--shadow-md);
}

.download-head h1 {
  font-size: clamp(2.1rem, 5.6vw, 3.25rem);
}

.download-head h1 .accent {
  color: var(--accent);
}

.download-head .hero-lead {
  margin-inline: auto;
}

.store-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 3vw, 1.5rem);
  max-width: 46rem;
  margin: clamp(2rem, 5vw, 3rem) auto 0;
}

/* An iPhone visitor sees "coming soon" first, so they don't hunt for it. */
:root[data-platform='ios'] .store-card--ios {
  order: -1;
}

.store-card {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: clamp(1.5rem, 4vw, 2rem);
  border: 1px solid var(--outline-variant);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.store-card--android {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--outline-variant));
}

.store-kicker {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}

.store-status {
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-pill);
  background: var(--surface-container);
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
}

/* Store badges — the black "Disponível no / Google Play" pill the stores use.
   Black in both themes, like the stores' own artwork; the grey hairline keeps
   it from dissolving into the navy dark-mode background. */
.store-badge {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  width: 100%;
  min-height: 64px;
  margin-top: auto;
  padding: 0.625rem 1.25rem;
  border: 1px solid #a6a6a6;
  border-radius: var(--radius-card);
  background: #000000;
  color: #ffffff;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.store-badge:hover {
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.store-badge-icon {
  flex: none;
  width: 34px;
  height: 34px;
}

.store-badge-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  text-align: left;
}

.store-badge-small {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.store-badge-big {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.store-badge[aria-disabled='true'] {
  opacity: 0.45;
  cursor: default;
}

.store-badge[aria-disabled='true']:hover {
  transform: none;
  box-shadow: none;
}

/* The QR stays dark-on-white in both themes — inverted codes don't scan on
   every phone camera. The white padding is the code's quiet zone. */
.store-qr {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.store-qr img {
  flex: none;
  width: 148px;
  height: 148px;
  padding: 10px;
  border-radius: var(--radius-card);
  background: #ffffff;
  border: 1px solid var(--outline-variant);
}

.store-qr p,
.store-soon p {
  color: var(--muted);
  font-size: 0.9375rem;
}

.store-soon {
  display: flex;
  align-items: center;
  flex: 1;
}

.download-note {
  margin-top: 2rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.9375rem;
}

@media (max-width: 680px) {
  .store-grid {
    grid-template-columns: 1fr;
  }
}

/* A QR code is for scanning from *another* screen. On a phone — where almost
   every visitor coming from social links is — it's just noise above the
   button they actually need. */
@media (hover: none) and (pointer: coarse) {
  .store-qr {
    display: none;
  }
}

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

.site-footer {
  border-top: 1px solid var(--outline-variant);
  background: var(--surface-lowest);
  padding-block: 3rem 2rem;
  font-size: 0.9375rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2.5rem;
}

@media (max-width: 960px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 760px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

.footer-grid p {
  margin-top: 1rem;
  color: var(--muted);
  max-width: 26rem;
}

.footer-grid h4 {
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 0.875rem;
}

.footer-grid ul li {
  margin-bottom: 0.5rem;
}

.footer-grid ul a {
  color: var(--ink);
}

.footer-grid ul a:hover {
  color: var(--accent);
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.social-link svg {
  flex: none;
}

.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--outline-variant);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.875rem;
}

/* --- Legal pages --------------------------------------------------------- */

.legal {
  max-width: 46rem;
  margin-inline: auto;
  padding-block: clamp(3rem, 7vw, 5rem);
}

.legal h1 {
  font-size: clamp(2rem, 5vw, 2.75rem);
}

.legal .updated {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.9375rem;
}

.legal h2 {
  margin-top: 2.75rem;
  font-size: 1.375rem;
}

.legal h3 {
  margin-top: 1.75rem;
  font-size: 1.0625rem;
}

.legal p,
.legal li {
  color: var(--muted);
  margin-top: 1rem;
}

.legal ul {
  list-style: disc;
  padding-left: 1.35rem;
}

/* Numbered procedures (the account-deletion steps) — order is meaningful, so
   they stay an <ol> rather than being flattened into bullets. */
.legal ol {
  list-style: decimal;
  padding-left: 1.35rem;
}

.legal ol li::marker {
  color: var(--accent);
  font-weight: 700;
}

.legal li {
  margin-top: 0.5rem;
}

.legal strong {
  color: var(--ink);
}

/* Callout box for the things a reader must not skim past (what we don't
   collect, how ratings stay private). Carried over from the policy page that
   used to live in prestix-api/public. */
.legal .note {
  margin: 1.5rem 0;
  padding: 1.125rem 1.25rem;
  background: var(--surface-low);
  border: 1px solid var(--outline-variant);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-card);
}

.legal .note p:first-child {
  margin-top: 0;
}

.legal code {
  padding: 0.1rem 0.35rem;
  border-radius: 5px;
  background: var(--surface-container);
  border: 1px solid var(--outline-variant);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.875em;
  color: var(--ink);
}

.legal table {
  width: 100%;
  /* Without a floor the 3-column table just squeezes on a phone until every
     cell wraps one word per line. Let it keep a readable width and scroll
     inside .table-scroll instead. */
  min-width: 34rem;
  margin-top: 1.25rem;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.legal .table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.legal th,
.legal td {
  text-align: left;
  padding: 0.75rem 0.875rem;
  border: 1px solid var(--outline-variant);
  vertical-align: top;
}

.legal th {
  background: var(--surface-low);
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.legal td {
  color: var(--muted);
}

/* --- 404 ----------------------------------------------------------------- */

.notfound {
  min-height: 62vh;
  display: grid;
  place-content: center;
  text-align: center;
  gap: 1rem;
  padding-block: 4rem;
}

.notfound .code {
  font-size: clamp(3.5rem, 12vw, 6rem);
  font-weight: 700;
  color: var(--accent);
  letter-spacing: -0.04em;
  line-height: 1;
}

/* --- Scroll reveal ------------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* --- Consent banner (js/analytics.js) ------------------------------------ */

.consent {
  position: fixed;
  z-index: 100;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  max-width: 34rem;
  margin-inline: auto;
  padding: 1rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--outline-variant);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-lg);
  font-size: 0.9rem;
}

.consent[hidden] {
  display: none;
}

.consent p {
  flex: 1 1 16rem;
  margin: 0;
}

.consent a {
  color: var(--primary);
}

.consent__actions {
  display: flex;
  gap: 0.5rem;
  margin-left: auto;
}
