/* ───────────────────────────  tokens  ─────────────────────────── */
:root {
  --bg: #fffefc;
  --ink: #1c1a16;          /* warm near-black */
  --muted: #837c70;        /* warm gray */
  --hair: rgba(28, 26, 22, 0.10);
  --card: #ffffff;

  --sun: #ffc53d;          /* sol — the sun */
  --sun-deep: #f5a623;     /* deeper, for hover + gradients */
  --sun-soft: #ffe6a3;     /* pale glow */

  --imsg-blue: #0a84ff;    /* sent bubble — it's imessage */
  --bubble-in: #ebe9e6;    /* received bubble, warm light gray */

  --radius: 22px;
  --r-bubble: 21px;
  --maxw: 1080px;

  --font-ui: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --font-round: ui-rounded, "SF Pro Rounded", "Hiragino Maru Gothic ProN", "Quicksand", system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;
}

/* ───────────────────────────  base  ─────────────────────────── */
* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-ui);
  color: var(--ink);
  background:
    radial-gradient(1100px 560px at 50% -14%, var(--sun-soft) 0%, rgba(255, 230, 163, 0) 62%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }

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

/* ───────────────────────────  type  ─────────────────────────── */
.display {
  font-family: var(--font-round);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 0.92;
  font-size: clamp(4.5rem, 17vw, 9.5rem);
}
.display--sm { font-size: clamp(3rem, 9vw, 5rem); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-transform: lowercase;
}
.center { text-align: center; }

.lede {
  font-size: clamp(1.05rem, 1.7vw, 1.3rem);
  color: #43403a;
  max-width: 34ch;
}
.lede.center { margin-inline: auto; max-width: 46ch; }

.fineprint { font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted); }
.mono { font-family: var(--font-mono); }
.muted { color: var(--muted); }

/* ───────────────────────────  brand + topbar  ─────────────────────────── */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 22px; padding-bottom: 22px;
}
.brand {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--font-round); font-weight: 800; font-size: 1.35rem; letter-spacing: -0.02em;
}
.brand.small { font-size: 1.1rem; }
.brand__mark { width: 36px; height: 36px; display: grid; place-items: center; }
.brand__mark img { width: 100%; height: 100%; object-fit: contain; }
.brand.small .brand__mark { width: 28px; height: 28px; }

/* ───────────────────────────  buttons  ─────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-round); font-weight: 700; font-size: 1rem;
  padding: 13px 22px; border-radius: 999px;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
  white-space: nowrap;
}
.btn--primary {
  color: #4a3500;
  background: linear-gradient(180deg, #ffd25e, var(--sun) 60%, var(--sun-deep));
  box-shadow: 0 8px 22px rgba(245, 166, 35, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(245, 166, 35, 0.48); }
.btn--primary::after { content: "→"; font-weight: 800; }
.btn--lg { font-size: 1.1rem; padding: 16px 30px; }
.btn--ghost {
  color: var(--ink);
  background: rgba(28, 26, 22, 0.04);
  border: 1px solid var(--hair);
}
.btn--ghost:hover { background: rgba(28, 26, 22, 0.07); transform: translateY(-1px); }

/* ───────────────────────────  hero  ─────────────────────────── */
.hero {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center;
  padding-top: clamp(40px, 7vw, 90px); padding-bottom: clamp(60px, 9vw, 120px);
}
.hero__copy { display: flex; flex-direction: column; gap: 22px; }
.hero .display { margin-top: 4px; }
.hero .lede { margin-top: 2px; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 6px; }

/* hero phone stage */
.hero__stage { position: relative; display: grid; place-items: center; }
.glow {
  position: absolute; inset: -10% -6%;
  background: radial-gradient(closest-side, rgba(255, 197, 61, 0.55), rgba(255, 197, 61, 0) 70%);
  filter: blur(8px); z-index: 0;
}

/* ───────────────────────────  iphone  ─────────────────────────── */
.phone {
  position: relative; z-index: 1;
  width: min(334px, 84vw);
  background: linear-gradient(150deg, #3a3a3e, #161618 55%, #2a2a2e);
  border-radius: 56px;
  padding: 11px;
  box-shadow:
    0 38px 80px rgba(60, 45, 10, 0.26),
    0 6px 16px rgba(60, 45, 10, 0.10),
    inset 0 0 0 1.5px rgba(255, 255, 255, 0.10);
}
.screen {
  position: relative;
  height: min(620px, 76vh);
  display: flex; flex-direction: column;
  background: #fff; border-radius: 46px; overflow: hidden;
}

/* dynamic island */
.island {
  position: absolute; top: 11px; left: 50%; transform: translateX(-50%);
  width: 86px; height: 25px; border-radius: 999px; background: #000; z-index: 6;
}

/* status bar */
.statusbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 26px 8px; color: #000;
}
.statusbar__time { font-weight: 700; font-size: 0.92rem; letter-spacing: 0.01em; }
.statusbar__icons { display: inline-flex; align-items: center; gap: 6px; }
.battery { position: relative; display: inline-block; width: 24px; height: 12px; border: 1px solid rgba(0,0,0,.35); border-radius: 3px; }
.battery__fill { position: absolute; inset: 1.5px; right: 6px; background: #000; border-radius: 1.5px; }
.battery__cap { position: absolute; right: -3px; top: 3.5px; width: 2px; height: 5px; border-radius: 0 2px 2px 0; background: rgba(0,0,0,.35); }

/* messages nav bar */
.navbar {
  display: flex; align-items: center; gap: 6px;
  padding: 2px 14px 9px; border-bottom: 1px solid rgba(0, 0, 0, 0.07);
}
.navbar__back { color: var(--imsg-blue); font-size: 1.9rem; line-height: 0.7; font-weight: 500; width: 18px; }
.navbar__contact { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.navbar__name { font-family: var(--font-ui); font-size: 0.78rem; font-weight: 600; color: #1a1a1a; }
.navbar__name em { color: #b8b8bd; font-style: normal; font-size: 0.7rem; }
.navbar__spacer { width: 18px; }
.avatar {
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  overflow: hidden; background: #fff6df;
}
.avatar img { width: 116%; height: 116%; object-fit: cover; }
.avatar--sm { width: 30px; height: 30px; }

/* thread fills the screen; input bar pins to the bottom */
.phone__thread {
  flex: 1; overflow-y: auto;
  display: flex; flex-direction: column; gap: 6px;
  padding: 14px 13px 8px; background: #fff;
}
.phone__thread::-webkit-scrollbar { display: none; }

/* composer */
.composer {
  display: flex; align-items: center; gap: 9px; padding: 7px 13px 4px;
}
.composer__plus { color: #9a9a9e; font-size: 1.5rem; line-height: 1; }
.composer__field {
  flex: 1; border: 1px solid rgba(0, 0, 0, 0.16); border-radius: 999px;
  padding: 7px 14px; color: #a2a2a7; font-size: 0.86rem;
}
.composer__send {
  display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: #e4e4e8; color: #fff;
}
.homebar { width: 128px; height: 5px; border-radius: 999px; background: #000; opacity: 0.85; margin: 7px auto 9px; }

/* ───────────────────────────  bubbles  ─────────────────────────── */
.bubble {
  max-width: 80%; padding: 10px 14px; font-size: 0.96rem; line-height: 1.32;
  border-radius: var(--r-bubble); width: fit-content;
}
.bubble.in {
  background: var(--bubble-in); color: var(--ink);
  align-self: flex-start; border-bottom-left-radius: 6px;
}
.bubble.out {
  background: var(--imsg-blue); color: #fff;
  align-self: flex-end; border-bottom-right-radius: 6px;
}
/* grouped bubbles: only the last in a run keeps the tail corner */
.bubble.in:not(:last-of-type) { border-bottom-left-radius: var(--r-bubble); }
.bubble.out:not(:last-of-type) { border-bottom-right-radius: var(--r-bubble); }

.bubble--media { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.thumb {
  width: 172px; height: auto; border-radius: 13px; display: block;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

/* typing indicator (hero) */
.typing { align-self: flex-start; background: var(--bubble-in); border-bottom-left-radius: 6px;
  border-radius: var(--r-bubble); padding: 13px 15px; display: inline-flex; gap: 5px; }
.typing span { width: 8px; height: 8px; border-radius: 50%; background: #9b958a; animation: blink 1.3s infinite both; }
.typing span:nth-child(2) { animation-delay: 0.18s; }
.typing span:nth-child(3) { animation-delay: 0.36s; }
@keyframes blink { 0%, 60%, 100% { opacity: 0.35; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

/* pop-in for dynamically added hero bubbles */
.pop { animation: pop 0.32s cubic-bezier(0.2, 0.85, 0.25, 1) both; }
@keyframes pop { from { opacity: 0; transform: translateY(9px) scale(0.96); } to { opacity: 1; transform: none; } }

/* ───────────────────────────  what it does  ─────────────────────────── */
.does { padding-top: clamp(40px, 6vw, 70px); padding-bottom: clamp(50px, 7vw, 90px); }
.section-head {
  font-family: var(--font-round); font-weight: 800; letter-spacing: -0.02em;
  font-size: clamp(1.7rem, 4vw, 2.4rem); line-height: 1.12; text-align: center;
  margin-bottom: 36px;
}
.feats { display: flex; flex-direction: column; gap: clamp(44px, 6vw, 80px); max-width: 940px; margin-inline: auto; }
.feat {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 5vw, 60px); align-items: center;
}
.feat__head { order: 0; }
.feat__chat { order: 1; }
/* alternate sides for rhythm */
.feat:nth-child(even) .feat__head { order: 1; }
.feat:nth-child(even) .feat__chat { order: 0; }

.feat__title {
  font-family: var(--font-round); font-weight: 800; letter-spacing: -0.02em;
  font-size: clamp(1.5rem, 3vw, 1.95rem); line-height: 1.12; margin-bottom: 12px;
}
.feat__desc { color: #5b574e; font-size: 1.06rem; line-height: 1.6; max-width: 36ch; }

.feat__chat {
  background: var(--card); border: 1px solid var(--hair); border-radius: var(--radius);
  padding: 20px; box-shadow: 0 14px 36px rgba(60, 45, 10, 0.07);
}
.bubbles { display: flex; flex-direction: column; gap: 7px; }
.bubbles .bubble { max-width: 90%; }

@media (max-width: 760px) {
  .feat { grid-template-columns: 1fr; gap: 18px; }
  .feat__head { order: 0 !important; }
  .feat__chat { order: 1 !important; }
  .feat__desc { max-width: none; }
}

[data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); }
[data-reveal].is-in { opacity: 1; transform: none; }

/* ───────────────────────────  beta form  ─────────────────────────── */
.beta { max-width: 560px; margin-inline: auto; padding: 32px 0 80px; }
.beta__lead { color: #43403a; font-size: 1.1rem; line-height: 1.6; margin: 12px 0 30px; }
.beta-form { display: flex; flex-direction: column; gap: 16px; }
.beta-form label {
  display: flex; flex-direction: column; gap: 6px;
  font-family: var(--font-round); font-weight: 600; font-size: 0.95rem; color: #2b2924;
}
.beta-form .hint { font-family: var(--font-ui); font-weight: 400; color: var(--muted); font-size: 0.85rem; }
.beta-form input[type="text"], .beta-form input[type="tel"], .beta-form input[type="email"], .beta-form textarea {
  font-family: var(--font-ui); font-size: 1rem; padding: 12px 14px;
  border: 1px solid rgba(28, 26, 22, 0.18); border-radius: 12px; background: #fff; color: var(--ink);
}
.beta-form textarea { resize: vertical; }
.beta-form input:focus, .beta-form textarea:focus {
  outline: none; border-color: var(--sun-deep); box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.2);
}
.beta-form .check {
  flex-direction: row; align-items: flex-start; gap: 9px;
  font-family: var(--font-ui); font-weight: 500; color: #43403a; font-size: 0.98rem;
}
.beta-form .check input { margin-top: 3px; }
.beta-form .check a { color: var(--imsg-blue); text-decoration: underline; }
.beta-form button { margin-top: 8px; align-self: flex-start; }
.beta__status { min-height: 1.2em; font-size: 0.95rem; font-family: var(--font-ui); }
.beta__status.ok { color: #0a7d3c; }
.beta__status.err { color: #c0392b; }

/* ───────────────────────────  closer  ─────────────────────────── */
.closer {
  text-align: center; display: flex; flex-direction: column; align-items: center; gap: 20px;
  padding-top: clamp(50px, 8vw, 100px); padding-bottom: clamp(60px, 9vw, 120px);
}
.closer .display { color: var(--ink); }
.closer .btn { margin-top: 6px; }

/* ───────────────────────────  footer  ─────────────────────────── */
.foot {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 28px; padding-bottom: 40px; border-top: 1px solid var(--hair);
}

/* ───────────────────────────  responsive  ─────────────────────────── */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 40px; text-align: center; padding-top: 30px; }
  .hero__copy { align-items: center; }
  .hero .lede { max-width: 40ch; }
  .cta-row { justify-content: center; }
}

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

/* keyboard focus */
:focus-visible { outline: 3px solid var(--sun-deep); outline-offset: 3px; border-radius: 6px; }

/* ───────────────────────────  legal pages  ─────────────────────────── */
.legal { max-width: 720px; margin-inline: auto; padding: 32px 0 80px; }
.legal h1 {
  font-family: var(--font-round); font-weight: 800; letter-spacing: -0.02em;
  font-size: clamp(2.2rem, 6vw, 3.1rem); margin-bottom: 6px;
}
.legal .updated { font-family: var(--font-mono); color: var(--muted); font-size: 0.82rem; margin-bottom: 30px; }
.legal h2 { font-family: var(--font-round); font-weight: 700; font-size: 1.25rem; margin: 32px 0 8px; }
.legal p, .legal li { color: #39362f; font-size: 1.02rem; line-height: 1.68; }
.legal p { margin-bottom: 12px; }
.legal ul { margin: 0 0 12px 1.25rem; }
.legal li { margin-bottom: 6px; }
.legal a { color: var(--imsg-blue); text-decoration: underline; }
.legal .lead { font-size: 1.1rem; color: #2b2924; }
.prompt-box {
  font-family: var(--font-mono); font-size: 0.82rem; line-height: 1.6;
  color: #33302a; background: #fbf7ee; border: 1px solid var(--hair);
  border-radius: 16px; padding: 22px; margin: 8px 0 8px;
  white-space: pre-wrap; word-wrap: break-word; overflow-wrap: anywhere;
}

.foot__links { display: inline-flex; gap: 16px; }
.foot__links a:hover { color: var(--ink); }
