/* DenTech — brand tokens (see BRAND.md) */
:root {
  --graphite: #2A2D31;
  --graphite-2: #34383D;
  --ink: #17191C;
  --porcelain: #F2F4F3;
  --white: #FFFFFF;
  --steel: #8E959C;
  --silver: #D9DDE0;
  --teal: #1E7C79;
  --teal-dark: #155E5C;
  --silver-grad: linear-gradient(160deg, #E6E9EB 0%, #A6ADB3 55%, #7E868D 100%);

  --font: "Readex Pro", system-ui, "Segoe UI", Tahoma, sans-serif;
  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius-btn: 10px;
  --radius-panel: 18px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--porcelain);
  -webkit-font-smoothing: antialiased;
}
html[lang="en"] body { line-height: 1.6; }
img, svg { display: block; max-width: 100%; }
a { color: var(--teal); }
h1, h2, h3 { line-height: 1.15; margin: 0; font-weight: 600; }

/* language switching: each text has an .ar and .en twin */
html[lang="ar"] .en, html[lang="en"] .ar { display: none !important; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

.skip { position: absolute; inset-inline-start: 8px; top: -60px; background: var(--white); padding: 8px 12px; z-index: 100; border-radius: 6px; }
.skip:focus { top: 8px; }

:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 4px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px;
  border-radius: var(--radius-btn);
  font: inherit; font-weight: 500; font-size: 16px;
  text-decoration: none; cursor: pointer; border: 1.5px solid transparent;
  transition: background-color .15s ease, border-color .15s ease;
}
.btn-teal { background: var(--teal); color: var(--white); }
.btn-teal:hover { background: var(--teal-dark); }
.btn-ghost { color: var(--white); border-color: rgba(217, 221, 224, .45); background: transparent; }
.btn-ghost:hover { border-color: var(--silver); }
.btn-small { min-height: 40px; padding: 0 16px; font-size: 15px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(42, 45, 49, .94);
  backdrop-filter: blur(8px);
  color: var(--white);
  border-bottom: 1px solid rgba(217, 221, 224, .12);
}
.header-row { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.brand-name { font-weight: 600; font-size: 20px; letter-spacing: .01em; }
.nav { display: flex; gap: 28px; margin-inline-start: auto; }
.nav a { color: var(--silver); text-decoration: none; font-size: 15px; }
.nav a:hover { color: var(--white); }
.header-actions { display: flex; align-items: center; gap: 12px; }
.lang-toggle {
  font: inherit; font-size: 14px; color: var(--silver);
  background: none; border: 0; padding: 8px 4px; cursor: pointer;
  text-decoration: underline; text-underline-offset: 4px; text-decoration-color: rgba(217,221,224,.4);
}
.lang-toggle:hover { color: var(--white); }

/* ---------- hero ---------- */
.hero {
  background: var(--graphite);
  color: var(--white);
  padding-block: clamp(48px, 9vw, 112px) clamp(56px, 9vw, 120px);
  overflow: hidden;
}
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(32px, 6vw, 80px); align-items: center; }
.hero-kicker { color: var(--steel); margin: 0 0 18px; font-size: 15px; }
.hero h1 { font-size: clamp(34px, 5.2vw, 58px); font-weight: 600; letter-spacing: -.01em; max-width: 17ch; }
html[lang="en"] .hero h1 { max-width: 18ch; letter-spacing: -.02em; }
.lede { color: var(--silver); font-size: clamp(17px, 1.6vw, 19px); max-width: 52ch; margin: 22px 0 32px; font-weight: 300; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; }

.rating {
  display: inline-flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  margin-top: 36px; padding-top: 20px;
  border-top: 1px solid rgba(217, 221, 224, .18);
  color: var(--silver); text-decoration: none;
}
.rating-score { font-size: 30px; font-weight: 600; color: var(--white); }
.stars { color: #E8C468; letter-spacing: 2px; }
.rating:hover .rating-text { text-decoration: underline; text-underline-offset: 4px; }

.hero-mark { margin: 0; justify-self: center; width: min(100%, 420px); }
.tooth { width: 100%; height: auto; filter: drop-shadow(0 30px 60px rgba(0,0,0,.35)); }

/* the one orchestrated motion: circuit traces draw into the tooth on load */
.traces path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.4s cubic-bezier(.6,.1,.2,1) forwards; }
.traces path:nth-child(2) { animation-delay: .12s; }
.traces path:nth-child(3) { animation-delay: .24s; }
.traces path:nth-child(4) { animation-delay: .36s; }
.traces path:nth-child(5) { animation-delay: .48s; }
.traces path:nth-child(6) { animation-delay: .6s; }
.traces path:nth-child(7) { animation-delay: .72s; }
.traces path:nth-child(8) { animation-delay: .84s; }
.nodes circle { opacity: 0; animation: pop .3s ease forwards; animation-delay: 1.5s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { to { opacity: 1; } }

/* ---------- sections ---------- */
.section { padding-block: clamp(56px, 8vw, 104px); }
.section h2 { font-size: clamp(28px, 3.4vw, 40px); margin-bottom: 14px; }
.section-intro { color: #4A5056; max-width: 58ch; margin: 0 0 36px; }

/* services: two lists, not cards */
.service-cols { display: grid; grid-template-columns: 1.35fr 1fr; gap: clamp(32px, 6vw, 72px); margin-top: 36px; }
.service-group h3 {
  font-size: 20px; padding-bottom: 14px; margin-bottom: 4px;
  border-bottom: 2px solid var(--graphite);
}
.service-list { margin: 0; }
.service-list > div { padding: 18px 0; border-bottom: 1px solid #D5D9DC; }
.service-list dt { font-weight: 500; font-size: 18px; }
.service-list dd { margin: 4px 0 0; color: #4A5056; font-size: 16px; max-width: 46ch; }

/* digital workflow: a real sequence, linked by a trace */
.digital { background: var(--white); }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; counter-reset: step; position: relative; }
.steps::before {
  content: ""; position: absolute; top: 19px; inset-inline: 20px calc((100% - 84px) / 4 - 20px);
  height: 2px; background: repeating-linear-gradient(to right, var(--steel) 0 8px, transparent 8px 14px);
}
.steps li { position: relative; counter-increment: step; }
.steps li::before {
  content: counter(step);
  display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--graphite); color: var(--white);
  font-weight: 600; margin-bottom: 18px; position: relative;
  box-shadow: 0 0 0 6px var(--white);
}
.steps h3 { font-size: 19px; margin-bottom: 6px; }
.steps p { margin: 0; color: #4A5056; font-size: 16px; }

/* team */
.team-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 400px)); gap: 28px; margin-top: 32px; }
.doctor { display: flex; align-items: flex-start; gap: 20px; }
.avatar {
  flex: none; width: 120px; height: 120px; border-radius: var(--radius-panel);
  object-fit: cover; background: var(--silver);
}
.doctor h3 { font-size: 20px; }
.role { margin: 4px 0 0; color: var(--graphite); font-weight: 500; font-size: 15px; }
.bio { margin: 8px 0 0; color: #4A5056; font-size: 15px; line-height: 1.6; max-width: 40ch; }
.note { color: var(--steel); font-size: 15px; margin-top: 28px; }

/* visitors */
.visitors { background: var(--graphite-2); color: var(--white); padding-block: clamp(44px, 6vw, 72px); }
.visitors-row { display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.visitors h2 { margin-bottom: 10px; }
.visitors p { color: var(--silver); max-width: 60ch; margin: 0; }
.visitors .btn { flex: none; }

/* book + visit */
.visit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 72px); }
form { display: grid; gap: 6px; max-width: 460px; }
label { font-weight: 500; font-size: 15px; margin-top: 10px; }
input, select, textarea {
  font: inherit; font-size: 16px; color: var(--ink);
  background: var(--white); border: 1.5px solid #C9CED2; border-radius: var(--radius-btn);
  padding: 11px 14px; width: 100%;
}
input:focus, select:focus, textarea:focus { border-color: var(--teal); outline: none; box-shadow: 0 0 0 3px rgba(30,124,121,.18); }
form .btn { margin-top: 18px; justify-self: start; }
.form-error { color: #A3332B; margin: 8px 0 0; font-size: 15px; }

.info address { font-style: normal; font-size: 18px; margin-bottom: 20px; }
.hours { border-collapse: collapse; width: 100%; max-width: 420px; margin-bottom: 20px; }
.hours caption { text-align: start; font-weight: 500; padding-bottom: 6px; }
.hours th, .hours td { padding: 10px 0; border-bottom: 1px solid #D5D9DC; font-weight: 400; text-align: start; }
.hours td { text-align: end; font-variant-numeric: tabular-nums; }
.contact { list-style: none; padding: 0; margin: 0 0 24px; display: grid; gap: 6px; }
.map { border-radius: var(--radius-panel); overflow: hidden; aspect-ratio: 4 / 3; background: var(--silver); }
.map iframe { width: 100%; height: 100%; border: 0; display: block; }

/* footer */
.site-footer { background: var(--graphite); color: var(--silver); padding-block: 36px; font-size: 15px; }
.footer-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.social { display: flex; gap: 20px; flex-wrap: wrap; }
.social a { color: var(--silver); }
.social a:hover { color: var(--white); }
.copy { margin: 0; color: var(--steel); }

/* floating WhatsApp (mobile only) */
.wa-float {
  display: none; position: fixed; inset-inline-end: 16px; bottom: 16px; z-index: 60;
  background: var(--teal); color: var(--white); text-decoration: none; font-weight: 500;
  padding: 12px 20px; border-radius: 999px; box-shadow: 0 8px 24px rgba(0,0,0,.25);
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .nav { display: none; }
  .header-actions { margin-inline-start: auto; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-mark { order: -1; width: min(60%, 240px); }
  .service-cols, .visit-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; row-gap: 36px; }
  .steps::before { display: none; }
  .visitors-row { flex-direction: column; align-items: flex-start; }
  .wa-float { display: inline-block; }
  .site-footer { padding-bottom: 88px; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .steps { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: 1fr; }
  .avatar { width: 88px; height: 88px; }
  .hero-ctas .btn { flex: 1 1 100%; }
  .header-actions .btn-small { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .traces path { animation: none; stroke-dashoffset: 0; }
  .nodes circle { animation: none; opacity: 1; }
}
