/* ==========================================================================
   Eve site stylesheet. Static site, no build step.
   Design tokens live in :root; components below use them and nothing else.
   ========================================================================== */

/* ---- 1. Tokens ---------------------------------------------------------- */
:root {
  /* Paper (page) */
  --paper: #f7f3ec;
  --paper-2: #efe8dc;

  /* Ink */
  --ink: #14251f;
  --ink-2: #3a4a43;
  --muted: #6f7a74;
  --line: rgba(20, 37, 31, 0.12);

  /* Brand — evergreen family (shared with the care-manager portal) */
  --brand: #176b4b;
  --brand-deep: #0f3b2e;
  --brand-night: #0a2a21;
  --brand-soft: #e4f1ea;
  --mint: #9be4bd;

  /* Dusk accent — the "Eve" of Eve Health */
  --apricot: #e9a464;

  /* Status (reserved; never decorative) */
  --good: #067647;

  /* Type */
  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Shape and motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --nav-h: 68px;
  --wrap: 1180px;
}

/* ---- 2. Reset & base ---------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "cv11", "ss01", "calt";
}
svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1em; }
h1 { margin: 0; font-weight: 500; letter-spacing: -0.01em; }
h1 { font-family: var(--font-display); font-variation-settings: "SOFT" 40, "opsz" 96; }
::selection { background: var(--mint); color: var(--brand-night); }
.skip { position: absolute; left: 16px; top: -60px; background: var(--ink); color: var(--paper); padding: 10px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { top: 12px; }

/* ---- 3. Layout ---------------------------------------------------------- */
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

/* ---- 4. Type ------------------------------------------------------------ */
.h-display { font-size: clamp(2.6rem, 6.2vw, 5.1rem); line-height: 1.0; letter-spacing: -0.025em; }
.accent { font-style: italic; font-variation-settings: "SOFT" 100, "opsz" 144; color: var(--apricot); font-weight: 400; }
.lede { font-size: clamp(1.15rem, 1.6vw, 1.35rem); line-height: 1.5; color: var(--ink-2); }

/* ---- 5. Buttons --------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 22px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: 0.975rem; line-height: 1; cursor: pointer;
  transition: transform 0.25s var(--ease), background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.25s;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--ink); color: var(--paper); box-shadow: 0 8px 20px -10px rgba(20, 37, 31, 0.6); }
.btn-primary:hover { background: var(--brand-deep); }
.btn-light { background: var(--paper); color: var(--brand-night); }
.btn-light:hover { background: #fff; }
.btn-sm { padding: 10px 16px; font-size: 0.9rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ---- 6. Navigation ------------------------------------------------------ */
.nav {
  position: fixed; inset: 0 0 auto 0; height: var(--nav-h); z-index: 50;
  display: flex; align-items: center;
  background: rgba(247, 243, 236, 0.72);
  backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, background 0.2s;
}
.nav.scrolled { border-bottom-color: var(--line); background: rgba(247, 243, 236, 0.88); }
.nav.on-dark:not(.scrolled) { background: transparent; color: var(--paper); }
.nav .wrap { display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-size: 1.35rem; font-weight: 500; letter-spacing: -0.01em; }
.nav-links { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav-cta { margin-left: 8px; }
.nav.on-dark:not(.scrolled) .nav-cta { background: var(--paper); color: var(--brand-night); }

/* ---- 7. Hero ------------------------------------------------------------ */
.hero {
  position: relative; overflow: hidden; color: var(--paper);
  padding: calc(var(--nav-h) + clamp(56px, 9vw, 120px)) 0 clamp(64px, 8vw, 110px);
  background:
    radial-gradient(70% 55% at 85% 105%, rgba(233, 164, 100, 0.55), transparent 62%),
    radial-gradient(45% 40% at 10% 95%, rgba(155, 228, 189, 0.22), transparent 60%),
    linear-gradient(180deg, #0a2a21 0%, #0f3b2e 42%, #17594a 76%, #2a6c5b 100%);
  isolation: isolate;
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0.18; mix-blend-mode: soft-light; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%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");
}
.orb { position: absolute; border-radius: 50%; filter: blur(60px); opacity: 0.55; z-index: -1; pointer-events: none; }
.orb-a { width: 520px; height: 520px; right: -140px; bottom: -220px; background: radial-gradient(circle, rgba(233, 164, 100, 0.9), rgba(233, 164, 100, 0)); animation: drift 18s ease-in-out infinite alternate; }
.orb-b { width: 420px; height: 420px; left: -160px; bottom: -160px; background: radial-gradient(circle, rgba(155, 228, 189, 0.55), rgba(155, 228, 189, 0)); animation: drift 22s ease-in-out infinite alternate-reverse; }
@keyframes drift { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(-40px, -30px, 0) scale(1.08); } }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 { color: #fff; }
.hero .lede { color: rgba(247, 243, 236, 0.86); max-width: 560px; margin-top: 24px; }
.hero .btn-row { margin-top: 32px; }

/* ---- 8. Mockups --------------------------------------------------------- */
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; padding-bottom: 0.27em; background: var(--brand-deep); color: var(--mint); font-family: var(--font-display); font-size: 1.1rem; flex: none; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--good); display: inline-block; }
.dot.pulse { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(6, 118, 71, 0.5); } 60% { box-shadow: 0 0 0 6px rgba(6, 118, 71, 0); } }
.transcript { display: flex; flex-direction: column; gap: 10px; padding-top: 14px; min-height: 300px; }
.msg { max-width: 88%; padding: 10px 14px; border-radius: 16px; font-size: 0.925rem; line-height: 1.45; transition: opacity 0.4s var(--ease), transform 0.5s var(--ease); }
.js .transcript[data-play] .msg { opacity: 0; transform: translateY(8px); }
.js .transcript[data-play] .msg.in { opacity: 1; transform: none; }
.msg.eve { background: var(--brand-soft); color: var(--ink); border-bottom-left-radius: 6px; align-self: flex-start; }
.msg.patient { background: var(--paper-2); color: var(--ink); border-bottom-right-radius: 6px; align-self: flex-end; }
.typing { display: inline-flex; gap: 4px; padding: 12px 14px; background: var(--brand-soft); border-radius: 16px; border-bottom-left-radius: 6px; align-self: flex-start; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--brand); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: 0.2s; } .typing i:nth-child(3) { animation-delay: 0.4s; }
@keyframes blink { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 1; } }

/* ---- 9. Motion --------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .msg { opacity: 1 !important; transform: none !important; transition: none !important; }
  .orb, .dot.pulse, .typing i { animation: none !important; }
  .btn:hover { transform: none; }
}

/* ---- 10. Responsive ----------------------------------------------------- */
@media (max-width: 880px) {
  .nav .wrap { gap: 12px; }
  .nav-cta { margin-left: 4px; }
  .hero .wrap { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 1rem; }
  .wrap { padding: 0 18px; }
  .btn { width: 100%; }
  .btn-row .btn { width: auto; flex: 1; }
}

/* ---- 11. Stealth home: one screen, two phones ---------------------------- */
.hero-stealth { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding-bottom: 72px; }
.hero-stealth .wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.stealth-copy .h-display { font-size: clamp(3rem, 7vw, 6rem); }
.stealth-copy .lede { font-size: clamp(1.1rem, 1.5vw, 1.3rem); letter-spacing: 0.01em; color: rgba(247, 243, 236, 0.72); }
.stealth-foot { position: absolute; left: 0; right: 0; bottom: 22px; display: flex; flex-wrap: wrap; gap: 6px 24px; justify-content: flex-end; padding: 0 max(24px, calc((100vw - var(--wrap)) / 2 + 24px)); font-size: 0.75rem; color: rgba(247, 243, 236, 0.5); }

.phones { position: relative; height: 640px; }
.iphone { position: absolute; width: 292px; height: 600px; border-radius: 48px; padding: 10px; background: linear-gradient(145deg, #2b2f2e, #0b0d0c 40%, #1c1f1e); box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.14) inset, 0 50px 90px -30px rgba(0, 0, 0, 0.7), 0 18px 40px -18px rgba(0, 0, 0, 0.6); }
.iphone-front { right: 0; top: 30px; transform: rotate(4deg); z-index: 2; animation: float 9s ease-in-out infinite alternate; }
.iphone-back { right: 53%; top: 0; transform: rotate(-7deg) scale(0.93); z-index: 1; filter: brightness(0.92); animation: float 11s ease-in-out infinite alternate-reverse; }
@keyframes float { from { translate: 0 0; } to { translate: 0 -12px; } }
.iphone-screen { position: relative; height: 100%; border-radius: 39px; overflow: hidden; display: flex; flex-direction: column; color: var(--ink); }
.island { position: absolute; top: 10px; left: 50%; width: 88px; height: 25px; margin-left: -44px; border-radius: 16px; background: #000; z-index: 3; }
.ios-status { display: flex; justify-content: space-between; align-items: center; padding: 14px 26px 0; font-size: 0.8rem; font-weight: 600; height: 44px; flex: none; }
.ios-right { display: inline-flex; gap: 6px; align-items: center; }

/* text thread */
.sms { background: #fff; }
.sms-head { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 0 10px; border-bottom: 1px solid #ececec; background: #f7f7f7; flex: none; }
.sms-head .avatar { width: 40px; height: 40px; }
.sms-name { font-size: 0.68rem; color: #555; }
.sms-thread { display: flex; flex-direction: column; gap: 7px; padding: 14px 12px; }
.bubble { max-width: 82%; padding: 8px 12px; border-radius: 18px; font-size: 0.8rem; line-height: 1.35; }
.bubble.in { background: #e9e9eb; color: #111; align-self: flex-start; border-bottom-left-radius: 5px; }
.bubble.out { background: #007aff; color: #fff; align-self: flex-end; border-bottom-right-radius: 5px; }

/* live call */
.call { background: radial-gradient(120% 70% at 50% 0%, #1f6a57, #0f3b2e 55%, #0a2a21); color: #fff; }
.call-head { text-align: center; padding: 12px 0 2px; flex: none; }
.call-name { font-size: 1.6rem; line-height: 1.2; font-weight: 600; letter-spacing: -0.01em; }
.call-sub { font-size: 0.75rem; color: rgba(255, 255, 255, 0.7); display: inline-flex; align-items: center; gap: 6px; margin-top: 2px; }
.call-sub .dot { background: var(--mint); }
.call-captions { flex: 1; min-height: 0; padding: 6px 12px 0; gap: 6px; overflow: hidden; justify-content: flex-end; }
.call-captions .msg { font-size: 0.78rem; padding: 7px 11px; max-width: 90%; }
.call-captions .msg.eve { background: rgba(255, 255, 255, 0.14); color: #fff; backdrop-filter: blur(6px); }
.call-captions .msg.patient { background: rgba(233, 164, 100, 0.22); color: #fff; }
.call-captions .typing { background: rgba(255, 255, 255, 0.14); }
.call-captions .typing i { background: #fff; }
.call-controls { display: flex; justify-content: center; gap: 22px; padding: 14px 0 26px; flex: none; }
.call-controls span { width: 50px; height: 50px; border-radius: 50%; background: rgba(255, 255, 255, 0.16); }
.call-controls .end { background: #ff453a; }

@media (prefers-reduced-motion: reduce) { .iphone { animation: none !important; } }
@media (max-width: 1100px) { .iphone-back { right: 46%; } }
@media (max-width: 880px) {
  .hero-stealth { padding-bottom: 96px; }
  .hero-stealth .wrap { grid-template-columns: 1fr; }
  .phones { margin-top: 28px; }
  .iphone-front { right: 50%; margin-right: -230px; }
  .iphone-back { right: 50%; margin-right: -60px; }
  .stealth-foot { position: static; margin-top: 40px; padding: 0 24px; }
}
@media (max-width: 560px) {
  .iphone-back { display: none; }
  .iphone-front { position: relative; right: auto; margin: 0 auto; transform: none; top: 0; }
  .phones { height: auto; }
}
.call-captions { margin-top: 6px; -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 14px); mask-image: linear-gradient(180deg, transparent 0, #000 14px); }

/* ---- 12. iPhone realism -------------------------------------------------- */
.iphone::before { content: ""; position: absolute; left: -3px; top: 118px; width: 3px; height: 26px; border-radius: 2px 0 0 2px; background: #2a2d2c; box-shadow: 0 52px 0 #2a2d2c, 0 52px 0 0 #2a2d2c, 0 108px 0 #2a2d2c; }
.iphone::before { height: 22px; box-shadow: 0 48px 0 0 #2a2d2c, 0 62px 0 0 #2a2d2c, 0 76px 0 0 #2a2d2c, 0 108px 0 0 #2a2d2c, 0 122px 0 0 #2a2d2c, 0 136px 0 0 #2a2d2c; }
.iphone::after { content: ""; position: absolute; right: -3px; top: 186px; width: 3px; height: 78px; border-radius: 0 2px 2px 0; background: #2a2d2c; }
.iphone-screen::after { content: ""; position: absolute; left: 50%; bottom: 7px; width: 108px; height: 4.500px; margin-left: -54px; border-radius: 3px; background: currentColor; opacity: 0.85; z-index: 4; }
.sms.iphone-screen::after { background: #111; }
.ios-right { gap: 5px; }

.sms-head { position: relative; padding: 2px 0 8px; }
.sms-back { position: absolute; left: 14px; top: 12px; color: #0a84ff; }
.sms-name { display: inline-flex; gap: 3px; align-items: center; font-size: 0.66rem; color: #222; }
.sms-name span { color: #999; }
.sms-thread { flex: 1; min-height: 0; overflow: hidden; padding: 10px 12px 6px; }
.sms-stamp { text-align: center; font-size: 0.62rem; color: #8a8a8e; margin-bottom: 2px; }
.sms-stamp b { font-weight: 600; }
.sms-delivered { align-self: flex-end; font-size: 0.6rem; color: #8a8a8e; margin: -3px 4px 0 0; }
.sms-compose { flex: none; display: flex; align-items: center; gap: 8px; padding: 6px 12px 22px; }
.sms-compose .plus { width: 28px; height: 28px; border-radius: 50%; background: #e9e9eb; color: #6b6b70; display: grid; place-items: center; font-size: 1.15rem; line-height: 1; }
.sms-compose .field { flex: 1; display: flex; justify-content: space-between; align-items: center; border: 1px solid #d1d1d6; border-radius: 16px; padding: 5px 11px; font-size: 0.74rem; color: #b0b0b5; }
.sms-compose .field svg { color: #8a8a8e; }

.call-controls { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 0; padding: 10px 26px 30px; justify-items: center; }
.cc { display: flex; flex-direction: column; align-items: center; gap: 5px; font-size: 0.62rem; color: rgba(255, 255, 255, 0.85); }
.call-controls .cc span { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; background: rgba(255, 255, 255, 0.16); backdrop-filter: blur(8px); }
.call-controls .cc svg { width: 22px; height: 22px; }
.call-controls .cc .end { background: #ff453a; }
.call-controls .cc .end svg { width: 28px; height: 28px; }
@media (max-width: 880px) { .iphone::before, .iphone::after { display: none; } }
/* call captions stack up from the bottom; unspoken lines take no space */
.js .call-captions .msg:not(.in) { display: none; }
.js .call-captions .msg.in { animation: caption-in 0.45s var(--ease) both; }
@keyframes caption-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

@media print { .nav { display: none !important; } }
