:root {
  --bg: #f3eee4;
  --surface: #fffcf7;
  --ink: #1a1612;
  --muted: #6e665c;
  --faint: #9a9286;
  --line: #e4d9c8;
  --accent: #8c3b2a;
  --accent-soft: #f4e4dc;
  --gold: #c4a35a;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --rail-h: 118px;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body {
  font-family: Assistant, "Segoe UI", sans-serif;
  line-height: 1.5;
  min-height: 100dvh;
  padding: var(--safe-t) 0 calc(var(--rail-h) + var(--safe-b));
  overflow-x: hidden;
}

.glow {
  pointer-events: none;
  position: fixed;
  inset: -20% -10% auto;
  height: 52vh;
  background:
    radial-gradient(ellipse at 70% 0%, rgba(196, 163, 90, 0.28), transparent 55%),
    radial-gradient(ellipse at 20% 10%, rgba(140, 59, 42, 0.16), transparent 50%);
  z-index: 0;
}

.wrap {
  position: relative;
  z-index: 1;
  max-width: 560px;
  margin: 0 auto;
  padding: 28px 20px 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--accent);
  font-weight: 700;
  font-size: 20px;
}
.brand img { width: 40px; height: 40px; }
.mark { font-family: "Frank Ruhl Libre", Georgia, serif; }

.eyebrow {
  display: inline-block;
  margin: 28px 0 0;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.02em;
}

h1 {
  font-family: "Frank Ruhl Libre", Georgia, serif;
  font-weight: 700;
  font-size: clamp(34px, 8.4vw, 48px);
  line-height: 1.12;
  margin: 14px 0 12px;
}
.lead { font-size: 18px; color: var(--ink); margin: 0 0 8px; }
.sub { color: var(--muted); margin: 0 0 22px; font-size: 16px; }

.demo { margin: 0 0 28px; }
.phone {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 14px 14px 16px;
  box-shadow: 0 18px 40px rgba(140, 59, 42, 0.08);
}
.phone-bar {
  margin: 0 0 14px;
  text-align: center;
  font-family: "Frank Ruhl Libre", Georgia, serif;
  font-weight: 700;
  color: var(--accent);
  font-size: 18px;
}
.bubble {
  max-width: 88%;
  padding: 10px 14px;
  border-radius: 16px;
  font-size: 14px;
  margin-bottom: 8px;
  line-height: 1.4;
}
.bubble.you {
  margin-left: auto;
  background: var(--ink);
  color: var(--surface);
  border-bottom-right-radius: 6px;
}
.bubble.mira {
  background: #f3eee4;
  color: var(--ink);
  border-bottom-left-radius: 6px;
}
.tiles {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 8px 2px 2px;
  -webkit-overflow-scrolling: touch;
}
.tile {
  flex: 0 0 132px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.tile img { width: 132px; height: 132px; object-fit: cover; display: block; }
.tile-name {
  display: block;
  padding: 8px 8px 0;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  min-height: 2.6em;
}
.tile-price {
  display: block;
  padding: 4px 8px 10px;
  font-size: 13px;
  font-weight: 700;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 18px 20px 22px;
  box-shadow: 0 18px 40px rgba(140, 59, 42, 0.06);
}

.tabs {
  display: flex;
  gap: 8px;
  margin: 0 0 18px;
  padding: 4px;
  background: #f3eee4;
  border-radius: 999px;
}
.tab {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
  font-size: 15px;
  font-family: inherit;
  min-height: 44px;
  border-radius: 999px;
  cursor: pointer;
  width: auto;
  padding: 10px 12px;
}
.tab.on {
  background: var(--accent);
  color: var(--surface);
}

.card h2 { margin: 0 0 8px; font-size: 20px; font-weight: 700; }
.card p { margin: 0 0 16px; color: var(--muted); font-size: 15px; }

label { display: block; color: var(--muted); font-size: 14px; margin-bottom: 6px; }
input[type="email"],
input[type="text"] {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 14px;
  padding: 14px 14px;
  font-size: 16px;
  color: var(--ink);
  font-family: inherit;
  margin-bottom: 12px;
}
input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

button[type="submit"] {
  width: 100%;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--surface);
  font-weight: 700;
  font-size: 16px;
  font-family: inherit;
  padding: 14px 18px;
  min-height: 48px;
  cursor: pointer;
}
button[type="submit"]:disabled { opacity: 0.6; cursor: default; }

.status { margin: 12px 0 0; font-size: 15px; min-height: 1.4em; }
.status.ok { color: #2d5a4a; }
.status.err { color: #9b2c2c; }

.notes { margin: 28px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 14px; }
.notes li { padding: 8px 0; border-top: 1px solid var(--line); }
.notes li:first-child { border-top: 0; }
.notes strong { color: var(--ink); font-weight: 600; }

footer { margin-top: 28px; color: var(--faint); font-size: 13px; line-height: 1.7; }
footer a { color: inherit; }

.rail {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  direction: ltr;
  padding: 8px 0 calc(8px + var(--safe-b));
  background: linear-gradient(180deg, rgba(243, 238, 228, 0), var(--bg) 22%, var(--bg));
  overflow: hidden;
}
.rail::before,
.rail::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 40px;
  z-index: 2;
  pointer-events: none;
}
.rail::before { left: 0; background: linear-gradient(90deg, var(--bg), transparent); }
.rail::after { right: 0; background: linear-gradient(270deg, var(--bg), transparent); }
.rail-track {
  display: flex;
  align-items: center;
  gap: 16px;
  width: max-content;
  padding: 4px 16px 2px;
  direction: ltr;
  will-change: transform;
  animation: rail-run 18s linear infinite;
}
.logo {
  flex: 0 0 auto;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 6px 16px rgba(26, 22, 18, 0.08);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.logo img { width: 70%; height: 70%; object-fit: contain; }
.logo .fallback {
  font-weight: 700;
  font-size: 15px;
  color: var(--accent);
  font-family: "Frank Ruhl Libre", Georgia, serif;
}
.rail-note {
  margin: 4px 0 0;
  text-align: center;
  font-size: 11px;
  color: var(--faint);
  direction: ltr;
}

@keyframes rail-run {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .rail-track { animation: none; }
}
