/* ============================================================
   Jaiswal Orthopaedics & Dental Care — site components
   Depends on tokens.css (load tokens.css first).
   ============================================================ */

/* Icon sizing — inline SVGs must never expand to container width */
.brand svg { width: 38px; height: 38px; flex: 0 0 auto; }
.btn svg { width: 1.1em; height: 1.1em; flex: 0 0 auto; }
.info-row > svg { width: 22px; height: 22px; flex: 0 0 auto; }
.actionbar a svg { width: 20px; height: 20px; flex: 0 0 auto; }
.mobile-toggle svg, .drawer__close svg { width: 22px; height: 22px; }
.doctor__ph svg { width: 52px; height: 52px; }

/* Skip link */
.skip {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--ink); color: #fff; padding: .6rem 1rem; border-radius: 0 0 var(--radius) 0;
}
.skip:focus { left: 0; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.1) blur(6px);
  border-bottom: var(--border);
}
.nav { display: flex; align-items: center; gap: var(--sp-5); min-height: 68px; }
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; margin-right: auto; }
.brand__mark { width: 38px; height: 38px; flex: 0 0 auto; }
.brand__name { font-family: var(--font-head); font-weight: 600; font-size: 1.12rem; color: var(--ink); line-height: 1.05; letter-spacing: -.01em; }
.brand__name span { display: block; font-family: var(--font-body); font-weight: 500; font-size: .72rem; color: var(--slate); letter-spacing: .01em; }

.menu { display: flex; align-items: center; gap: var(--sp-5); list-style: none; padding: 0; margin: 0; }
.menu a { color: var(--ink); text-decoration: none; font-weight: 500; font-size: .98rem; padding: .4rem 0; border-bottom: 2px solid transparent; }
.menu a:hover { color: var(--ortho); }
.menu a[aria-current="page"] { border-bottom-color: var(--ortho); color: var(--ortho); }

.nav__cta { display: flex; align-items: center; gap: .6rem; }
.mobile-toggle { display: none; }

@media (max-width: 900px) {
  .menu, .nav__cta .btn--ghost { display: none; }
  .mobile-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border: var(--border); border-radius: var(--radius);
    background: var(--surface); cursor: pointer; color: var(--ink);
  }
  .mobile-toggle svg { width: 22px; height: 22px; }
}

/* Mobile drawer */
.drawer {
  position: fixed; inset: 0; z-index: 50; display: none;
  background: rgba(8,18,28,.5);
}
.drawer[open], .drawer.is-open { display: block; }
.drawer__panel {
  position: absolute; right: 0; top: 0; height: 100%; width: min(84vw, 340px);
  background: var(--surface); border-left: var(--border);
  padding: var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-2);
  transform: translateX(0);
}
.drawer__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--sp-3); }
.drawer__panel a.menu-link { display: block; padding: .85rem .25rem; border-bottom: var(--border); color: var(--ink); text-decoration: none; font-weight: 500; }
.drawer__panel .btn { justify-content: center; margin-top: var(--sp-2); }
.drawer__close { width: 40px; height: 40px; border: var(--border); border-radius: var(--radius); background: var(--surface); cursor: pointer; }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(var(--sp-6), 6vw, var(--sp-8)); }
.hero__grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(var(--sp-5), 5vw, var(--sp-8)); align-items: center; }
.hero__eyebrow { display: inline-flex; align-items: center; gap: .5rem; color: var(--slate); font-weight: 600; font-size: var(--step--1); margin-bottom: var(--sp-3); }
.hero__eyebrow .dot { width: .55rem; height: .55rem; border-radius: 50%; background: var(--ortho); }
.hero__eyebrow .dot + .dot { background: var(--dental); margin-left: -.15rem; }
.hero h1 { margin-bottom: var(--sp-4); }
.hero__lead { font-size: var(--step-1); color: var(--slate); line-height: 1.5; margin-bottom: var(--sp-5); max-width: 40ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; }
.hero__media { position: relative; }
.hero__media img { width: 100%; border-radius: var(--radius); border: var(--border); aspect-ratio: 4/3; object-fit: cover; }
.hero__tag { position: absolute; left: var(--sp-4); bottom: var(--sp-4); background: var(--ink); color: #fff; font-size: var(--step--1); font-weight: 600; padding: .5rem .8rem; border-radius: var(--radius); }

@media (max-width: 820px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__media { order: -1; }
  .hero__media img { aspect-ratio: 16/10; }
}

/* ---------- Section scaffolding ---------- */
.section-head { max-width: 56ch; margin-bottom: var(--sp-6); }
.section-head .eyebrow { display: block; margin-bottom: var(--sp-2); }
.section-head p { color: var(--slate); margin-top: var(--sp-3); }
.section--alt { background: var(--surface); border-block: var(--border); }

/* ---------- Specialty split ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-5); }
@media (max-width: 720px) { .split { grid-template-columns: 1fr; } }
.spec-card {
  background: var(--surface); border: var(--border); border-radius: var(--radius);
  padding: clamp(var(--sp-5), 4vw, var(--sp-6)); position: relative;
}
.spec-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--spec); border-radius: var(--radius) 0 0 var(--radius); }
.spec-card--ortho { --spec: var(--ortho); }
.spec-card--dental { --spec: var(--dental); }
.spec-card .eyebrow { color: var(--spec); margin-bottom: var(--sp-2); display: block; }
.spec-card h3 { margin-bottom: var(--sp-3); }
.spec-card ul { list-style: none; padding: 0; margin: 0 0 var(--sp-4); }
.spec-card li { padding: .45rem 0; border-top: var(--border); color: var(--slate); display: flex; gap: .55rem; align-items: baseline; }
.spec-card li::before { content: ""; width: .45rem; height: .45rem; border-radius: 50%; background: var(--spec); flex: 0 0 auto; transform: translateY(.35rem); }
.spec-card li:first-child { border-top: 0; }

/* ---------- Service groups (services page) ---------- */
.svc-group + .svc-group { margin-top: var(--sp-7); }
.svc-head { display: flex; align-items: center; gap: .7rem; margin-bottom: var(--sp-5); }
.svc-head .rule { width: 2.5rem; border-top: 3px solid var(--spec); }
.svc-head h2 { color: var(--spec); }
.svc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: var(--sp-4); }
.svc-item { background: var(--surface); border: var(--border); border-radius: var(--radius); padding: var(--sp-5); }
.svc-item h3 { font-size: var(--step-1); margin-bottom: var(--sp-2); }
.svc-item p { color: var(--slate); font-size: .96rem; margin: 0; }
.svc-item--ortho { --spec: var(--ortho); } .svc-item--dental { --spec: var(--dental); }

/* ---------- Doctors ---------- */
.doctor-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-5); }
@media (max-width: 760px) { .doctor-grid { grid-template-columns: 1fr; } }
.doctor {
  background: var(--surface); border: var(--border); border-radius: var(--radius);
  padding: var(--sp-5); display: grid; grid-template-columns: 128px 1fr; gap: var(--sp-5);
}
.doctor__photo { width: 128px; height: 160px; border-radius: var(--radius); object-fit: cover; border: var(--border); background: var(--paper); }
.doctor__ph {
  width: 128px; height: 160px; border-radius: var(--radius); border: var(--border);
  background: linear-gradient(160deg, var(--paper), #e7edf0); display: grid; place-items: center; color: var(--muted);
}
.doctor__ph svg { width: 52px; height: 52px; opacity: .5; }
.doctor__spec { display: inline-flex; align-items: center; gap: .45rem; font-size: var(--step--1); font-weight: 600; margin-bottom: .35rem; }
.doctor__spec .dot { width: .55rem; height: .55rem; border-radius: 50%; }
.doctor h3 { font-size: var(--step-2); }
.doctor__q { color: var(--slate); margin: .25rem 0 var(--sp-3); font-size: .96rem; }
.doctor__meta { font-size: .92rem; color: var(--slate); border-top: var(--border); padding-top: var(--sp-3); margin-top: var(--sp-3); }
.doctor__flag { display: inline-block; margin-top: .5rem; font-size: .7rem; font-weight: 600; color: var(--muted); border: 1px dashed var(--line); border-radius: 4px; padding: .12rem .45rem; }
@media (max-width: 460px) { .doctor { grid-template-columns: 1fr; } .doctor__photo, .doctor__ph { width: 120px; } }

/* ---------- Hours table ---------- */
.hours { width: 100%; border-collapse: collapse; }
.hours caption { text-align: left; font-weight: 600; margin-bottom: var(--sp-3); }
.hours th, .hours td { text-align: left; padding: .6rem .5rem; border-top: var(--border); font-size: .95rem; }
.hours th { font-weight: 600; color: var(--ink); }
.hours td { color: var(--slate); }
.hours tr:first-child th, .hours tr:first-child td { border-top: 0; }

/* ---------- Info / contact grid ---------- */
.info-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(var(--sp-5), 5vw, var(--sp-7)); align-items: start; }
@media (max-width: 820px) { .info-grid { grid-template-columns: 1fr; } }
.info-row { display: flex; gap: .8rem; padding: var(--sp-4) 0; border-top: var(--border); }
.info-row:first-child { border-top: 0; }
.info-row svg { width: 22px; height: 22px; color: var(--ortho); flex: 0 0 auto; margin-top: .15rem; }
.info-row b { display: block; }
.info-row a { color: var(--ink); }

/* ---------- CTA band ---------- */
.cta-band { background: var(--ink); color: #fff; border-radius: var(--radius); padding: clamp(var(--sp-6), 5vw, var(--sp-8)); text-align: center; }
.cta-band h2 { color: #fff; margin-bottom: var(--sp-3); }
.cta-band p { color: #c7d2dc; margin: 0 auto var(--sp-5); }
.cta-band .btn--ghost { color: #fff; border-color: rgba(255,255,255,.4); }
.cta-band .btn--ghost:hover { background: rgba(255,255,255,.08); border-color:#fff; }
.cta-actions { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; }

/* ---------- Form ---------- */
.form { background: var(--surface); border: var(--border); border-radius: var(--radius); padding: clamp(var(--sp-5), 4vw, var(--sp-6)); }
.field { margin-bottom: var(--sp-4); }
.field label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: .35rem; }
.field label .req { color: var(--danger); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink);
  padding: .7rem .8rem; border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ortho); box-shadow: var(--ring); }
.field textarea { min-height: 96px; resize: vertical; }
.field .hint { font-size: .82rem; color: var(--muted); margin-top: .3rem; }
.field.two { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); }
@media (max-width: 520px) { .field.two { grid-template-columns: 1fr; } }
.field.invalid input, .field.invalid select { border-color: var(--danger); }
.field .error { display: none; color: var(--danger); font-size: .82rem; margin-top: .3rem; }
.field.invalid .error { display: block; }
.form__note { font-size: .82rem; color: var(--muted); margin-top: var(--sp-4); }
.form__status { display: none; padding: var(--sp-4); border-radius: var(--radius); margin-bottom: var(--sp-4); font-size: .95rem; }
.form__status.ok { display: block; background: #E4F0E9; color: var(--success); }
.form__status.err { display: block; background: #F6E1E1; color: var(--danger); }

/* ---------- Trust strip ---------- */
.trust { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--sp-5); }
.trust__item { padding: var(--sp-4); border-left: 3px solid var(--ortho); }
.trust__item:nth-child(even) { border-left-color: var(--dental); }
.trust__item b { display: block; font-family: var(--font-head); font-size: var(--step-1); }
.trust__item span { color: var(--slate); font-size: .92rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #c7d2dc; margin-top: var(--sp-8); }
.site-footer a { color: #dbe4ec; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: var(--sp-6); padding-block: var(--sp-7); }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h4 { color: #fff; font-family: var(--font-body); font-size: .82rem; font-weight: 700; letter-spacing: .02em; margin-bottom: var(--sp-3); }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { padding: .28rem 0; font-size: .94rem; }
.footer-brand__name { font-family: var(--font-head); color: #fff; font-size: 1.15rem; margin-bottom: var(--sp-2); }
.footer-brand p { font-size: .92rem; max-width: 34ch; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding-block: var(--sp-4); display: flex; flex-wrap: wrap; gap: var(--sp-3); justify-content: space-between; font-size: .82rem; }
.footer-credit a { text-decoration: underline; }

/* ---------- Mobile action bar ---------- */
.actionbar { display: none; }
@media (max-width: 900px) {
  .actionbar {
    display: grid; grid-template-columns: repeat(4, 1fr); position: fixed;
    left: 0; right: 0; bottom: 0; z-index: 45; background: var(--surface);
    border-top: var(--border); box-shadow: 0 -2px 10px rgba(8,18,28,.06);
  }
  .actionbar a {
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: .5rem 0 calc(.5rem + env(safe-area-inset-bottom, 0px));
    font-size: .68rem; font-weight: 600; color: var(--ink); text-decoration: none;
  }
  .actionbar a svg { width: 20px; height: 20px; }
  .actionbar a.is-wa { color: var(--wa-dark); }
  .actionbar a + a { border-left: var(--border); }
  body { padding-bottom: 64px; }
}

/* ---------- Breadcrumb ---------- */
.breadcrumb { font-size: .85rem; color: var(--muted); padding-top: var(--sp-5); }
.breadcrumb a { color: var(--slate); text-decoration: none; }
.breadcrumb a:hover { color: var(--ortho); }

/* Honeypot — visually and semantically hidden from real users */
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* Inline WhatsApp text link (not a button) */
.inline-wa { display: inline-flex; align-items: center; gap: .25em; font-weight: 600; color: var(--wa-dark); text-decoration: underline; }
.inline-wa svg { width: 1em; height: 1em; flex: 0 0 auto; }

/* ---------- Legal / prose pages ---------- */
.legal { max-width: 74ch; }
.legal .updated { color: var(--muted); font-size: var(--step--1); margin-bottom: var(--sp-5); }
.legal h2 { font-size: var(--step-2); margin: var(--sp-6) 0 var(--sp-3); }
.legal h3 { font-size: var(--step-1); margin: var(--sp-5) 0 var(--sp-2); }
.legal p, .legal li { color: var(--slate); }
.legal ul { padding-left: 1.25rem; margin: var(--sp-3) 0; }
.legal li { padding: .2rem 0; }
.legal .callout { background: var(--surface); border: var(--border); border-left: 3px solid var(--ortho); border-radius: var(--radius); padding: var(--sp-4) var(--sp-5); margin: var(--sp-5) 0; }
.legal .callout p { margin: 0; color: var(--ink); }

/* ---------- Thank-you ---------- */
.thanks { text-align: center; padding-block: clamp(var(--sp-8), 10vw, 7rem); }
.thanks .tick { width: 64px; height: 64px; border-radius: 50%; background: #E4F0E9; color: var(--success); display: grid; place-items: center; margin: 0 auto var(--sp-5); }
.thanks .tick svg { width: 32px; height: 32px; }
.thanks .links { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; margin-top: var(--sp-5); }

/* ---------- FAQ (native details/summary — accessible by default) ---------- */
.faq { max-width: 780px; }
.faq__item { border-top: var(--border); }
.faq__item:last-child { border-bottom: var(--border); }
.faq__item summary {
  cursor: pointer; list-style: none; padding: var(--sp-4) 2rem var(--sp-4) 0;
  font-weight: 600; color: var(--ink); position: relative; font-size: 1.02rem;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: "+"; position: absolute; right: .25rem; top: 50%; transform: translateY(-50%);
  font-size: 1.4rem; font-weight: 400; color: var(--ortho); line-height: 1;
}
.faq__item[open] summary::after { content: "\2013"; }
.faq__item summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.faq__a { padding: 0 0 var(--sp-4); }
.faq__a p { color: var(--slate); margin: 0; }

/* ---------- 404 ---------- */
.err-wrap { text-align: center; padding-block: clamp(var(--sp-8), 12vw, 8rem); }
.err-wrap .code { font-family: var(--font-head); font-size: clamp(3rem, 12vw, 6rem); color: var(--ortho); line-height: 1; }
.err-wrap .links { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; margin-top: var(--sp-5); }
