/* Egersi site concept v3: clean product showcase.
   White space, one accent (the app's blue), real screens in real-looking phones.
   No webfonts: SF Pro on Apple devices, Inter elsewhere. */

:root {
  --ink: #1d1d1f;
  --ink-2: #6e6e73;
  --line: #e5e5ea;
  --bg: #ffffff;
  --bg-2: #f5f5f7;
  --blue: #1f5bff;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Helvetica Neue", Arial, sans-serif;
  --max: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, video { display: block; }
h1, h2, h3, p { margin: 0; }

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: saturate(1.8) blur(20px);
  -webkit-backdrop-filter: saturate(1.8) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  max-width: var(--max);
  height: 60px;
  margin: 0 auto;
  padding: 0 24px;
}
.wordmark { font-size: 21px; font-weight: 800; letter-spacing: -0.035em; }
.wordmark-sm { font-size: 17px; }
.nav-links { display: flex; gap: 28px; margin-left: auto; }
.nav-links a { font-size: 14px; color: var(--ink-2); transition: color 0.2s ease; }
.nav-links a:hover { color: var(--ink); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 600;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.btn:hover { opacity: 0.86; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-sm { height: 34px; padding: 0 16px; font-size: 14px; }

/* ---------- Type ---------- */
.eyebrow {
  margin-bottom: 14px;
  font-size: 15px;
  font-weight: 600;
  color: var(--blue);
}
h1 {
  font-size: clamp(52px, 8.4vw, 112px);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.045em;
}
h2 {
  font-size: clamp(40px, 5.6vw, 72px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.04em;
}
h3 {
  font-size: 24px;
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.lede, .sub {
  max-width: 620px;
  font-size: clamp(18px, 1.6vw, 21px);
  line-height: 1.5;
  color: var(--ink-2);
}

/* ---------- iPhone mockups (real iPhone render, screens composited in) ---------- */
.mock {
  display: block;
  width: 300px;
  height: auto;
  filter: drop-shadow(0 36px 40px rgba(17, 24, 54, 0.2)) drop-shadow(0 8px 12px rgba(17, 24, 54, 0.1));
}
/* Video phones: the recording is baked into the iPhone render (with its shadow)
   on white, so no masks or transforms are needed and every browser shows the same thing. */
.bakedv, .mock.bakedv { position: relative; aspect-ratio: 640 / 1354; mix-blend-mode: multiply; filter: none; }
.bakedv video {
  position: absolute;
  left: -17.1875%;
  top: 0;
  margin-top: -17.1875%;
  width: 134.375%;
  height: auto;
  aspect-ratio: 860 / 1574;
  display: block;
  background: #fff;
}

.step-video, .phone-main-still { display: none; }

/* ---------- Hero ---------- */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 118px 24px 0;
  text-align: center;
  background: var(--bg);
  overflow: hidden;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 26px;
  padding: 7px 14px 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 14px;
  color: var(--ink-2);
  transition: border-color 0.2s ease;
}
.chip:hover { border-color: #c8c8d0; color: var(--ink); }
.chip-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 4px rgba(31, 91, 255, 0.15); }
.hero .lede { margin: 26px auto 0; }
.hero-ctas {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-top: 36px;
}
.badge img { height: 50px; width: auto; }
.link-arrow { font-size: 17px; font-weight: 500; color: var(--blue); }
.link-arrow:hover { text-decoration: underline; }

.stage {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  width: 100%;
  max-width: 1000px;
  height: clamp(420px, 44vw, 560px);
  margin-top: 54px;
}
.phone-main {
  position: relative;
  z-index: 3;
  width: clamp(270px, 28vw, 350px);
  margin-bottom: -230px;
}
.phone-side {
  position: absolute;
  bottom: -250px;
  z-index: 2;
  width: clamp(230px, 23vw, 295px);
  transition: transform 0.2s linear;
}
.phone-left { left: calc(50% - clamp(380px, 37vw, 470px)); transform: rotate(-6deg); }
.phone-right { right: calc(50% - clamp(380px, 37vw, 470px)); transform: rotate(6deg); }

/* ---------- Strip ---------- */
.strip {
  position: relative;
  z-index: 4;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
  border-top: 1px solid var(--line);
  background: #fff;
}
.strip div {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 34px 24px 38px;
  border-left: 1px solid var(--line);
}
.strip div:first-child { border-left: 0; padding-left: 0; }
.strip b { font-size: 34px; font-weight: 700; letter-spacing: -0.03em; }
.strip span { font-size: 15px; color: var(--ink-2); }

/* ---------- Sticky showcase ---------- */
.how {
  max-width: var(--max);
  margin: 0 auto;
  padding: 140px 24px 60px;
}
.how-head { margin-bottom: 40px; }
.how-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 60px;
}
.step {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 82vh;
  max-width: 440px;
  opacity: 0.28;
  transition: opacity 0.4s ease;
}
.step.is-active { opacity: 1; }
.step-n { margin-bottom: 18px; font-size: 14px; font-weight: 600; color: var(--blue); font-variant-numeric: tabular-nums; }
.step h3 { font-size: clamp(30px, 3vw, 40px); letter-spacing: -0.035em; }
.step p { margin-top: 16px; font-size: 19px; line-height: 1.5; color: var(--ink-2); }
.how-sticky {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  background: var(--bg);
}
.phone-show { position: relative; width: clamp(280px, 26vw, 340px); aspect-ratio: 720 / 1521; }
.phone-show .mock {
  position: absolute;
  inset: 0;
  width: 100%;
  opacity: 0;
  transform: translateY(12px) scale(0.985);
  transition: opacity 0.5s ease, transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.phone-show .mock.is-on { opacity: 1; transform: none; }

/* ---------- Section heads ---------- */
.section-head { max-width: var(--max); margin: 0 auto 56px; padding: 0 24px; text-align: center; }
.section-head .sub { margin: 18px auto 0; }

/* ---------- Puzzles ---------- */
.puzzles { padding: 120px 0 40px; }
.cards3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}
.pcard {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 560px;
  margin: 0;
  overflow: hidden;
  border-radius: 28px;
  background: var(--bg-2);
}
.pcard figcaption { padding: 32px 32px 0; }
.pcard b { display: block; font-size: 24px; font-weight: 650; letter-spacing: -0.02em; }
.pcard figcaption span { display: block; margin-top: 6px; font-size: 17px; color: var(--ink-2); }
.peek {
  display: flex;
  justify-content: center;
  margin-top: auto;
  transform: translateY(14%);
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.pcard .mock { width: 285px; }
.pcard:hover .peek { transform: translateY(10%); }

/* ---------- Bento ---------- */
.features { padding: 120px 0 40px; }
.bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 420px;
  gap: 20px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}
.b {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 32px;
  border-radius: 28px;
  background: var(--bg-2);
}
.b-wide { grid-column: span 2; flex-direction: row; gap: 24px; }
.b-text { max-width: 320px; }
.b-text p { margin-top: 10px; font-size: 17px; line-height: 1.45; color: var(--ink-2); }
.b-blue { background: var(--blue); color: #fff; }
.b-blue .b-text p { color: rgba(255, 255, 255, 0.78); }
.b-sky { background: linear-gradient(160deg, #4b6fc7 0%, #93a6dc 45%, #f2c7aa 100%); color: #fff; }
.b-sky .b-text p { color: rgba(255, 255, 255, 0.85); }
.peek-right { margin: 0 0 0 auto; align-self: flex-start; transform: translateY(6%) rotate(-4deg); }
.peek-right .mock, .peek-right .mockv { width: 265px; }
.b:hover .peek-right { transform: translateY(3%) rotate(-2deg); }

.la {
  margin-top: auto;
  padding: 18px 20px 20px;
  border-radius: 26px;
  background: #1c1c1e;
  color: #fff;
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.4);
}
.la-row { display: flex; justify-content: space-between; font-size: 14px; font-weight: 600; }
.la-row span:last-child { color: rgba(255, 255, 255, 0.55); font-weight: 500; }
.la-count { margin: 6px 0 12px; font-size: 52px; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.la-bar { height: 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.15); overflow: hidden; }
.la-bar span { display: block; width: 0; height: 100%; border-radius: 6px; background: #fff; transition: width 0.9s linear; }

.eq { display: flex; align-items: center; gap: 6px; height: 130px; margin-top: auto; }
.eq i {
  flex: 1;
  height: 20%;
  border-radius: 6px;
  background: var(--blue);
  animation: eq 1.2s ease-in-out infinite;
}
.eq i:nth-child(2n) { animation-delay: -0.4s; background: #6d93ff; }
.eq i:nth-child(3n) { animation-delay: -0.8s; }
.eq i:nth-child(5n) { animation-duration: 0.9s; background: #a9c0ff; }
@keyframes eq { 50% { height: 100%; } }

/* ---------- CTA ---------- */
.cta { max-width: var(--max); margin: 0 auto; padding: 120px 24px 100px; }
.cta-card {
  display: flex;
  align-items: stretch;
  overflow: hidden;
  min-height: 460px;
  border-radius: 36px;
  background: #0b0b0f;
  color: #fff;
}
.cta-text { display: flex; flex-direction: column; justify-content: center; gap: 20px; padding: 64px; }
.cta-text p { font-size: 19px; color: rgba(255, 255, 255, 0.65); }
.badge-light img { filter: invert(1); }
.peek-cta { margin: 0 64px 0 auto; align-self: flex-end; transform: translateY(30%); }
.peek-cta .mock { width: 320px; filter: drop-shadow(0 30px 60px rgba(31, 91, 255, 0.35)); }

/* ---------- Footer ---------- */
.foot { border-top: 1px solid var(--line); }
.foot-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px 24px 40px;
  font-size: 14px;
  color: var(--ink-2);
}
.foot-links { display: flex; gap: 24px; }
.foot-links a:hover { color: var(--ink); }
.foot-copy { margin-left: auto; }
.foot .wordmark { color: var(--ink); }

/* Reveal */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1); }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- Small screens ---------- */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-inner .btn { margin-left: auto; }
  .hero { padding-top: 110px; }
  .hero-ctas { flex-direction: column; gap: 18px; }
  .stage { height: auto; margin-top: 44px; padding-bottom: 36px; }
  .stage .bakedv.phone-main { display: none; }
  .phone-main-still { display: block; width: min(52vw, 210px); margin-bottom: 0; }
  .phone-side { width: min(34vw, 145px); bottom: 64px; }
  .phone-left { left: calc(50% - min(44vw, 178px)); }
  .phone-right { right: calc(50% - min(44vw, 178px)); }
  .strip { grid-template-columns: 1fr 1fr; }
  .strip div { padding: 26px 16px; }
  .strip div:nth-child(3) { border-left: 0; padding-left: 0; }
  .strip div:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .how { padding-top: 100px; }
  .how-grid { grid-template-columns: 1fr; }
  .how-sticky { display: none; }
  .step { min-height: 0; padding: 30px 0; opacity: 1; }
  .step::after {
    content: "";
    display: block;
    width: 250px;
    aspect-ratio: 720 / 1521;
    margin: 30px auto 0;
    background: var(--shot) center / contain no-repeat;
    filter: drop-shadow(0 26px 30px rgba(17, 24, 54, 0.2));
  }
  .step[data-screen="0"]::after { content: none; }
  .step-video { display: block; width: 250px; margin: 30px auto 0; }
  .step[data-screen="1"] { --shot: url("/assets/mock/s-presets-pro.webp"); }
  .step[data-screen="2"] { --shot: url("/assets/mock/s-review.webp"); }
  .step[data-screen="3"] { --shot: url("/assets/mock/s-ringing.webp"); }
  .cards3 { grid-template-columns: 1fr; }
  .pcard { height: 500px; }
  .bento { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .b { min-height: 360px; }
  .b-wide { grid-column: auto; flex-direction: column; min-height: 520px; }
  .peek-right { margin: auto auto 0; transform: translateY(18%) rotate(-4deg); }
  .cta-card { flex-direction: column; }
  .cta-text { padding: 40px 28px 10px; }
  .peek-cta { margin: 30px auto 0; transform: translateY(20%); }
  .peek-cta .mock { width: 250px; }
  .foot-inner { flex-wrap: wrap; }
}

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

/* =========================================================
   Subpages: Privacy, Terms, Support
   ========================================================= */
.subpage main { padding-top: 60px; }
.nav-links a[aria-current="page"] { color: var(--ink); }

/* Legal */
.doc-hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 90px 24px 56px;
  border-bottom: 1px solid var(--line);
}
.doc-hero h1 { font-size: clamp(48px, 7vw, 88px); }
.doc-meta { margin-top: 18px; font-size: 16px; color: var(--ink-2); }
.doc-meta a { color: var(--blue); }
.doc-meta a:hover { text-decoration: underline; }
.doc {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 80px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 56px 24px 120px;
}
.toc { position: sticky; top: 90px; align-self: start; }
.toc-title { margin-bottom: 14px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.toc ol { margin: 0; padding: 0; list-style: none; border-left: 1px solid var(--line); }
.toc a {
  display: block;
  margin-left: -1px;
  padding: 6px 0 6px 16px;
  border-left: 2px solid transparent;
  font-size: 14px;
  line-height: 1.35;
  color: var(--ink-2);
  transition: color 0.2s ease, border-color 0.2s ease;
}
.toc a:hover { color: var(--ink); }
.toc a.is-on { color: var(--ink); font-weight: 600; border-left-color: var(--blue); }
.prose { max-width: 680px; font-size: 18px; line-height: 1.7; color: #3a3a3f; }
.prose h2 {
  margin: 56px 0 14px;
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--ink);
  scroll-margin-top: 90px;
}
.prose h2:first-of-type { margin-top: 36px; }
.prose > p:first-child { font-size: 21px; line-height: 1.55; color: var(--ink); }
.prose p { margin: 0 0 16px; }
.prose ul { margin: 0 0 16px; padding-left: 22px; }
.prose li { margin: 8px 0; padding-left: 4px; }
.prose li::marker { color: var(--blue); }
.prose a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.prose strong { color: var(--ink); }

/* Support */
.support-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  align-items: center;
  gap: 40px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 80px 24px 40px;
  overflow: hidden;
}
.support-hero h1 { font-size: clamp(48px, 6.4vw, 84px); }
.support-hero .lede { margin-top: 22px; }
.support-ctas { margin-top: 32px; }
.btn-lg { height: 54px; padding: 0 26px; font-size: 17px; }
.support-phone { display: flex; justify-content: center; }
.support-phone .mock { width: 280px; transform: rotate(4deg); }
.faq { max-width: var(--max); margin: 0 auto; padding: 60px 24px 120px; }
.faq-title { margin-bottom: 28px; font-size: clamp(32px, 4vw, 48px); }
.faq-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.faq-card { padding: 34px; border-radius: 28px; background: var(--bg-2); }
.faq-card h2 { font-size: 24px; letter-spacing: -0.02em; }
.faq-card p { margin-top: 10px; font-size: 17px; line-height: 1.55; color: var(--ink-2); }
.faq-card a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.faq-more {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
  padding: 28px 34px;
  border: 1px solid var(--line);
  border-radius: 28px;
  font-size: 17px;
  color: var(--ink-2);
}
.faq-more b { color: var(--ink); }

@media (max-width: 900px) {
  .doc { grid-template-columns: 1fr; gap: 0; padding-top: 30px; }
  .toc { position: static; margin-bottom: 20px; }
  .toc ol { columns: 2; column-gap: 16px; }
  .doc-hero { padding-top: 60px; }
  .support-hero { grid-template-columns: 1fr; padding-top: 50px; }
  .support-phone .mock { width: 230px; margin-top: 20px; }
  .faq-grid { grid-template-columns: 1fr; }
}

