/* --------------------------------------------------------------------------
   Northbound — shared + landing
   Legal pages (privacy, terms, etc.) reuse .site-header, .legal-page, .site-footer
   -------------------------------------------------------------------------- */

:root {
  --bg: #ffffff;
  --text: #1a1d26;
  --muted: #5c6370;
  --accent: #38598d;
  --accent-soft: rgba(56, 89, 141, 0.12);
  --accent-warm: #e88a3a;
  --warm-soft: rgba(232, 138, 58, 0.1);
  --border: #e8ebf2;
  --shadow: 0 12px 40px rgba(26, 36, 56, 0.08);
  --shadow-soft: 0 4px 20px rgba(26, 36, 56, 0.06);
  --radius-lg: 20px;
  --radius-md: 14px;
  --max-content: 36rem;
}

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

html {
  scroll-behavior: smooth;
  height: 100%;
}

body {
  margin: 0;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-size-adjust: 100%;
  min-height: 100%;
  width: 100%;
}

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

a:hover {
  text-decoration: underline;
}

/* ----- Landing page ----- */

.page-landing {
  /* Shared horizontal rhythm (safe areas + symmetric minimum gutter) */
  --page-gutter: max(1.25rem, env(safe-area-inset-left));
  --page-gutter-end: max(1.25rem, env(safe-area-inset-right));
  min-height: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #fafbfd 0%, #ffffff 35%, #fffdfb 100%);
  overflow-x: hidden;
  width: 100%;
}

.landing-main {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
}

.page-landing .site-header {
  flex-shrink: 0;
  width: min(40rem, 100%);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: max(1rem, env(safe-area-inset-top)) var(--page-gutter-end) 1rem var(--page-gutter);
  box-sizing: border-box;
}

.page-landing .site-header.site-header--centered {
  justify-content: center;
}

.brand {
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
  color: var(--accent);
}

body:not(.page-landing) .site-header {
  width: min(42rem, 100%);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: max(1rem, env(safe-area-inset-top)) var(--page-gutter-end) 1rem var(--page-gutter);
  box-sizing: border-box;
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
}

.main-nav a {
  font-size: 0.9rem;
  color: var(--muted);
}

.main-centered {
  width: 100%;
  max-width: min(40rem, 100%);
  margin-inline: auto;
  padding: 0 var(--page-gutter-end) 3rem var(--page-gutter);
  box-sizing: border-box;
}

/* Hero */
.hero--centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.25rem 0 1.75rem;
}

.hero-headline {
  margin: 0 0 1rem;
  width: 100%;
  font-size: clamp(1.75rem, 5vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  overflow-wrap: break-word;
  word-wrap: break-word;
  text-wrap: balance;
}

.hero-sub {
  margin: 0;
  width: 100%;
  max-width: 32rem;
  color: var(--muted);
  font-size: 1.05rem;
}

.cta-primary {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin-top: 1.5rem;
  margin-inline: auto;
  padding: 0.95rem 1.45rem;
  font-size: clamp(0.9rem, 3.9vw, 1rem);
  font-weight: 700;
  color: #fff;
  text-align: center;
  line-height: 1.35;
  background: linear-gradient(135deg, #234e8a 0%, #173a67 100%);
  border: none;
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(23, 58, 103, 0.28), 0 0 0 1px rgba(255, 255, 255, 0.12) inset;
  cursor: default;
  user-select: none;
  overflow-wrap: break-word;
}

.cta-subtext {
  margin: 0.45rem 0 0;
  width: 100%;
  font-size: 0.88rem;
  color: var(--muted);
}

.app-store-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.05rem;
  margin-top: 0.5rem;
  padding: 0.48rem 0.85rem 0.55rem;
  border-radius: 0.55rem;
  background: #111215;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 4px 12px rgba(15, 18, 24, 0.22);
  user-select: none;
  opacity: 0.7;
  filter: grayscale(0.22);
}

.badge-top {
  font-size: 0.58rem;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
  opacity: 0.8;
}

.badge-bottom {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.05;
}

.badge-note {
  margin: 0.3rem 0 0;
  width: 100%;
  font-size: 0.74rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(92, 99, 112, 0.88);
}

/* Screenshots — full-width strip (no 100vw; prevents iOS horizontal page scroll) */
.section--screenshots {
  width: 100%;
  max-width: min(40rem, 100%);
  margin-inline: auto;
  padding: 0.35rem var(--page-gutter-end) 1.75rem var(--page-gutter);
  position: relative;
  z-index: 0;
  box-sizing: border-box;
}

.screenshots-scroll {
  --track-pad: clamp(0.5rem, 2.2vw, 0.85rem);
  --mockup-gap: clamp(0.5rem, 2.2vw, 0.9rem);
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: var(--mockup-gap);
  overflow-x: auto;
  overflow-y: visible;
  width: 100%;
  padding: 0.5rem var(--track-pad) 1rem;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--track-pad);
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
}

.screenshots-scroll::after {
  content: "";
  flex: 0 0 var(--track-pad);
}

.screenshots-scroll::-webkit-scrollbar {
  height: 6px;
}

.screenshots-scroll::-webkit-scrollbar-thumb {
  background: rgba(26, 29, 38, 0.2);
  border-radius: 999px;
}

.phone-mockup {
  flex: 0 0 auto;
  flex-shrink: 0;
  scroll-snap-align: center;
  margin: 0;
}

.phone-mockup-frame {
  /* One sizing rule for all phones: stable on 360/375/390/430 widths */
  width: clamp(8.5rem, 31vw, 10.75rem);
  padding: 8px 8px 10px;
  background: linear-gradient(160deg, #f0f2f8 0%, #e4e8f2 100%);
  border-radius: clamp(18px, 5vw, 26px);
  box-shadow: var(--shadow), 0 0 0 1px rgba(0, 0, 0, 0.04);
}

.phone-mockup-notch {
  width: clamp(52px, 32%, 72px);
  height: clamp(16px, 4vw, 22px);
  margin: 0 auto 6px;
  background: #1a1d26;
  border-radius: 0 0 14px 14px;
  opacity: 0.92;
}

.phone-mockup-screen {
  aspect-ratio: 9 / 19.5;
  border-radius: clamp(14px, 3.5vw, 18px);
  overflow: hidden;
  background: #d8dce6;
}

.screenshot-placeholder {
  width: 100%;
  height: 100%;
  min-height: 100%;
  background: linear-gradient(145deg, #e2e6ef 0%, #c8ceda 50%, #dde1ea 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.screenshot-placeholder::after {
  content: attr(data-placeholder-label);
  font-size: clamp(0.62rem, 2.8vw, 0.75rem);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(90, 98, 112, 0.55);
}

/* When you add real images, use:
   .phone-mockup-screen .screenshot-img { width:100%; height:100%; object-fit:cover; display:block; }
   and hide/remove .screenshot-placeholder */

.screenshot-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (min-width: 480px) {
  .phone-mockup-frame {
    width: clamp(9.5rem, 30vw, 11.75rem);
  }
}

@media (min-width: 640px) {
  .phone-mockup-frame {
    width: clamp(10rem, 24vw, 12.75rem);
  }

  .screenshots-scroll {
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: clamp(0.75rem, 1.6vw, 1rem);
  }

  .phone-mockup-screen {
    min-height: 0;
  }
}

/* Features */
.section {
  padding: 2rem 0;
}

.section-title {
  margin: 0 0 1.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  text-align: center;
}

.feature-blocks {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.feature-block {
  padding: 1.25rem 1.35rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  text-align: center;
}

.feature-block__title {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
  font-weight: 600;
  overflow-wrap: break-word;
}

.feature-block__desc {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
  overflow-wrap: break-word;
}

/* Trust */
.section--trust {
  text-align: center;
  padding: 2.25rem 1.25rem;
  margin-top: 0.5rem;
  background: linear-gradient(135deg, var(--accent-soft) 0%, var(--warm-soft) 100%);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(56, 89, 141, 0.08);
}

.trust-title {
  margin: 0 0 0.6rem;
  font-size: 1.2rem;
  font-weight: 700;
}

.trust-sub {
  margin: 0 auto;
  max-width: 26rem;
  font-size: 0.95rem;
  color: var(--muted);
}

/* Footer */
.page-landing .site-footer {
  flex-shrink: 0;
  width: min(40rem, 100%);
  margin-inline: auto;
  padding: 2rem var(--page-gutter-end) max(2.5rem, env(safe-area-inset-bottom)) var(--page-gutter);
  border-top: 1px solid var(--border);
  background: #fff;
  box-sizing: border-box;
}

.page-landing .site-footer--centered {
  margin: 0;
  text-align: center;
}

.page-landing .footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1.25rem;
  width: 100%;
  margin: 0 0 1rem;
}

.page-landing .footer-nav a {
  font-size: 0.9rem;
  color: var(--muted);
}

.page-landing .footer-nav a:hover {
  color: var(--accent);
}

.page-landing .footer-copy {
  margin: 0 auto;
  max-width: 40rem;
  font-size: 0.8rem;
  color: var(--muted);
}

/* Scroll fade-in (opacity only — avoids transform overlap with hero on mobile) */
.reveal {
  opacity: 0;
  transition: opacity 0.55s ease;
}

.reveal.visible {
  opacity: 1;
}

.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;
}

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

body:not(.page-landing) {
  background: linear-gradient(180deg, #fafbfd 0%, #ffffff 50%);
  min-height: 100vh;
}

.legal-page {
  max-width: min(42rem, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.5rem 0 3rem;
}

.legal-content {
  padding: 1.5rem 1.35rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}

.legal-content h1 {
  margin-top: 0;
  font-size: 1.65rem;
}

.legal-content h3 {
  margin-top: 1.35rem;
  margin-bottom: 0.5rem;
  font-size: 1.05rem;
}

body:not(.page-landing) .site-footer {
  width: min(42rem, 100%);
  padding: 1.35rem var(--page-gutter-end) max(2rem, env(safe-area-inset-bottom)) var(--page-gutter);
  box-sizing: border-box;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-inline: auto;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-links a {
  font-size: 0.9rem;
  color: var(--muted);
}
