/* What if We — marketing landing page
   Tokens mirror the app's shipped theme (lib/theme.dart), light-only. */

:root {
  --bg: #F4F6F8;            /* cool stone page background */
  --surface: #FFFFFF;
  --primary: #44403C;       /* charcoal */
  --primary-dark: #292524;
  --secondary: #64748B;     /* slate */
  --text: #1E293B;
  --border: #E2E8F0;
  --border-soft: #F1F5F9;
  --accent: #C69C6D;        /* muted gold */
  --green-1: #E8F5E9;
  --green-2: #C8E6C9;
  --green-3: #A5D6A7;
  --green-4: #4CAF50;
  --green-deep: #2E7D32;
  --radius: 16px;
  --radius-pill: 100px;
  --maxw: 1280px;
  --gutter: 48px;
  --shadow-card: 0 1px 2px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.04);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Lato', -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }
h1, h2, h3 { margin: 0 0 .5em; color: var(--primary-dark); }
h1 { font-size: clamp(2.4rem, 5.2vw, 3.6rem); font-weight: 300; letter-spacing: -1.5px; line-height: 1.12; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.25rem); font-weight: 300; letter-spacing: -0.5px; }
h3 { font-size: 1.05rem; font-weight: 700; }
p { margin: 0 0 1em; }

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

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

.section-inner { max-width: var(--maxw); margin: 0 auto; padding: 72px var(--gutter); }
.section-narrow { max-width: 760px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 10px 22px;
  border-radius: var(--radius-pill);
  font: 700 0.95rem/1 'Lato', sans-serif;
  text-decoration: none; cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--primary); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--secondary); background: var(--surface); }
.btn-lg { min-height: 52px; padding: 14px 30px; font-size: 1.05rem; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(244, 246, 248, .85);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 14px var(--gutter);
  display: flex; align-items: center; gap: 32px;
}
.nav-logo { display: flex; align-items: center; }
.nav-logo img { width: 150px; height: auto; }
.nav-links { display: flex; gap: 28px; flex: 1; }
.nav-links a {
  text-decoration: none; color: var(--secondary);
  font-weight: 600; font-size: .95rem; letter-spacing: .2px;
}
.nav-links a:hover { color: var(--primary); }
.nav-cta { display: flex; gap: 10px; }

/* ---------- Hero ---------- */
.hero { overflow: hidden; }
.hero-inner {
  max-width: var(--maxw); margin: 0 auto;
  padding: 72px var(--gutter) 88px;
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: 56px; align-items: center;
}
.brandline {
  font-style: italic; color: var(--secondary);
  font-size: 1.05rem; margin-bottom: 14px; letter-spacing: .3px;
}
.hero-sub { font-size: 1.15rem; color: var(--secondary); max-width: 34em; text-wrap: pretty; }
.cta-row { display: flex; gap: 14px; flex-wrap: wrap; margin: 26px 0 14px; }
.trust-line { color: var(--secondary); font-size: .9rem; }

/* ---------- Phone frame (echoes the app's desktop bezel) ---------- */
.hero-demo { justify-self: center; text-align: center; }
.demo-callout {
  display: inline-block; margin-bottom: 14px;
  background: var(--primary-dark); color: #fff;
  font-weight: 700; font-size: .9rem;
  padding: 8px 16px; border-radius: var(--radius-pill);
}
.phone {
  position: relative;
  width: min(393px, 100%);
  margin: 0 auto;
  background: linear-gradient(145deg, #8A8784, #656563 25%, #4A4947 50%, #656563 75%, #8A8784);
  border-radius: 55px;
  padding: 8px;
  box-shadow:
    0 2px 6px rgba(0,0,0,.12),
    0 12px 28px rgba(0,0,0,.16),
    0 32px 64px rgba(0,0,0,.18);
  text-align: left;
}
.phone-notch {
  position: absolute; top: 18px; left: 50%; transform: translateX(-50%);
  width: 108px; height: 26px; border-radius: 20px; background: #1C1C1E; z-index: 2;
}
.phone-screen {
  background: var(--bg);
  border-radius: 47px;
  padding: 58px 16px 22px;
  min-height: 560px;
}
.demo-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; margin-bottom: 14px; padding: 0 4px;
}
.demo-trip { font-weight: 900; font-size: 1.1rem; margin: 0; color: var(--primary-dark); }
.demo-meta { color: var(--secondary); font-size: .8rem; margin: 0; }

.avatars { display: flex; }
.avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--c, var(--secondary)); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .72rem; font-weight: 900;
  border: 2px solid var(--bg);
  flex: none;
}
.avatars .avatar + .avatar { margin-left: -8px; }
.avatar-you { background: var(--primary); }

.demo-controls {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 12px; padding: 0 4px;
}
.demo-controls-label { font-size: .8rem; font-weight: 700; color: var(--secondary); }
.seg {
  display: inline-flex; background: var(--border-soft);
  border: 1px solid var(--border); border-radius: var(--radius-pill); padding: 3px;
}
.seg button {
  border: 0; background: transparent; color: var(--secondary);
  font: 700 .8rem 'Lato', sans-serif; padding: 7px 12px;
  border-radius: var(--radius-pill); cursor: pointer; min-height: 32px;
}
.seg button.on { background: var(--primary); color: #fff; }

.demo-grid-wrap {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 10px 10px;
}
/* minmax(0,…) tracks: a bare 1fr can't shrink below the 44px day cells,
   and 7 of them (~402px with gaps) overflow phone viewports. */
.dow {
  display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px;
  text-align: center; font-size: .68rem; font-weight: 700; color: var(--secondary);
  margin-bottom: 6px;
}
.demo-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.day {
  position: relative;
  aspect-ratio: 1; min-height: 44px;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: var(--surface);
  font: 400 .82rem 'Lato', sans-serif; color: var(--text);
  cursor: pointer; padding: 0;
  transition: transform .12s ease, box-shadow .12s ease;
}
.day:hover:not(:disabled) { transform: scale(1.06); box-shadow: 0 2px 8px rgba(0,0,0,.1); z-index: 1; }
.day:disabled { visibility: hidden; }
.day.c1 { background: var(--green-1); border-color: transparent; }
.day.c2 { background: var(--green-2); border-color: transparent; }
.day.c3 { background: var(--green-3); border-color: transparent; }
.day.c4 { background: var(--green-4); border-color: transparent; color: #fff; font-weight: 700; }
.day.c5 { background: var(--green-deep); border-color: transparent; color: #fff; font-weight: 700; }
.day[aria-pressed="true"]::after {
  content: ""; position: absolute; inset: 0;
  border: 2.5px solid var(--primary); border-radius: 10px;
}
.day.best { box-shadow: 0 0 0 3px var(--green-deep), 0 0 14px rgba(46,125,50,.45); z-index: 1; }

.demo-result {
  min-height: 44px; margin: 12px 4px 4px;
  background: var(--green-1); border: 1px solid var(--green-3);
  border-radius: 12px; padding: 10px 14px;
  font-weight: 700; font-size: .9rem; color: var(--green-deep);
  display: flex; align-items: center;
}
.demo-legend { font-size: .72rem; color: var(--secondary); margin: 10px 4px 0; }
.legend-you {
  display: inline-block; width: 10px; height: 10px; border-radius: 3px;
  border: 2.5px solid var(--primary); vertical-align: -1px;
}
.noscript-note { color: var(--secondary); margin-top: 14px; font-size: .9rem; }

/* ---------- Cards / sections ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.how h2, .features h2, .faq h2 { text-align: center; margin-bottom: 40px; }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.step { position: relative; padding-top: 30px; }
.step-num {
  position: absolute; top: -18px; left: 22px;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; margin: 0;
  border: 3px solid var(--bg);
}
.step h3 { margin-top: 16px; }
.step p { color: var(--secondary); font-size: .95rem; margin-bottom: 0; }

/* little in-card mockups */
.mock {
  background: var(--bg); border: 1px solid var(--border-soft);
  border-radius: 12px; padding: 14px; font-size: .85rem;
}
.mock-cover {
  height: 64px; border-radius: 9px;
  background: linear-gradient(135deg, #3E5C50, #6E8B7B);
  display: flex; align-items: center; justify-content: center; font-size: 1.6rem;
}
.mock-trip-title { font-weight: 900; margin: 10px 0 0; color: var(--primary-dark); }
.mock-trip-sub { color: var(--secondary); margin: 0; font-size: .78rem; }

.mock-invite { text-align: center; }
.mock-invite-head { font-size: .78rem; font-weight: 700; color: var(--secondary); margin: 0 0 4px; }
.mock-invite-trip { font-weight: 900; font-size: 1rem; color: var(--primary-dark); margin: 0; }
.mock-invite-host { color: var(--secondary); font-size: .78rem; margin: 2px 0 10px; }
.mock-btn {
  display: inline-block; background: var(--primary); color: #fff;
  font-weight: 700; font-size: .78rem;
  padding: 7px 14px; border-radius: var(--radius-pill);
}
.mock-btn-confirm { background: var(--green-deep); }

.mock-heat { display: flex; gap: 4px; justify-content: center; margin-bottom: 12px; }
.mock-heat span {
  width: 30px; height: 30px; border-radius: 7px;
  background: var(--surface); border: 1px solid var(--border-soft);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .7rem; font-weight: 700; color: #fff;
}
.mock-heat .h1 { background: var(--green-1); }
.mock-heat .h2 { background: var(--green-3); }
.mock-heat .h4 { background: var(--green-deep); }
.mock-confirm { text-align: center; }

.mock-toast { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.mock-chatlink { background: #E9E9EB; border-radius: 16px 16px 16px 4px; padding: 8px; }
.mock-linkcard { background: var(--surface); border-radius: 10px; overflow: hidden; border: 1px solid var(--border); }
.mock-linkimg {
  height: 56px; background: linear-gradient(135deg, #3E5C50, #6E8B7B);
  display: flex; align-items: center; justify-content: center; font-size: 1.4rem;
}
.mock-linktext { padding: 8px 10px; }
.mock-linktext p { margin: 0; font-weight: 700; font-size: .8rem; color: var(--primary-dark); }
.mock-linkurl { color: var(--secondary) !important; font-weight: 400 !important; font-size: .72rem !important; }

.mock-preview { text-align: center; }
.mock-locked { text-align: center; }
.mock-locked-head { font-weight: 900; color: var(--green-deep); margin: 0 0 10px; }
.mock-cal-row { display: flex; gap: 8px; justify-content: center; }
.mock-chip {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-pill); padding: 5px 12px;
  font-size: .75rem; font-weight: 700; color: var(--primary);
}

.mock-whobrought p { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-weight: 700; }
.mock-whobrought p:last-child { margin-bottom: 0; }
.mock-whobrought .avatar { border-color: var(--bg); }
.mock-via {
  margin-left: auto; color: var(--secondary); font-weight: 400; font-size: .75rem;
  background: var(--border-soft); border-radius: var(--radius-pill); padding: 3px 9px;
}

.mock-mini-month { display: flex; gap: 5px; justify-content: center; margin-bottom: 10px; }
.mock-mini-month span {
  width: 30px; height: 30px; border-radius: 7px;
  background: var(--surface); border: 1px solid var(--border-soft);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .7rem; font-weight: 700; color: var(--primary-dark);
}
.mock-mini-month .m1 { background: var(--green-3); }
.mock-mini-month .m2 { background: var(--green-deep); color: #fff; }
.mock-multical-sub { text-align: center; color: var(--secondary); font-size: .75rem; margin: 0; }

.feat h3 { margin-top: 16px; }
.feat p { color: var(--secondary); font-size: .95rem; margin-bottom: 0; }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }

/* ---------- Differentiator ---------- */
.different { background: var(--surface); border-block: 1px solid var(--border); }
.diff-grid {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: 56px; align-items: center;
}
.diff-copy p { color: var(--secondary); font-size: 1.05rem; max-width: 32em; }
.diff-copy strong { color: var(--primary-dark); }
.diff-aside { font-style: italic; }
.diff-chart { padding: 28px; }
.diff-chart-title { font-weight: 900; color: var(--primary-dark); margin-bottom: 18px; }
.diff-row {
  display: grid; grid-template-columns: 58px 1fr 64px;
  gap: 12px; align-items: center; margin-bottom: 14px;
  font-size: .9rem; font-weight: 700; color: var(--secondary);
}
.diff-bar { background: var(--border-soft); border-radius: var(--radius-pill); height: 14px; overflow: hidden; }
.diff-bar i { display: block; height: 100%; width: var(--w); background: var(--green-3); border-radius: inherit; }
.diff-row-best { color: var(--green-deep); }
.diff-row-best .diff-bar i { background: var(--green-deep); }
.diff-n { text-align: right; }
.diff-note { color: var(--secondary); font-size: .85rem; margin: 16px 0 0; }

/* ---------- FAQ ---------- */
.faq details {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); margin-bottom: 12px;
  padding: 0 24px;
}
.faq summary {
  cursor: pointer; font-weight: 700; color: var(--primary-dark);
  padding: 18px 0; list-style: none; position: relative; min-height: 44px;
  display: flex; align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; margin-left: auto; color: var(--secondary);
  font-size: 1.3rem; font-weight: 400;
}
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--secondary); margin: 0 0 18px; }

/* ---------- Final CTA / footer ---------- */
.final-cta { text-align: center; }
.final-cta .section-inner { padding-block: 88px; }
.final-cta h2 { font-style: italic; font-weight: 300; font-size: clamp(2rem, 4.5vw, 3rem); }
.final-cta p { color: var(--secondary); font-size: 1.1rem; margin-bottom: 28px; }

.footer { border-top: 1px solid var(--border); background: var(--surface); }
.footer-inner { padding-block: 40px; text-align: center; }
.footer-inner img { opacity: .85; width: 110px; }
.footer-tag { color: var(--secondary); font-style: italic; font-size: .9rem; margin: 10px 0 16px; }
.footer nav { display: flex; gap: 24px; justify-content: center; margin-bottom: 14px; }
.footer nav a { color: var(--secondary); font-weight: 600; font-size: .9rem; text-decoration: none; }
.footer nav a:hover { color: var(--primary); }
.footer-fine { color: var(--secondary); font-size: .8rem; margin: 0; }

/* ---------- Scroll reveal (JS adds .reveal; CSS no-ops without it) ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .section-inner, .nav-inner, .hero-inner { padding-inline: 28px; }
}
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: minmax(0, 1fr); gap: 44px; padding-top: 48px; text-align: center; }
  .hero-demo { width: 100%; max-width: 440px; justify-self: center; }
  .hero-sub { margin-inline: auto; }
  .cta-row { justify-content: center; }
  .diff-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .steps, .feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav-links { display: none; }
}
@media (max-width: 640px) {
  .steps, .feature-grid { grid-template-columns: minmax(0, 1fr); }
  .section-inner { padding: 56px 20px; }
  .hero-inner { padding-inline: 16px; }
  .nav-inner { padding-inline: 16px; gap: 12px; }
  .nav-logo { min-width: 0; }
  .nav-logo img { width: 120px; }
  .btn { padding-inline: 16px; }
  .nav-cta .btn { padding-inline: 12px; font-size: .9rem; }
  .phone-screen { min-height: 520px; }
  /* "Camping weekend 🏕️" + 5 avatars need the full row at phone widths */
  .demo-trip { font-size: 1rem; }
  .demo-head { gap: 8px; }
  /* 44px squares don't fit 7-up in the bezel on phones; stay square and scale down. */
  .day { min-height: 0; }
}
