/* ==========================================================================
   Housome — Early Access Landing Page
   Design tokens carried over from the product's own design system:
   navy ink / cream shell / apricot warmth / teal companion.
   ========================================================================== */

:root {
  /* --- Brand colour tokens --- */
  --ink: #0d2b52;          /* navy — headings, primary CTA, nav */
  --ink-soft: #274a72;     /* lighter navy for secondary text on cream */
  --cream: #fff7ee;        /* shell background */
  --cream-deep: #fbecd9;   /* slightly deeper cream for card fields */
  --paper: #fffdf9;        /* near-white card surface */
  --apricot: #f2765b;      /* warmth / attention accent — never the CTA */
  --apricot-soft: #fde3da; /* tint for chips, highlights */
  --teal: #159b90;         /* AI / companion / privacy / positive */
  --teal-soft: #dcf1ee;
  --line: rgba(13, 43, 82, 0.12);
  --line-soft: rgba(13, 43, 82, 0.07);
  --shadow-soft: 0 1px 2px rgba(13, 43, 82, 0.06), 0 12px 28px -14px rgba(13, 43, 82, 0.22);
  --shadow-lift: 0 4px 10px rgba(13, 43, 82, 0.08), 0 22px 44px -18px rgba(13, 43, 82, 0.30);

  /* --- Type --- */
  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", serif;
  --font-body: "Manrope", "Segoe UI", system-ui, -apple-system, sans-serif;

  /* --- Motion --- */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 160ms;
  --dur-med: 420ms;
  --dur-slow: 700ms;

  color-scheme: light;
}

/* Housome's product is light-first by product decision; the marketing site
   follows suit deliberately rather than auto-inverting to a generic dark
   mode — see build notes in README.md. */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

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

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

.wrap {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.prose { max-width: 640px; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 0.5em;
  text-wrap: balance;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.3rem, 5vw + 0.5rem, 4rem); line-height: 1.05; }
h2 { font-size: clamp(1.7rem, 3vw + 0.4rem, 2.6rem); line-height: 1.14; }
h3 { font-size: clamp(1.15rem, 1.2vw + 0.6rem, 1.5rem); line-height: 1.3; }

p { margin: 0 0 1em; }
.lede { font-size: clamp(1.05rem, 0.6vw + 0.9rem, 1.25rem); color: var(--ink-soft); }

a { color: inherit; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--apricot);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--apricot);
}
.eyebrow.teal { color: var(--teal); }
.eyebrow.teal::before { background: var(--teal); }

/* --- Buttons --- */
.btn {
  --btn-shadow: var(--shadow-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1;
  border-radius: 999px;
  padding: 16px 26px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
  box-shadow: var(--btn-shadow);
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn-primary { background: var(--ink); color: var(--cream); }
.btn-primary:hover { background: #123762; box-shadow: var(--shadow-lift); }
.btn-secondary {
  background: transparent;
  color: var(--ink);
  box-shadow: none;
  border: 1.5px solid var(--line);
}
.btn-secondary:hover { border-color: var(--ink); background: rgba(13,43,82,0.04); }
.btn-block { width: 100%; }
.btn:focus-visible, a:focus-visible, input:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2.5px solid var(--teal);
  outline-offset: 3px;
}

/* --- Header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 247, 238, 0.86);
  backdrop-filter: blur(10px) saturate(1.1);
  border-bottom: 1px solid var(--line-soft);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.brand { display: flex; align-items: center; }
.brand img { height: 30px; width: auto; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  font-weight: 600;
  font-size: 0.95rem;
}
.nav-links a { text-decoration: none; color: var(--ink-soft); position: relative; }
.nav-links a::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -4px;
  height: 2px; background: var(--apricot);
  transform: scaleX(0); transform-origin: left;
  transition: transform var(--dur-fast) var(--ease);
}
.nav-links a:hover::after { transform: scaleX(1); }
.nav-cta { display: flex; align-items: center; gap: 18px; }
.nav-cta .btn { padding: 11px 20px; font-size: 0.92rem; }
.nav-hide-mobile { display: flex; }
@media (max-width: 760px) {
  .nav-hide-mobile { display: none; }
}

/* --- Sections --- */
section { padding: 96px 0; position: relative; }
section.tight { padding: 72px 0; }
.section-head { max-width: 640px; margin: 0 auto 56px; text-align: center; }
.section-head.left { margin-left: 0; text-align: left; }

.band-cream { background: var(--cream); }
.band-deep {
  background: linear-gradient(180deg, var(--cream) 0%, var(--cream-deep) 100%);
}
.band-ink { background: var(--ink); color: var(--cream); }
.band-ink h2, .band-ink h3 { color: var(--cream); }
.band-ink .lede { color: rgba(255,247,238,0.72); }

/* --- Reveal-on-scroll --- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal-stagger > * { transition-delay: calc(var(--i, 0) * 90ms); }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  padding: 64px 0 88px;
  overflow: hidden;
}
.hero .wrap {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
@media (max-width: 940px) {
  .hero .wrap { grid-template-columns: 1fr; }
}
.hero h1 { margin-bottom: 20px; }
.hero .lede { max-width: 520px; margin-bottom: 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 18px; }
.hero-fineprint { font-size: 0.86rem; color: var(--ink-soft); opacity: 0.8; }
.hero-fineprint svg { vertical-align: -3px; margin-right: 5px; }

.hero-visual { position: relative; }
.hero-card {
  background: var(--paper);
  border-radius: 26px;
  box-shadow: var(--shadow-lift);
  padding: 22px;
  border: 1px solid var(--line-soft);
  position: relative;
}
.chat-mock { display: flex; flex-direction: column; gap: 12px; }
.chat-row { display: flex; gap: 10px; align-items: flex-end; }
.chat-row.from-me { justify-content: flex-end; }
.chat-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--apricot-soft);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.chat-avatar img { width: 18px; height: 18px; }
.bubble {
  max-width: 78%;
  padding: 11px 15px;
  border-radius: 16px;
  font-size: 0.92rem;
  line-height: 1.45;
}
.bubble.them { background: var(--cream-deep); border-bottom-left-radius: 4px; }
.bubble.me { background: var(--ink); color: var(--cream); border-bottom-right-radius: 4px; }
.chat-card {
  margin-top: 4px;
  background: var(--teal-soft);
  border: 1px solid rgba(21,155,144,0.25);
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 0.86rem;
}
.chat-card .row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.chat-card .tag {
  font-weight: 700; font-size: 0.68rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--teal);
}
.chat-card .visibility {
  font-size: 0.72rem; font-weight: 700; color: var(--ink);
  background: var(--paper); border-radius: 999px; padding: 3px 9px;
}
.chat-card .title { font-weight: 700; margin-bottom: 2px; }
.chat-card .meta { color: var(--ink-soft); font-size: 0.8rem; }
.hero-badge {
  position: absolute;
  top: -18px; right: -18px;
  background: var(--apricot);
  color: var(--paper);
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 800;
  font-size: 0.82rem;
  box-shadow: var(--shadow-soft);
  transform: rotate(4deg);
}
@media (max-width: 500px) {
  .hero-badge { top: -14px; right: 8px; font-size: 0.72rem; padding: 8px 12px; }
}

/* ==========================================================================
   Waitlist form
   ========================================================================== */
.waitlist-form {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 8px;
  display: flex;
  gap: 8px;
  box-shadow: var(--shadow-soft);
  max-width: 480px;
}
.waitlist-form.stacked { flex-direction: column; }
.waitlist-form input[type="email"],
.waitlist-form input[type="tel"] {
  flex: 1;
  border: none;
  background: transparent;
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  min-width: 0;
}
.waitlist-form input::placeholder { color: rgba(13,43,82,0.45); }
.waitlist-form input:focus { outline: none; }
.waitlist-form .btn { flex-shrink: 0; }
.form-msg {
  margin-top: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  display: none;
}
.form-msg.show { display: block; }
.form-msg.ok { color: var(--teal); }
.form-msg.err { color: var(--apricot); }
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }

/* ==========================================================================
   Problem / recognition list
   ========================================================================== */
.gripe-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
@media (max-width: 860px) { .gripe-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .gripe-grid { grid-template-columns: 1fr; } }
.gripe-card {
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  padding: 24px;
  transition: transform var(--dur-med) var(--ease), box-shadow var(--dur-med) var(--ease);
}
.gripe-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-soft); }
.gripe-card .quote-mark { font-family: var(--font-display); font-size: 2.4rem; color: var(--apricot); line-height: 0.6; display: block; margin-bottom: 10px; }
.gripe-card p { margin: 0; color: var(--ink-soft); font-size: 0.98rem; }

/* ==========================================================================
   How it works — 3 steps
   ========================================================================== */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  counter-reset: step;
  position: relative;
}
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; gap: 32px; } }
.step { position: relative; padding-left: 0; }
.step-num {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--paper);
  background: var(--ink);
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
}
.step h3 { margin-bottom: 8px; }
.step p { color: var(--ink-soft); font-size: 0.96rem; }

/* ==========================================================================
   Feature pillars (alternating)
   ========================================================================== */
.pillar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  padding: 56px 0;
  border-bottom: 1px solid var(--line-soft);
}
.pillar:last-child { border-bottom: none; }
.pillar.flip .pillar-copy { order: 2; }
.pillar.flip .pillar-art { order: 1; }
@media (max-width: 860px) {
  .pillar, .pillar.flip .pillar-copy, .pillar.flip .pillar-art { grid-template-columns: 1fr; order: initial; }
  .pillar { gap: 28px; }
}
.pillar-icon-wrap {
  width: 54px; height: 54px;
  border-radius: 15px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
}
.pillar-copy ul { margin: 18px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.pillar-copy li { display: flex; gap: 10px; align-items: flex-start; color: var(--ink-soft); font-size: 0.96rem; }
.pillar-copy li svg { flex-shrink: 0; margin-top: 3px; color: var(--teal); }

.pillar-art { position: relative; }
.mock-panel {
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: 20px;
  box-shadow: var(--shadow-soft);
  padding: 22px;
}
.mock-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
}
.mock-row:last-child { border-bottom: none; }
.mock-check {
  width: 22px; height: 22px; border-radius: 7px;
  border: 2px solid var(--line);
  flex-shrink: 0;
}
.mock-check.done { background: var(--teal); border-color: var(--teal); position: relative; }
.mock-check.done::after {
  content: ""; position: absolute; left: 6px; top: 2px;
  width: 5px; height: 10px;
  border-right: 2px solid var(--paper); border-bottom: 2px solid var(--paper);
  transform: rotate(40deg);
}
.mock-row .title { font-weight: 700; font-size: 0.94rem; }
.mock-row .sub { font-size: 0.8rem; color: var(--ink-soft); }
.mock-row .pill {
  margin-left: auto;
  font-size: 0.72rem; font-weight: 700;
  padding: 4px 10px; border-radius: 999px;
  background: var(--cream-deep); color: var(--ink-soft);
  white-space: nowrap;
}
.mock-row .pill.warn { background: var(--apricot-soft); color: #b8492f; }

/* ==========================================================================
   Privacy section
   ========================================================================== */
.privacy-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  max-width: 760px;
  margin: 0 auto;
}
@media (max-width: 700px) { .privacy-split { grid-template-columns: 1fr; } }
.privacy-lane {
  border-radius: 20px;
  padding: 26px;
  border: 1.5px solid;
}
.privacy-lane.only-you { background: rgba(255,247,238,0.5); border-color: var(--line); }
.privacy-lane.household { background: var(--teal-soft); border-color: rgba(21,155,144,0.3); }
.privacy-lane h3 { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.privacy-lane ul { margin: 0; padding-left: 20px; color: var(--ink-soft); font-size: 0.92rem; }
.privacy-lane li { margin-bottom: 6px; }
.privacy-note {
  text-align: center;
  max-width: 560px;
  margin: 28px auto 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

/* ==========================================================================
   Local relevance strip
   ========================================================================== */
.local-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
@media (max-width: 860px) { .local-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 500px) { .local-grid { grid-template-columns: 1fr; } }
.local-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,247,238,0.16);
  border-radius: 16px;
  padding: 20px;
}
.local-card .tag { color: var(--apricot); font-weight: 700; font-size: 0.78rem; letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 8px; display: block; }
.local-card p { margin: 0; font-size: 0.92rem; color: rgba(255,247,238,0.82); }

/* ==========================================================================
   Founder note
   ========================================================================== */
.founder-note {
  max-width: 700px;
  margin: 0 auto;
  background: var(--paper);
  border: 1px solid var(--line-soft);
  border-radius: 22px;
  padding: 40px;
  box-shadow: var(--shadow-soft);
}
.founder-note .sign {
  margin-top: 22px;
  display: flex; align-items: center; gap: 12px;
}
.founder-note .sign img { height: 22px; width: auto; }

/* ==========================================================================
   FAQ
   ========================================================================== */
.faq { max-width: 720px; margin: 0 auto; }
.faq-item {
  border-bottom: 1px solid var(--line);
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 22px 34px 22px 0;
  font-weight: 700;
  font-size: 1.02rem;
  position: relative;
  font-family: var(--font-display);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute; right: 4px; top: 18px;
  font-size: 1.6rem; font-weight: 400; color: var(--apricot);
  transition: transform var(--dur-fast) var(--ease);
  font-family: var(--font-body);
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .faq-a { padding: 0 34px 24px 0; color: var(--ink-soft); font-size: 0.96rem; max-width: 620px; }

/* ==========================================================================
   Final CTA
   ========================================================================== */
.final-cta { text-align: center; }
.final-cta .waitlist-form { margin: 0 auto; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--ink);
  color: rgba(255,247,238,0.75);
  padding: 56px 0 28px;
  font-size: 0.9rem;
}
.footer-top {
  display: flex;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(255,247,238,0.14);
  margin-bottom: 24px;
}
.footer-brand img { height: 26px; margin-bottom: 12px; }
.footer-brand p { max-width: 280px; color: rgba(255,247,238,0.6); font-size: 0.88rem; }
.footer-cols { display: flex; gap: 64px; flex-wrap: wrap; }
.footer-col h4 {
  color: var(--cream); font-family: var(--font-body); font-size: 0.8rem;
  letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 14px;
}
.footer-col a {
  display: block; text-decoration: none; color: rgba(255,247,238,0.72);
  margin-bottom: 10px; font-size: 0.92rem;
}
.footer-col a:hover { color: var(--apricot); }
.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  color: rgba(255,247,238,0.5); font-size: 0.82rem;
}

/* Utility */
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0; padding: 0; margin: -1px;
}
.skip-link {
  position: absolute; left: 12px; top: -60px;
  background: var(--ink); color: var(--cream);
  padding: 10px 16px; border-radius: 10px; z-index: 100;
  transition: top var(--dur-fast) var(--ease);
  text-decoration: none; font-weight: 700; font-size: 0.9rem;
}
.skip-link:focus { top: 12px; }
