:root {
  --ink: #111713;
  --muted: #606a64;
  --line: rgba(17, 23, 19, 0.1);
  --paper: #ffffff;
  --soft: #faf9f6;
  --green: #97bfa9;
  --teal: #117f71;
  --shadow: 0 30px 90px rgba(17, 23, 19, 0.1);
  --story: 0;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Geist, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 400;
  letter-spacing: 0;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
}
html[dir="rtl"] body { font-family: "IBM Plex Sans Arabic", Geist, system-ui, sans-serif; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

.scroll-meter {
  position: fixed;
  inset: 0 auto auto 0;
  z-index: 100;
  width: calc(var(--page-progress, 0) * 100%);
  height: 3px;
  background: linear-gradient(90deg, var(--teal), var(--green), #fff0a8);
}

.scroll-ribbon {
  position: fixed;
  inset: 112px clamp(18px, 3.2vw, 52px) auto auto;
  z-index: 8;
  width: 58px;
  height: calc(100vh - 188px);
  min-height: 360px;
  pointer-events: none;
  opacity: 0.62;
  mix-blend-mode: multiply;
}
html[dir="rtl"] .scroll-ribbon { inset: 112px auto auto clamp(18px, 3.2vw, 52px); }
.scroll-ribbon::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 50%;
  width: 1px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, transparent, rgba(151,191,169,.1), rgba(151,191,169,.55), rgba(151,191,169,.28), transparent);
}
.scroll-ribbon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: calc((100% - 96px) * var(--page-progress, 0));
  width: 18px;
  height: 96px;
  border-radius: 999px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, transparent, rgba(151,191,169,.34), transparent);
  filter: blur(6px);
}
.ribbon-shape {
  position: absolute;
  left: 50%;
  top: calc((100% - 48px) * var(--page-progress, 0));
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(151,191,169,.34);
  border-radius: 50%;
  background: rgba(255,255,255,.72);
  box-shadow: 0 18px 50px rgba(17,23,19,.08);
  backdrop-filter: blur(18px);
  color: #456858;
  font-size: 16px;
  font-weight: 600;
  transform: translateX(-50%) rotate(calc(-8deg + var(--page-progress, 0) * 16deg));
  transition: border-radius 450ms ease, transform 450ms ease, color 450ms ease, background 450ms ease;
}
.ribbon-shape::before { content: "↗"; }
body[data-zone="overview"] .ribbon-shape { width: 54px; border-radius: 18px; transform: translateX(-50%) rotate(0deg); }
body[data-zone="overview"] .ribbon-shape::before { content: "AI"; font-size: 13px; }
body[data-zone="dental"] .ribbon-shape::before { content: "♡"; font-size: 23px; }
body[data-zone="features"] .ribbon-shape { border-radius: 999px 999px 999px 18px; }
body[data-zone="features"] .ribbon-shape::before { content: "☎"; font-size: 19px; }
body[data-zone="demo"] .ribbon-shape { border-radius: 18px 999px 999px 999px; }
body[data-zone="demo"] .ribbon-shape::before { content: "+"; font-size: 26px; font-weight: 400; }
body[data-zone="pricing"] .ribbon-shape { border-radius: 16px; }
body[data-zone="pricing"] .ribbon-shape::before { content: "$"; font-size: 20px; }

.site-header {
  position: fixed;
  inset: 20px 24px auto;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 8px 10px;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 999px;
  background: rgba(255,255,255,.74);
  box-shadow: 0 18px 50px rgba(17,23,19,.08);
  backdrop-filter: blur(24px);
}
.brand-mark, .footer-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 650; }
.brand-mark img, .footer-brand img { width: 38px; height: 38px; object-fit: contain; }
.nav-links { display: flex; align-items: center; justify-content: center; gap: 4px; }
.nav-links a, .language-toggle {
  min-height: 38px;
  padding: 10px 13px;
  border-radius: 999px;
  color: #31433f;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease;
}
.nav-links a:hover, .language-toggle:hover { transform: translateY(-2px); background: rgba(17,23,19,.05); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.language-toggle { border: 0; cursor: pointer; background: #f5faf8; display: inline-flex; gap: 7px; align-items: center; }
.globe { font-size: 20px; line-height: 1; }

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 650;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}
.button:hover { transform: translateY(-3px) scale(1.015); }
.button:active { transform: translateY(0) scale(.98); }
.button-dark { background: #111713; color: white; box-shadow: 0 16px 40px rgba(17,23,19,.18); }
.button-soft { border-color: var(--line); background: rgba(255,255,255,.74); color: var(--ink); }
.button-whatsapp { color: white; background: linear-gradient(135deg, #1cc86f, #0fa59e); box-shadow: 0 18px 48px rgba(17,181,122,.25); }

.hero-story { min-height: 520vh; background: #fff; }
.story-canvas {
  position: sticky;
  top: 0;
  display: flex;
  min-height: 100vh;
  align-items: center;
  overflow: hidden;
  padding: 132px clamp(18px, 6vw, 92px) 64px;
}
.morph-stage { position: absolute; inset: 0; overflow: hidden; background: #fff; }
.smile-story::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(circle at 66% 51%, rgba(255,255,255,0) 0 14%, rgba(255,255,255,.16) 35%, rgba(255,255,255,.76) 78%),
    linear-gradient(90deg, rgba(255,255,255,.76), rgba(255,255,255,.12) 42%, rgba(255,255,255,.58));
  opacity: calc(.18 + min(max((var(--story) - .34) * 2.2, 0), .78));
  pointer-events: none;
}
.smile-zoom-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  transform-origin: 67% 51%;
  transform:
    translate3d(
      calc(min(max((var(--story) - .14) * 1.9, 0), 1) * -6.8vw),
      calc(min(max((var(--story) - .20) * 1.7, 0), 1) * -1.2vh),
      0
    )
    scale(calc(1.02 + min(var(--story) * 1.38, 1) * 1.7 + min(max((var(--story) - .52) * 2.1, 0), 1) * 6.6));
  filter:
    saturate(calc(.94 - min(max((var(--story) - .58) * 1.4, 0), .34)))
    contrast(calc(1 + min(max((var(--story) - .34) * .7, 0), .16)))
    brightness(calc(1 + min(max((var(--story) - .55) * 1.8, 0), .42)))
    blur(calc(min(max((var(--story) - .72) * 7, 0), 1) * 9px));
  opacity: calc(1 - min(max((var(--story) - .82) * 4.4, 0), .96));
  transition: filter 120ms linear, opacity 120ms linear;
}
.smile-focus {
  position: absolute;
  left: 66.7%;
  top: 51.5%;
  z-index: 2;
  width: clamp(170px, 18vw, 290px);
  aspect-ratio: 2.8 / 1;
  border-radius: 999px;
  border: 1px solid rgba(151,191,169,.36);
  box-shadow: 0 0 90px rgba(151,191,169,.34), inset 0 0 36px rgba(255,255,255,.35);
  opacity: calc(min(max((var(--story) - .28) * 3, 0), .52) * (1 - min(max((var(--story) - .66) * 3, 0), 1)));
  transform:
    translate(-50%, -50%)
    scale(calc(.76 + min(max((var(--story) - .28) * 2, 0), 1) * 1.42));
}
.smile-aperture {
  position: absolute;
  left: 66.7%;
  top: 51.5%;
  z-index: 3;
  width: clamp(170px, 17vw, 280px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(255,255,255,.92);
  box-shadow: 0 0 0 1px rgba(255,255,255,.5), 0 0 120px rgba(255,255,255,.88), 0 0 180px rgba(151,191,169,.24);
  opacity: min(max((var(--story) - .58) * 3.1, 0), 1);
  transform:
    translate(-50%, -50%)
    scale(calc(.18 + min(max((var(--story) - .58) * 2.2, 0), 1) * 8.4));
  mix-blend-mode: screen;
}
.smile-light {
  position: absolute;
  inset: -12%;
  z-index: 3;
  background:
    radial-gradient(circle at 66.7% 51.5%, rgba(255,255,255,min(max((var(--story) - .60) * 2.8, 0), .96)) 0 18%, rgba(255,255,255,min(max((var(--story) - .64) * 2.6, 0), .86)) 34%, transparent 58%),
    radial-gradient(circle at 66.7% 51.5%, rgba(151,191,169,min(max((var(--story) - .48) * 2.4, 0), .18)), transparent 44%);
  opacity: min(max((var(--story) - .50) * 2.6, 0), 1);
  pointer-events: none;
}
.morph-glow {
  position: absolute;
  inset: 0;
  z-index: 4;
  background:
    radial-gradient(circle at 66.7% 51.5%, rgba(255,255,255,min(max((var(--story) - .70) * 3, 0), .96)), transparent 44%),
    linear-gradient(90deg, rgba(255,255,255,.92), rgba(255,255,255,.58) 36%, rgba(255,255,255,.14) 70%, rgba(255,255,255,.56));
}
html[dir="rtl"] .morph-glow { background: linear-gradient(270deg, rgba(255,255,255,.92), rgba(255,255,255,.58) 36%, rgba(255,255,255,.14) 70%, rgba(255,255,255,.56)); }
.growth-line {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 5;
  width: min(820px, 80vw);
  color: #111713;
  font-size: clamp(42px, 7vw, 104px);
  font-weight: 560;
  line-height: 1.02;
  letter-spacing: -0.035em;
  text-wrap: balance;
  opacity: min(max((var(--story) - .76) * 4.2, 0), 1);
  transform:
    translate(-50%, calc(-50% + min(max((var(--story) - .76) * 3.2, 0), 1) * 76px))
    scale(calc(.94 + min(max((var(--story) - .76) * 2, 0), 1) * .06));
  text-shadow: 0 18px 70px rgba(151,191,169,.22);
}
.hero-copy {
  position: relative;
  z-index: 4;
  max-width: 720px;
  opacity: calc(1 - min(max((var(--story) - .42) * 4.2, 0), 1));
  transform: translateY(calc(var(--story) * -28px));
}
.eyebrow {
  margin: 0 0 12px;
  color: var(--teal);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .11em;
  text-transform: uppercase;
}
html[dir="rtl"] .eyebrow { letter-spacing: 0; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 760px; margin-bottom: 24px; font-size: clamp(46px, 6.2vw, 88px); font-weight: 650; line-height: .98; letter-spacing: -0.05em; }
h1 span { display: block; color: var(--teal); font-size: .28em; font-weight: 600; margin-bottom: 10px; letter-spacing: 0; }
h1 strong { display: block; font-weight: 650; }
.hero-description { max-width: 640px; color: #525a55; font-size: clamp(16px, 1.25vw, 19px); line-height: 1.9; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.hero-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 660px;
  margin-top: 22px;
}
.hero-proof span {
  padding: 9px 12px;
  border: 1px solid rgba(151,191,169,.34);
  border-radius: 999px;
  background: rgba(255,255,255,.72);
  color: #39443d;
  font-size: 13px;
  font-weight: 560;
  backdrop-filter: blur(14px);
}

.section { position: relative; overflow: clip; padding: clamp(100px, 12vw, 168px) clamp(18px, 5vw, 82px); }
.section::before {
  content: "";
  position: absolute;
  inset: 8% clamp(10px, 4vw, 64px) auto auto;
  width: min(18vw, 240px);
  height: 420px;
  border-radius: 999px;
  background: var(--green);
  opacity: .035;
  filter: blur(18px);
  transform: rotate(calc(-2deg + var(--local-progress, 0) * 8deg));
  pointer-events: none;
}
html[dir="rtl"] .section::before { inset: 8% auto auto clamp(10px, 4vw, 64px); }
.section > * { position: relative; z-index: 1; }
.section-heading { max-width: 780px; margin: 0 auto 46px; text-align: center; }
.section-heading h2, .dental-copy h2, .demo-copy h2 { margin-bottom: 18px; font-size: clamp(32px, 4vw, 58px); font-weight: 650; line-height: 1.08; letter-spacing: -0.04em; }

.animated-video {
  position: relative;
  display: grid;
  min-height: 620px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(17,23,19,.08);
  border-radius: 28px;
  background: linear-gradient(115deg, rgba(255,255,255,.88), rgba(255,255,255,.48)), url("assets/dental-overview-bg.png") center / cover;
  box-shadow: 0 38px 120px rgba(17,23,19,.1);
}
.phone-frame, .demo-phone {
  width: min(340px, 78vw);
  min-height: 470px;
  padding: 20px;
  border: 1px solid rgba(255,255,255,.58);
  border-radius: 38px;
  background: rgba(255,255,255,.62);
  box-shadow: 0 30px 90px rgba(17,23,19,.13);
  backdrop-filter: blur(22px);
}
.phone-top, .demo-phone-top { height: 42px; margin-bottom: 18px; border-radius: 18px; background: #111713; color: white; display: grid; place-items: center; font-weight: 650; }
.chat-row, .demo-message {
  width: fit-content;
  max-width: 88%;
  margin: 12px 0;
  padding: 12px 14px;
  border-radius: 18px;
  color: #213934;
  background: white;
  line-height: 1.45;
  box-shadow: 0 12px 30px rgba(17,23,19,.08);
  animation: chatFloat 3.8s ease-in-out infinite;
}
.outgoing { margin-left: auto; color: white; background: linear-gradient(135deg, #12b981, #0ea9a3); animation-delay: 500ms; }
html[dir="rtl"] .outgoing { margin-right: auto; margin-left: 0; }
.small { font-size: 13px; }
.orbit {
  position: absolute;
  width: max-content;
  max-width: 240px;
  padding: 12px 14px;
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 999px;
  background: rgba(255,255,255,.66);
  box-shadow: 0 18px 50px rgba(17,23,19,.1);
  backdrop-filter: blur(18px);
  font-size: 14px;
  font-weight: 650;
  animation: orbitFloat 4.2s ease-in-out infinite;
}
.orbit-one { left: 10%; top: 18%; }
.orbit-two { right: 12%; top: 22%; animation-delay: 400ms; }
.orbit-three { left: 12%; bottom: 16%; animation-delay: 800ms; }
.orbit-four { right: 13%; bottom: 18%; animation-delay: 1200ms; }

.dental-section, .demo-section { display: grid; grid-template-columns: minmax(0,.95fr) minmax(340px,1.05fr); align-items: center; gap: clamp(28px,6vw,82px); }
.dental-visual img { width: 100%; border-radius: 28px; border: 1px solid rgba(17,23,19,.08); box-shadow: 0 38px 120px rgba(17,23,19,.11); }
.dental-copy p, .demo-copy p { color: var(--muted); font-size: 17px; line-height: 1.8; }
.outcome-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 24px 0;
}
.outcome-strip div {
  padding: 16px;
  border: 1px solid rgba(151,191,169,.26);
  border-radius: var(--radius);
  background: rgba(151,191,169,.08);
}
.outcome-strip strong {
  display: block;
  color: var(--ink);
  font-size: clamp(24px, 3vw, 38px);
  font-weight: 560;
  letter-spacing: -.02em;
}
.outcome-strip span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.check-list, .price-card ul { display: grid; gap: 12px; margin: 22px 0; padding: 0; list-style: none; }
.check-list li, .price-card li { position: relative; padding-inline-start: 30px; color: #5c645f; line-height: 1.55; }
.check-list li::before, .price-card li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: .35em;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--green), var(--teal));
  box-shadow: inset 0 0 0 5px white;
}
.features-section, .pricing-section { background: linear-gradient(180deg, #fff, #f8fcfb 45%, #fff); }
.feature-grid, .pricing-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
.feature-card, .price-card { border: 1px solid rgba(17,23,19,.08); border-radius: 22px; background: linear-gradient(180deg, #fff, #fbfaf7); box-shadow: 0 24px 70px rgba(17,23,19,.06); }
.feature-card { min-height: 330px; padding: 30px; transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease; }
.feature-card:hover, .price-card:hover { transform: translateY(-5px); border-color: rgba(17,23,19,.16); box-shadow: 0 38px 110px rgba(17,23,19,.1); }
.feature-number { display: inline-grid; width: 56px; height: 56px; margin-bottom: 42px; place-items: center; border-radius: 50%; background: #111713; color: white; font-size: 13px; font-weight: 650; }
.feature-card h3, .price-card h3 { margin-bottom: 12px; font-size: 24px; font-weight: 650; }
.feature-card p { color: var(--muted); line-height: 1.7; }
.feature-card strong { display: block; color: #15211c; font-weight: 600; line-height: 1.55; }
.demo-section { grid-template-columns: minmax(340px,.9fr) minmax(0,1.1fr); }
.demo-phone { justify-self: center; transform: rotate(2deg); }
.demo-message.outgoing { margin-left: auto; }
.price-card { position: relative; padding: 28px; overflow: hidden; border-radius: 24px; }
.price-card.featured { border-color: rgba(17,23,19,.2); transform: translateY(-12px); box-shadow: var(--shadow); }
.plan-badge { position: absolute; inset: 22px 22px auto auto; padding: 7px 11px; border-radius: 999px; background: #eafff6; color: #0d766d; font-size: 12px; font-weight: 650; }
html[dir="rtl"] .plan-badge { inset: 22px auto auto 22px; }
.price { display: flex; align-items: baseline; gap: 8px; margin: 8px 0 16px; }
.price span { font-size: 48px; font-weight: 650; line-height: 1; }
.price small, .price-card p { color: var(--muted); line-height: 1.7; }
.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 34px clamp(18px,5vw,82px); border-top: 1px solid var(--line); background: #fff; }
.site-footer p { margin: 0; color: var(--muted); }
.footer-links { display: flex; gap: 16px; font-weight: 600; }
.footer-links a:hover { color: var(--teal); }
.reveal { opacity: 0; transform: translateY(28px) scale(.992); transition: opacity 700ms ease, transform 700ms ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0) scale(1); }

@keyframes chatFloat { 50% { transform: translateY(-5px); } }
@keyframes orbitFloat { 50% { transform: translateY(-10px); } }

@media (max-width: 1080px) {
  .site-header { inset: 12px 12px auto; border-radius: 24px; flex-wrap: wrap; }
  .nav-links { order: 3; width: 100%; overflow-x: auto; justify-content: flex-start; padding-bottom: 2px; scrollbar-width: none; }
  .nav-links::-webkit-scrollbar { display: none; }
  .story-canvas, .dental-section, .demo-section { grid-template-columns: 1fr; }
  .story-canvas { padding-top: 166px; }
  .feature-grid, .pricing-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .outcome-strip { grid-template-columns: 1fr; }
  .scroll-ribbon { inset: 156px 12px auto auto; width: 36px; height: calc(100vh - 230px); min-height: 280px; opacity: .42; }
  html[dir="rtl"] .scroll-ribbon { inset: 156px auto auto 12px; }
  .ribbon-shape { width: 36px; height: 36px; font-size: 13px; }
}
@media (max-width: 720px) {
  .site-header { display: grid; grid-template-columns: auto 1fr; gap: 8px 12px; padding: 10px; border-radius: 22px; }
  .brand-mark span { display: none; }
  .header-actions { justify-self: end; }
  .nav-links { grid-column: 1 / -1; gap: 2px; }
  .nav-links a { min-height: 34px; padding: 8px 7px; font-size: 12px; }
  .language-toggle, .button { min-height: 40px; padding: 10px 14px; font-size: 12px; }
  .story-canvas { align-items: flex-start; padding: 160px 16px 48px; }
  .smile-zoom-photo {
    object-position: 68% 50%;
    transform-origin: 68% 52%;
    transform:
      translate3d(
        calc(min(max((var(--story) - .18) * 1.8, 0), 1) * -10vw),
        calc(min(max((var(--story) - .22) * 1.7, 0), 1) * -1vh),
        0
      )
      scale(calc(1.06 + min(var(--story) * 1.45, 1) * 1 + min(max((var(--story) - .50) * 1.75, 0), 1) * 4.8));
  }
  .smile-focus, .smile-aperture { left: 68%; top: 52%; }
  h1 { font-size: clamp(42px, 12vw, 62px); }
  .hero-description { max-width: 95%; font-size: 16px; }
  .hero-proof span { font-size: 12px; padding: 8px 10px; }
  .growth-line { width: 88vw; font-size: clamp(42px, 13vw, 64px); }
  .animated-video { min-height: 690px; display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: 28px 12px; }
  .orbit { position: static; margin: 8px; animation: none; }
  .feature-grid, .pricing-grid { grid-template-columns: 1fr; }
  .price-card.featured { transform: none; }
  .site-footer { flex-direction: column; align-items: flex-start; }
  .scroll-ribbon { inset: 176px 8px auto auto; width: 30px; height: calc(100vh - 250px); min-height: 240px; opacity: .34; mix-blend-mode: normal; }
  html[dir="rtl"] .scroll-ribbon { inset: 176px auto auto 8px; }
  .ribbon-shape { width: 30px; height: 30px; font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 1ms !important; transition-duration: 1ms !important; }
}
