/* Islamabad Eye Centre
   Grid: max 1240 / gutters 20 → 40. Spacing: 4 8 12 16 24 32 48 64 96.
   Type: 14 16 18 + display 32 48 88. One face (Familjen Grotesk). */

:root {
  --ink: #0E1A22;
  --ink-2: #3A4750;
  --ink-3: #5E6A72;
  --paper: #FFFFFF;
  --tint: #F1F3F2;
  --line: rgba(14, 26, 34, 0.14);
  --line-strong: rgba(14, 26, 34, 0.28);

  --night: #0B1419;
  --night-2: #13222B;
  --on-night: #F2F5F6;
  --on-night-2: #A7B4BB;
  --night-line: rgba(242, 245, 246, 0.16);

  --retina: #B5441A;        /* from the fundus photo; actions + state only */
  --retina-hover: #9A3813;
  --retina-bright: #EE6A33; /* readout on dark ground */
  --retina-wash: #FBEDE6;
  --ok: #1F7A4D;
  --wa: #128C4A;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;
  --gutter: 20px;
  --max: 1240px;
  --r-sm: 4px;
  --r-pill: 999px;

  --t-14: 0.875rem;
  --t-16: 1rem;
  --t-18: 1.125rem;
  --d-32: clamp(1.75rem, 1.3rem + 1.6vw, 2rem);
  --d-48: clamp(2rem, 1.4rem + 2.4vw, 3rem);
  --d-88: clamp(2.5rem, 1.2rem + 5.2vw, 5.5rem);

  --ease-out: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-io: cubic-bezier(0.6, 0, 0.3, 1);
  --d-press: 160ms;
  --d-ui: 320ms;

  --head-h: 64px;
  --dock-h: 0px;

  color-scheme: light;
}

@media (min-width: 720px) { :root { --gutter: 32px; } }
@media (min-width: 1080px) { :root { --gutter: 40px; --head-h: 72px; } }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--head-h) + 16px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Familjen Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: var(--t-16);
  line-height: 1.55;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  padding-bottom: var(--dock-h);
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
p { margin: 0; text-wrap: pretty; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; text-wrap: balance; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 2px; }
.sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.num { font-variant-numeric: tabular-nums lining-nums; }
.muted { color: var(--ink-3); }
.wrap { width: 100%; max-width: calc(var(--max) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.i use[href^="#si-"] { fill: currentColor; stroke: none; }

.skip { position: absolute; left: var(--s4); top: -100px; z-index: 100; background: var(--ink); color: #fff; padding: var(--s3) var(--s4); border-radius: var(--r-sm); text-decoration: none; }
.skip:focus { top: var(--s4); }

/* ---------- type ---------- */
.h2 { font-size: var(--d-48); line-height: 1.05; letter-spacing: -0.025em; font-weight: 600; }
.h3 { font-size: var(--d-32); line-height: 1.1; letter-spacing: -0.02em; }
.h4 { font-size: var(--t-14); font-weight: 600; letter-spacing: 0; display: flex; align-items: center; gap: var(--s2); color: var(--ink); }
.h4 .i { width: 16px; height: 16px; color: var(--ink-3); }

/* ---------- buttons + links ---------- */
.btn {
  --bg: var(--ink); --fg: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 48px; padding: 0 var(--s5);
  border: 0; border-radius: var(--r-pill);
  background: var(--bg); color: var(--fg);
  font-size: var(--t-16); font-weight: 500; line-height: 1;
  text-decoration: none; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: background-color var(--d-ui) var(--ease-out), transform var(--d-press) var(--ease-out);
}
.btn:active { transform: scale(0.97); }
.btn .i { width: 18px; height: 18px; }
.btn--primary { --bg: var(--retina); }
.btn--primary:hover { --bg: var(--retina-hover); }
.btn--wa { --bg: transparent; --fg: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn--wa:hover { --bg: var(--tint); }
.btn--wa .i { color: var(--wa); }
.btn--sm { min-height: 40px; padding: 0 18px; font-size: var(--t-14); }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: progress; }

.link {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px;
  font-weight: 500; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px;
  text-decoration-color: var(--line-strong);
  transition: text-decoration-color var(--d-ui) var(--ease-out);
}
.link:hover { text-decoration-color: currentColor; }
.link .i { width: 16px; height: 16px; }
.link--light { color: var(--on-night); text-decoration-color: var(--night-line); }

/* ---------- status (open now) ---------- */
.status { display: inline-flex; align-items: center; gap: var(--s2); font-size: var(--t-14); font-weight: 500; color: var(--ink-2); }
.status__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); }
.status.is-open .status__dot { background: var(--ok); box-shadow: 0 0 0 4px rgba(31, 122, 77, .16); }
.status.is-open { color: var(--ok); }
.status--dark { color: var(--on-night-2); }
.status--dark.is-open { color: #7FD3A5; }
.status--dark.is-open .status__dot { background: #43B97A; box-shadow: 0 0 0 4px rgba(67, 185, 122, .2); }

/* ---------- masthead ---------- */
.masthead {
  position: sticky; top: 0; z-index: 40;
  height: var(--head-h);
  padding-top: env(safe-area-inset-top);
  box-sizing: content-box;
  background: var(--night); color: var(--on-night);
  transition: background-color var(--d-ui) var(--ease-out), color var(--d-ui) var(--ease-out), box-shadow var(--d-ui) var(--ease-out);
}
.masthead.is-light { background: var(--paper); color: var(--ink); box-shadow: 0 1px 0 var(--line); }
.masthead__bar { height: 100%; display: flex; align-items: center; gap: var(--s5); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; min-height: 44px; }
.brand__mark { width: 28px; height: 28px; flex: none; }
.brand__name { font-weight: 600; font-size: 17px; letter-spacing: -0.015em; white-space: nowrap; }
.nav { display: none; gap: var(--s6); margin-left: auto; }
.nav a { font-size: var(--t-14); font-weight: 500; text-decoration: none; opacity: .8; padding: var(--s3) 0; transition: opacity var(--d-ui) var(--ease-out); }
.nav a:hover, .nav a[aria-current="true"] { opacity: 1; }
.masthead__end { display: flex; align-items: center; gap: var(--s3); margin-left: auto; }
.masthead__phone { display: none; align-items: center; gap: 6px; font-size: var(--t-14); font-weight: 500; text-decoration: none; font-variant-numeric: tabular-nums; }
.masthead__phone .i { width: 16px; height: 16px; opacity: .7; }
.masthead .btn--sm { display: none; }
.menu-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px; margin-right: -10px;
  background: none; border: 0; border-radius: var(--r-sm); cursor: pointer; color: inherit;
  -webkit-tap-highlight-color: transparent;
}
.menu-btn .i { width: 24px; height: 24px; }
.masthead:not(.is-light) :focus-visible { outline-color: var(--on-night); }

@media (min-width: 560px) { .masthead .btn--sm { display: inline-flex; } }
@media (min-width: 960px) {
  .nav { display: flex; }
  .masthead__end { margin-left: var(--s6); }
  .menu-btn { display: none; }
}
@media (min-width: 1180px) { .masthead__phone { display: inline-flex; } }

/* ---------- mobile sheet ---------- */
.sheet {
  position: fixed; inset: 0; margin: 0;
  width: 100%; max-width: 100%; height: 100%; max-height: 100%;
  border: 0; padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
  background: var(--night); color: var(--on-night);
  display: none; flex-direction: column;
}
.sheet[open] { display: flex; animation: sheet-in var(--d-ui) var(--ease-out); }
.sheet::backdrop { background: rgba(11, 20, 25, .4); }
@keyframes sheet-in { from { opacity: 0; transform: translateY(-8px); } }
.sheet__head { height: var(--head-h); display: flex; align-items: center; justify-content: space-between; padding: 0 var(--gutter); border-bottom: 1px solid var(--night-line); }
.sheet__nav { display: flex; flex-direction: column; padding: var(--s5) var(--gutter); }
.sheet__nav a { font-size: var(--d-32); font-weight: 500; letter-spacing: -0.02em; text-decoration: none; padding: var(--s3) 0; border-bottom: 1px solid var(--night-line); }
.sheet__foot { margin-top: auto; padding: var(--s5) var(--gutter) var(--s6); display: grid; gap: var(--s4); }
.sheet .status { color: var(--on-night-2); }
.sheet .status.is-open { color: #7FD3A5; }
.sheet :focus-visible { outline-color: var(--on-night); }

/* ---------- hero ---------- */
.hero { background: var(--night); color: var(--on-night); padding: var(--s6) 0 var(--s8); overflow: hidden; }
.hero__grid { display: grid; gap: var(--s7); align-items: center; }
.hero__copy { display: grid; gap: var(--s5); align-content: start; }
.hero__title { font-size: var(--d-88); line-height: 0.98; letter-spacing: -0.035em; font-weight: 600; max-width: 13ch; }
.hero__lede { font-size: var(--t-18); line-height: 1.5; color: var(--on-night-2); max-width: 36rem; }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s4) var(--s5); }
.hero :focus-visible { outline-color: var(--on-night); }

.readouts { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: var(--s6); margin: var(--s4) 0 0; padding-top: var(--s5); border-top: 1px solid var(--night-line); }
.readouts div { display: grid; gap: 2px; }
.readouts dt { font-size: var(--t-14); color: var(--on-night-2); }
.readouts dd { margin: 0; font-size: var(--d-32); font-weight: 500; letter-spacing: -0.02em; line-height: 1.1; }
@media (max-width: 420px) {
  .readouts { gap: var(--s5); }
  .readouts dd { font-size: 1.5rem; }
  .readouts dt { font-size: 13px; }
}

/* the scope: retina + focus ring */
.scope { margin: 0; display: grid; gap: var(--s5); justify-items: center; }
.scope__lens {
  position: relative; width: min(78vw, 440px); aspect-ratio: 1;
  touch-action: pan-y; cursor: ew-resize; user-select: none; -webkit-user-select: none;
}
.scope__ring { position: absolute; inset: 0; width: 100%; height: 100%; color: var(--on-night-2); transition: transform 80ms linear; }
.scope__ring .tick { stroke: currentColor; stroke-width: 0.6; opacity: .55; }
.scope__ring .tick--major { stroke-width: 0.9; opacity: .95; }
.scope__ring .mark { fill: var(--retina-bright); }
.scope__glass {
  position: absolute; inset: 9%;
  border-radius: 50%; overflow: hidden;
  background: #1a0b05;
  box-shadow: 0 0 0 1px var(--night-line), 0 30px 80px -20px rgba(238, 106, 51, .35);
}
.scope__img {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.12);
  will-change: filter, transform;
  -webkit-user-drag: none;
}
.scope__controls { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: var(--s4); width: min(100%, 440px); }
.scope__label { font-size: var(--t-14); color: var(--on-night-2); }
.scope__readout { font-size: var(--t-16); font-weight: 500; min-width: 6.2ch; text-align: right; color: var(--on-night); transition: color var(--d-ui) var(--ease-out); }
.scope.is-sharp .scope__readout { color: var(--retina-bright); }
.scope__cap { font-size: var(--t-14); color: var(--on-night-2); max-width: 440px; text-align: center; }

.scope__range { -webkit-appearance: none; appearance: none; width: 100%; height: 44px; background: transparent; margin: 0; cursor: pointer; touch-action: pan-y; }
.scope__range::-webkit-slider-runnable-track {
  height: 20px; border-radius: 2px;
  background:
    repeating-linear-gradient(90deg, var(--night-line) 0 1px, transparent 1px 10%) center / 100% 10px no-repeat,
    linear-gradient(var(--night-line), var(--night-line)) center / 100% 1px no-repeat;
}
.scope__range::-moz-range-track {
  height: 20px; background:
    repeating-linear-gradient(90deg, var(--night-line) 0 1px, transparent 1px 10%) center / 100% 10px no-repeat,
    linear-gradient(var(--night-line), var(--night-line)) center / 100% 1px no-repeat;
}
.scope__range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 6px; height: 28px; margin-top: -4px; border-radius: 3px; border: 0;
  background: var(--retina-bright);
}
.scope__range::-moz-range-thumb { width: 6px; height: 28px; border-radius: 3px; border: 0; background: var(--retina-bright); }
.scope__range:focus-visible { outline: 2px solid var(--on-night); outline-offset: 2px; }

/* phones: bring the retina up under the headline so the dial is above the fold */
@media (max-width: 959px) {
  .hero { padding-top: var(--s5); }
  .hero__grid { gap: var(--s5); }
  .hero__copy { display: contents; }
  .hero__copy > .status { order: 1; }
  .hero__title { order: 2; }
  .scope { order: 3; margin: var(--s2) 0; gap: var(--s3); }
  .hero__lede { order: 4; }
  .hero__actions { order: 5; }
  .readouts { order: 6; }
  .scope__lens { width: min(64vw, 300px); }
  .scope__controls { width: min(100%, 340px); }
  .scope__cap { font-size: 13px; max-width: 34ch; }
}
@media (min-width: 600px) and (max-width: 959px) { .scope__lens { width: min(50vw, 380px); } }

@media (min-width: 960px) {
  .hero { padding: var(--s8) 0 var(--s9); }
  .hero__grid { grid-template-columns: 7fr 5fr; gap: var(--s8); }
  .scope__lens { width: min(36vw, 460px); }
}

/* ---------- sections ---------- */
.section { padding: var(--s8) 0; }
.section--tint { background: var(--tint); }
@media (min-width: 960px) { .section { padding: var(--s9) 0; } }
.section__head { display: grid; gap: var(--s4); margin-bottom: var(--s7); max-width: 46rem; }
.section__intro { font-size: var(--t-18); color: var(--ink-2); }
@media (min-width: 960px) {
  .section__head--row { max-width: none; grid-template-columns: 5fr 6fr; align-items: end; gap: var(--s8); }
}

/* ---------- treatments ---------- */
.tx { display: grid; gap: var(--s5); }
.tx__tabs {
  display: flex; gap: var(--s2);
  overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch;
  margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter);
  scroll-padding-inline: var(--gutter);
}
.tx__tabs::-webkit-scrollbar { display: none; }
.tx__tabs [role="tab"] {
  flex: none; display: inline-flex; align-items: center; gap: var(--s2);
  min-height: 44px; padding: 0 var(--s4);
  border: 0; border-radius: var(--r-pill); background: var(--tint); color: var(--ink-2);
  font-size: var(--t-14); font-weight: 500; cursor: pointer; white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  transition: background-color var(--d-ui) var(--ease-out), color var(--d-ui) var(--ease-out);
}
.tx__tabs [role="tab"] .num { color: var(--ink-3); font-weight: 400; transition: color var(--d-ui) var(--ease-out); }
.tx__tabs [role="tab"][aria-selected="true"] { background: var(--ink); color: #fff; }
.tx__tabs [role="tab"][aria-selected="true"] .num { color: rgba(255,255,255,.6); }
.tx__photo { display: none; margin: 0; }
.tx__ptitle { font-size: var(--t-14); font-weight: 500; color: var(--ink-3); padding-bottom: var(--s3); border-bottom: 1px solid var(--line-strong); }
.js .tx__ptitle { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.js .tx__panel { border-top: 1px solid var(--line-strong); }
.tx__panel + .tx__panel { margin-top: var(--s7); }
.js .tx__panel + .tx__panel { margin-top: 0; }
.tx__panel:focus-visible { outline-offset: 6px; }

.row { border-bottom: 1px solid var(--line); }
.row summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: var(--s4);
  min-height: 56px; padding: var(--s3) 0;
  font-size: var(--t-18); font-weight: 500; letter-spacing: -0.01em;
  -webkit-tap-highlight-color: transparent;
}
.row summary::-webkit-details-marker { display: none; }
.row__i { width: 18px; height: 18px; color: var(--ink-3); transition: transform var(--d-ui) var(--ease-out), color var(--d-ui) var(--ease-out); }
.row[open] .row__i { transform: rotate(45deg); color: var(--retina); }
.row summary:hover .row__i { color: var(--ink); }
.row__body { display: grid; gap: var(--s3); padding: 0 var(--s7) var(--s5) 0; color: var(--ink-2); max-width: 40rem; }
.row[open] .row__body { animation: row-in var(--d-ui) var(--ease-out); }
@keyframes row-in { from { opacity: 0; transform: translateY(-4px); } }
.row__ask { justify-self: start; font-size: var(--t-14); font-weight: 500; color: var(--retina); text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; min-height: 32px; display: inline-flex; align-items: center; }

@media (min-width: 960px) {
  .tx { grid-template-columns: 4fr 7fr; grid-template-rows: auto 1fr; column-gap: var(--s8); row-gap: var(--s6); align-items: start; }
  .tx__tabs { grid-column: 1; flex-direction: column; margin: 0; padding: 0; overflow: visible; gap: 2px; }
  .tx__tabs [role="tab"] { justify-content: space-between; min-height: 52px; padding: 0 var(--s4); border-radius: var(--r-sm); background: transparent; font-size: var(--t-16); color: var(--ink-2); }
  .tx__tabs [role="tab"]:hover { background: var(--tint); }
  .tx__tabs [role="tab"][aria-selected="true"] { background: var(--ink); color: #fff; }
  .tx__photo { display: block; grid-column: 1; grid-row: 2; position: sticky; top: calc(var(--head-h) + var(--s5)); }
  .tx__photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-sm); transition: opacity var(--d-ui) var(--ease-out); }
  .tx__photo img.is-swapping { opacity: 0; }
  .tx__panels { grid-column: 2; grid-row: 1 / span 2; }
}

/* ---------- doctor ---------- */
.doc { display: grid; gap: var(--s7); }
.doc__text { display: grid; gap: var(--s4); align-content: start; }
.doc__role { font-size: var(--t-18); color: var(--ink-3); margin-top: calc(var(--s2) * -1); }
.doc__lede { font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem); line-height: 1.4; letter-spacing: -0.01em; color: var(--ink); margin-top: var(--s4); }
.doc__text p:last-child { color: var(--ink-2); max-width: 36rem; }
.facts { margin: 0; display: grid; border-top: 1px solid var(--line-strong); }
.facts div { display: grid; grid-template-columns: 7.5rem 1fr; gap: var(--s4); padding: var(--s4) 0; border-bottom: 1px solid var(--line); }
.facts dt { font-size: var(--t-14); color: var(--ink-3); padding-top: 2px; }
.facts dd { margin: 0; font-weight: 500; }
.doc__photo { margin: 0; }
.doc__photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-sm); }
.doc__photo figcaption, .gallery figcaption { font-size: var(--t-14); color: var(--ink-3); margin-top: var(--s2); }
@media (min-width: 960px) {
  .doc { grid-template-columns: 6fr 5fr; column-gap: var(--s8); row-gap: var(--s7); }
  .doc__text { grid-column: 1; grid-row: 1; }
  .facts { grid-column: 1; grid-row: 2; align-self: end; }
  .doc__photo { grid-column: 2; grid-row: 1 / span 2; align-self: stretch; display: flex; flex-direction: column; }
  .doc__photo img { flex: 1; aspect-ratio: auto; min-height: 0; height: 100%; }
}

/* ---------- gallery ---------- */
.gallery {
  list-style: none; margin: 0; padding: 0 var(--gutter);
  display: grid; grid-auto-flow: column; grid-auto-columns: 82%;
  gap: var(--s4);
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  margin-inline: calc(var(--gutter) * -1);
  scroll-padding-inline: var(--gutter);
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}
.gallery::-webkit-scrollbar { display: none; }
.gallery__item { scroll-snap-align: start; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--r-sm); background: var(--tint); }
@media (min-width: 720px) { .gallery { grid-auto-columns: 46%; } }
@media (min-width: 960px) {
  .gallery {
    overflow: visible; margin: 0; padding: 0;
    grid-auto-flow: row; grid-template-columns: repeat(4, 1fr); grid-auto-columns: auto;
    gap: var(--s6) var(--s5);
  }
  .gallery__item--lead { grid-column: span 2; grid-row: span 2; }
  .gallery__item--lead figure { height: 100%; display: flex; flex-direction: column; }
  .gallery__item--lead img { flex: 1; aspect-ratio: auto; min-height: 0; }
}

/* ---------- visit + book ---------- */
.visit { display: grid; gap: var(--s8); }
.visit__info { display: grid; gap: var(--s5); align-content: start; }
.hours { width: 100%; border-collapse: collapse; font-size: var(--t-16); }
.hours th, .hours td { padding: var(--s3) 0; border-bottom: 1px solid var(--line); text-align: left; font-weight: 400; }
.hours td { text-align: right; color: var(--ink-2); }
.hours tr:first-child th, .hours tr:first-child td { border-top: 1px solid var(--line-strong); }
.hours tr.is-today th, .hours tr.is-today td { font-weight: 600; color: var(--ink); }
.hours tr.is-today th::after { content: "Today"; margin-left: var(--s3); font-size: 12px; font-weight: 500; color: var(--retina); }
.contact { display: grid; gap: var(--s5); margin-top: var(--s4); }
.contact__block { display: grid; gap: var(--s2); align-content: start; }
.contact__block p { color: var(--ink-2); }
.contact__block .muted { font-size: var(--t-14); }
.contact__block .link { justify-self: start; font-size: var(--t-14); }
.plain { list-style: none; margin: 0; padding: 0; display: grid; }
.plain a { display: inline-flex; align-items: center; min-height: 36px; text-decoration: none; font-weight: 500; word-break: break-word; }
.plain a:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
@media (min-width: 640px) { .contact { grid-template-columns: 1fr 1fr; } .contact__block:first-child { grid-column: 1 / -1; } }

.book {
  background: var(--paper); border-radius: var(--r-sm);
  box-shadow: 0 0 0 1px var(--line);
  padding: var(--s6) var(--s5);
  display: grid; gap: var(--s4); align-content: start;
  scroll-margin-top: calc(var(--head-h) + 16px);
}
.book__note { color: var(--ink-2); }
@media (min-width: 720px) { .book { padding: var(--s7); } }
@media (min-width: 1080px) {
  .visit { grid-template-columns: 5fr 6fr; gap: var(--s8); align-items: start; }
}

.form { display: grid; gap: var(--s5); margin-top: var(--s2); }
.field { display: grid; gap: var(--s2); min-width: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s4); }
@media (max-width: 359px) { .field-row { grid-template-columns: 1fr; } }
.field label { font-size: var(--t-14); font-weight: 500; }
.opt { color: var(--ink-3); font-weight: 400; margin-left: 4px; }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 12px 14px;
  font-size: 16px; /* stops iOS zoom on focus */
  background: var(--paper); color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  -webkit-appearance: none; appearance: none;
  transition: border-color var(--d-ui) var(--ease-out), box-shadow var(--d-ui) var(--ease-out);
}
.field input[type="date"] { display: block; min-width: 0; line-height: 1.4; }
.field input[type="date"]::-webkit-date-and-time-value { text-align: left; }
.field textarea { resize: vertical; min-height: 96px; line-height: 1.5; }
.field input::placeholder { color: #8A949A; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--ink-3); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(14, 26, 34, .12); }
.field [aria-invalid="true"] { border-color: #B42318; }
.field [aria-invalid="true"]:focus { box-shadow: 0 0 0 3px rgba(180, 35, 24, .14); }
.field__err { font-size: var(--t-14); color: #B42318; }
.select { position: relative; }
.select select { padding-right: 40px; cursor: pointer; }
.select .i { position: absolute; right: 12px; top: 50%; translate: 0 -50%; width: 18px; height: 18px; pointer-events: none; color: var(--ink-3); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__actions { display: grid; gap: var(--s3); margin-top: var(--s2); }

.notice { display: flex; gap: var(--s3); padding: var(--s4); border-radius: var(--r-sm); font-size: var(--t-14); }
.notice[hidden] { display: none; }
.notice__title { font-weight: 600; font-size: var(--t-16); margin-bottom: 2px; }
.notice--ok { background: #E8F3ED; color: #14532F; }
.notice--ok .i { color: var(--ok); margin-top: 2px; }
.notice--err { background: #FCEBEA; color: #7A1A12; display: block; }

/* ---------- map ---------- */
.mapband { height: 320px; background: var(--tint); border-top: 1px solid var(--line); }
.mapband iframe { display: block; width: 100%; height: 100%; border: 0; filter: grayscale(1) contrast(1.05); }
@media (min-width: 960px) { .mapband { height: 380px; } }

/* ---------- footer ---------- */
.foot { background: var(--night); color: var(--on-night-2); padding: var(--s7) 0 calc(var(--s7) + env(safe-area-inset-bottom)); font-size: var(--t-14); }
.foot__grid { display: grid; gap: var(--s5); }
.foot .brand { color: var(--on-night); }
.foot__brand { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--s3) var(--s5); }
.foot__urdu { font-family: "Noto Nastaliq Urdu", serif; font-size: 20px; line-height: 2; color: var(--on-night); }
.foot__social { list-style: none; margin: 0; padding: 0; display: flex; gap: var(--s2); }
.foot__social a { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--night-line); color: var(--on-night); transition: background-color var(--d-ui) var(--ease-out); }
.foot__social a:hover { background: var(--night-2); }
.foot__social .i { width: 18px; height: 18px; }
.foot__small { max-width: 52rem; padding-top: var(--s5); border-top: 1px solid var(--night-line); font-size: 13px; }
.foot :focus-visible { outline-color: var(--on-night); }
@media (min-width: 960px) {
  .foot__grid { grid-template-columns: 1fr auto; align-items: center; }
  .foot__brand { justify-content: flex-start; }
  .foot__addr { grid-column: 1; }
  .foot__social { grid-column: 2; grid-row: 1 / span 2; }
  .foot__small { grid-column: 1 / -1; }
}

/* ---------- mobile dock ---------- */
.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: 1fr 1fr 1.2fr; gap: var(--s2);
  padding: var(--s2) var(--s3) calc(var(--s2) + env(safe-area-inset-bottom));
  background: var(--paper); box-shadow: 0 -1px 0 var(--line);
  transition: transform var(--d-ui) var(--ease-io);
}
.dock a {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 48px; border-radius: var(--r-pill);
  font-size: var(--t-14); font-weight: 500; text-decoration: none; color: var(--ink);
  -webkit-tap-highlight-color: transparent;
  transition: transform var(--d-press) var(--ease-out), background-color var(--d-ui) var(--ease-out);
}
.dock a:active { transform: scale(0.97); background: var(--tint); }
.dock a .i { width: 18px; height: 18px; }
.dock a:nth-child(2) .i { color: var(--wa); }
.dock .dock__book { background: var(--retina); color: #fff; }
.dock .dock__book:active { background: var(--retina-hover); }
.dock.is-hidden { transform: translateY(110%); }
@media (max-width: 959px) { :root { --dock-h: calc(64px + env(safe-area-inset-bottom)); } }
@media (min-width: 960px) { .dock { display: none; } }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
}
