:root {
  /* Selçuklu çinisinden alınan palet */
  --cini: #0E7C7B;        /* çini turkuazı: eylemler, seçili diş */
  --cini-dark: #0A5F5E;
  --cini-soft: #E2F0EF;   /* açık turkuaz yüzey */
  --cini-hover: #CBE8E6;
  --ink: #17263A;         /* lacivert mürekkep: metin */
  --ink-soft: #4A5B6E;
  --line: #C8D7D9;
  --enamel: #FAFCFC;      /* mine beyazı: zemin */
  --white: #FFFFFF;
  --danger: #B3261E;

  --font: "Schibsted Grotesk", system-ui, sans-serif;
  --wrap: 1160px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius-s: 6px;
  --radius-m: 12px;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--enamel);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.15; margin: 0; }
h1 { font-size: clamp(2.4rem, 5.2vw, 4.1rem); font-weight: 800; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); font-weight: 800; letter-spacing: -0.02em; }
h3 { font-size: 1.2rem; font-weight: 700; letter-spacing: -0.005em; }
p { margin: 0; }
a { color: var(--cini-dark); }

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

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

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--white); padding: 8px 14px; border-radius: var(--radius-s);
}
.skip:focus { top: 12px; }

/* Butonlar */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px;
  font: inherit; font-weight: 600; font-size: 1rem;
  color: var(--white); background: var(--cini);
  border: 2px solid var(--cini); border-radius: 999px;
  text-decoration: none; cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease;
}
.btn:hover { background: var(--cini-dark); border-color: var(--cini-dark); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--cini-soft); border-color: var(--cini); }
.btn-small { min-height: 40px; padding: 0 18px; }

.text-link { font-weight: 600; text-underline-offset: 3px; }

/* Üst bant */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(250, 252, 252, .94);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; margin-right: auto; }
.brand-mark { width: 34px; height: 34px; }
.brand-mark rect { fill: none; stroke: var(--cini); stroke-width: 2.4; }
.brand-mark circle { fill: var(--cini); }
.brand-name { font-weight: 800; font-size: 1.35rem; letter-spacing: .04em; }
.brand-sub { font-size: .9rem; color: var(--ink-soft); padding-left: 10px; border-left: 1px solid var(--line); }
.site-nav { display: flex; gap: 28px; }
.site-nav a { color: var(--ink); text-decoration: none; font-weight: 500; }
.site-nav a:hover { color: var(--cini-dark); text-decoration: underline; text-underline-offset: 6px; }

/* Hero */
.hero { padding: clamp(32px, 5vw, 64px) 0 clamp(56px, 8vw, 104px); }
.hero-grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero-text { max-width: 34rem; }
.lead { margin-top: 22px; font-size: 1.15rem; color: var(--ink-soft); max-width: 31rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.open-status { margin-top: 22px; font-size: .98rem; color: var(--ink-soft); display: flex; align-items: center; gap: 8px; }
.open-status::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--line); flex: none; }
.open-status[data-open="true"]::before { background: var(--cini); }

/* Diş şeması */
.chart { margin: 0; }
#arch { display: block; width: 100%; max-width: 440px; height: auto; margin: 0 auto; overflow: visible; }
.arch-label { font-size: 13px; fill: var(--ink-soft); text-anchor: middle; }
.arch-side { font-size: 13px; font-weight: 600; fill: var(--ink-soft); }
.arch-num { font-size: 64px; font-weight: 800; fill: var(--cini); text-anchor: middle; letter-spacing: -0.03em; }
.arch-num.is-hint { font-size: 15px; font-weight: 500; fill: var(--ink-soft); letter-spacing: 0; }

.tooth { cursor: pointer; outline: none; }
.tooth .crown { fill: var(--white); stroke: var(--ink-soft); stroke-width: 1.4; transition: fill .15s ease, stroke .15s ease; }
.tooth .groove { fill: none; stroke: var(--line); stroke-width: 1.2; stroke-linecap: round; pointer-events: none; }
.tooth:hover .crown { fill: var(--cini-hover); }
.tooth:focus-visible .crown { stroke: var(--ink); stroke-width: 3; }
.tooth[aria-pressed="true"] .crown { fill: var(--cini); stroke: var(--cini-dark); }
.tooth[aria-pressed="true"] .groove { stroke: rgba(255,255,255,.55); }

/* Tek giriş anı: dişler orta hattan dışa doğru belirir */
@keyframes tooth-in { from { opacity: 0; } to { opacity: 1; } }
.tooth { animation: tooth-in .35s ease both; animation-delay: calc(var(--i) * 45ms + 150ms); }
@media (prefers-reduced-motion: reduce) { .tooth { animation: none; } .tooth .crown { transition: none; } }

.chart-note { text-align: center; font-size: .9rem; color: var(--ink-soft); margin: 10px auto 0; max-width: 26rem; }

.tooth-panel {
  margin: 18px auto 0; max-width: 480px;
  padding: 20px 22px; border-radius: var(--radius-m);
  background: var(--cini-soft);
  min-height: 132px;
}
.tooth-title { font-weight: 700; font-size: 1.1rem; }
.tooth-desc { color: var(--ink-soft); margin-top: 4px; font-size: .98rem; }
.tooth-treatments { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; }
.tooth-treatments:empty { display: none; }
.tooth-treatments a { font-weight: 600; font-size: .98rem; text-underline-offset: 3px; }
#tooth-book { margin-top: 16px; }

/* Hizmetler */
.services { padding: clamp(64px, 8vw, 112px) 0; border-top: 1px solid var(--line); }
.services-grid { display: grid; grid-template-columns: minmax(0, 20rem) minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.services-aside { position: sticky; top: 100px; }
.services-aside > p { margin-top: 16px; color: var(--ink-soft); }
.services-index { display: flex; flex-direction: column; margin-top: 28px; border-left: 2px solid var(--line); }
.services-index a { color: var(--ink); text-decoration: none; padding: 5px 0 5px 16px; margin-left: -2px; border-left: 2px solid transparent; font-size: .98rem; }
.services-index a:hover { border-left-color: var(--cini); color: var(--cini-dark); }

.services-list { display: flex; flex-direction: column; }
.service { padding: 32px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 90px; }
.service:first-child { padding-top: 0; }
.service > p { margin-top: 6px; color: var(--ink-soft); max-width: 40rem; }
.service ul { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 32px; }
.service li { display: flex; align-items: baseline; gap: 12px; }
.service li::before { content: ""; flex: none; width: 10px; height: 12px; border-radius: 3px 3px 5px 5px; border: 2px solid var(--cini); transform: translateY(1px); }
.service:target h3 { color: var(--cini-dark); }
.service-urgent { border-bottom: 0; }
.service-urgent .btn { margin-top: 18px; }

/* Randevu */
.booking { padding: clamp(64px, 8vw, 112px) 0; background: var(--cini-soft); }
.booking-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 88px); align-items: start; }
.booking-intro > p { margin-top: 16px; color: var(--ink-soft); max-width: 30rem; }
.booking-intro a { font-weight: 600; white-space: nowrap; }
.steps { list-style: none; counter-reset: step; margin: 32px 0 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 36px 1fr; gap: 14px; align-items: start; color: var(--ink-soft); }
.steps p { padding-top: 5px; }
.steps li::before {
  content: counter(step);
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 700; color: var(--cini-dark); border: 2px solid var(--cini);
}
.steps strong { color: var(--ink); display: block; }

.booking-form {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px;
  background: var(--white); padding: clamp(22px, 3.5vw, 36px);
  border-radius: var(--radius-m); border: 1px solid var(--line);
}
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; margin: 0; padding: 0; border: 0; }
.field-wide { grid-column: 1 / -1; }
.field label, .field legend { font-weight: 600; font-size: .95rem; padding: 0; }
.optional { font-weight: 400; color: var(--ink-soft); }
.field input[type="text"], .field input[type="tel"], .field input[type="date"], .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 10px 14px;
  font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--enamel); border: 1.5px solid var(--line); border-radius: var(--radius-s);
}
.field textarea { resize: vertical; min-height: 96px; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--cini); outline-offset: 0; border-color: var(--cini); }
.field [aria-invalid="true"] { border-color: var(--danger); }
.error { color: var(--danger); font-size: .9rem; min-height: 0; }
.error:empty { display: none; }

.tooth-input { position: relative; }
.field .tooth-input input[type="text"] { padding-right: 92px; }
.link-btn {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  font: inherit; font-size: .9rem; font-weight: 600; color: var(--cini-dark);
  background: none; border: 0; padding: 8px 10px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px;
}

.slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 6px; }
.slots label {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 56px; border: 1.5px solid var(--line); border-radius: var(--radius-s);
  font-weight: 600; cursor: pointer; background: var(--enamel); line-height: 1.2;
}
.slots label span { font-weight: 400; font-size: .85rem; color: var(--ink-soft); }
.slots input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.slots label:has(input:checked) { border-color: var(--cini); background: var(--cini-soft); color: var(--cini-dark); }
.slots label:has(input:focus-visible) { outline: 3px solid var(--ink); outline-offset: 2px; }
.slots label:has(input:disabled) { opacity: .45; cursor: not-allowed; }

.form-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; margin-top: 4px; }
.form-status { font-size: .95rem; color: var(--cini-dark); font-weight: 500; max-width: 26rem; }
.form-status[data-kind="error"] { color: var(--danger); }

/* İletişim */
.contact { padding: clamp(64px, 8vw, 112px) 0; }
.contact-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 88px); align-items: stretch; }
.contact-info h3 { margin-top: 32px; font-size: 1rem; color: var(--ink-soft); font-weight: 600; }
.contact-info h2 + h3 { margin-top: 28px; }
.contact-info address { font-style: normal; margin-top: 6px; font-size: 1.1rem; }
.contact-info p { margin-top: 6px; font-size: 1.1rem; }
.contact-info address + .text-link { display: inline-block; margin-top: 8px; }
.hours { border-collapse: collapse; margin-top: 8px; width: 100%; max-width: 22rem; }
.hours th, .hours td { text-align: left; padding: 8px 0; border-bottom: 1px solid var(--line); font-weight: 400; }
.hours td { text-align: right; }
.hours tr.is-today th, .hours tr.is-today td { font-weight: 700; color: var(--cini-dark); }
.map { min-height: 360px; border-radius: var(--radius-m); overflow: hidden; border: 1px solid var(--line); background: var(--cini-soft); }
.map iframe { display: block; width: 100%; height: 100%; min-height: 360px; border: 0; }

/* Alt bant */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0; font-size: .92rem; color: var(--ink-soft); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.site-footer strong { color: var(--ink); letter-spacing: .04em; }

.mobile-bar { display: none; }

/* Duyarlı düzen */
@media (max-width: 960px) {
  .hero-grid, .services-grid, .booking-grid, .contact-grid { grid-template-columns: 1fr; }
  .hero-text { max-width: 40rem; }
  .services-aside { position: static; }
  .services-index { flex-direction: row; flex-wrap: wrap; border-left: 0; gap: 8px; }
  .services-index a { border: 1.5px solid var(--line); border-radius: 999px; padding: 6px 14px; margin: 0; font-size: .92rem; }
  .services-index a:hover { border-color: var(--cini); }
}

@media (max-width: 720px) {
  body { padding-bottom: 76px; }
  .brand-sub, .header-call { display: none; }
  .site-nav { gap: 18px; }
  .site-nav a { font-size: .95rem; }
  .hero-actions .btn-ghost { display: none; }
  .service ul { grid-template-columns: 1fr; }
  .booking-form { grid-template-columns: 1fr; }
  .mobile-bar {
    display: grid; grid-template-columns: 1fr 2fr; gap: 10px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: var(--white); border-top: 1px solid var(--line);
  }
  .mobile-bar .btn-ghost { background: var(--white); }
}

@media (max-width: 400px) {
  .site-nav { gap: 12px; }
  .site-nav a { font-size: .9rem; }
  .brand-name { font-size: 1.2rem; }
}
