/* ===== Tokens (matched to productme.org) ===== */
:root {
  --page: #f7f6f3;
  --ink: #151514;
  --muted: #504d44;
  --soft: #6b685f;
  --line: #dad8d2;
  --shadow: #b0aea5;
  --sage: #a9c3bf;
  --sand: #c4bca8;
  --lavender: #b4b0c9;
  --serif: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --header-h: 64px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

.container {
  max-width: 72rem; /* max-w-6xl */
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--page);
  border-bottom: 0.8px solid var(--line);
  font-family: var(--serif);
}
.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 24px;
  line-height: 1;
}
.brand img { height: 26px; width: auto; }
.nav { display: flex; gap: 40px; font-size: 16px; }
.nav a, .brand { transition: opacity 0.2s; }
.nav a:hover, .brand:hover { opacity: 0.7; }
.nav a.active { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }

/* ===== Hero ===== */
.hero {
  min-height: calc(100vh - var(--header-h));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 32px;
  padding-bottom: 48px;
  position: relative;
}
.hero-art { width: 240px; max-width: 70vw; margin-bottom: 20px; }
.house-svg { width: 100%; height: auto; overflow: visible; }
.sparkles line { animation: twinkle 2.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.sparkles line:nth-child(2) { animation-delay: 0.6s; }
.sparkles line:nth-child(3) { animation-delay: 1.2s; }
.sparkles line:nth-child(4) { animation-delay: 1.8s; }
.smoke path { animation: smoke 3s ease-in-out infinite; }

.hero-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(36px, 5.2vw, 60px);
  line-height: 1.04;
  letter-spacing: -0.025em;
  max-width: 900px;
  margin: 0 0 20px;
}
.hero-sub {
  font-family: var(--serif);
  font-size: clamp(19px, 2vw, 24px);
  line-height: 1.35;
  color: var(--muted);
  max-width: 768px;
  margin: 0;
}

.scroll-down {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  animation: bob 2s ease-in-out infinite;
}

/* ===== Features ===== */
.features {
  padding-top: 64px;
  padding-bottom: 64px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  scroll-margin-top: var(--header-h);
}
.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}
.feature.reverse .feature-card { order: 2; }
.feature.reverse .feature-text { order: 1; align-self: center; }
.feature-card {
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  display: grid;
  place-items: center;
  overflow: hidden;
  max-height: 420px;
  width: 100%;
}
.card-sage { background: var(--sage); }
.card-sand { background: var(--sand); }
.card-lavender { background: var(--lavender); }
.card-illus { width: 72%; height: auto; }

.feature-text { padding: 0 8px; }
.feature:not(.reverse) .feature-text { padding-top: 14px; }
.feature:nth-child(3) .feature-text { align-self: center; }
.feature-text h2 {
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(20px, 2vw, 24px);
  line-height: 1.4;
  margin: 0 0 12px;
}
.feature-text em, .contact em { font-weight: 700; font-style: italic; }
.feature-text p {
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
  margin: 0;
  max-width: 440px;
}

/* dots + float animations */
.dot { animation: typing 1.2s ease-in-out infinite; }
.d2 { animation-delay: 0.15s; }
.d3 { animation-delay: 0.3s; }
.float { animation: floaty 3s ease-in-out infinite; }

/* ===== Contact ===== */
.contact {
  padding-top: 80px;
  padding-bottom: 80px;
  text-align: center;
  scroll-margin-top: var(--header-h);
}
.contact-title, .contact-sub {
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(22px, 2.4vw, 26px);
  line-height: 1.4;
  margin: 0 0 16px;
}
.contact-sub { margin-bottom: 28px; }
.demo-form {
  max-width: 440px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.demo-form input,
.demo-form textarea {
  width: 100%;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
  background: #fff;
  border: 1.6px solid var(--line);
  border-radius: 8px;
  padding: 12px 12px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.demo-form input { height: 52px; }
.demo-form textarea { resize: vertical; min-height: 112px; }
.demo-form input:focus,
.demo-form textarea:focus { border-color: #9cc9b7; box-shadow: 0 0 0 4px rgba(156, 201, 183, 0.35); }
.demo-form input::placeholder,
.demo-form textarea::placeholder { color: #6b685f; }
.demo-form .invalid { border-color: #d97a6a; }
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; }

/* 3D button (productme style) */
.btn-3d {
  position: relative;
  isolation: isolate;
  height: 52px;
  border: 0;
  background: transparent;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  margin-bottom: 8px;
}
.btn-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--ink);
  border: 1.6px solid var(--ink);
  border-radius: 10px;
  box-shadow: 0 5px 0 0 var(--shadow);
  transition: transform 0.2s ease-out, box-shadow 0.2s ease-out;
}
.btn-label { display: inline-block; transition: transform 0.2s ease-out; }
.btn-3d:hover .btn-bg { transform: translateY(2px); box-shadow: 0 3px 0 0 var(--shadow); }
.btn-3d:hover .btn-label { transform: translateY(2px); }
.btn-3d:active .btn-bg { transform: translateY(4px) scale(0.98); box-shadow: 0 1px 0 0 var(--shadow); }
.btn-3d:active .btn-label { transform: translateY(4px) scale(0.98); }
.btn-3d:disabled { opacity: 0.6; cursor: wait; }

.form-status { min-height: 24px; margin: 4px 0 0; font-size: 15px; color: var(--muted); }
.form-status.ok { color: #3e6b5c; }
.form-status.err { color: #b4523f; }

/* ===== Footer ===== */
.site-footer {
  background: #f0efec;
  font-family: var(--serif);
  font-size: 15px;
  padding: 0 0 40px;
}
.site-footer .container { border-top: 2px solid var(--line); padding-top: 36px; }
.site-footer p { margin: 0; }

/* ===== Scroll reveal ===== */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ===== Keyframes ===== */
@keyframes twinkle { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.35; transform: scale(0.8); } }
@keyframes smoke { 0% { opacity: 0; transform: translateY(4px); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(-10px); } }
@keyframes bob { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 5px); } }
@keyframes typing { 0%, 60%, 100% { opacity: 0.3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ===== Mobile ===== */
@media (max-width: 720px) {
  .nav { gap: 20px; font-size: 15px; }
  .brand { font-size: 21px; }
  .feature { grid-template-columns: 1fr; gap: 16px; }
  .feature.reverse .feature-card { order: 0; }
  .feature.reverse .feature-text { order: 1; }
  .feature-text { padding: 0; }
  .features { gap: 48px; }
}
