/* ============================================================
   Recall landing page
   Palette + type lifted 1:1 from the app (mobile/constants/design.ts)
   ============================================================ */
:root {
  /* Core palette */
  --primary:      #8B6F47;
  --primary-dark: #6B5838;
  --secondary:    #D97757; /* coral */
  --success:      #7B9E6E; /* sage  */
  --warning:      #D9A949;
  --error:        #C85A54;

  /* Neutrals */
  --white:     #FFFFFF;
  --cream:     #F5EFE7;
  --beige:     #E8DDD3;
  --sand:      #D1C9BC;
  --gray:      #A39E93;
  --dark-gray: #6B6560;
  --dark:      #3D3228;

  /* Type */
  --font-display: 'Fredoka', system-ui, sans-serif;
  --font-label:   'Patrick Hand', system-ui, sans-serif;
  --font-hand:    'Caveat', cursive;
  --font-body:    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;

  /* Radius / shadow — app uses soft, low-opacity dark-brown shadows */
  --r-md: 12px;
  --r-lg: 20px;
  --r-xl: 28px;
  --shadow-sm: 0 2px 6px rgba(61, 50, 40, 0.05);
  --shadow-md: 0 4px 14px rgba(61, 50, 40, 0.07);
  --shadow-lg: 0 18px 44px rgba(61, 50, 40, 0.12);

  --maxw: 1120px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; /* clear the sticky header on anchor jumps */ }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--dark);
  background-color: var(--cream);
  /* faint paper grain so the cream isn't a flat fill */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
em { font-style: normal; color: var(--secondary); }

/* Ionicons paw glyph (via <use href="#paw">) — inherits colour from its context */
.paw { fill: currentColor; }

/* App-icon badge used as the brand mark; round-crops the square PNG cleanly */
.wordmark__badge { border-radius: 50%; flex: none; }

/* ---------- Shared bits ---------- */
.kicker {
  font-family: var(--font-hand);
  font-size: 1.45rem;
  line-height: 1;
  color: var(--secondary);
  margin: 0 0 .5rem;
  transform: rotate(-2deg);
}
.kicker--center { text-align: center; }

.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.7rem, 1rem + 2.4vw, 2.6rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--dark);
  margin: 0;
}

.section-head { text-align: center; margin: 0 auto 2.8rem; max-width: 36ch; }
.section-head--left { text-align: left; margin-inline: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  padding: 0 1.6rem;
  height: 56px;
  border-radius: var(--r-md);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn--primary {
  background: var(--primary);
  color: var(--cream);
  box-shadow: var(--shadow-md);
}
.btn--primary:hover { background: var(--primary-dark); box-shadow: var(--shadow-lg); }
.btn--ghost {
  background: var(--white);
  color: var(--dark);
  border-color: var(--sand);
  height: 44px;
  box-shadow: var(--shadow-sm);
}
.btn--ghost:hover { border-color: var(--primary); }
.btn--text {
  background: transparent;
  color: var(--primary);
  padding: 0 .4rem;
  height: auto;
}
.btn--text:hover { color: var(--primary-dark); }
.btn--block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .85rem clamp(1.1rem, 4vw, 2.4rem);
  background: rgba(245, 239, 231, 0.82);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid rgba(209, 201, 188, 0.6);
}
.wordmark { display: inline-flex; align-items: center; gap: .5rem; }
.wordmark__paw { color: var(--primary); display: inline-flex; }
.wordmark__text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
  color: var(--dark);
}

/* ---------- Layout primitives ---------- */
main { display: block; }
section { padding-inline: clamp(1.1rem, 5vw, 2.4rem); }

/* ---------- Hero ---------- */
.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-top: clamp(2.5rem, 6vw, 5rem);
  padding-bottom: clamp(2.5rem, 6vw, 5rem);
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.hero__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.3rem, 1.2rem + 4vw, 3.9rem);
  line-height: 1.05;
  letter-spacing: -0.025em;
  margin: 0 0 1.1rem;
  color: var(--dark);
  text-wrap: balance; /* let the browser pick a balanced wrap — no hardcoded breaks */
}
.hero__sub {
  font-size: clamp(1.02rem, .95rem + .4vw, 1.18rem);
  color: var(--dark-gray);
  max-width: 46ch;
  margin: 0 0 1.8rem;
}
.hero__actions { display: flex; align-items: center; gap: 1.3rem; flex-wrap: wrap; }
.hero__note {
  margin: 1.6rem 0 0;
  font-size: .9rem;
  color: var(--gray);
}

/* Animated entrance */
.hero__copy > * { animation: rise .7s cubic-bezier(.2,.7,.2,1) both; }
.hero__copy > *:nth-child(1) { animation-delay: .02s; }
.hero__copy > *:nth-child(2) { animation-delay: .09s; }
.hero__copy > *:nth-child(3) { animation-delay: .16s; }
.hero__copy > *:nth-child(4) { animation-delay: .23s; }
.hero__copy > *:nth-child(5) { animation-delay: .30s; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- Hero device / chat mockup ---------- */
.hero__device { position: relative; justify-self: center; animation: rise .9s cubic-bezier(.2,.7,.2,1) both; animation-delay: .25s; }
.device {
  width: min(340px, 78vw);
  background: var(--white);
  border: 1px solid var(--sand);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  padding: .8rem;
  transform: rotate(1.4deg);
}
.device__bar {
  display: flex; align-items: center; gap: .5rem;
  padding: .35rem .6rem .7rem;
  border-bottom: 1px solid var(--beige);
}
.device__paw { color: var(--primary); display: inline-flex;
  background: var(--cream); border-radius: 50%; padding: 6px; }
.device__name { font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; color: var(--dark); }
.device__chat { display: flex; flex-direction: column; gap: .55rem; padding: .9rem .5rem .6rem; }
.bubble {
  font-size: .92rem;
  line-height: 1.4;
  padding: .7rem .9rem;
  border-radius: 16px;
  max-width: 90%;
}
.bubble--user { align-self: flex-end; background: var(--primary); color: var(--cream); border-bottom-right-radius: 5px; }
.bubble--ai { align-self: flex-start; background: var(--cream); color: var(--dark); border-bottom-left-radius: 5px; border: 1px solid var(--beige); }
.memory-pill {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: .35rem;
  margin-top: .15rem;
  font-family: var(--font-hand);
  font-size: 1.05rem;
  color: var(--success);
  background: rgba(123, 158, 110, 0.12);
  border-radius: 999px;
  padding: .15rem .7rem;
}
.memory-pill svg { color: var(--success); }
.device__scribble {
  position: absolute;
  left: 18px; bottom: -34px;
  font-family: var(--font-hand);
  font-size: 1.4rem;
  color: var(--dark-gray);
  transform: rotate(-5deg);
}

/* ---------- Demo video ---------- */
.demo { max-width: 920px; margin: 0 auto; padding-top: clamp(2rem, 5vw, 3.5rem); padding-bottom: clamp(2rem, 5vw, 3.5rem); }
.video {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--sand);
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  background: var(--beige);
}
.video__placeholder {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: .8rem;
  background:
    radial-gradient(120% 120% at 50% 0%, rgba(255,255,255,.5), transparent 60%),
    linear-gradient(150deg, var(--beige), var(--sand));
  transition: filter .2s ease;
}
.video:hover .video__placeholder { filter: brightness(1.03); }
.video__play {
  width: 76px; height: 76px;
  display: grid; place-items: center;
  background: var(--white);
  color: var(--primary);
  border-radius: 50%;
  box-shadow: var(--shadow-md);
  padding-left: 4px;
  transition: transform .2s ease;
}
.video:hover .video__play { transform: scale(1.06); }
.video__hint { font-family: var(--font-label); font-size: 1.25rem; color: var(--dark); margin: 0; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.demo__caption { text-align: center; color: var(--dark-gray); font-size: .98rem; margin: 1.2rem auto 0; max-width: 46ch; }

/* ---------- Benefits ---------- */
.benefits { max-width: var(--maxw); margin: 0 auto; padding-top: clamp(2.5rem, 6vw, 4.5rem); padding-bottom: clamp(2.5rem, 6vw, 4rem); }
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(1rem, 2.5vw, 1.6rem);
}
.card {
  background: var(--white);
  border: 1px solid var(--sand);
  border-radius: var(--r-lg);
  padding: 1.7rem 1.6rem;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card__icon {
  display: inline-grid; place-items: center;
  width: 48px; height: 48px;
  border-radius: 14px;
  margin-bottom: 1rem;
}
.card__icon--brown { background: rgba(139, 111, 71, 0.12); color: var(--primary); }
.card__icon--coral { background: rgba(217, 119, 87, 0.13); color: var(--secondary); }
.card__icon--sage  { background: rgba(123, 158, 110, 0.14); color: var(--success); }
.card__title { font-family: var(--font-display); font-weight: 600; font-size: 1.22rem; margin: 0 0 .5rem; color: var(--dark); }
.card__body { margin: 0; color: var(--dark-gray); font-size: .98rem; }

/* ---------- Trust band ---------- */
.trust {
  background: var(--beige);
  border-block: 1px solid var(--sand);
  padding-block: clamp(3rem, 7vw, 5rem);
  margin-block: clamp(1.5rem, 4vw, 2.5rem);
}
.trust__inner { max-width: 44ch; margin: 0 auto; text-align: center; }
.trust__mark { display: inline-flex; color: var(--primary); margin: 0 0 .9rem; }
.trust__title { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.5rem, 1rem + 2vw, 2.1rem); line-height: 1.15; margin: 0 0 .9rem; color: var(--dark); }
.trust__body { color: var(--dark-gray); font-size: 1.05rem; margin: 0; }

/* ---------- Founder ---------- */
.founder { max-width: var(--maxw); margin: 0 auto; padding-block: clamp(2rem, 5vw, 3.5rem); }
.founder__card {
  max-width: 640px; margin: 0 auto;
  background: var(--white);
  border: 1px solid var(--sand);
  border-left: 4px solid var(--secondary);
  border-radius: var(--r-lg);
  padding: 1.8rem 2rem;
  box-shadow: var(--shadow-sm);
}
.founder__label { font-family: var(--font-hand); font-size: 1.4rem; color: var(--secondary); margin: 0 0 .4rem; }
.founder__body { margin: 0 0 .8rem; color: var(--dark); font-size: 1.08rem; }
.founder__sign { font-family: var(--font-hand); font-size: 1.6rem; color: var(--dark); margin: 0; }

/* ---------- Waitlist ---------- */
.waitlist { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.waitlist__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.waitlist__sub { color: var(--dark-gray); font-size: 1.05rem; margin: 1rem 0 0; max-width: 38ch; }
.form {
  background: var(--white);
  border: 1px solid var(--sand);
  border-radius: var(--r-xl);
  padding: clamp(1.4rem, 3vw, 2.2rem);
  box-shadow: var(--shadow-md);
}
.form__row--split { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field { margin-bottom: 1.1rem; }
.field__label {
  display: block;
  font-family: var(--font-label);
  font-size: 1.2rem;
  color: var(--dark);
  margin-bottom: .35rem;
}
.field__opt { color: var(--gray); font-size: .95rem; }
.field__input {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--dark);
  background: var(--cream);
  border: 1.5px solid var(--sand);
  border-radius: var(--r-md);
  padding: 0 1rem;
  height: 52px;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.field__input--area { padding: .75rem 1rem; height: auto; resize: vertical; min-height: 84px; line-height: 1.5; }
.field__input::placeholder { color: var(--gray); }
.field__input:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(139, 111, 71, 0.14);
}
.form__fineprint { font-size: .85rem; color: var(--gray); margin: .9rem 0 0; text-align: center; }
.form__status {
  margin: 1rem 0 0;
  padding: .85rem 1rem;
  border-radius: var(--r-md);
  font-size: .98rem;
  text-align: center;
}
.form__status--ok { background: rgba(123, 158, 110, 0.15); color: #4f6b44; border: 1px solid rgba(123,158,110,.4); }
.form__status--err { background: rgba(200, 90, 84, 0.12); color: var(--error); border: 1px solid rgba(200,90,84,.35); }
.btn[disabled] { background: var(--gray); cursor: progress; box-shadow: none; }

/* Download reveal — swapped in by main.js once the gate form succeeds */
.reveal {
  background: var(--white);
  border: 1px solid var(--sand);
  border-radius: var(--r-xl);
  padding: clamp(1.6rem, 3vw, 2.4rem);
  box-shadow: var(--shadow-md);
  text-align: center;
}
.reveal__lead {
  font-family: var(--font-display); font-weight: 500;
  font-size: 1.2rem; line-height: 1.4; color: var(--dark);
  margin: 0 0 1.4rem;
}
.store-row { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }
.store-btn {
  flex: 1 1 200px;
  height: 60px;
  gap: .7rem;
  font-size: .82rem;
  line-height: 1.15;
  text-align: left;
  text-transform: none;
  letter-spacing: 0;
}
.store-btn span { display: inline-block; }
.store-btn strong {
  font-family: var(--font-display); font-weight: 600;
  font-size: 1.12rem; letter-spacing: -0.01em;
}
.store-btn svg { flex: none; }
.reveal__note { font-size: .85rem; color: var(--gray); margin: 1.2rem 0 0; }

/* consent checkbox */
.field__check {
  display: flex;
  gap: .65rem;
  align-items: flex-start;
  margin: .2rem 0 .4rem;
  font-size: .95rem;
  line-height: 1.5;
  color: var(--dark-gray);
  cursor: pointer;
}
.field__check input { margin-top: .2rem; flex: 0 0 auto; accent-color: var(--primary); }

/* honeypot */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--sand);
  padding: 2.2rem clamp(1.1rem, 5vw, 2.4rem);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--maxw);
  margin: 0 auto;
}
.site-footer__brand { display: inline-flex; align-items: center; gap: .5rem; font-family: var(--font-display); font-weight: 600; color: var(--dark); }
.site-footer__brand .wordmark__paw { color: var(--primary); }
.site-footer__links { display: flex; gap: 1.4rem; }
.site-footer__links a { color: var(--dark-gray); font-size: .95rem; transition: color .15s ease; }
.site-footer__links a:hover { color: var(--primary); }
.site-footer__fine { width: 100%; color: var(--gray); font-size: .85rem; margin: .4rem 0 0; }

/* ---------- Legal pages (privacy / terms) ---------- */
.legal {
  max-width: 760px;
  margin: 0 auto;
  padding-top: clamp(2.2rem, 5vw, 3.5rem);
  padding-bottom: clamp(3rem, 7vw, 5rem);
  /* Side gutter so content doesn't touch the screen edge on mobile. The .legal
     article isn't a <section>, so it doesn't inherit the section padding-inline;
     match that value here. */
  padding-inline: clamp(1.1rem, 5vw, 2.4rem);
}
.legal__head { margin-bottom: 2.4rem; }
.legal__back {
  display: inline-flex; align-items: center; gap: .35rem;
  font-family: var(--font-label); font-size: 1.15rem;
  color: var(--primary); margin-bottom: 1.2rem;
}
.legal__back:hover { color: var(--primary-dark); }
.legal__title {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(2rem, 1.2rem + 2.6vw, 2.9rem);
  line-height: 1.1; letter-spacing: -0.02em; color: var(--dark);
  margin: 0 0 .5rem;
}
.legal__updated { color: var(--gray); font-size: .95rem; margin: 0; }
.legal__note {
  background: var(--beige); border: 1px solid var(--sand);
  border-radius: var(--r-md); padding: .8rem 1rem;
  color: var(--dark-gray); font-size: .9rem; margin: 1.6rem 0 0;
}
.legal h2 {
  font-family: var(--font-display); font-weight: 600;
  font-size: 1.4rem; color: var(--dark);
  margin: 2.2rem 0 .6rem; letter-spacing: -0.01em;
}
.legal h3 {
  font-family: var(--font-display); font-weight: 500;
  font-size: 1.12rem; color: var(--dark); margin: 1.4rem 0 .4rem;
}
.legal p, .legal li { color: var(--dark-gray); font-size: 1.02rem; line-height: 1.65; }
.legal p { margin: 0 0 1rem; }
.legal ul { margin: 0 0 1rem; padding-left: 1.2rem; }
.legal li { margin-bottom: .4rem; }
.legal a:not(.legal__back):not(.btn) { color: var(--primary); text-decoration: underline; text-underline-offset: 2px; }

/* Plain-language summary card at the top of legal pages */
.legal__summary {
  background: var(--white);
  border: 1px solid var(--sand);
  border-left: 4px solid var(--success);
  border-radius: var(--r-lg);
  padding: 1.4rem 1.6rem;
  margin: 1.8rem 0 0;
  box-shadow: var(--shadow-sm);
}
.legal__summary-label {
  font-family: var(--font-hand);
  font-size: 1.4rem;
  color: var(--success);
  margin: 0 0 .5rem;
}
.legal__summary ul { margin-bottom: 0; }
.legal__summary p:last-child { margin-bottom: 0; }

/* Tables (processor list, retention schedule) */
.legal table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.2rem;
  background: var(--white);
  border: 1px solid var(--sand);
  border-radius: var(--r-md);
  font-size: .95rem;
}
.legal th, .legal td {
  text-align: left;
  vertical-align: top;
  padding: .65rem .8rem;
  border-bottom: 1px solid var(--beige);
  color: var(--dark-gray);
  line-height: 1.5;
}
.legal th {
  font-family: var(--font-label);
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--dark);
  background: var(--cream);
}
.legal tr:last-child td { border-bottom: 0; }
.legal .table-scroll { overflow-x: auto; margin: 0 0 1rem; }
.legal .table-scroll table { margin-bottom: 0; min-width: 560px; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; text-align: center; }
  .hero__sub { margin-inline: auto; }
  .hero__actions { justify-content: center; }
  .kicker { display: inline-block; }
  .hero__device { margin-top: 1.5rem; }
  .device__scribble { display: none; }
  .card-grid { grid-template-columns: 1fr; }
  .waitlist__inner { grid-template-columns: 1fr; }
  .section-head--left { text-align: center; margin-inline: auto; }
  .waitlist__sub { margin-inline: auto; }
}
@media (max-width: 480px) {
  .form__row--split { grid-template-columns: 1fr; }
  .header__cta { display: none; }
}

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