:root {
  /* CasaMap brand palette (see assets/png/logo/casamap-logo-*.png) — warm cream
     surfaces and a dark-green/coral/gold accent trio, matching the app and
     admin panel. */
  --bg: #f5f1e6;
  --bg-soft: #ece4d2;
  --card: #ffffff;
  --card-border: rgba(47, 74, 67, 0.14);
  --text: #1a1817;
  --text-dim: #57524a;
  --text-faint: #7d766a;
  --accent: #6fbf9b;
  --accent-2: #e8c15a;
  --accent-3: #f0916d;
  --on-accent: #1a1817;
  /* Darker foreground-safe variants of --accent/--accent-2 — the light
     versions above read fine as fills/glows on this light bg, but need
     darkening wherever they're used as actual text/line color. */
  --accent-fg: #2f6b4f;
  --accent-2-fg: #b5822e;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --wrap: 1120px;
  --shadow-lg: 0 30px 80px -20px rgba(47, 74, 67, 0.22);
  color-scheme: light;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

h1, h2, h3 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  line-height: 1.12;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.4rem, 5.2vw, 3.8rem); font-weight: 500; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.15rem; }

p { margin: 0 0 1em; color: var(--text-dim); }

a { color: inherit; text-decoration: none; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

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

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent-fg);
  margin: 0 0 0.9em;
}

.text-gradient {
  background: linear-gradient(100deg, var(--accent-fg), var(--accent-2-fg) 70%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Ambient background */
.noise {
  position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.glow {
  position: fixed; z-index: 0; border-radius: 50%; filter: blur(110px); pointer-events: none;
}
.glow--a { top: -180px; left: -120px; width: 520px; height: 520px; background: radial-gradient(circle, rgba(111,191,155,0.32), transparent 70%); }
.glow--b { top: 20%; right: -220px; width: 620px; height: 620px; background: radial-gradient(circle, rgba(232,193,90,0.28), transparent 70%); }

main, header, footer { position: relative; z-index: 1; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px) saturate(140%);
  background: rgba(245, 241, 230, 0.78);
  border-bottom: 1px solid var(--card-border);
}
.header-row {
  display: flex; align-items: center; gap: 24px;
  height: 72px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 1.05rem; letter-spacing: -0.01em;
}
.brand-mark { width: 30px; height: 30px; }

.nav { display: flex; gap: 28px; margin-left: 12px; flex: 1; }
.nav a { color: var(--text-dim); font-size: 0.92rem; font-weight: 500; transition: color 0.15s ease; }
.nav a:hover { color: var(--text); }

.header-cta { margin-left: auto; }

.nav-toggle {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--card-border);
  background: transparent; cursor: pointer; margin-left: 8px;
}
.nav-toggle span { display: block; width: 18px; height: 2px; margin: 0 auto; background: var(--text); border-radius: 2px; transition: transform 0.2s ease, opacity 0.2s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; border-radius: 999px;
  font-weight: 600; font-size: 0.92rem;
  border: 1px solid transparent; cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: linear-gradient(120deg, var(--accent), var(--accent-2)); color: var(--on-accent); box-shadow: 0 12px 30px -10px rgba(232,193,90, 0.55); }
.btn-primary:hover { box-shadow: 0 16px 34px -8px rgba(232,193,90, 0.65); }
.btn-ghost { background: rgba(47,74,67,0.05); border-color: var(--card-border); color: var(--text); }
.btn-ghost:hover { background: rgba(47,74,67,0.09); }
.btn-outline { background: transparent; border-color: var(--card-border); color: var(--text); width: 100%; justify-content: center; }
.btn-outline:hover { border-color: var(--accent-2); }
.btn-lg { padding: 15px 28px; font-size: 1rem; }

/* Hero */
.hero { padding: 76px 0 40px; }
.hero-grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center;
}
.hero-copy h1 { margin-bottom: 0.4em; }
.lede { font-size: 1.08rem; max-width: 46ch; }

.waitlist {
  display: flex; gap: 10px; max-width: 420px; margin: 28px 0 10px;
  background: #ffffff; border: 1px solid var(--card-border);
  padding: 6px; border-radius: 999px;
}
.waitlist input {
  flex: 1; min-width: 0; background: transparent; border: none; outline: none;
  color: var(--text); font-size: 0.95rem; padding: 10px 14px;
}
.waitlist input::placeholder { color: var(--text-faint); }
.waitlist.is-success { border-color: var(--accent); }

.form-note { font-size: 0.82rem; color: var(--text-faint); margin-bottom: 26px; }

.store-badges { display: flex; gap: 12px; flex-wrap: wrap; }
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: 999px; font-size: 0.82rem; font-weight: 600;
  border: 1px solid var(--card-border); color: var(--text-dim); background: rgba(47,74,67,0.04);
}

/* Hero visual — phone mock */
.hero-visual { display: flex; justify-content: center; }
.phone {
  width: 300px; border-radius: 40px; padding: 14px;
  background: linear-gradient(160deg, #1a1f2b, #10131a);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: var(--shadow-lg);
  position: relative;
}
.phone-notch {
  position: absolute; top: 26px; left: 50%; transform: translateX(-50%);
  width: 70px; height: 8px; border-radius: 8px; background: rgba(0,0,0,0.5); z-index: 2;
}
.phone-screen {
  background: var(--bg-soft); border-radius: 28px; padding: 46px 16px 22px;
  display: flex; flex-direction: column; gap: 12px; min-height: 480px;
}
.app-topbar { display: flex; flex-direction: column; gap: 10px; margin-bottom: 6px; }
.app-title { font-family: "Fraunces", serif; font-size: 1.3rem; font-weight: 600; }
.app-search {
  font-size: 0.82rem; color: var(--text-faint);
  background: rgba(47,74,67,0.06); border-radius: 999px; padding: 9px 14px;
}
.room-card {
  background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius-md);
  padding: 14px 16px;
}
.room-card.highlight { border-color: rgba(111,191,155, 0.4); box-shadow: 0 0 0 1px rgba(111,191,155,0.12), 0 12px 24px -12px rgba(111,191,155,0.35); }
.room-head { display: flex; align-items: center; justify-content: space-between; font-weight: 600; font-size: 0.92rem; }
.chevron { color: var(--text-faint); }
.chip-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.chip { font-size: 0.72rem; padding: 5px 10px; border-radius: 999px; background: rgba(47,74,67,0.07); color: var(--text-dim); }
.found-pill {
  margin-top: 10px; font-size: 0.72rem; color: var(--accent-fg);
  background: rgba(111,191,155,0.12); border: 1px solid rgba(111,191,155,0.3);
  padding: 8px 10px; border-radius: var(--radius-sm);
}

/* Marquee */
.marquee { border-top: 1px solid var(--card-border); border-bottom: 1px solid var(--card-border); padding: 18px 0; overflow: hidden; background: var(--bg-soft); }
.marquee-track {
  display: flex; gap: 14px; width: max-content;
  font-size: 0.85rem; color: var(--text-faint); font-weight: 500;
  animation: scroll 32s linear infinite;
}
@keyframes scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* Sections */
section { padding: 96px 0; }
.section-head { max-width: 640px; margin: 0 auto 52px; text-align: center; }
.section-sub { margin-top: -0.2em; }

/* Features */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature-card {
  background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius-lg);
  padding: 28px 24px; transition: transform 0.2s ease, border-color 0.2s ease;
}
.feature-card:hover { transform: translateY(-3px); border-color: rgba(47,74,67,0.24); }
.feature-icon {
  width: 46px; height: 46px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center; margin-bottom: 16px;
  color: var(--c2);
  background: linear-gradient(135deg, color-mix(in srgb, var(--c1) 18%, transparent), color-mix(in srgb, var(--c2) 10%, transparent));
  border: 1px solid color-mix(in srgb, var(--c1) 30%, transparent);
}
.feature-icon svg { width: 22px; height: 22px; }
.feature-card h3 { margin-bottom: 0.4em; }
.feature-card p { margin: 0; font-size: 0.92rem; }

/* How it works */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: step; }
.step { position: relative; padding: 30px 24px; border-radius: var(--radius-lg); background: var(--bg-soft); border: 1px solid var(--card-border); }
.step-num {
  display: inline-block; font-family: "Fraunces", serif; font-size: 1.6rem; font-weight: 600;
  color: transparent; -webkit-text-stroke: 1px var(--accent-2-fg); margin-bottom: 14px;
}
.step h3 { margin-bottom: 0.4em; }
.step p { margin: 0; font-size: 0.92rem; }

/* Pricing */
.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; }
.price-card {
  background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius-lg);
  padding: 32px 28px; display: flex; flex-direction: column; position: relative;
}
.price-card.featured { border-color: rgba(232,193,90, 0.55); box-shadow: 0 20px 50px -20px rgba(232,193,90,0.4); background: linear-gradient(180deg, rgba(232,193,90,0.08), var(--card) 40%); }
.price-tag {
  position: absolute; top: -13px; left: 28px; font-size: 0.7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em; padding: 5px 12px; border-radius: 999px;
  background: linear-gradient(120deg, var(--accent), var(--accent-2)); color: var(--on-accent);
}
.price-card h3 { margin-bottom: 0.2em; }
.price { display: flex; align-items: baseline; gap: 6px; margin: 0.2em 0 0; }
.price span { font-family: "Fraunces", serif; font-size: 2.2rem; font-weight: 600; }
.price small { color: var(--text-faint); font-size: 0.85rem; }
.price-sub { font-size: 0.85rem; color: var(--text-faint); margin-bottom: 18px; }
.price-card ul { list-style: none; margin: 0 0 26px; padding: 0; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.price-card li { font-size: 0.9rem; color: var(--text-dim); padding-left: 24px; position: relative; }
.price-card li::before {
  content: ""; position: absolute; left: 0; top: 0.45em; width: 14px; height: 8px;
  border-left: 2px solid var(--accent-fg); border-bottom: 2px solid var(--accent-fg); transform: rotate(-45deg);
}

/* FAQ */
.faq-list { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.faq-item { background: var(--card); border: 1px solid var(--card-border); border-radius: var(--radius-md); padding: 6px 22px; }
.faq-item summary {
  cursor: pointer; padding: 16px 0; font-weight: 600; list-style: none; position: relative;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; font-size: 1.3rem; color: var(--text-faint); transition: transform 0.2s ease; flex-shrink: 0;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { padding-bottom: 18px; margin: 0; font-size: 0.92rem; }

/* CTA band */
.cta-band {
  margin: 0 24px 96px; border-radius: 28px; padding: 72px 24px;
  text-align: center; background: linear-gradient(135deg, rgba(111,191,155,0.14), rgba(232,193,90,0.14));
  border: 1px solid var(--card-border);
}
.cta-band-inner { max-width: 560px; }
.cta-band h2 { margin-bottom: 0.3em; }
.cta-band .btn { margin-top: 12px; }

/* Footer */
.site-footer { border-top: 1px solid var(--card-border); padding: 44px 0; }
.footer-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.footer-note { max-width: 340px; font-size: 0.85rem; margin: 0; }
.footer-copy { font-size: 0.8rem; color: var(--text-faint); margin: 0; }

/* Reveal-on-scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* Responsive */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .phone { width: 260px; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .price-grid { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; }
}

@media (max-width: 720px) {
  .nav { position: fixed; top: 72px; left: 0; right: 0; flex-direction: column; gap: 0;
    background: rgba(245,241,230,0.98); border-bottom: 1px solid var(--card-border);
    padding: 8px 24px 18px; transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease; }
  .nav a { padding: 12px 0; border-bottom: 1px solid rgba(47,74,67,0.08); }
  .nav.is-open { opacity: 1; transform: translateY(0); pointer-events: auto; }
  .header-cta { display: none; }
  .nav-toggle { display: flex; }
  .feature-grid { grid-template-columns: 1fr; }
  .waitlist { flex-direction: row; }
  .cta-band { margin: 0 16px 72px; padding: 56px 20px; }
}
