/* RallyAce marketing site — palette lifted directly from
   ralliace/lib/utils/themes/app_theme.dart's light ColorScheme, so this page
   reads as the same brand as the app, not a separate marketing skin. */

:root {
  --primary: #004324;
  --primary-container: #1a5c38;
  --on-primary-container: #90d2a5;
  --secondary-container: #fed255;
  --on-secondary-container: #735a00;
  --surface: #f8f9ff;
  --surface-container: #e5eeff;
  --surface-container-high: #dce9ff;
  --on-surface: #0b1c30;
  --on-surface-variant: #404941;
  --outline-variant: #c0c9bf;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 9999px;
  --max-width: 760px;
}

/* No dark-mode variant, deliberately — the app itself only has a light
   theme (ralliace/lib/utils/themes/app_theme.dart has no `dark` getter),
   and the logo (assets/logo.png) is dark navy/lime line art drawn for a
   light surface. A dark variant here would need a redrawn logo to match;
   until then, forcing light keeps the mark legible and this page
   consistent with the app's actual (light-only) brand. `color-scheme:
   light` below tells the browser not to substitute its own dark-mode
   form control / scrollbar colors on top of this. */
:root {
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  color: var(--on-surface);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.55;
}

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

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

header.site {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 20px 0;
  background: var(--surface);
  border-bottom: 1px solid var(--outline-variant);
}

header.site .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.brand img {
  height: 64px;
  width: auto;
  display: block;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  padding: 13px 26px;
  border-radius: var(--radius-md);
  background: var(--primary);
  color: #ffffff;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  white-space: nowrap;
}

.cta-button:hover {
  background: var(--primary-container);
}

main {
  flex: 1 0 auto;
  padding: 56px 0 40px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
}

/* Weight/tracking matched to the app's own largest type style,
   displayLarge (ralliace/lib/utils/themes/app_theme.dart) — 700/-0.88,
   not an independently-invented site-only style. */
h1 {
  font-size: 40px;
  line-height: 1.15;
  letter-spacing: -0.88px;
  font-weight: 700;
  margin: 12px 0 16px;
}

.lede {
  font-size: 18px;
  color: var(--on-surface-variant);
  max-width: 52ch;
  margin: 0 0 32px;
}

.badges {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 12px;
}

/* Styled like the standard App Store / Google Play store badges (dark
   pill, icon + two-line label). Links to /coming-soon rather than a real
   store listing, since neither exists yet. */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 14px;
  border-radius: var(--radius-md);
  background: #0a0a0a;
  color: #ffffff;
  border: 1px solid #1f1f1f;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.badge:hover {
  background: #1a1a1a;
  border-color: #333;
}

.badge svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.badge .label {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.badge .eyebrow-sm {
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #cfcfcf;
}

.badge .headline-sm {
  font-size: 16px;
  font-weight: 600;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.badges-note {
  font-size: 13px;
  color: var(--on-surface-variant);
  margin: 0 0 40px;
}

/* --- Waitlist form ---
   Input styling matches the app's InputDecorationTheme (app_theme.dart):
   radiusMd border in outline colour, 2px primary-coloured focus ring. */
.waitlist {
  margin: 0 0 40px;
  padding: 20px;
  background: var(--surface-container);
  border-radius: var(--radius-lg);
}

.waitlist h2 {
  font-size: 18px;
  margin: 0 0 4px;
}

.waitlist p {
  margin: 0 0 16px;
  color: var(--on-surface-variant);
  font-size: 14px;
}

.waitlist-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.waitlist-form input[type="email"] {
  flex: 1 1 220px;
  min-width: 0;
  padding: 13px 14px;
  font-size: 15px;
  font-family: inherit;
  color: var(--on-surface);
  background: var(--surface);
  border: 1px solid var(--outline-variant);
  border-radius: var(--radius-md);
}

.waitlist-form input[type="email"]:focus {
  outline: none;
  border-color: var(--primary);
  border-width: 2px;
  padding: 12px 13px;
}

.waitlist-form button {
  padding: 13px 22px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--primary);
  color: #ffffff;
  font-weight: 700;
  font-size: 15px;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
}

.waitlist-form button:hover {
  background: var(--primary-container);
}

.waitlist-form button:disabled {
  opacity: 0.6;
  cursor: default;
}

/* Honeypot — off-screen, not display:none (some bots skip fields hidden
   that way but still fill in ones merely positioned off-canvas). */
.waitlist-form .hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.waitlist-status {
  margin: 10px 0 0;
  font-size: 13.5px;
  min-height: 1.2em;
}

.waitlist-status[data-state="ok"] {
  color: var(--primary);
  font-weight: 600;
}

.waitlist-status[data-state="error"] {
  color: #ba1a1a;
}

.features {
  display: grid;
  gap: 16px;
  margin: 8px 0 8px;
  padding: 0;
  list-style: none;
}

.features li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px;
  background: var(--surface-container);
  border-radius: var(--radius-lg);
  /* Matches CardThemeData's elevation-2 shadow (app_theme.dart) — same
     soft green-tinted shadow, so these read as cards, not flat rectangles. */
  box-shadow: 0 2px 8px rgba(26, 92, 56, 0.04);
}

.features .dot {
  width: 8px;
  height: 8px;
  margin-top: 8px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
}

.features strong {
  display: block;
  margin-bottom: 2px;
}

.features p {
  margin: 0;
  color: var(--on-surface-variant);
  font-size: 15px;
}

footer.site {
  padding: 24px 0 40px;
  font-size: 14px;
  color: var(--on-surface-variant);
}

footer.site .footer-logo {
  display: block;
  height: 32px;
  width: auto;
  margin-bottom: 20px;
}

footer.site .footer-divider {
  border-top: 1px solid var(--outline-variant);
  margin-top: 20px;
}

footer.site .footer-bottom {
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

footer.site .links {
  display: flex;
  justify-content: flex-start;
  gap: 20px;
  flex-wrap: wrap;
}

footer.site a {
  text-decoration: none;
}

footer.site a:hover {
  text-decoration: underline;
}

/* --- Legal pages (privacy.html / terms.html) --- */

.legal h1 {
  font-size: 28px;
  margin-bottom: 4px;
}

.legal .meta {
  color: var(--on-surface-variant);
  font-size: 14px;
  margin-bottom: 32px;
}

.legal h2 {
  font-size: 19px;
  margin: 36px 0 12px;
  letter-spacing: -0.2px;
}

.legal p, .legal li {
  color: var(--on-surface-variant);
  font-size: 15.5px;
}

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

.legal table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
  font-size: 14px;
}

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

.legal th {
  color: var(--on-surface);
  font-weight: 700;
}

.legal ul {
  padding-left: 20px;
}

.back-link {
  display: inline-block;
  margin-bottom: 24px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

/* --- Coming soon page --- */

.coming-soon {
  text-align: center;
  max-width: 480px;
  margin: 0 auto;
}

.coming-soon .back-link {
  display: block;
  width: fit-content;
  text-align: left;
  margin-bottom: 28px;
}

.coming-soon .brand-logo {
  display: block;
  height: 72px;
  width: auto;
  margin: 0 auto 28px;
}

.coming-soon h1 {
  font-size: 32px;
  margin: 0 0 12px;
}

.coming-soon .lede {
  margin: 0 auto 36px;
  font-size: 16px;
}

.store-rows {
  display: grid;
  gap: 14px;
  text-align: left;
}

.store-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--outline-variant);
  background: var(--surface-container-low, var(--surface-container));
}

.store-row .icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: #0a0a0a;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.store-row .icon-wrap svg {
  width: 24px;
  height: 24px;
}

.store-row .title {
  font-weight: 700;
  font-size: 16px;
}

.store-row .status {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--primary);
}

/* --- Desktop / laptop scale-up ---
   Everything above is sized for the 760px mobile-first column. Above
   ~1024px that column just floats in a sea of blank space, so widen the
   working area and scale typography/layout to actually use it. The
   coming-soon "download card" is deliberately excluded (it hardcodes its
   own 480px max-width) since a narrow centered card is the right shape
   for that page at any viewport. */
@media (min-width: 1024px) {
  :root {
    --max-width: 1100px;
  }

  h1 {
    font-size: 52px;
  }

  .lede {
    font-size: 20px;
    max-width: 58ch;
  }

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

  .legal {
    max-width: 680px;
    margin: 0 auto;
  }

  /* The coming-soon card is centered mid-page at this width, so its
     in-flow "← Home" link ends up floating near the middle of the
     screen instead of reading as a page-level back nav. Pin it to the
     actual top-left corner of the viewport instead, same spot the
     other pages' header sits. */
  .coming-soon .back-link {
    position: fixed;
    top: 24px;
    left: 24px;
    margin-bottom: 0;
  }
}
