/* Smyldent Dental Clinic — demo concept by ArrowheadX
   Palette is a placeholder (soft teal/blue). Swap the tokens below for the clinic's logo colors. */

:root {
  --ink: #10262e;
  --muted: #51666d;
  --line: #dce9eb;
  --bg: #ffffff;
  --soft: #f1f8f8;
  --teal: #178f8c;
  --teal-d: #0f6f6c;
  --teal-l: #dcf1f0;
  --blue: #2f6fd6;
  --ph: #8a4f00;
  --ph-bg: #fff6e6;
  --dark: #0d1b20;
  --radius: 16px;
  --shadow: 0 12px 32px -14px rgba(16, 38, 46, .22);
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Fraunces", Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.6; font-size: 16px; }
img { max-width: 100%; display: block; }
a { color: var(--teal-d); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.3rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.25rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.eyebrow { font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--teal); margin-bottom: .6rem; }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 62ch; }

/* Placeholder marker for unconfirmed facts */
.ph { display: inline-block; background: var(--ph-bg); color: var(--ph); border: 1px dashed #e2ad55; border-radius: 6px; padding: 0 .4em; font-family: var(--font); font-size: .86em; font-weight: 700; letter-spacing: 0; line-height: 1.5; }
.ph-dark { background: rgba(255, 246, 230, .1); color: #f3c98a; border-color: rgba(243, 201, 138, .5); }

/* Demo bar */
.demo-bar { background: var(--dark); color: #e3eef0; font-size: .85rem; display: flex; flex-wrap: wrap; gap: .35rem 1.1rem; align-items: center; justify-content: center; padding: .55rem 16px; text-align: center; position: relative; z-index: 50; }
.demo-bar p { margin: 0; }
.demo-bar nav { display: flex; gap: 1rem; }
.demo-bar a { color: #7fe0da; font-weight: 700; text-decoration: none; }
.demo-bar a:hover, .demo-bar a[aria-current="page"] { text-decoration: underline; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 40; background: rgba(255, 255, 255, .93); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 66px; gap: 1rem; position: relative; }
.brand { font-family: var(--serif); font-weight: 600; font-size: 1.3rem; color: var(--ink); text-decoration: none; }
.brand span { color: var(--teal); }
.site-nav { display: flex; align-items: center; gap: 1.5rem; }
.site-nav a { color: var(--ink); text-decoration: none; font-weight: 700; font-size: .95rem; }
.site-nav a:not(.btn):hover { color: var(--teal); }
.site-nav a.btn { color: #fff; }
.nav-toggle { display: none; }

@media (max-width: 780px) {
  .nav-toggle { display: inline-flex; background: #fff; border: 1.5px solid var(--line); border-radius: 999px; padding: .45rem 1rem; font: inherit; font-weight: 700; color: var(--ink); cursor: pointer; }
  .site-nav { display: none; position: absolute; left: -16px; right: -16px; top: 100%; flex-direction: column; align-items: stretch; gap: 0; background: #fff; border-bottom: 1px solid var(--line); padding: .25rem 16px 1rem; box-shadow: var(--shadow); }
  .site-nav.open { display: flex; }
  .site-nav a:not(.btn) { padding: .85rem 0; border-bottom: 1px solid var(--line); }
  .site-nav .btn { margin-top: .9rem; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .85rem 1.35rem; border-radius: 999px; background: var(--teal); color: #fff; font: inherit; font-weight: 800; text-decoration: none; border: 2px solid var(--teal); cursor: pointer; transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, border-color .2s ease; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 22px -10px rgba(23, 143, 140, .65); background: var(--teal-d); border-color: var(--teal-d); }
.btn:active { transform: translateY(0); }
.btn-ghost { background: #fff; color: var(--teal-d); }
.btn-ghost:hover { background: var(--teal-l); color: var(--teal-d); border-color: var(--teal); }
.btn-messenger { background: #fff; color: #0866ff; border-color: #cfdcff; }
.btn-messenger:hover { background: #eef4ff; border-color: #0866ff; color: #0866ff; box-shadow: 0 10px 22px -10px rgba(8, 102, 255, .45); }
.btn-sm { padding: .55rem 1rem; font-size: .9rem; }
.btn-block { width: 100%; }

/* Hero */
.hero { background: radial-gradient(1100px 480px at 88% -12%, var(--teal-l), transparent 62%), linear-gradient(180deg, #f6fbfb, #fff); padding: clamp(3rem, 8vw, 6rem) 0 clamp(2.5rem, 6vw, 4.5rem); }
.hero-slim { padding-bottom: clamp(1.5rem, 4vw, 2.5rem); }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(2rem, 5vw, 3.5rem); align-items: center; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.6rem 0 1.1rem; }
.hero-actions.center { justify-content: center; margin-bottom: 0; }
.hero-meta { font-size: .92rem; color: var(--muted); }
.hero-card { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: 1.6rem; box-shadow: var(--shadow); }
.hero-card ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.1rem; }
.hero-card li { display: grid; grid-template-columns: 42px 1fr; gap: .9rem; align-items: center; line-height: 1.4; }
.step-num { width: 42px; height: 42px; border-radius: 12px; background: var(--teal-l); color: var(--teal-d); display: grid; place-items: center; font-weight: 800; }
.status { margin-top: 1.3rem; padding: .8rem 1rem; border-radius: 12px; background: var(--soft); font-size: .88rem; font-weight: 600; display: flex; gap: .7rem; align-items: center; }
.dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: #2bb673; box-shadow: 0 0 0 4px rgba(43, 182, 115, .18); animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(43, 182, 115, .04); } }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } }

/* Sections */
.section { padding: clamp(3.5rem, 8vw, 5.5rem) 0; }
.section-tight { padding: clamp(2.5rem, 6vw, 4rem) 0; }
.section-alt { background: var(--soft); }
.section-head { max-width: 660px; margin-bottom: 2.2rem; }
.grid { display: grid; gap: 1.25rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; transition: transform .25s ease, box-shadow .25s ease; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card p:last-child { margin-bottom: 0; }
.icon { width: 46px; height: 46px; border-radius: 13px; background: var(--teal-l); color: var(--teal-d); display: grid; place-items: center; margin-bottom: 1rem; }
.icon svg { width: 23px; height: 23px; }

/* Branches */
.branch dl { display: grid; grid-template-columns: auto 1fr; gap: .55rem 1.1rem; margin: 1rem 0 1.25rem; }
.branch dt { font-weight: 800; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding-top: .15rem; }
.branch dd { margin: 0; }
.map-ph { aspect-ratio: 16 / 8; border-radius: 12px; background: repeating-linear-gradient(45deg, #edf6f6 0 12px, #f6fbfb 12px 24px); border: 1px dashed #b5d5d6; display: grid; place-items: center; color: var(--muted); font-size: .88rem; font-weight: 600; text-align: center; padding: 1rem; }
.branch-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.1rem; }

/* Booking */
.book-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(2rem, 5vw, 3.5rem); align-items: start; }
@media (max-width: 900px) { .book-grid { grid-template-columns: 1fr; } }
.next-steps { padding-left: 1.2rem; margin: 0 0 1.25rem; display: grid; gap: .4rem; }
.urgent { background: #fff; border-left: 4px solid #e5484d; border-radius: 10px; padding: .85rem 1rem; font-size: .93rem; }
.form { background: #fff; border: 1px solid var(--line); border-radius: 22px; padding: clamp(1.25rem, 3vw, 2rem); box-shadow: var(--shadow); }
.form-row { display: grid; gap: 0 1rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: .35rem; margin: 0 0 1rem; }
fieldset.field { border: 0; padding: 0; min-width: 0; }
label, legend { font-weight: 800; font-size: .92rem; padding: 0; }
.hint { font-size: .8rem; color: var(--muted); font-weight: 500; margin-left: .3rem; }
input, select, textarea { font: inherit; color: var(--ink); padding: .75rem .9rem; border: 1.5px solid var(--line); border-radius: 12px; background: #fff; width: 100%; transition: border-color .2s, box-shadow .2s; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 4px var(--teal-l); }
.choice-group { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .35rem; }
.choice { position: relative; font-weight: 600; }
.choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice span { display: inline-block; padding: .6rem 1.1rem; border: 1.5px solid var(--line); border-radius: 999px; cursor: pointer; transition: background-color .2s, border-color .2s; }
.choice span:hover { border-color: var(--teal); }
.choice input:checked + span { border-color: var(--teal); background: var(--teal-l); color: var(--teal-d); }
.choice input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 2px; }
.error { color: #b42318; font-size: .82rem; font-weight: 700; margin: 0; }
.error:empty { display: none; }
.field.invalid input, .field.invalid select, .field.invalid .choice span { border-color: #e5484d; }
.form-note { font-size: .8rem; color: var(--muted); margin: .7rem 0 0; text-align: center; }
.confirm { text-align: center; padding: 1rem 0; outline: none; }
.confirm .check { width: 66px; height: 66px; border-radius: 50%; background: var(--teal-l); color: var(--teal-d); display: grid; place-items: center; margin: 0 auto 1rem; font-size: 1.9rem; font-weight: 800; animation: pop .35s ease; }
.summary { text-align: left; background: var(--soft); border-radius: 12px; padding: 1rem 1.2rem; margin: 1.2rem 0; font-size: .92rem; display: grid; grid-template-columns: auto 1fr; gap: .35rem 1rem; }
.summary dt { font-weight: 800; color: var(--muted); }
.summary dd { margin: 0; word-break: break-word; }

/* FAQ */
.faq-wrap { max-width: 820px; }
.faq details { border-bottom: 1px solid var(--line); padding: 1.1rem 0; }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 800; list-style: none; display: flex; justify-content: space-between; gap: 1rem; font-size: 1.05rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.5rem; line-height: 1; color: var(--teal); transition: transform .25s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: .75rem 0 0; color: var(--muted); }

/* Footer */
.site-footer { background: var(--dark); color: #c3d4d8; padding: 3rem 0 5.5rem; font-size: .93rem; }
.site-footer-slim { padding: 1.75rem 0 5rem; }
.site-footer a { color: #fff; }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.5rem; }
.footer-brand { font-family: var(--serif); font-size: 1.25rem; color: #fff; margin-bottom: .35rem; }
.built { margin: 1.75rem 0 0; font-size: .78rem; opacity: .6; }
.site-footer-slim .built { margin: 0; text-align: center; }

/* Preview badge */
.preview-badge { position: fixed; left: 14px; bottom: 14px; z-index: 60; background: var(--dark); color: #fff; font-size: .7rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; padding: .35rem .75rem; border-radius: 999px; opacity: .82; pointer-events: none; }

/* Chat */
.chat { position: fixed; right: 16px; bottom: 16px; z-index: 70; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.chat-launch { display: inline-flex; align-items: center; gap: .5rem; background: var(--teal); color: #fff; border: 0; border-radius: 999px; padding: .85rem 1.2rem; font: inherit; font-weight: 800; cursor: pointer; box-shadow: 0 14px 30px -12px rgba(16, 38, 46, .55); transition: transform .2s ease, background-color .2s ease; }
.chat-launch:hover { transform: translateY(-2px); background: var(--teal-d); }
.chat.is-open .chat-launch span { display: none; }
.chat-panel { width: min(360px, calc(100vw - 32px)); height: min(530px, calc(100vh - 150px)); background: #fff; border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 24px 60px -20px rgba(16, 38, 46, .45); display: flex; flex-direction: column; overflow: hidden; transform-origin: bottom right; animation: pop .22s ease; }
.chat-panel[hidden] { display: none; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.97); } }
.chat-head { background: var(--teal); color: #fff; padding: .9rem 1rem; display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.chat-head small { display: block; opacity: .88; font-size: .76rem; font-weight: 500; }
.chat-close { background: none; border: 0; color: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer; padding: 0 .2rem; }
.chat-log { flex: 1; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: .6rem; background: var(--soft); }
.msg { max-width: 86%; padding: .65rem .85rem; border-radius: 14px; font-size: .9rem; line-height: 1.45; animation: pop .2s ease; }
.msg.bot { background: #fff; border: 1px solid var(--line); align-self: flex-start; border-bottom-left-radius: 4px; }
.msg.user { background: var(--teal); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.msg.urgent-msg { border-left: 4px solid #e5484d; }
.msg-actions { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .55rem; }
.msg-actions a, .msg-actions button { font: inherit; font-size: .78rem; font-weight: 800; padding: .32rem .7rem; border-radius: 999px; border: 1.5px solid var(--teal); color: var(--teal-d); background: #fff; text-decoration: none; cursor: pointer; }
.msg-actions a:hover, .msg-actions button:hover { background: var(--teal-l); }
.typing { display: inline-flex; gap: 4px; padding: .8rem .9rem; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: #9db3b8; animation: blink 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 50% { opacity: .25; } }
.chat-chips { display: flex; gap: .4rem; overflow-x: auto; padding: .6rem .75rem; border-top: 1px solid var(--line); background: #fff; scrollbar-width: none; }
.chat-chips button { flex: none; font: inherit; font-size: .8rem; font-weight: 700; padding: .4rem .8rem; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; }
.chat-chips button:hover { border-color: var(--teal); color: var(--teal-d); }
.chat-form { display: flex; gap: .5rem; padding: .25rem .75rem .75rem; background: #fff; }
.chat-form input { padding: .6rem .85rem; }
.chat-form button { flex: none; font: inherit; font-weight: 800; border: 0; border-radius: 12px; background: var(--teal); color: #fff; padding: 0 1rem; cursor: pointer; }

/* Compare */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; margin-top: 1.25rem; }
table { width: 100%; border-collapse: collapse; min-width: 640px; font-size: .95rem; }
th, td { padding: 1rem 1.1rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
thead th { background: var(--soft); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; font-weight: 800; }
tbody th { font-weight: 800; width: 22%; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
td.bad { color: #6f3b3b; }
td.good { color: var(--teal-d); font-weight: 600; }
.mark-bad::before { content: "✕  "; font-weight: 800; color: #c2413b; }
.mark-good::before { content: "✓  "; font-weight: 800; }
.row-highlight { background: var(--ph-bg); }

.shots-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; }
.shots-head .lead { margin-bottom: 0; }
.toggle { display: inline-flex; background: var(--soft); border: 1px solid var(--line); border-radius: 999px; padding: 4px; gap: 4px; }
.toggle button { font: inherit; font-weight: 800; border: 0; background: none; padding: .5rem 1.1rem; border-radius: 999px; cursor: pointer; color: var(--muted); transition: background-color .2s, color .2s; }
.toggle button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: 0 2px 8px -2px rgba(0, 0, 0, .15); }
.shots { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-top: 1.75rem; }
@media (max-width: 760px) { .shots { grid-template-columns: 1fr; } }
.shot { margin: 0; }
.shot-frame { position: relative; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #f3f7f8; aspect-ratio: 4 / 3; box-shadow: var(--shadow); }
.shots.phone .shot-frame { aspect-ratio: 390 / 844; max-width: 280px; margin-inline: auto; border-radius: 30px; border: 8px solid var(--dark); }
.shot-frame img { width: 100%; height: 100%; object-fit: cover; object-position: top; opacity: 0; transition: opacity .4s ease; }
.shot-frame img.loaded { opacity: 1; }
.shot-status { position: absolute; inset: 0; margin: 0; display: grid; place-items: center; color: var(--muted); font-size: .9rem; font-weight: 700; text-align: center; padding: 1rem; }
.shot-status[hidden] { display: none; }
.shot figcaption { margin-top: .8rem; font-size: .92rem; text-align: center; }

/* Pitch */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem; }
.step { display: grid; grid-template-columns: 56px 1fr; gap: 1.25rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.6rem; }
.step h2 { font-size: clamp(1.3rem, 2.6vw, 1.6rem); }
.step p { margin: 0; color: var(--muted); max-width: 64ch; }
.step-badge { width: 56px; height: 56px; border-radius: 16px; background: var(--teal); color: #fff; display: grid; place-items: center; font-family: var(--serif); font-size: 1.5rem; font-weight: 600; }
@media (max-width: 520px) { .step { grid-template-columns: 1fr; gap: .9rem; } }
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.ticks li { padding-left: 1.6rem; position: relative; }
.ticks li::before { content: "✓"; position: absolute; left: 0; color: var(--teal); font-weight: 800; }
.cta-band { background: var(--dark); color: #fff; border-radius: 24px; padding: clamp(2rem, 5vw, 3.5rem); text-align: center; }
.cta-band p { color: #c3d4d8; max-width: 56ch; margin-inline: auto; }
.cta-band .btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .4); }
.cta-band .btn-ghost:hover { background: rgba(255, 255, 255, .08); border-color: #fff; }

/* Scroll reveal (only when JS is on) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .7, .2, 1); }
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal-d1 { transition-delay: .08s; }
.js .reveal-d2 { transition-delay: .16s; }

/* Reduced motion: switch all motion off */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  .btn:hover, .card:hover, .chat-launch:hover { transform: none; }
}
