/* ==========================================================================
   Smile Nest Dental Care
   One hand-written stylesheet, per the design board spec sheet (artboard 1k).
   Contrast is checked on --paper (#FAF7F0), not on white.
   ========================================================================== */

/* --- Tokens ------------------------------------------------------------- */
:root {
  /* Colour */
  --paper:        #FAF7F0;   /* page ground, a hair warm */
  --surface:      #FFFDF8;   /* cards, lifted by a hairline not a shadow */
  --accent:       #113D35;   /* 7.9:1 on paper. Every link and button, nothing else */
  --accent-deep:  #0B2B25;   /* hover only */
  --accent-soft:  #E5EDE7;   /* tinted panels, ~11% of accent */
  --on-soft:      #22423A;   /* body text on --accent-soft */
  --urgent:       #7A5518;   /* same-day pain callout only */
  --urgent-soft:  #F6EEDD;
  --whatsapp:     #25D366;   /* only ever the dot on the WhatsApp control */
  --ink:          #15211C;
  --ink-muted:    #5A645C;   /* 5.1:1 on paper */
  --line:         #E3E0D5;

  /* Type: a serif display over the sans. Both resolve on every device in
     Bangladesh with no webfont request; the serif is what makes it read as a
     practice rather than a template. */
  --font: "Segoe UI Variable Text", system-ui, -apple-system, "Segoe UI",
          "Helvetica Neue", Arial, sans-serif;
  --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia,
          "Times New Roman", serif;
  --display:  52px;
  --title:    46px;
  --section:  32px;
  --body:     18px;
  --small:    15px;
  --micro:    11px;

  /* Spacing scale */
  --s1: 4px;  --s2: 8px;  --s3: 12px; --s4: 16px; --s5: 24px;
  --s6: 32px; --s7: 44px; --s8: 56px; --s9: 64px;
  --section-gap: 56px;

  /* Radius */
  --r-outer: 10px;
  --r-inner: 7px;

  /* The one shadow in the system */
  --shadow-bar: 0 -2px 14px rgba(20, 22, 19, .13);

  --wrap: 1160px;
  --callbar-h: 0px;         /* reset to a real height at the phone breakpoint */
}

/* --- Reset -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--body)/1.6 var(--font);
  overflow-x: hidden;               /* nothing scrolls sideways at 360 */
  padding-bottom: var(--callbar-h); /* every page reserves the call bar height */
}
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, table { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { max-width: 100%; display: block; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-deep); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 3px; }

/* Phone numbers, serial numbers and times are tabular so a column lines up */
.tnum, .hours td, .phone-lg, .header__number, time { font-variant-numeric: tabular-nums; }

/* --- Layout ------------------------------------------------------------- */
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--s5); }
.section { padding-block: var(--section-gap); }
.section + .section { border-top: 1px solid var(--line); }
.section--soft { background: var(--accent-soft); color: var(--on-soft); border-top: 0; }
.section--soft h2, .section--soft h3 { color: var(--on-soft); }
.stack > * + * { margin-top: var(--s4); }

.grid-2 { display: grid; gap: var(--s6); }
.grid-3 { display: grid; gap: var(--s4); }
@media (min-width: 720px)  { .grid-2 { grid-template-columns: 1fr 1fr; }
                             .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

/* --- Type --------------------------------------------------------------- */
.eyebrow {
  font-size: var(--micro); font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-muted); margin-bottom: var(--s3);
}
/* Display type is the serif; body, labels and controls stay on the sans. */
.display, .page-title, h2, .section-title, h3 { font-family: var(--font-display); }
.display    { font-size: var(--display); font-weight: 700; line-height: 1.06; letter-spacing: -.015em; }
.page-title { font-size: var(--title);   font-weight: 700; line-height: 1.1;  letter-spacing: -.015em; }
h2, .section-title { font-size: var(--section); font-weight: 700; line-height: 1.18; letter-spacing: -.005em; }
h3 { font-size: 21px; font-weight: 700; line-height: 1.28; }
.lede  { font-size: 21px; color: var(--ink-muted); max-width: 62ch; }
.small { font-size: var(--small); }
.muted { color: var(--ink-muted); }
.note  { font-size: var(--small); color: var(--ink-muted); max-width: 70ch; }
.section--soft .muted, .section--soft .note { color: #3E5349; }
.mt5 { margin-top: var(--s5); }
.mt6 { margin-top: var(--s6); }

/* Tinted and bracketed = still to confirm. Everything else is real. */
.tbc {
  background: var(--urgent-soft); color: var(--urgent);
  padding: 1px 6px; border-radius: 4px; font-size: .94em;
  box-decoration-break: clone; -webkit-box-decoration-break: clone;
  overflow-wrap: anywhere;
}

/* --- Wordmark ----------------------------------------------------------- */
.wordmark { display: inline-flex; align-items: center; gap: var(--s3); text-decoration: none; color: inherit; }
.wordmark__tile {
  width: 38px; height: 38px; flex: 0 0 38px; border-radius: var(--r-inner);
  background: var(--accent); display: grid; place-items: center;
}
.wordmark__tile svg { width: 21px; height: 21px; }
.wordmark__name { font-family: var(--font-display); font-size: 19px; font-weight: 700;
                  letter-spacing: -.01em; line-height: 1.1; }
.wordmark__sub  { font-size: 10px; font-weight: 700; letter-spacing: .11em;
                  text-transform: uppercase; color: var(--ink-muted); }

/* --- Header (desktop: not fixed) ---------------------------------------- */
.header { border-bottom: 1px solid var(--line); background: var(--surface); }
.header__in { display: flex; align-items: center; gap: var(--s5); min-height: 84px; }
.nav { display: none; margin-left: auto; gap: var(--s5); }
.nav a { color: var(--ink); text-decoration: none; font-size: 17px; padding: var(--s2) 0; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--accent); text-decoration: underline; }
.header__call { display: none; margin-left: auto; align-items: center; gap: var(--s4); }
.header__call .label { font-size: var(--micro); font-weight: 700; letter-spacing: .1em;
                       text-transform: uppercase; color: var(--ink-muted); text-align: right; }
/* Full size, as text — a desktop visitor is likelier to be writing it down than dialling */
.header__number { font-size: 22px; font-weight: 700; color: var(--ink); text-decoration: none; letter-spacing: -.01em; }
.header__number:hover { color: var(--accent); }
@media (min-width: 900px) {
  .nav { display: flex; }
  .header__call { display: flex; margin-left: var(--s6); }
}

/* --- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 44px; padding: var(--s3) var(--s5); border-radius: var(--r-inner);
  font-size: 17px; font-weight: 700; text-decoration: none; border: 1px solid transparent;
  cursor: pointer; transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn--call { background: var(--accent); color: #FFF; min-height: 56px; padding-inline: var(--s6); }
.btn--call:hover { background: var(--accent-deep); color: #FFF; }
.btn--wa { background: var(--surface); color: var(--ink); border-color: var(--line); min-height: 56px; }
.btn--wa:hover { border-color: var(--accent); color: var(--accent); }
.btn--ghost { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn--ghost:hover { background: var(--accent); color: #FFF; }
.btn--urgent { background: var(--urgent); color: #FFF; }
.btn--urgent:hover { background: #5C3F12; color: #FFF; }
.dot-wa { width: 10px; height: 10px; border-radius: 50%; background: var(--whatsapp); flex: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--s3); }

/* --- Status chip (pill is allowed here, and only here) ------------------- */
.chip {
  display: inline-flex; align-items: center; gap: var(--s2);
  padding: 7px var(--s4); border-radius: 999px; background: var(--accent-soft);
  color: var(--on-soft); font-size: var(--small); font-weight: 700;
}
.chip__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); flex: none; }
.chip[data-open="false"] { background: #EFEBE0; color: var(--ink-muted); }
.chip[data-open="false"] .chip__dot { background: var(--ink-muted); }
.section--soft .chip { background: #FFF; }

/* --- Cards -------------------------------------------------------------- */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-outer); padding: var(--s5);
}
.card h3 { margin-bottom: var(--s1); }
.card__kicker { font-size: var(--small); color: var(--ink-muted); margin-bottom: var(--s3); }
.card__price { margin-top: var(--s4); padding-top: var(--s3); border-top: 1px solid var(--line);
               font-size: 19px; font-weight: 700; }
.card__price .from { font-size: var(--small); font-weight: 400; color: var(--ink-muted); }
.card__what { font-size: var(--small); color: var(--ink-muted); }
.card__what strong { color: var(--ink); }
/* Replaces the old price panel. Cost is never a figure on this site. */
.card__cost {
  margin-top: var(--s4); padding-top: var(--s3); border-top: 1px solid var(--line);
  font-size: var(--small); color: var(--ink-muted);
}

/* --- Hero --------------------------------------------------------------- */
.hero { padding-block: var(--s9) var(--section-gap); }
.hero__grid { display: grid; gap: var(--s6); align-items: start; }
@media (min-width: 1080px) { .hero__grid { grid-template-columns: 1.15fr .85fr; gap: var(--s9); } }
.hero .display { margin-block: var(--s4) var(--s4); }
.hero__credential { font-size: 17px; color: var(--ink-muted); margin-bottom: var(--s5); }

/* Portrait panel — with photography, and without. Same footprint either way. */
.portrait {
  background: var(--accent-soft); border-radius: var(--r-outer);
  min-height: 420px; display: grid; place-items: center; padding: var(--s5); text-align: center;
}
.portrait img { border-radius: var(--r-inner); }
/* Photo variant: the image fills the panel the initials otherwise occupy,
   so the two states keep the same footprint. */
.portrait--photo { display: block; padding: 0; overflow: hidden; margin: 0; }
.portrait--photo img { width: 100%; height: auto; border-radius: 0; }
.portrait--photo figcaption {
  padding: var(--s4) var(--s5); font-size: var(--small); color: #3E5349; text-align: left;
}
.portrait__initials {
  width: 116px; height: 116px; border-radius: 50%; background: var(--accent); color: #FFF;
  display: grid; place-items: center; font-size: 40px; font-weight: 700; letter-spacing: .02em;
}
.portrait__note { margin-top: var(--s4); font-size: var(--small); color: #3E5349; max-width: 34ch; }

/* --- Urgent callout ----------------------------------------------------- */
.urgent {
  background: var(--urgent-soft); border: 1px solid #E6D7B8; border-left: 4px solid var(--urgent);
  border-radius: var(--r-outer); padding: var(--s5);
  display: flex; flex-wrap: wrap; gap: var(--s4); align-items: center; justify-content: space-between;
}
.urgent h3 { color: var(--urgent); display: flex; align-items: center; gap: var(--s2); }
.urgent p { color: #5E410F; font-size: 17px; }

/* --- Price table -------------------------------------------------------- */
.prices { width: 100%; border-collapse: collapse; }
.prices caption { text-align: left; font-size: var(--small); color: var(--ink-muted); padding-bottom: var(--s4); }
.prices th { text-align: left; font-size: var(--micro); letter-spacing: .1em; text-transform: uppercase;
             color: var(--ink-muted); font-weight: 700; padding-bottom: var(--s3); }
.prices th:last-child { text-align: right; }
.prices td { padding: var(--s3) 0; border-top: 1px solid var(--line); vertical-align: baseline; }
/* Money columns stay on one line so the figures line up ... */
.prices td:last-child { text-align: right; font-weight: 700; white-space: nowrap; }
/* ... but a table carrying prose in that column has to be allowed to wrap,
   or it forces the page sideways at 360. */
.prices--prose td:last-child { white-space: normal; }
.prices--prose td { vertical-align: top; }

/* --- Hours -------------------------------------------------------------- */
.hours { width: 100%; border-collapse: collapse; }
.hours td { padding: var(--s3) 0; border-top: 1px solid var(--line); }
.hours tr:first-child td { border-top: 0; }
.hours td:last-child { text-align: right; font-weight: 700; white-space: nowrap; }
.section--soft .hours td { border-color: #CBDBD0; }

/* --- Accordion ---------------------------------------------------------- */
.faq { border-top: 1px solid var(--line); }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: var(--s4);
  background: none; border: 0; padding: var(--s5) 0; min-height: 44px;
  font-size: 19px; font-weight: 700; text-align: left; cursor: pointer;
}
.faq__q:hover { color: var(--accent); }
.faq__sign { flex: none; width: 24px; height: 24px; position: relative; }
.faq__sign::before, .faq__sign::after {
  content: ""; position: absolute; top: 50%; left: 0; right: 0; height: 2px;
  background: currentColor; transition: transform .15s ease;
}
.faq__sign::after { transform: rotate(90deg); }
.faq__q[aria-expanded="true"] .faq__sign::after { transform: rotate(0deg); }
.faq__a { padding-bottom: var(--s5); max-width: 72ch; color: var(--ink-muted); }
.faq__a[hidden] { display: none; }

/* --- Steps -------------------------------------------------------------- */
.steps { display: grid; gap: var(--s5); }
.step { display: grid; grid-template-columns: 40px 1fr; gap: var(--s4); align-items: start; }
.step__n {
  width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: #FFF;
  display: grid; place-items: center; font-weight: 700; font-size: 17px;
}
.section--soft .step__n { background: var(--accent); }

/* --- Map / address ------------------------------------------------------ */
.map { background: var(--accent-soft); border-radius: var(--r-outer); overflow: hidden; }
.map img { width: 100%; height: auto; }
/* Live map embed. Fixed aspect ratio so nothing reflows when the iframe loads. */
.map__frame { display: block; width: 100%; aspect-ratio: 16 / 10; border: 0; }
@supports not (aspect-ratio: 1) { .map__frame { height: 340px; } }
.map__fallback { padding: var(--s6); text-align: center; color: var(--on-soft); }
.address-line { font-size: 19px; line-height: 1.5; }
dl.facts dt { font-weight: 700; font-size: var(--small); }
dl.facts dd { margin: 0 0 var(--s4); color: var(--ink-muted); }
.section--soft dl.facts dd { color: #3E5349; }

/* --- Testimonials ------------------------------------------------------- */
.quote { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-outer); padding: var(--s5); }
.quote p { font-size: 17px; }
.quote cite { display: block; margin-top: var(--s4); font-style: normal;
              font-size: var(--small); color: var(--ink-muted); }

/* --- Footer ------------------------------------------------------------- */
.footer { background: var(--accent); color: #D7E2DB; padding-block: var(--s8); margin-top: var(--section-gap); }
.footer a { color: #FFF; }
.footer .wordmark__name, .footer strong { color: #FFF; }
.footer .wordmark__sub { color: #A3B8AC; }
.footer .wordmark__tile { background: rgba(255,255,255,.14); }
.footer__grid { display: grid; gap: var(--s6); }
@media (min-width: 720px) { .footer__grid { grid-template-columns: 1.4fr 1fr 1fr; } }
.footer h4 { font-size: var(--micro); letter-spacing: .12em; text-transform: uppercase;
             color: #A3B8AC; margin-bottom: var(--s3); font-weight: 700; }
.footer__legal { margin-top: var(--s8); padding-top: var(--s5);
                 border-top: 1px solid rgba(255,255,255,.16); font-size: var(--small); color: #A3B8AC; }
.footer .tbc { background: rgba(255,255,255,.16); color: #FFEFD8; }

/* --- The call bar (phone only) ------------------------------------------ */
.callbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: none;
  background: var(--surface); border-top: 1px solid transparent;
  padding: var(--s2) var(--s3) calc(var(--s2) + env(safe-area-inset-bottom, 22px));
  gap: var(--s2);
}
.callbar.is-scrolled { border-top-color: var(--line); box-shadow: var(--shadow-bar); }
/* 56px controls exactly — the label stacks inside that height, it does not grow it. */
.callbar .btn { flex: 1; min-height: 56px; height: 56px; line-height: 1.1; }
.callbar .btn--call { flex: 1.6; flex-direction: column; gap: 0; padding-inline: var(--s3); }
.callbar .btn--call .lbl { font-size: 12px; font-weight: 400; opacity: .85; }

/* --- Phone -------------------------------------------------------------- */
@media (max-width: 899px) {
  :root {
    --display: 34px; --title: 29px; --section: 23px; --body: 16px;
    --section-gap: 26px; --callbar-h: 96px;
  }
  .wrap { padding-inline: var(--s4); }
  .hero { padding-block: var(--s6) var(--section-gap); }
  .portrait { min-height: 260px; }
  .lede { font-size: 18px; }
  .callbar { display: flex; }
  /* On the contact page the bar hands over — the number is already the largest thing there */
  body.page-contact { --callbar-h: 0px; }
  body.page-contact .callbar { display: none; }
  .header__in { min-height: 64px; }
  .urgent { flex-direction: column; align-items: stretch; }
  .urgent .btn { width: 100%; }
  .footer { margin-top: var(--s6); }
  /* A link that stands on its own is a tap target, not prose: 44px minimum.
     Links inside a sentence keep their natural height. */
  .footer a, .link-tap { display: inline-flex; align-items: center; min-height: 44px; }
}

/* --- Motion: hover colour shifts and the bar shadow. Nothing else moves. - */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* --- Print -------------------------------------------------------------- */
@media print {
  .callbar, .nav, .btn { display: none !important; }
  body { background: #FFF; padding-bottom: 0; }
  .footer { background: none; color: #000; }
  .footer a, .footer h4, .footer__legal { color: #000; }
}

/* --- Utilities ---------------------------------------------------------- */
.skip {
  position: absolute; left: -9999px; top: 0; background: var(--accent); color: #FFF;
  padding: var(--s3) var(--s4); z-index: 100; border-radius: 0 0 var(--r-inner) 0;
}
.skip:focus { left: 0; color: #FFF; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
