/* ============================================================
   Smilysis — design tokens
   Bright, clinical health-tech palette (official brand colors):
   primary blue #3498DB, navy #1A2E4A, near-white background.
   ============================================================ */
:root {
  --bg: #fdfefe;
  --bg-soft: #eef5fb;
  --surface: #ffffff;
  --surface-alt: #e7f1fa;
  --navy: #1a2e4a;
  --text: #24374f;
  --text-muted: #60768c;
  --text-faint: #8a9bad;
  --primary: #3498db;
  --primary-dark: #217dbb;
  --primary-soft: #eaf4fb;
  --primary-faded: #3498db26;
  --dental-blue: #5b98ba;
  --dental-blue-faded: #5b98ba26;
  --border: #dfe8f0;
  --white: #ffffff;

  --font-heading: "Changa One", "Afacad Flux", sans-serif;
  --font-body: "Afacad Flux", "Droid Sans", sans-serif;

  --nav-height: 84px;
  --container-width: 1200px;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --ease: cubic-bezier(.25, .8, .25, 1);
  --shadow-sm: 0 2px 10px rgba(26, 46, 74, .06);
  --shadow-md: 0 16px 40px -16px rgba(26, 46, 74, .18);
  --shadow-lg: 0 30px 60px -24px rgba(26, 46, 74, .22);
}

@media (max-width: 767px) {
  :root { --nav-height: 68px; }
}

/* ============================================================
   Reset
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-family: var(--font-heading); margin: 0; font-weight: 500; color: var(--navy); }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; }
input, textarea { font-family: inherit; }

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

section[id] { scroll-margin-top: var(--nav-height); }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -60px;
  left: 16px;
  background: var(--primary);
  color: var(--white);
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  z-index: 999;
  font-weight: 600;
  transition: top .2s var(--ease);
}
.skip-link:focus { top: 16px; }

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 999px;
  padding: 16px 34px;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background-color .25s var(--ease);
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: var(--white);
  box-shadow: 0 10px 26px -10px rgba(52, 152, 219, .55);
}
.btn-primary:hover, .btn-primary:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 16px 32px -10px rgba(52, 152, 219, .6);
}
.btn-outline {
  background: transparent;
  color: var(--navy);
  border: 1.5px solid var(--border);
}
.btn-outline:hover, .btn-outline:focus-visible {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-3px);
}

/* ============================================================
   Navigation
   ============================================================ */
.nav-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  background: rgba(253, 254, 254, .8);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: background-color .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.nav-bar.is-scrolled {
  background: rgba(253, 254, 254, .96);
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.nav-logo img { height: 40px; width: auto; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-link {
  padding: 10px 16px;
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  border-radius: 999px;
  transition: color .25s var(--ease), background-color .25s var(--ease);
}
.nav-link:hover, .nav-link:focus-visible { color: var(--primary); background: var(--primary-soft); }
.nav-cta { margin-left: 12px; padding: 12px 26px; font-size: 15px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid var(--border);
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--navy);
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    background: rgba(253, 254, 254, .99);
    backdrop-filter: blur(16px);
    padding: 12px 24px 28px;
    gap: 4px;
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform .3s var(--ease), opacity .3s var(--ease), visibility .3s;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
  }
  .nav-links.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  .nav-link { padding: 14px 12px; font-size: 18px; border-bottom: 1px solid var(--border); border-radius: 0; }
  .nav-cta { margin: 12px 0 0; text-align: center; }
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-height);
  overflow: hidden;
  background: var(--bg);
}
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(circle at 12% 15%, var(--dental-blue-faded), transparent 55%),
    radial-gradient(circle at 88% 80%, var(--primary-faded), transparent 55%);
}
.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: .5;
  will-change: transform;
}
.hero-blob--1 {
  width: 420px; height: 420px;
  top: -100px; right: 6%;
  background: var(--primary-soft);
  animation: float-a 16s ease-in-out infinite;
}
.hero-blob--2 {
  width: 320px; height: 320px;
  bottom: -80px; left: 2%;
  background: var(--dental-blue-faded);
  animation: float-b 20s ease-in-out infinite;
}
.hero-blob--3 {
  width: 220px; height: 220px;
  top: 45%; right: 28%;
  background: var(--primary-faded);
  animation: float-a 12s ease-in-out infinite reverse;
}
@keyframes float-a {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-30px, 40px) scale(1.08); }
}
@keyframes float-b {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, -30px) scale(1.1); }
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 48px;
  align-items: center;
  width: 100%;
}
.hero-copy .eyebrow {
  display: inline-block;
  color: var(--primary-dark);
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  font-size: 13px;
  padding: 6px 14px;
  background: var(--primary-soft);
  border: 1px solid var(--primary-faded);
  border-radius: 999px;
  margin-bottom: 22px;
}
.hero-heading {
  font-size: clamp(2.6rem, 5vw, 4.4rem);
  line-height: 1.05;
  color: var(--navy);
  letter-spacing: .01em;
}
.hero-copy-text {
  margin-top: 24px;
  font-size: clamp(1.05rem, 1.4vw, 1.35rem);
  color: var(--text-muted);
  max-width: 46ch;
  line-height: 1.5;
}
.hero-actions {
  margin-top: 40px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.hero-scroll-cue {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-faint);
  font-size: 12px;
  letter-spacing: .1em;
  text-transform: uppercase;
  z-index: 2;
}
.hero-scroll-cue svg { animation: bob 2s ease-in-out infinite; }
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}
@keyframes bob-soft {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ---- Hero visual: 3D rotating logo (replaces the old hero video) ---- */
.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1400px;
}
.logo3d-glow {
  position: absolute;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--primary-faded), transparent 70%);
  filter: blur(10px);
  animation: bob-soft 7s ease-in-out infinite;
}
.logo3d-float {
  position: relative;
  width: 260px;
  animation: bob-soft 7s ease-in-out infinite;
}
.logo3d-canvas {
  display: block;
  width: 260px;
  height: 260px;
  filter: drop-shadow(0 20px 30px rgba(26, 46, 74, .22));
}
.logo3d-fallback {
  width: 260px;
  height: 260px;
  object-fit: contain;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50%;
  padding: 40px;
  box-shadow: var(--shadow-lg);
}
.logo3d-shadow {
  width: 200px;
  height: 26px;
  margin: 10px auto 0;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(26, 46, 74, .22), transparent 72%);
  filter: blur(2px);
}

@media (max-width: 479px) {
  .logo3d-float { width: 200px; }
  .logo3d-canvas, .logo3d-fallback { width: 200px; height: 200px; }
  .logo3d-glow { width: 280px; height: 280px; }
}

@media (max-width: 991px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-copy-text { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .hero-visual { margin-top: 24px; }
  .hero-scroll-cue { display: none; }
  .hero { padding-bottom: 48px; }
}

/* ============================================================
   Section shell + reveal animation
   ============================================================ */
.section {
  position: relative;
  padding: clamp(72px, 10vw, 140px) 0;
  z-index: 1;
}
.section-tight { padding: clamp(48px, 6vw, 90px) 0; }

[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
[data-reveal].in-view {
  opacity: 1;
  transform: translateY(0);
}
[data-reveal-stagger] > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
[data-reveal-stagger].in-view > * {
  opacity: 1;
  transform: translateY(0);
}
[data-reveal-stagger].in-view > *:nth-child(1) { transition-delay: .05s; }
[data-reveal-stagger].in-view > *:nth-child(2) { transition-delay: .12s; }
[data-reveal-stagger].in-view > *:nth-child(3) { transition-delay: .19s; }
[data-reveal-stagger].in-view > *:nth-child(4) { transition-delay: .26s; }
[data-reveal-stagger].in-view > *:nth-child(5) { transition-delay: .33s; }
[data-reveal-stagger].in-view > *:nth-child(6) { transition-delay: .4s; }

.eyebrow-label {
  display: inline-block;
  background: var(--primary-soft);
  color: var(--primary-dark);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 700;
  font-size: 12px;
  padding: 5px 13px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.section-heading {
  font-size: clamp(1.9rem, 3.4vw, 2.75rem);
  font-style: italic;
  color: var(--navy);
  max-width: 40ch;
}
.section-lead {
  margin-top: 18px;
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 60ch;
  line-height: 1.6;
}
.section-lead strong { color: var(--primary-dark); font-weight: 700; }

/* ============================================================
   Features
   ============================================================ */
.features-grid {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s var(--ease);
}
.feature-card:hover {
  transform: translateY(-8px);
  border-color: var(--primary-faded);
  box-shadow: var(--shadow-md);
}
.feature-image-wrapper { aspect-ratio: 16/11; overflow: hidden; background: var(--bg-soft); }
.feature-image-wrapper img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.feature-card:hover .feature-image-wrapper img { transform: scale(1.06); }
.feature-text { padding: 22px 24px 26px; }
.feature-text h3 { font-size: 1.25rem; color: var(--navy); margin-bottom: 8px; font-style: normal; }
.feature-text p { color: var(--text-muted); font-size: .98rem; line-height: 1.55; }

@media (max-width: 991px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .features-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Why Smilysis
   ============================================================ */
.why-section { background: var(--bg-soft); }
.why-header { text-align: center; max-width: 720px; margin: 0 auto 48px; }
.why-header .section-lead { margin-left: auto; margin-right: auto; text-align: center; }
.why-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.why-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow-sm);
  transition: border-color .3s var(--ease), transform .3s var(--ease), box-shadow .3s var(--ease);
}
.why-item:hover { border-color: var(--primary-faded); transform: translateY(-4px); box-shadow: var(--shadow-md); }
.why-item-head { display: flex; align-items: center; gap: 14px; }
.why-item-head img { width: 44px; height: 44px; object-fit: contain; }
.why-item-head h3 { font-size: 1.1rem; color: var(--primary-dark); font-weight: 700; font-style: normal; }
.why-item p { color: var(--text); font-size: .98rem; line-height: 1.55; }
.why-footnote {
  margin-top: 40px;
  text-align: center;
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 60ch;
  margin-left: auto;
  margin-right: auto;
}
.why-visual { margin-top: 44px; text-align: center; }
.why-visual img { max-width: 340px; margin: 0 auto; border-radius: var(--radius-md); box-shadow: var(--shadow-sm); }

@media (max-width: 767px) {
  .why-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   About
   ============================================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 56px;
  align-items: center;
}
.about-text {
  font-size: clamp(1.2rem, 1.6vw, 1.5rem);
  line-height: 1.55;
  color: var(--text);
}
.about-text em { color: var(--primary-dark); font-style: italic; }
.about-image { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-md); }
.about-image img { width: 100%; }

@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .about-image { order: -1; max-width: 420px; margin: 0 auto; }
}

/* ============================================================
   Team
   ============================================================ */
.team-section { background: var(--bg-soft); }
.team-grid {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.team-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px 26px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.team-card:hover { transform: translateY(-6px); border-color: var(--primary-faded); box-shadow: var(--shadow-md); }
.team-avatar {
  width: 96px;
  height: 96px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: linear-gradient(150deg, var(--primary), var(--dental-blue));
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid var(--surface);
  box-shadow: 0 0 0 1px var(--border);
}
.team-avatar svg { width: 44px; height: 44px; color: var(--white); opacity: .95; }
.team-name { font-size: 1.2rem; color: var(--navy); font-style: normal; }
.team-role { color: var(--primary-dark); font-size: .9rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; margin-top: 4px; }
.team-bio { margin-top: 14px; color: var(--text-muted); font-size: .95rem; line-height: 1.55; }
.team-social {
  margin-top: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: border-color .25s var(--ease), color .25s var(--ease), background-color .25s var(--ease);
}
.team-social:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.team-social svg { width: 17px; height: 17px; }

@media (max-width: 991px) {
  .team-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .team-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Contact
   ============================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 56px;
  align-items: flex-start;
}
.contact-heading {
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  font-style: italic;
  color: var(--navy);
  line-height: 1;
}
.contact-subtext { margin-top: 20px; color: var(--text-muted); font-size: 1.05rem; max-width: 42ch; }
.contact-socials { margin-top: 32px; display: flex; gap: 12px; }
.social-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--navy);
  box-shadow: var(--shadow-sm);
  transition: transform .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease), background-color .25s var(--ease);
}
.social-icon svg { width: 20px; height: 20px; }
.social-icon:hover, .social-icon:focus-visible {
  transform: translateY(-3px);
  border-color: var(--primary);
  color: var(--white);
  background: var(--primary);
}

.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 4vw, 40px);
  box-shadow: var(--shadow-sm);
}
.field { margin-bottom: 20px; }
.field label {
  display: block;
  margin-bottom: 8px;
  font-size: .9rem;
  font-weight: 600;
  color: var(--navy);
  letter-spacing: .02em;
}
.field input, .field textarea {
  width: 100%;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  color: var(--text);
  font-size: 1rem;
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease), background-color .25s var(--ease);
}
.field input::placeholder, .field textarea::placeholder { color: var(--text-faint); }
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--primary-faded);
}
.field textarea { min-height: 130px; resize: vertical; }
.form-submit { width: 100%; margin-top: 4px; }
.form-status {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: .95rem;
  display: none;
}
.form-status.is-visible { display: block; }
.form-status.success { background: var(--primary-soft); color: var(--primary-dark); border: 1px solid var(--primary-faded); }
.form-status.error { background: #fdeceb; color: #c0392b; border: 1px solid #f5c6c2; }

@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   Footer
   ============================================================ */
.footer {
  border-top: 1px solid var(--border);
  padding: 44px 0;
  background: var(--surface);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.footer-logo img { height: 32px; }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
}
.footer-link {
  padding: 8px 12px;
  font-size: .95rem;
  color: var(--text-muted);
  border-radius: 999px;
  transition: color .25s var(--ease);
}
.footer-link:hover, .footer-link:focus-visible { color: var(--primary); }
.footer-bottom {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.footer-copyright { color: var(--text-faint); font-size: .85rem; }
.footer-socials { display: flex; gap: 10px; }

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