/* Remexa marketing site — Warm Memory design system.
   Tokens mirror lib/core/design_tokens.dart. */
:root {
  --bg: #FAF7F2;
  --surface: #FFFFFF;
  --ink: #2A2118;
  --muted: #6E6153;
  --primary: #C15A2B;
  --primary-deep: #A84A20;
  --time-bg: #FDF1E3;
  --time-fg: #8F5A15;
  --place-bg: #EDF3EA;
  --place-fg: #5C7A52;
  --border: #EDE5DA;
  --radius: 24px;
  --pill: 999px;
  --font-head: "Poppins", system-ui, sans-serif;
  --font-body: "Nunito Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--font-head); font-weight: 600; line-height: 1.2; }
a { color: inherit; text-decoration: none; }
svg { display: block; }
.mark path { fill: var(--primary); }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px clamp(20px, 5.5vw, 80px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease;
}
.nav.scrolled { border-color: var(--border); }
.brand { display: flex; align-items: center; gap: 11px; font-family: var(--font-head); font-weight: 600; font-size: 22px; }
.brand .mark { width: 26px; height: 30px; }
.nav nav { display: flex; align-items: center; gap: clamp(16px, 2.5vw, 36px); }
.nav nav > a:not(.btn) {
  font-weight: 700; font-size: 15px; color: var(--muted);
  transition: color 160ms ease;
}
.nav nav > a:not(.btn):hover { color: var(--ink); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-head); font-weight: 600; font-size: 17px;
  padding: 16px 32px; border-radius: var(--pill);
  cursor: pointer; white-space: nowrap;
  transition: transform 180ms cubic-bezier(.2,.7,.3,1), box-shadow 180ms ease, background 160ms ease;
}
.btn:active { transform: scale(.97); }
.btn svg { width: 20px; height: 20px; fill: currentColor; }
.btn-primary {
  background: var(--primary); color: #fff;
  box-shadow: 0 10px 24px -10px color-mix(in srgb, var(--primary) 55%, transparent);
}
.btn-primary:hover { background: var(--primary-deep); transform: translateY(-2px); box-shadow: 0 16px 30px -10px color-mix(in srgb, var(--primary) 60%, transparent); }
.btn-sm { padding: 11px 24px; font-size: 15px; }
.btn-ghost { background: var(--surface); border: 1.5px solid var(--border); }
.btn-ghost:hover { border-color: var(--primary); transform: translateY(-2px); }
.btn-inverse { background: #fff; color: var(--primary); }
.btn-inverse:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -12px rgba(0,0,0,.35); }
.btn:focus-visible, a:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 55%, transparent); outline-offset: 3px; border-radius: 6px; }
.btn:focus-visible { border-radius: var(--pill); }

/* ---------- Hero ---------- */
.hero {
  display: flex; align-items: center; justify-content: center;
  gap: clamp(32px, 6vw, 90px);
  padding: clamp(40px, 7vh, 90px) clamp(20px, 5.5vw, 80px) clamp(60px, 9vh, 110px);
  max-width: 1440px; margin: 0 auto;
}
.hero-copy { max-width: 620px; }
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--time-bg); color: var(--time-fg);
  font-weight: 700; font-size: 13px;
  padding: 8px 18px; border-radius: var(--pill); margin-bottom: 26px;
}
.badge svg { width: 15px; height: 15px; fill: currentColor; }
h1 { font-size: clamp(38px, 5vw, 56px); letter-spacing: -.5px; }
.sub { color: var(--muted); font-size: clamp(16px, 1.4vw, 19px); margin: 24px 0 32px; max-width: 560px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 16px; }
.cta-note { color: var(--muted); font-size: 14px; margin-top: 18px; }

/* Phone mockup */
.phone {
  width: 290px; padding: 10px; border-radius: 40px; background: var(--ink);
  box-shadow: 0 40px 80px -30px rgba(42, 33, 24, .4);
  transform: rotate(2.5deg);
  transition: transform 400ms cubic-bezier(.2,.7,.3,1);
}
.phone:hover { transform: rotate(0deg) scale(1.02); }
.phone-screen {
  background: var(--bg); border-radius: 31px; height: 560px;
  padding: 26px 18px; overflow: hidden;
}
.ps-greet { font-size: 12px; color: var(--muted); }
.ps-title { font-family: var(--font-head); font-weight: 600; font-size: 21px; margin-bottom: 16px; }
.ps-input {
  background: var(--surface); border: 1.5px solid var(--primary);
  border-radius: 14px; padding: 12px 14px; font-size: 13.5px; min-height: 44px;
  margin-bottom: 12px; display: flex; align-items: center;
}
.caret { width: 2px; height: 16px; background: var(--primary); margin-left: 2px; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.ps-card { background: var(--surface); border-radius: 14px; padding: 14px; margin-bottom: 10px; }
.ps-card p { font-weight: 700; font-size: 13.5px; }
.ps-chips { display: flex; gap: 6px; margin-top: 9px; }
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10.5px; font-weight: 700; padding: 5px 10px; border-radius: var(--pill);
  opacity: 0; transform: scale(.85); transition: opacity 250ms ease, transform 250ms cubic-bezier(.2,.7,.3,1);
}
.chip.on { opacity: 1; transform: scale(1); }
.chip svg { width: 12px; height: 12px; fill: currentColor; }
.chip-time { background: var(--time-bg); color: var(--time-fg); }
.chip-place { background: var(--place-bg); color: var(--place-fg); }

/* ---------- Sections ---------- */
section h2 { font-size: clamp(28px, 3.2vw, 36px); text-align: center; }
.features { background: var(--surface); padding: clamp(56px, 9vh, 90px) clamp(20px, 5.5vw, 80px); }
.feature-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px; max-width: 1240px; margin: 48px auto 0;
}
.feature-card {
  background: var(--bg); border-radius: var(--radius); padding: 36px 28px;
  transition: transform 250ms cubic-bezier(.2,.7,.3,1), box-shadow 250ms ease;
}
.feature-card:hover { transform: translateY(-6px); box-shadow: 0 24px 44px -24px rgba(42,33,24,.25); }
.fc-icon { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; margin-bottom: 18px; }
.fc-icon svg { width: 30px; height: 30px; }
.fc-amber { background: var(--time-bg); } .fc-amber svg { fill: var(--time-fg); }
.fc-sage { background: var(--place-bg); } .fc-sage svg { fill: var(--place-fg); }
.feature-card h3 { font-size: 21px; margin-bottom: 10px; }
.feature-card p { color: var(--muted); font-size: 15.5px; }

.how { padding: clamp(56px, 9vh, 90px) clamp(20px, 5.5vw, 80px); }
.how-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 36px; max-width: 1240px; margin: 48px auto 0; text-align: center;
}
.how-num {
  width: 48px; height: 48px; margin: 0 auto 14px; border-radius: 50%;
  background: var(--primary); color: #fff; display: grid; place-items: center;
  font-family: var(--font-head); font-weight: 600; font-size: 20px;
}
.how-step h3 { font-size: 19px; margin-bottom: 8px; }
.how-step p { color: var(--muted); font-size: 15px; max-width: 340px; margin: 0 auto; }

.bottom-cta {
  background: var(--primary); color: #fff; text-align: center;
  padding: clamp(64px, 10vh, 100px) 24px;
}
.bottom-cta .mark-lg { width: 60px; height: 68px; margin: 0 auto 22px; }
.bottom-cta .mark-lg path { fill: var(--bg); }
.bottom-cta h2 { font-size: clamp(30px, 3.6vw, 40px); }
.bottom-cta p { color: var(--time-bg); font-size: 18px; margin: 14px 0 30px; }

footer {
  background: var(--ink); color: #B8AC9E;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
  padding: 28px clamp(20px, 5.5vw, 80px); font-size: 14px;
}
footer nav { display: flex; gap: 28px; }
footer nav a { color: var(--bg); font-weight: 700; transition: color 160ms ease; }
footer nav a:hover { color: #fff; text-decoration: underline; }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 550ms ease, transform 550ms cubic-bezier(.2,.7,.3,1); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Privacy page ---------- */
.prose { max-width: 760px; margin: 0 auto; padding: clamp(40px, 7vh, 72px) 24px 90px; }
.prose h1 { font-size: clamp(32px, 4vw, 44px); margin-bottom: 8px; }
.prose .updated { color: var(--muted); font-size: 14px; margin-bottom: 36px; }
.prose h2 { font-size: 24px; text-align: left; margin: 36px 0 12px; }
.prose p, .prose li { color: var(--muted); font-size: 16.5px; }
.prose ul { padding-left: 22px; margin: 10px 0; }
.prose strong { color: var(--ink); }
.prose a { color: var(--primary); font-weight: 700; }
.prose a:hover { text-decoration: underline; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero { flex-direction: column; text-align: center; }
  .hero-copy { display: flex; flex-direction: column; align-items: center; }
  .cta-row { justify-content: center; }
  .nav nav > a:not(.btn) { display: none; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .chip { opacity: 1; transform: none; transition: none; }
  .caret { animation: none; }
  .phone { transform: none; transition: none; }
  .btn, .feature-card { transition: none; }
}
