/* ==========================================================================
   PottyGo marketing site
   Palette + radii mirror the app's design tokens (PottyGo/src/design/tokens.ts)
   No external fonts, no JS, no trackers — the page should feel like the app:
   calm, fast, quiet.
   ========================================================================== */

:root {
  /* From app tokens */
  --bg: #f5f3f0;            /* palette.background */
  --surface: #ffffff;       /* palette.surface */
  --surface-alt: #f0f7fa;   /* palette.surfaceAlt */
  --ink: #3a4f5c;           /* palette.textPrimary */
  --muted: #8b9faf;         /* palette.textMuted — large/decorative use only */
  --accent: #a8c5d1;        /* palette.accent */
  --accent-strong: #95b5c5; /* palette.accentStrong */
  --accent-light: #d5e5ed;  /* palette.accentLight */
  --border: #e5e3e0;        /* palette.border */
  --amber: #f5a94d;         /* palette.highlight — the star */
  --green: #a9d8b7;         /* palette.successStrong */
  --green-soft: #ddefe3;    /* palette.successSoft */
  --sand: #f5e6d3;          /* palette.accident */
  --lilac: #e5ddeb;         /* palette.refused */
  --pale-blue: #e5f2f7;     /* palette.dryCheck */

  /* Derived for web (app's textSecondary fails AA at body sizes) */
  --text-soft: #516675;
  --ink-deep: #2d3f4a;
  --accent-ink: #4a7085;    /* accent family, dark enough for small text (4.8:1 on cream) */
  --accent-heading: #5b809a;/* accent family, AA for large headings (3.8:1 on cream) */

  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --radius-xl: 24px;

  --shadow-soft: 0 10px 30px rgba(58, 79, 92, 0.08);
  --shadow-lift: 0 18px 50px rgba(58, 79, 92, 0.14);

  --container: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

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

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.015em; margin: 0 0 0.5em; }

p { margin: 0 0 1em; }

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

/* --- Accessibility helpers ---------------------------------------------- */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 10px 18px;
  border-radius: 0 0 var(--radius-sm) 0;
  z-index: 100;
}
.skip-link:focus { left: 0; }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

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

.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 999px; /* app radius.pill */
  font-weight: 650;
  font-size: 1rem;
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 6px 18px rgba(58, 79, 92, 0.25);
}
.btn-primary:hover { background: var(--ink-deep); }

.btn-secondary {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border);
}
.btn-secondary:hover { border-color: var(--accent-strong); }

.btn-small { padding: 9px 20px; font-size: 0.92rem; }

.btn-on-dark {
  background: #fff;
  color: var(--ink);
}
.btn-on-dark:hover { background: var(--pale-blue); }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(245, 243, 240, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(229, 227, 224, 0.7);
}

.nav {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 14px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 750;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  margin-right: auto;
}
.brand img { width: 34px; height: 34px; border-radius: 9px; }

.nav-links {
  display: flex;
  gap: 24px;
  font-size: 0.95rem;
  font-weight: 550;
}
.nav-links a {
  text-decoration: none;
  color: var(--text-soft);
}
.nav-links a:hover { color: var(--ink); }

@media (max-width: 719px) {
  .nav-links { display: none; }
}

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

.hero { padding: 72px 0 96px; overflow: hidden; }

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
/* let grid tracks shrink below content min-width (prevents mobile overflow) */
.hero-grid > *, .pillar > * { min-width: 0; }

.eyebrow {
  display: inline-block;
  max-width: 100%;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-soft);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 16px;
  margin-bottom: 22px;
}
.eyebrow .spark { color: var(--amber); font-size: 1rem; margin-right: 6px; }

.hero h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.3rem);
  font-weight: 780;
  margin-bottom: 20px;
}
.hero h1 .h1-accent {
  display: block;
  color: var(--accent-heading);
}

.hero-sub {
  font-size: 1.16rem;
  color: var(--text-soft);
  max-width: 34em;
  margin-bottom: 30px;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  margin-bottom: 16px;
}

.cta-note {
  font-size: 0.88rem;
  color: var(--text-soft);
}
.cta-note span { white-space: nowrap; }
.cta-note .dot { color: var(--muted); padding: 0 6px; }

@media (max-width: 899px) {
  .hero { padding: 48px 0 72px; }
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero-visual { justify-self: center; }
}

/* --- Phone mockup ----------------------------------------------------------- */

.hero-visual { position: relative; }

.phone {
  width: min(310px, 88vw);
  margin: 0 auto;
  background: var(--bg);
  border: 9px solid var(--ink);
  border-radius: 46px;
  box-shadow: var(--shadow-lift);
  position: relative;
  overflow: hidden;
}
.phone::before {
  /* notch */
  content: "";
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 96px;
  height: 22px;
  background: var(--ink);
  border-radius: 999px;
}

.phone-screen { padding: 48px 16px 22px; }

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.app-child {
  font-weight: 750;
  font-size: 1.02rem;
}
.app-child small {
  display: block;
  font-weight: 500;
  font-size: 0.72rem;
  color: var(--text-soft);
}

.avatars { display: flex; }
.avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid var(--bg);
  display: grid;
  place-items: center;
  font-size: 0.62rem;
  font-weight: 750;
  color: var(--ink);
  margin-left: -6px;
}
.avatar:first-child { margin-left: 0; }
.avatar.a1 { background: var(--green); }
.avatar.a2 { background: var(--accent-light); }
.avatar.a3 { background: var(--sand); }

.quick-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 8px 2px;
}

.log-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 14px;
}
.log-btn {
  border-radius: var(--radius-md);
  padding: 18px 12px 15px;
  font-weight: 700;
  font-size: 0.95rem;
  text-align: center;
}
.log-btn i {
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin: 0 auto 8px;
}
.log-win { background: var(--green-soft); }
.log-win i { background: var(--green); }
.log-attempt { background: var(--pale-blue); }
.log-attempt i { background: var(--accent-strong); }
.log-accident { background: var(--sand); }
.log-accident i { background: var(--amber); }
.log-dry { background: var(--lilac); }
.log-dry i { background: var(--accent); }

.mini-feed {
  background: var(--surface);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  box-shadow: var(--shadow-soft);
}
.feed-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.8rem;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}
.feed-row:last-child { border-bottom: 0; }
.feed-row .who { font-weight: 700; }
.feed-row .when { color: var(--muted); white-space: nowrap; }

/* floating chips */
.float-chip {
  position: absolute;
  background: var(--surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lift);
  padding: 12px 16px;
  font-size: 0.82rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 240px;
}
.float-chip .pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
}
.float-chip small {
  display: block;
  font-weight: 500;
  color: var(--text-soft);
}
.chip-sync { right: -4px; bottom: 84px; }
.chip-reminder { left: -14px; top: 112px; }
.chip-reminder .pulse { background: var(--amber); }

@media (max-width: 1020px) {
  .chip-sync { right: 0; }
  .chip-reminder { left: 0; }
}

/* --- Sections (shared) ----------------------------------------------------- */

.section { padding: 88px 0; }
.section-tight { padding: 64px 0; }

.kicker {
  font-size: 0.82rem;
  font-weight: 750;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent-ink);
  margin: 0 0 10px;
}

.section h2 {
  font-size: clamp(1.65rem, 3.2vw, 2.35rem);
  font-weight: 760;
  max-width: 22em;
}

.section-intro {
  color: var(--text-soft);
  font-size: 1.08rem;
  max-width: 40em;
}

.center { text-align: center; }
.center .section-intro, .center h2 { margin-left: auto; margin-right: auto; }

@media (max-width: 719px) {
  .section { padding: 64px 0; }
}

/* --- Reality (stats) -------------------------------------------------------- */

.reality { background: var(--surface-alt); }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 40px;
}
.stat-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 28px 26px;
  box-shadow: var(--shadow-soft);
}
.stat-card .stat-num {
  font-size: 2.1rem;
  font-weight: 780;
  letter-spacing: -0.02em;
  display: block;
  margin-bottom: 6px;
}
.stat-card p { margin: 0; color: var(--text-soft); font-size: 0.95rem; }

.sources {
  margin-top: 22px;
  font-size: 0.78rem;
  color: var(--text-soft);
}

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

/* --- How it works ------------------------------------------------------------ */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 40px;
  counter-reset: step;
}
.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  counter-increment: step;
  text-align: left;
}
.step::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent-light);
  color: var(--ink);
  font-weight: 750;
  margin-bottom: 14px;
}
.step h3 { font-size: 1.12rem; margin-bottom: 6px; }
.step p { margin: 0; color: var(--text-soft); font-size: 0.95rem; }

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

/* --- Pillars ------------------------------------------------------------------ */

.pillar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  padding: 56px 0;
}
.pillar-copy .section-intro { font-size: 1.02rem; }
.pillar-fine {
  font-size: 0.88rem;
  color: var(--text-soft);
  margin-top: 14px;
}

.pillar-visual { position: relative; }

.demo-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lift);
  padding: 26px;
  max-width: 420px;
  margin: 0 auto;
}
.demo-card .card-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-weight: 750;
  margin-bottom: 16px;
}
.demo-card .card-title span:last-child {
  font-size: 0.8rem;
  font-weight: 550;
  color: var(--muted);
}

/* big log buttons demo */
.log-grid-lg .log-btn { padding: 26px 12px 22px; font-size: 1.05rem; }
.note-chip {
  margin-top: 14px;
  background: var(--bg);
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 0.86rem;
  color: var(--text-soft);
  display: inline-block;
}

/* team timeline demo */
.team-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.94rem;
}
.team-row:last-of-type { border-bottom: 0; }
.team-row .avatar { width: 34px; height: 34px; font-size: 0.72rem; margin: 0; border: 0; }
.team-row .what { flex: 1; }
.team-row .what b { font-weight: 700; }
.team-row .what small { display: block; color: var(--text-soft); font-size: 0.8rem; }
.team-row .when { color: var(--muted); font-size: 0.8rem; white-space: nowrap; }
.tag {
  display: inline-block;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 10px;
  vertical-align: 1px;
}
.tag-win { background: var(--green-soft); }
.tag-attempt { background: var(--pale-blue); }
.tag-dry { background: var(--lilac); }

.shared-reminder {
  margin-top: 16px;
  background: var(--surface-alt);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 0.86rem;
  display: flex;
  gap: 10px;
  align-items: center;
}
.shared-reminder .bell { color: var(--amber); font-size: 1rem; }

/* long-arc chart demo */
.bars {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 150px;
  padding: 8px 4px 0;
}
.bar {
  flex: 1;
  background: var(--green);
  border-radius: 8px 8px 4px 4px;
  min-height: 8px;
}
.bar.dip { background: var(--sand); }
.bars-caption {
  margin: 14px 0 0;
  font-size: 0.84rem;
  color: var(--text-soft);
  text-align: center;
}

@media (max-width: 899px) {
  .pillar { grid-template-columns: 1fr; gap: 36px; padding: 44px 0; }
  .pillar-visual { order: 2; }
}

/* --- Early days / testimonials ---------------------------------------------- */

.text-link {
  font-weight: 650;
  text-decoration-color: var(--accent-strong);
  text-underline-offset: 3px;
}

.quote-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 40px;
  text-align: left;
}
.quote-card {
  margin: 0;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: 26px 28px;
}
.quote-card blockquote {
  margin: 0 0 12px;
  font-size: 1.02rem;
  line-height: 1.6;
}
.quote-card figcaption {
  color: var(--text-soft);
  font-size: 0.9rem;
}

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

/* --- Coming next ---------------------------------------------------------------- */

.coming { background: var(--surface-alt); }

.coming-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 40px;
}
.coming-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 28px 26px;
  box-shadow: var(--shadow-soft);
  position: relative;
}
.coming-card h3 { font-size: 1.12rem; margin: 10px 0 8px; }
.coming-card p { margin: 0; color: var(--text-soft); font-size: 0.94rem; }
.coming-card .example {
  display: block;
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 0.86rem;
  color: var(--ink);
  margin-bottom: 12px;
  font-style: italic;
}
.badge {
  display: inline-block;
  background: var(--sand);
  color: var(--ink);
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 4px 12px;
}

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

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

.trust-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px 24px;
  margin-top: 36px;
  max-width: 820px;
}
.trust-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
}
.trust-item .check {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--ink);
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  font-weight: 800;
}
.trust-item p { margin: 0; font-size: 0.95rem; }
.trust-item p b { display: block; }

.disclaimer {
  margin-top: 26px;
  font-size: 0.88rem;
  color: var(--text-soft);
  max-width: 46em;
}

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

/* --- Founder note -------------------------------------------------------------------- */

.founder-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-soft);
  padding: 44px 48px;
  max-width: 760px;
  margin: 0 auto;
}
.founder-card blockquote {
  margin: 0 0 18px;
  font-size: 1.14rem;
  line-height: 1.7;
}
.founder-card figcaption {
  color: var(--text-soft);
  font-size: 0.94rem;
}
.founder-card .star { color: var(--amber); }

@media (max-width: 719px) {
  .founder-card { padding: 32px 26px; }
}

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

.faq-list { max-width: 760px; margin: 36px auto 0; text-align: left; }

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  overflow: hidden;
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  font-weight: 650;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--accent-strong);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .faq-body {
  padding: 0 22px 20px;
  color: var(--text-soft);
  font-size: 0.97rem;
}
.faq-item .faq-body p { margin: 0 0 0.6em; }
.faq-item .faq-body p:last-child { margin: 0; }

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

.final-cta {
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius-xl);
  padding: 64px 32px;
  text-align: center;
}
.final-cta h2 { color: #fff; margin-left: auto; margin-right: auto; }
.final-cta p {
  color: var(--accent-light);
  max-width: 36em;
  margin: 0 auto 28px;
}
.final-cta .cta-row { justify-content: center; margin-bottom: 0; }
.final-cta a.text-link { color: var(--accent-light); }

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

.site-footer {
  padding: 48px 0 56px;
  border-top: 1px solid var(--border);
  margin-top: 88px;
}
.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
  justify-content: space-between;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 750;
}
.footer-brand img { width: 28px; height: 28px; border-radius: 7px; }
.footer-brand small {
  display: block;
  font-weight: 500;
  color: var(--text-soft);
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 0.92rem;
}
.footer-links a { color: var(--text-soft); text-decoration: none; }
.footer-links a:hover { color: var(--ink); text-decoration: underline; }
.copyright {
  width: 100%;
  font-size: 0.82rem;
  color: var(--text-soft);
  margin-top: 8px;
}
