/* ============================================================
   Dr. Amir Hadar — THE ART OF SMILE
   Single stylesheet, shared by Hebrew (RTL) and English (LTR).
   Uses logical properties so both directions mirror correctly.
   ============================================================ */

:root {
  --purple: #6C4768;
  --purple-dark: #533650;
  --purple-deep: #3c2739;
  --lavender: #BCB6D1;
  --lavender-soft: #f3f0f7;
  --ink: #2b2430;
  --gray: #6f6a74;
  --bg: #ffffff;
  --bg-soft: #faf8fb;
  --font-sans: 'Heebo', system-ui, sans-serif;
  --font-display: 'Cormorant Garamond', 'Times New Roman', serif;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 10px 34px rgba(108, 71, 104, .14);
  --shadow-soft: 0 4px 18px rgba(108, 71, 104, .08);
  --container: 1120px;
  --header-h: 74px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--purple); text-decoration: none; }
a:hover { color: var(--purple-dark); }

/* ---------------- Accessibility: skip link + focus ---------------- */
.skip-link {
  position: absolute;
  inset-inline-start: -9999px;
  top: 0;
  z-index: 100;
  padding: .65em 1.2em;
  background: var(--purple);
  color: #fff;
  font-weight: 600;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}
.skip-link:focus,
.skip-link:focus-visible {
  inset-inline-start: 1rem;
  outline: 3px solid #fff;
  outline-offset: 2px;
}

:focus { outline: none; }
:focus-visible {
  outline: 3px solid var(--purple);
  outline-offset: 3px;
}
.btn:focus-visible,
.nav-toggle:focus-visible {
  outline: 3px solid var(--lavender);
  outline-offset: 3px;
}
.site-footer a:focus-visible,
.cta-band a:focus-visible,
.page-hero a:focus-visible {
  outline-color: #fff;
}

h1, h2, h3 { line-height: 1.25; font-weight: 600; margin: 0 0 .6em; }
h1 { font-size: clamp(2rem, 4.5vw, 3rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.1rem, 4vw, 2rem);
}

.eyebrow {
  display: inline-block;
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--purple);
  margin-block-end: .8rem;
}

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  padding: .72em 1.7em;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn-primary { background: var(--purple); color: #fff; box-shadow: var(--shadow-soft); }
.btn-primary:hover { background: var(--purple-dark); color: #fff; transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-ghost { border: 1.5px solid rgba(255,255,255,.7); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.12); color: #fff; }

/* ---------------- Header ---------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(108, 71, 104, .1);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: var(--header-h);
}
.brand img { height: 34px; width: auto; }
.site-nav { margin-inline-start: auto; }
.site-nav ul {
  display: flex;
  gap: clamp(.9rem, 1.8vw, 1.6rem);
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav a {
  font-weight: 500;
  font-size: .98rem;
  color: var(--ink);
  padding-block: .3em;
  border-bottom: 2px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}
.site-nav a:hover { color: var(--purple); }
.site-nav a.active { color: var(--purple); border-bottom-color: var(--lavender); }

.header-cta { white-space: nowrap; }
.lang-switch {
  font-weight: 600;
  font-size: .9rem;
  color: var(--gray);
  border: 1px solid rgba(108, 71, 104, .25);
  border-radius: 999px;
  padding: .28em .9em;
  transition: background .15s ease, color .15s ease;
}
.lang-switch:hover { background: var(--lavender-soft); color: var(--purple); }

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: .4rem;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--purple);
  margin: 5px 0;
  border-radius: 2px;
  transition: transform .25s ease, opacity .25s ease;
}

/* ---------------- Hero (home) ---------------- */
.hero {
  position: relative;
  min-height: min(88svh, 780px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  color: #fff;
}
.hero-slides { position: absolute; inset: 0; }
.hero-slides img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  animation: heroFade 21s infinite;
}
.hero-slides img:nth-child(1) { animation-delay: 0s; }
.hero-slides img:nth-child(2) { animation-delay: 7s; }
.hero-slides img:nth-child(3) { animation-delay: 14s; }
@keyframes heroFade {
  0% { opacity: 0; }
  6% { opacity: 1; }
  33.3% { opacity: 1; }
  41% { opacity: 0; }
  100% { opacity: 0; }
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(60, 39, 57, .25) 0%, rgba(60, 39, 57, .55) 70%, rgba(60, 39, 57, .75) 100%);
}
.hero-content {
  position: relative;
  z-index: 2;
  padding: 6rem 1.2rem;
  max-width: 46rem;
}
.hero-tagline {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.6rem, 7vw, 4.6rem);
  letter-spacing: .14em;
  margin: 0 0 .35em;
  text-shadow: 0 2px 24px rgba(0, 0, 0, .35);
}
.hero-sub {
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  font-weight: 300;
  margin: 0 auto 2rem;
  max-width: 34rem;
  text-shadow: 0 1px 12px rgba(0, 0, 0, .4);
}
.hero-actions { display: flex; gap: .9rem; justify-content: center; flex-wrap: wrap; }

/* ---------------- Sections ---------------- */
.section { padding-block: clamp(3.5rem, 8vw, 5.5rem); }
.section-soft { background: var(--bg-soft); }
.section-head { max-width: 42rem; margin-block-end: clamp(2rem, 4vw, 3rem); }
.section-head p { color: var(--gray); }

/* ---------------- Tooth helix (homepage treatments) ---------------- */
.section-treatments {
  padding-block-end: 0;
}
.tooth-helix {
  position: relative;
}
.tooth-helix-stage {
  display: none;
  position: sticky;
  top: var(--header-h);
  height: calc(100svh - var(--header-h));
  width: 100%;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 55% at 50% 45%, rgba(188, 182, 209, .35) 0%, transparent 65%),
    linear-gradient(180deg, var(--bg-soft) 0%, #fff 45%, var(--lavender-soft) 100%);
}
.tooth-helix-canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  pointer-events: auto;
}
.tooth-helix-cards {
  position: relative;
  z-index: 2;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.1rem, 4vw, 2rem);
  padding-block-end: clamp(3.5rem, 8vw, 5.5rem);
}

/* Desktop helix active: tall scrubber, hide DOM cards visually (kept for a11y/SEO) */
html.helix-on .tooth-helix {
  height: var(--helix-scrub, 220vh);
}
html.helix-on .tooth-helix-stage {
  display: block;
}
html.helix-on .tooth-helix.is-active .tooth-helix-cards {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  pointer-events: none;
}

@media (max-width: 759px), (prefers-reduced-motion: reduce) {
  html.helix-on .tooth-helix {
    height: auto;
  }
  html.helix-on .tooth-helix-stage {
    display: none !important;
  }
  html.helix-on .tooth-helix.is-active .tooth-helix-cards {
    position: relative;
    width: auto;
    height: auto;
    padding-inline: clamp(1.1rem, 4vw, 2rem);
    padding-block-end: clamp(3.5rem, 8vw, 5.5rem);
    margin: 0 auto;
    overflow: visible;
    clip: auto;
    white-space: normal;
    pointer-events: auto;
  }
}

/* ---------------- Service cards ---------------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: clamp(1.2rem, 2.5vw, 1.8rem);
}
.card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  color: var(--ink);
  transition: transform .22s ease, box-shadow .22s ease;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); color: var(--ink); }
.card figure { margin: 0; aspect-ratio: 3 / 2; overflow: hidden; }
.card figure img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.card:hover figure img { transform: scale(1.05); }
.card-body { padding: 1.3rem 1.4rem 1.5rem; }
.card-body h3 { margin-bottom: .35em; }
.card-body p { color: var(--gray); font-size: .96rem; margin: 0 0 .9em; }
.card-more { font-weight: 600; font-size: .95rem; }
.card-more::after { content: " \2190"; }
[dir="ltr"] .card-more::after { content: " \2192"; }

/* ---------------- Intro split (home about-teaser / page sections) ---- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.split figure { margin: 0; }
.split figure img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 100%;
  object-fit: cover;
}
.split .lead { font-size: 1.15rem; font-weight: 300; color: var(--ink); }
.split p { color: var(--gray); }
.split h2 + p, .split .body-strong { color: var(--ink); }

/* ---------------- Check list ---------------- */
.check-list { list-style: none; padding: 0; margin: 0 0 1.2em; display: grid; gap: .45rem; }
.check-list li { padding-inline-start: 1.7em; position: relative; color: var(--gray); }
.check-list li::before {
  content: "\2713";
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  color: var(--purple);
  font-weight: 700;
}

/* ---------------- Tip callout ---------------- */
.tip {
  background: var(--lavender-soft);
  border-inline-start: 4px solid var(--purple);
  border-radius: var(--radius-sm);
  padding: 1.6rem 1.8rem;
  margin-block: 2.5rem;
  position: relative;
}
.tip-label {
  display: block;
  font-weight: 700;
  color: var(--purple);
  margin-bottom: .3em;
  letter-spacing: .02em;
}
.tip p { margin: 0; color: var(--ink); font-weight: 300; font-size: 1.1rem; }

/* ---------------- Gallery (cases) ---------------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.gallery img {
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-soft);
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform .25s ease;
}
.gallery img:hover { transform: scale(1.02); }

/* ---------------- Page hero (inner pages) ---------------- */
.page-hero {
  background:
    radial-gradient(120% 160% at 15% 0%, rgba(188, 182, 209, .35) 0%, transparent 55%),
    linear-gradient(135deg, var(--purple-deep) 0%, var(--purple) 60%, var(--purple-dark) 100%);
  color: #fff;
  padding-block: clamp(3.5rem, 8vw, 5.5rem);
  text-align: center;
}
.page-hero h1 { margin: 0 0 .2em; }
.page-hero .page-hero-sub {
  color: var(--lavender);
  font-weight: 300;
  font-size: 1.1rem;
  max-width: 38rem;
  margin-inline: auto;
}
.page-hero .art-of-smile {
  font-family: var(--font-display);
  letter-spacing: .22em;
  font-size: .95rem;
  color: var(--lavender);
  display: block;
  margin-bottom: 1rem;
}

/* ---------------- CTA band ---------------- */
.cta-band {
  background: linear-gradient(135deg, var(--purple-deep), var(--purple));
  color: #fff;
  text-align: center;
  padding-block: clamp(3rem, 7vw, 4.5rem);
}
.cta-band h2 { color: #fff; }
.cta-band p { color: var(--lavender); font-weight: 300; max-width: 34rem; margin-inline: auto; }
.cta-band .btn-primary { background: #fff; color: var(--purple); margin-top: 1rem; }
.cta-band .btn-primary:hover { background: var(--lavender-soft); color: var(--purple-dark); }

/* ---------------- Footer ---------------- */
.site-footer {
  background: var(--purple-deep);
  color: rgba(255, 255, 255, .8);
  padding-block: 3rem 2rem;
  font-size: .95rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}
.site-footer img { height: 30px; width: auto; margin-bottom: 1rem; }
.site-footer h4 {
  color: #fff;
  font-size: .85rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  margin: 0 0 .8em;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.site-footer a { color: rgba(255, 255, 255, .8); }
.site-footer a:hover { color: #fff; }
.footer-phone { font-size: 1.25rem; font-weight: 600; color: #fff !important; }
.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(255, 255, 255, .15);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: .85rem;
  color: rgba(255, 255, 255, .55);
}
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem 1rem;
  width: 100%;
  margin-top: .35rem;
}
.footer-legal a { color: rgba(255, 255, 255, .7); }
.footer-legal a:hover { color: #fff; }

/* ---------------- Legal pages ---------------- */
.legal-prose {
  max-width: 42rem;
  margin-inline: auto;
}
.legal-prose h2 {
  font-size: 1.35rem;
  margin-top: 2rem;
  margin-bottom: .5em;
}
.legal-prose h2:first-child { margin-top: 0; }
.legal-prose ul {
  padding-inline-start: 1.25rem;
  margin: 0 0 1em;
}
.legal-prose li { margin-bottom: .35em; }
.legal-prose .note {
  font-size: .92rem;
  color: var(--gray);
  border-inline-start: 3px solid var(--lavender);
  padding-inline-start: 1rem;
  margin-top: 2rem;
}

/* ---------------- Scroll reveal ---------------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity .7s ease, transform .7s ease;
  }
  .reveal.in-view { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-slides img { animation: none; }
  .hero-slides img:first-child { opacity: 1; }
  html { scroll-behavior: auto; }
}

/* ---------------- Responsive ---------------- */
@media (max-width: 920px) {
  .nav-toggle { display: block; }
  /* The header's backdrop-filter makes it the containing block for
     position:fixed, so anchor the overlay to the header instead. */
  .site-nav {
    position: absolute;
    top: 100%;
    inset-inline: 0;
    height: calc(100vh - var(--header-h));
    background: #fff;
    display: none;
    padding: 2rem 1.5rem;
    overflow-y: auto;
  }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; gap: .4rem; }
  .site-nav a { display: block; font-size: 1.25rem; padding: .55em 0; border-bottom: 1px solid var(--lavender-soft); }
  .header-cta { display: none; }
  body.nav-open { overflow: hidden; }
  .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: 760px) {
  .split { grid-template-columns: 1fr; }
  .split figure { order: -1; }
  .footer-grid { grid-template-columns: 1fr; gap: 1.8rem; }
}
