:root {
  --ink: #101525;
  --muted: #596174;
  --line: rgba(16, 21, 37, 0.12);
  --paper: rgba(255, 255, 255, 0.78);
  --medical: #006cff;
  --medical-2: #00c2ff;
  --dental: #ff6a00;
  --dental-2: #ff2f8f;
  --lime: #ccff00;
  --whatsapp: #18a85f;
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100svh;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(118deg, rgba(0, 194, 255, 0.18), transparent 34%),
    linear-gradient(242deg, rgba(255, 47, 143, 0.2), transparent 36%),
    linear-gradient(180deg, #fffdf6 0%, #f0fbff 46%, #fff3fa 100%),
    #fffdf6;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    repeating-linear-gradient(90deg, rgba(16, 21, 37, 0.055) 0 1px, transparent 1px 92px),
    repeating-linear-gradient(0deg, rgba(16, 21, 37, 0.04) 0 1px, transparent 1px 92px),
    linear-gradient(115deg, transparent 0 38%, rgba(255, 255, 255, 0.7) 45%, transparent 55%);
  background-size: 92px 92px, 92px 92px, 240% 240%;
  animation: grid-drift 20s linear infinite;
}

body[data-active="medical"] {
  --accent: var(--medical);
  --accent-2: var(--medical-2);
}

body[data-active="dental"] {
  --accent: var(--dental);
  --accent-2: var(--dental-2);
}

#health-canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  opacity: 0.44;
  pointer-events: none;
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
  padding: 18px 0;
  backdrop-filter: blur(16px);
}

.brand,
.topbar nav {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand {
  font-weight: 950;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--medical), var(--dental-2));
  box-shadow: 0 14px 30px rgba(0, 108, 255, 0.22);
}

.topbar nav a {
  padding: 10px 12px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 850;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.5);
  box-shadow: inset 0 0 0 1px rgba(16, 21, 37, 0.08);
  transition: transform 160ms ease, background 160ms ease;
}

.topbar nav a:hover {
  background: rgba(255, 255, 255, 0.88);
  transform: translateY(-2px);
}

main {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 520px);
  gap: clamp(28px, 6vw, 70px);
  align-items: center;
  min-height: calc(100svh - 88px);
  padding: clamp(28px, 6vw, 72px) 0;
}

.hero-copy,
.hero-visual,
.access-card,
.pricing-system {
  transform: translateY(0);
  opacity: 1;
}

.motion-ready .hero-copy,
.motion-ready .hero-visual,
.motion-ready .access-card,
.motion-ready .pricing-system {
  transform: translateY(22px);
  opacity: 0;
}

.motion-ready .reveal.visible {
  transform: translateY(0);
  opacity: 1;
  transition: transform 620ms ease, opacity 620ms ease;
}

.eyebrow,
.access-card p,
.pricing-intro p {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero h1,
.section-heading h2 {
  margin: 0;
  max-width: 800px;
  color: var(--ink);
  font-size: clamp(2.65rem, 6.6vw, 6.7rem);
  line-height: 0.9;
  letter-spacing: 0;
}

.hero-text {
  max-width: 650px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.22rem);
  line-height: 1.7;
}

.system-switch,
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.system-switch button,
.button,
.carousel-button,
.dot-button {
  border: 0;
  font: inherit;
  cursor: pointer;
}

.system-switch button {
  min-height: 50px;
  padding: 0 18px;
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.66);
  font-weight: 950;
  box-shadow: inset 0 0 0 1px rgba(16, 21, 37, 0.12);
  transition: transform 160ms ease, color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.system-switch button.active,
.system-switch button:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 16px 36px color-mix(in srgb, var(--accent) 30%, transparent);
  transform: translateY(-2px);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 950;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button.primary {
  color: #fff;
  background: #101525;
  box-shadow: 0 16px 34px rgba(16, 21, 37, 0.18);
}

.button.secondary {
  color: #101525;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 0 0 1px rgba(16, 21, 37, 0.12);
}

.button:hover,
.whatsapp-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px color-mix(in srgb, var(--accent) 26%, transparent);
}

.visual-frame {
  position: relative;
  overflow: hidden;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: 0 36px 90px rgba(16, 21, 37, 0.18);
  backdrop-filter: blur(20px);
}

.visual-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(120deg, transparent 0 36%, rgba(255, 255, 255, 0.58) 48%, transparent 62%);
  transform: translateX(-120%);
  animation: shine 6s ease-in-out infinite;
}

.visual-frame img {
  width: 100%;
  aspect-ratio: 16 / 11;
  border-radius: 8px;
  object-fit: cover;
  filter: saturate(1.08);
}

.visual-caption,
.signal-card {
  position: absolute;
  z-index: 2;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 18px 42px rgba(16, 21, 37, 0.16);
  backdrop-filter: blur(16px);
}

.visual-caption {
  top: 28px;
  left: 28px;
  display: grid;
  gap: 4px;
  padding: 12px 14px;
}

.visual-caption span,
.signal-card span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
}

.visual-caption strong {
  color: var(--ink);
  font-size: 1.2rem;
}

.signal-card {
  display: grid;
  place-items: center;
  min-width: 116px;
  padding: 14px;
  text-align: center;
}

.signal-card b {
  color: var(--accent);
  font-size: 2rem;
  line-height: 1;
}

.signal-card-a {
  right: 22px;
  bottom: 26px;
}

.signal-card-b {
  right: 138px;
  bottom: 54px;
}

.access-section,
.pricing-section,
.tutorial-section {
  padding: clamp(44px, 7vw, 86px) 0;
}

.section-heading {
  display: grid;
  gap: 10px;
  margin-bottom: 26px;
}

.section-heading h2 {
  max-width: 720px;
  font-size: clamp(2rem, 4.4vw, 4.7rem);
}

.access-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.access-card {
  display: grid;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 28px 70px rgba(16, 21, 37, 0.12);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.access-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 34px 90px color-mix(in srgb, var(--card-accent) 22%, transparent);
}

.access-card.medical {
  --card-accent: var(--medical);
}

.access-card.dental {
  --card-accent: var(--dental);
}

.access-card img {
  width: 100%;
  aspect-ratio: 16 / 8.5;
  border-radius: 8px;
  object-fit: cover;
}

.access-card h3,
.pricing-intro h3 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  line-height: 1;
}

.access-card span,
.pricing-intro span {
  display: block;
  max-width: 560px;
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.6;
}

.pricing-section {
  display: grid;
  gap: 26px;
}

.pricing-system {
  --system-accent: var(--medical);
  --system-accent-2: var(--medical-2);
  display: grid;
  grid-template-columns: minmax(250px, 0.7fr) minmax(0, 1.3fr);
  gap: 22px;
  align-items: center;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}

.pricing-system.dental {
  --system-accent: var(--dental);
  --system-accent-2: var(--dental-2);
}

.pricing-system .eyebrow,
.pricing-system p:first-child,
.pricing-intro p {
  color: var(--system-accent);
}

.carousel-shell {
  position: relative;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 46px;
  gap: 10px;
  align-items: center;
}

.plan-track {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 12px 4px 18px;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--system-accent) 42%, transparent) transparent;
}

.plan-card {
  position: relative;
  display: flex;
  flex: 0 0 min(360px, 84vw);
  flex-direction: column;
  min-height: 430px;
  padding: 22px;
  border: 1px solid rgba(16, 21, 37, 0.1);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.7)),
    linear-gradient(135deg, color-mix(in srgb, var(--system-accent) 16%, transparent), transparent 54%);
  box-shadow: 0 24px 64px rgba(16, 21, 37, 0.12);
  scroll-snap-align: center;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.plan-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 5px;
  background: linear-gradient(90deg, var(--system-accent), var(--system-accent-2), var(--lime));
}

.plan-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 34px 90px color-mix(in srgb, var(--system-accent) 22%, transparent);
}

.plan-card.featured {
  border-color: color-mix(in srgb, var(--system-accent) 32%, transparent);
}

.plan-card strong {
  color: var(--ink);
  font-size: 1.45rem;
  line-height: 1.05;
}

.plan-card b {
  margin-top: 16px;
  color: var(--system-accent);
  font-size: 2.25rem;
  line-height: 1;
}

.plan-card small {
  margin-top: 6px;
  color: var(--muted);
  font-weight: 850;
}

.plan-card p {
  margin: 18px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.plan-card ul {
  display: grid;
  gap: 10px;
  margin: 18px 0 22px;
  padding: 0;
  list-style: none;
}

.plan-card li {
  position: relative;
  padding-left: 18px;
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 760;
  line-height: 1.35;
}

.plan-card li::before {
  content: "";
  position: absolute;
  top: 0.55em;
  left: 0;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--system-accent);
}

.whatsapp-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  margin-top: auto;
  padding: 0 18px;
  border-radius: 999px;
  color: #fff;
  background: var(--whatsapp);
  font-weight: 950;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.carousel-button {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(135deg, var(--system-accent), var(--system-accent-2));
  font-size: 1.6rem;
  font-weight: 950;
  box-shadow: 0 16px 34px color-mix(in srgb, var(--system-accent) 28%, transparent);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.carousel-button:hover {
  transform: translateY(-2px) scale(1.03);
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 9px;
}

.dot-button {
  width: 10px;
  height: 10px;
  padding: 0;
  border-radius: 999px;
  background: rgba(16, 21, 37, 0.22);
  transition: width 160ms ease, background 160ms ease;
}

.dot-button.active {
  width: 30px;
  background: linear-gradient(90deg, var(--system-accent), var(--system-accent-2));
}

:focus-visible {
  outline: 4px solid color-mix(in srgb, var(--accent) 30%, transparent);
  outline-offset: 4px;
}

@media (max-width: 960px) {
  .hero,
  .access-grid,
  .pricing-system {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .pricing-intro {
    max-width: 760px;
  }
}

@media (max-width: 680px) {
  .topbar {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  main {
    width: min(100% - 28px, 1180px);
  }

  .hero h1 {
    font-size: clamp(2.35rem, 13vw, 4.3rem);
  }

  .carousel-shell {
    grid-template-columns: 1fr;
  }

  .carousel-button {
    display: none;
  }

  .plan-track {
    padding-inline: 0;
  }

  .plan-card {
    flex-basis: 88vw;
    min-height: 0;
  }

  .signal-card-b {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}

@keyframes grid-drift {
  0% {
    background-position: 0 0, 0 0, 180% 0;
  }

  100% {
    background-position: 92px 0, 0 92px, -80% 0;
  }
}

@keyframes shine {
  0%,
  55% {
    transform: translateX(-120%);
  }

  100% {
    transform: translateX(120%);
  }
}
