/* Cavalry Dental Care: deep navy + brass, Fraunces + DM Sans.
   Calm, clinical, a little "Cantt" formality. */
:root {
  --navy: #102a43;
  --navy-2: #1b3a5a;
  --brass: #b8893b;
  --brass-soft: #f3e7cf;
  --mint: #eef5f3;
  --bg: #fbfaf7;
  --text: #16232f;
  --muted: #56606b;
  --line: #e2e0d8;
  --white: #ffffff;
  --radius: 16px;
  --max: 1120px;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: var(--navy-2); }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; color: var(--navy); letter-spacing: -0.01em; }
h1 { font-size: clamp(2.1rem, 7vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 5vw, 2.5rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
section { padding: 64px 0; }
.eyebrow {
  display: inline-block;
  font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--brass); margin-bottom: .7em;
}
.lead { font-size: 1.12rem; color: var(--muted); max-width: 40em; }
.urdu { font-family: "Noto Nastaliq Urdu", serif; direction: rtl; line-height: 2.2; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  background: var(--navy); color: var(--white);
  padding: 13px 24px; border-radius: 999px; border: 2px solid var(--navy);
  font: 600 1rem var(--sans); text-decoration: none; cursor: pointer;
  transition: background .2s, color .2s, transform .1s;
}
.btn:hover { background: var(--navy-2); }
.btn:active { transform: translateY(1px); }
.btn.brass { background: var(--brass); border-color: var(--brass); color: var(--white); }
.btn.brass:hover { background: #a37630; }
.btn.ghost { background: transparent; color: var(--navy); }
.btn.ghost.light { color: var(--white); border-color: rgba(255,255,255,.7); }
.btn svg { width: 20px; height: 20px; fill: currentColor; flex: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* Header */
.topbar { background: var(--navy); color: #cfd9e3; font-size: .85rem; }
.topbar .wrap { display: flex; justify-content: space-between; gap: 12px; padding-top: 7px; padding-bottom: 7px; }
.topbar a { color: var(--white); text-decoration: none; font-weight: 600; }
.topbar .hide-sm { display: none; }
header.site {
  position: sticky; top: 0; z-index: 40;
  background: rgba(251,250,247,.94); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
header.site .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy); }
.brand-mark {
  width: 38px; height: 38px; border-radius: 10px; background: var(--navy);
  display: grid; place-items: center; flex: none;
}
.brand-mark svg { width: 24px; height: 24px; }
.brand b { font-family: var(--serif); font-size: 1.12rem; display: block; line-height: 1.1; }
.brand small { display: block; font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--brass); font-weight: 700; }
.nav-toggle {
  background: none; border: 1px solid var(--line); border-radius: 10px;
  width: 44px; height: 44px; display: grid; place-items: center; cursor: pointer;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; display: block; width: 20px; height: 2px; background: var(--navy); position: relative;
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }
nav.main {
  display: none; position: absolute; top: 64px; left: 0; right: 0;
  background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 16px 16px;
}
nav.main.open { display: block; }
nav.main a {
  display: block; padding: 12px 4px; text-decoration: none; color: var(--text);
  font-weight: 500; border-bottom: 1px solid var(--line);
}
nav.main a[aria-current="page"] { color: var(--brass); font-weight: 700; }
nav.main .btn { display: flex; margin-top: 14px; border-bottom: 0; color: var(--white); }

/* Hero */
.hero { position: relative; padding: 0; background: var(--navy); color: var(--white); overflow: hidden; }
.hero img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .35; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(16,42,67,.35), rgba(16,42,67,.92) 75%); }
.hero .wrap { position: relative; z-index: 1; padding-top: 72px; padding-bottom: 56px; }
.hero h1 { color: var(--white); max-width: 14em; }
.hero h1 em { font-style: italic; color: var(--brass-soft); }
.hero p { color: #d8e1ea; font-size: 1.1rem; max-width: 34em; }
.hero .urdu { color: var(--brass-soft); font-size: 1.15rem; margin: -.2em 0 .6em; text-align: left; }
.hero-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 32px; }
.hero-facts div { border-top: 1px solid rgba(255,255,255,.25); padding-top: 10px; font-size: .88rem; color: #cfd9e3; }
.hero-facts b { display: block; color: var(--white); font-family: var(--serif); font-size: 1.05rem; font-weight: 600; }

/* Page hero (inner pages) */
.page-hero { background: var(--navy); color: var(--white); padding: 48px 0 40px; }
.page-hero h1 { color: var(--white); font-size: clamp(2rem, 6vw, 3rem); }
.page-hero p { color: #cfd9e3; max-width: 36em; margin: 0; }
.crumb { font-size: .82rem; color: var(--brass-soft); margin-bottom: .6em; }
.crumb a { color: var(--brass-soft); }

/* Cards / grids */
.grid { display: grid; gap: 16px; }
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px;
}
.card h3 { margin-bottom: .35em; }
.card p { color: var(--muted); margin: 0; font-size: .96rem; }
.icon {
  width: 46px; height: 46px; border-radius: 12px; background: var(--mint);
  display: grid; place-items: center; margin-bottom: 14px;
}
.icon svg { width: 26px; height: 26px; stroke: var(--navy); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.card .more { display: inline-block; margin-top: 12px; font-weight: 700; color: var(--brass); text-decoration: none; font-size: .92rem; }
.section-head { margin-bottom: 28px; }
.section-head .btn { margin-top: 6px; }
.alt { background: var(--mint); }
.dark { background: var(--navy); color: #d8e1ea; }
.dark h2, .dark h3 { color: var(--white); }

/* Split */
.split { display: grid; gap: 28px; align-items: center; }
.split img { border-radius: var(--radius); width: 100%; height: auto; aspect-ratio: 4/3; object-fit: cover; }
.ticks { list-style: none; padding: 0; margin: 0 0 1.2em; }
.ticks li { padding-left: 30px; position: relative; margin-bottom: 10px; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 4px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--brass) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center/12px no-repeat;
}

/* Doctors */
.doc { display: flex; gap: 16px; align-items: flex-start; }
.avatar {
  width: 72px; height: 72px; border-radius: 50%; flex: none;
  background: linear-gradient(135deg, var(--navy), var(--navy-2));
  color: var(--brass-soft); display: grid; place-items: center;
  font: 600 1.5rem var(--serif); border: 3px solid var(--brass-soft);
}
.avatar.lg { width: 112px; height: 112px; font-size: 2.3rem; }
.doc .role { color: var(--brass); font-weight: 700; font-size: .85rem; letter-spacing: .04em; margin-bottom: .4em; }
.tag { display: inline-block; font-size: .78rem; background: var(--mint); color: var(--navy); border-radius: 999px; padding: 3px 10px; margin: 0 6px 6px 0; }

/* Steps (overseas) */
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.steps li { counter-increment: s; position: relative; padding: 18px 18px 18px 64px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); border-radius: var(--radius); }
.steps li::before {
  content: counter(s); position: absolute; left: 18px; top: 16px; width: 32px; height: 32px; border-radius: 50%;
  background: var(--brass); color: var(--white); display: grid; place-items: center; font-weight: 700;
}
.steps b { color: var(--white); display: block; }

/* Hours */
.hours { width: 100%; border-collapse: collapse; }
.hours td { padding: 10px 0; border-bottom: 1px solid var(--line); }
.hours td:last-child { text-align: right; font-weight: 600; white-space: nowrap; }
.hours tr.today td { color: var(--brass); }

/* Gallery */
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gallery button { padding: 0; border: 0; background: none; cursor: zoom-in; border-radius: 12px; overflow: hidden; }
.gallery img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; transition: transform .3s; }
.gallery button:hover img { transform: scale(1.04); }
.gallery figure { margin: 0; }
.gallery figcaption { font-size: .85rem; color: var(--muted); padding: 6px 2px 0; }
dialog.lightbox { border: 0; padding: 0; background: transparent; max-width: 94vw; }
dialog.lightbox::backdrop { background: rgba(10,20,32,.88); }
dialog.lightbox img { max-height: 80vh; border-radius: 12px; }
dialog.lightbox p { color: #fff; text-align: center; margin: 10px 0 0; }
dialog.lightbox button { position: absolute; top: 8px; right: 8px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(0,0,0,.55); color: #fff; font-size: 1.4rem; cursor: pointer; }

/* Map */
.map iframe { width: 100%; height: 320px; border: 0; border-radius: var(--radius); display: block; }

/* Forms */
form.booking { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field label, fieldset legend { font-weight: 600; font-size: .92rem; color: var(--navy); }
.field small { color: var(--muted); font-size: .82rem; }
input, select, textarea {
  font: inherit; font-size: 1rem; /* 16px stops iOS zoom */
  padding: 12px 14px; border: 1px solid #cfd3d6; border-radius: 12px; width: 100%;
  background: var(--white); color: var(--text);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brass); outline-offset: 1px; border-color: var(--brass); }
fieldset { border: 0; padding: 0; margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.chips label { position: relative; }
.chips input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chips span {
  display: inline-block; padding: 9px 16px; border: 1px solid #cfd3d6; border-radius: 999px;
  background: var(--white); cursor: pointer; font-weight: 500; font-size: .95rem;
}
.chips input:checked + span { background: var(--navy); border-color: var(--navy); color: var(--white); }
.chips input:focus-visible + span { outline: 2px solid var(--brass); outline-offset: 2px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .95rem; }
.check input { width: 20px; height: 20px; margin-top: 3px; flex: none; accent-color: var(--navy); }
.two { display: grid; gap: 14px; }
.form-card { background: var(--white); border: 1px solid var(--line); border-radius: 20px; padding: 22px; box-shadow: 0 10px 30px rgba(16,42,67,.06); }
.form-note { font-size: .85rem; color: var(--muted); margin: 0; }

/* CTA band */
.cta-band { background: var(--brass-soft); }
.cta-band .wrap { display: grid; gap: 16px; }

/* Footer */
footer.site { background: #0b1f33; color: #a9b7c5; padding: 44px 0 96px; font-size: .92rem; }
footer.site h3 { color: var(--white); font-size: 1.05rem; }
footer.site a { color: var(--white); }
footer.site .grid { gap: 28px; }
footer.site .fine { border-top: 1px solid rgba(255,255,255,.12); margin-top: 28px; padding-top: 16px; font-size: .8rem; }

/* Floating WhatsApp */
.wa-float {
  position: fixed; right: 16px; bottom: 16px; z-index: 50;
  width: 58px; height: 58px; border-radius: 50%; background: #25d366;
  display: grid; place-items: center; box-shadow: 0 6px 18px rgba(0,0,0,.25);
}
.wa-float svg { width: 31px; height: 31px; fill: #fff; }

/* Placeholder marker (only visible when ?ph is in the URL) */
.ph-on [data-ph] { outline: 2px dashed #e0457b; outline-offset: 2px; }

@media (min-width: 640px) {
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .two { grid-template-columns: 1fr 1fr; }
  .hero-facts { grid-template-columns: repeat(4, 1fr); }
  .topbar .hide-sm { display: inline; }
}
@media (min-width: 760px) {
  .grid.c2 { grid-template-columns: 1fr 1fr; }
  .grid.c3 { grid-template-columns: repeat(3, 1fr); }
  .split { grid-template-columns: 1fr 1fr; gap: 48px; }
  .cta-band .wrap { grid-template-columns: 1fr auto; align-items: center; }
  footer.site .grid { grid-template-columns: 1.4fr 1fr 1fr; }
}
@media (min-width: 960px) {
  section { padding: 88px 0; }
  .hero .wrap { padding-top: 120px; padding-bottom: 80px; }
  .nav-toggle { display: none; }
  nav.main { display: flex !important; position: static; padding: 0; border: 0; background: none; align-items: center; gap: 22px; }
  nav.main a { border: 0; padding: 6px 0; font-size: .95rem; }
  nav.main .btn { margin: 0 0 0 6px; padding: 10px 20px; }
  .grid.c4 { grid-template-columns: repeat(4, 1fr); }
  .gallery { grid-template-columns: repeat(4, 1fr); }
  .booking-layout { display: grid; grid-template-columns: 1.3fr 1fr; gap: 40px; align-items: start; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
.booking-layout > .form-card { margin-bottom: 16px; }
@media (max-width: 519px) {
  .doc:has(.avatar.lg) { flex-direction: column; }
  .doc .avatar.lg { width: 88px; height: 88px; font-size: 1.9rem; }
}
