/* ==========================================================================
   Shivalik Hospital: what every page shares (tokens, base, shared pieces,
   header, footer, WhatsApp button). Each page keeps its own screens inline.
   Doctors sample site 3 (a made-up 30-bed general hospital), four pages.
   Colours and fonts: brand.json. Look D, Linen and forest, chosen by Raman.
   Corners: buttons 12 (small 10), cards 16, photos 20, icon discs round.
   One screen each: from 1024px up every length is in rem and the root size
   follows the window (16px at 1440x780), so a section that fits one laptop
   screen fits every laptop screen. Below 1024px the page simply flows.
   His standing rules (docs/preflight.md): headings one centred line just under
   the header; blocks side by side start and end level; sibling cards match;
   several calm colours; icons draw themselves; clickable cards lift.
   ========================================================================== */
@font-face { font-family: "Literata"; font-style: normal; font-weight: 400 600; font-display: swap; src: url(fonts/literata.woff2) format("woff2"); }
@font-face { font-family: "Hanken Grotesk"; font-style: normal; font-weight: 400 600; font-display: swap; src: url(fonts/hanken-grotesk.woff2) format("woff2"); }

:root {
  --linen: #F3F0E7; --paper: #F9F7F1; --card: #FFFEFA; --white: #FFFFFF;
  --line: #DFDACB; --line-strong: #C8C1AE; --ink: #1E2A24; --muted: #5B655E;
  --forest: #2E5A47; --forest-deep: #1F4334; --forest-wash: #DFEAE3;
  --brass: #856226; --brass-wash: #F1E9D6; --navy: #2F4C6E; --navy-wash: #E0E7EF;
  --rose: #94524A; --rose-wash: #F2E3DF; --plum: #6A4C7A; --plum-wash: #ECE5F0; --teal: #3D6B6E; --teal-wash: #DFEBEB;
  --gut: 5rem; --bar: 4.25rem;
  --head: "Literata", Georgia, "Times New Roman", serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --rest: 0 .0625rem .125rem rgba(30, 42, 36, .05);
  --lift: 0 .125rem .25rem rgba(30, 42, 36, .06), 0 1.375rem 2rem -1rem rgba(30, 42, 36, .32);
  --float: 0 .1875rem .375rem rgba(30, 42, 36, .07), 0 1.75rem 2.75rem -1.25rem rgba(30, 42, 36, .45);
}
/* one colour per card in a row, all from the same calm set */
.forest { --c: var(--forest); --w: var(--forest-wash); }
.brass { --c: var(--brass); --w: var(--brass-wash); }
.navy { --c: var(--navy); --w: var(--navy-wash); }
.rose { --c: var(--rose); --w: var(--rose-wash); }
.plum { --c: var(--plum); --w: var(--plum-wash); }
.teal { --c: var(--teal); --w: var(--teal-wash); }

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (min-width: 1024px) { html { font-size: clamp(12.5px, min(1.1111vw, 2.0513vh), 18px); } }
body { margin: 0; background: var(--linen); color: var(--ink); font: 400 1.0625rem/1.6 "Hanken Grotesk", system-ui, sans-serif; -webkit-font-smoothing: antialiased; overflow-x: clip; }
h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img, svg { display: block; }
img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--forest); outline-offset: 3px; border-radius: .25rem; }
.skip { position: absolute; left: 1rem; top: 1rem; z-index: 60; padding: .75rem 1.1rem; border-radius: .625rem; background: var(--forest); color: var(--white); font-weight: 600; transform: translateY(-5rem); transition: transform .2s ease; }
.skip:focus { transform: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

h1, h2, h3 { font-family: var(--head); font-weight: 600; font-variant-numeric: lining-nums; }
h1 { font-size: 3.15rem; line-height: 1.12; letter-spacing: -.012em; }
h2 { font-size: 3.25rem; line-height: 1.1; letter-spacing: -.02em; }
h1.h2 { font-size: 3.25rem; line-height: 1.1; letter-spacing: -.02em; }      /* a page's own title, set like a section heading */
h3 { font-size: 1.3rem; line-height: 1.3; letter-spacing: -.01em; }
.lede { font-size: 1.125rem; line-height: 1.6; color: var(--muted); }
p { text-wrap: pretty; }

/* ---------- shared pieces ---------- */
.sec { position: relative; min-height: 100vh; min-height: 100svh; padding: calc(var(--bar) + 1.75rem) var(--gut) 2.25rem; display: flex; flex-direction: column; }
.sec.alt { background: var(--paper); }
.wrap { width: 100%; max-width: 80rem; margin: 0 auto; }
/* a heading alone above its section: one centred line right under the header, the lede under it */
.head { text-align: center; margin-bottom: 3rem; }
.head .lede { margin-top: 1.25rem; }
@media (min-width: 1024px) {
  /* every screen is designed at 48.75rem tall (1440x780); its content keeps exactly that size, and a taller screen
     (a desktop monitor, a 16:10 frame) shares the extra air above and below instead of stretching the layout */
  .sec > .wrap { flex: none; height: 40.5rem; margin-block: auto; display: flex; flex-direction: column; min-height: 0; }
  .grow { flex: 1; min-height: 0; }
  .head h1, .head h2, .head .lede, .hero h1 { white-space: nowrap; }
}

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .6rem; height: 3.3rem; padding: 0 1.6rem; border: 0; border-radius: .75rem; background: var(--forest); color: var(--white); font: 600 1.02rem/1 "Hanken Grotesk", system-ui, sans-serif; white-space: nowrap; box-shadow: 0 .5rem 1.25rem -.75rem var(--forest-deep); transition: background-color .2s ease, transform .2s var(--ease), box-shadow .2s ease; }
.btn:hover { background: var(--forest-deep); transform: translateY(-.0625rem); }
.btn:active { transform: translateY(.0625rem); box-shadow: none; }
.btn.quiet { background: var(--card); color: var(--forest); box-shadow: inset 0 0 0 .09375rem var(--forest); }
.btn.quiet:hover { background: var(--forest-wash); }
.btn.small { height: 2.5rem; padding: 0 1.15rem; border-radius: .625rem; font-size: .92rem; box-shadow: none; }
.btn .ic { width: 1.2rem; height: 1.2rem; }

.ic { width: 1.5rem; height: 1.5rem; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.disc { display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 50%; background: var(--w, var(--forest-wash)); color: var(--c, var(--forest)); flex: none; }

.panel { background: var(--card); border: 1px solid var(--line); border-radius: 1rem; }
.photo-box { position: relative; overflow: hidden; border-radius: 1.25rem; background: var(--line); }
.photo-box img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* a card that can be pressed lifts in 3D and casts a shadow under the pointer */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 1rem; box-shadow: var(--rest); transition: transform .28s var(--ease), box-shadow .28s ease, border-color .28s ease; }
.card.lifts:hover { transform: translateY(-.375rem); box-shadow: var(--lift); border-color: var(--line-strong); }

/* arrival: a screen comes in once and fast; clickable cards one after another (--i) */
.js .rise { opacity: 0; transform: translateY(1rem); }
.js .in .rise { opacity: 1; transform: none; transition: opacity .5s ease, transform .55s var(--ease); transition-delay: calc(var(--i, 0) * 70ms); }
.js .wipe { clip-path: inset(0 100% 0 0); }
.js .in .wipe { clip-path: inset(0); transition: clip-path .9s cubic-bezier(.3, 0, .1, 1); }
/* every line icon is drawn, stroke by stroke, as its screen arrives (each path in the sprite has pathLength 1) */
.js .sec .ic { stroke-dasharray: 1 2; stroke-dashoffset: 1.05; }
.js .sec.in .ic { animation: draw .9s cubic-bezier(.4, 0, .2, 1) .15s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---------- header: slimmer once the page moves ---------- */
#sentinel { position: absolute; top: 0; height: 1px; width: 1px; }
.bar { position: fixed; inset: 0 0 auto 0; z-index: 40; height: var(--bar); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 var(--gut); }
.bar::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(249, 247, 241, .94); border-bottom: 1px solid var(--line); transform-origin: top; transition: transform .35s var(--ease), box-shadow .35s ease; }
@supports (backdrop-filter: blur(1px)) { .bar::before { background: rgba(249, 247, 241, .84); backdrop-filter: blur(.75rem); } }
.bar > * { transition: transform .35s var(--ease); }
.scrolled .bar::before { transform: scaleY(.85); box-shadow: 0 .5rem 1.5rem -1rem rgba(30, 42, 36, .25); }
.scrolled .bar > * { transform: translateY(-.32rem); }
.brand { display: flex; align-items: center; gap: .75rem; font: 600 1.3rem/1 var(--head); letter-spacing: -.01em; white-space: nowrap; min-height: 2.75rem; justify-self: start; }
.mark { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: .6rem; background: var(--forest); flex: none; }
.mark svg { width: 1.2rem; height: 1.2rem; fill: var(--white); }
.nav { display: flex; gap: 2.25rem; font-size: .98rem; color: var(--muted); }
.nav a { display: flex; align-items: center; height: 2.75rem; white-space: nowrap; transition: color .2s ease; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--ink); font-weight: 600; box-shadow: inset 0 -2px 0 var(--forest); height: 2rem; }
.right { display: flex; align-items: center; gap: .75rem; justify-self: end; }
.er { display: flex; align-items: center; gap: .5rem; height: 2.5rem; padding: 0 1rem; border-radius: .625rem; background: var(--navy-wash); color: var(--navy); font-weight: 600; font-size: .92rem; white-space: nowrap; transition: background-color .2s ease; }
.er:hover { background: #D3DDE9; }
.er .ic { width: 1.1rem; height: 1.1rem; }
.menu { display: none; }

/* ---------- footer ---------- */
.foot { background: var(--ink); color: #D9DDD6; padding: 4rem var(--gut) 2rem; }
.foot .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 3rem; }
.foot .brand { color: var(--white); }
.foot .mark { background: var(--forest); }
.foot .about { margin-top: 1rem; max-width: 22rem; font-size: .95rem; color: #AEB6AE; }
.foot h3 { font: 600 .95rem/1 "Hanken Grotesk", sans-serif; color: var(--white); margin-bottom: 1.1rem; }
.foot li + li { margin-top: .6rem; }
.foot li a, .foot li span { font-size: .95rem; color: #C4CAC3; transition: color .2s ease; }
.foot li a:hover { color: var(--white); }
.foot .base { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 1rem; padding-top: 1.5rem; margin-top: 1rem; border-top: 1px solid rgba(255, 255, 255, .12); font-size: .85rem; color: #9AA39A; }

/* ---------- WhatsApp: a sample, so it says what it would do ---------- */
.wa { position: fixed; right: 1.5rem; bottom: 1.5rem; z-index: 30; display: flex; flex-direction: column; align-items: flex-end; gap: .75rem; }
.wa button { display: grid; place-items: center; width: 3.5rem; height: 3.5rem; border: 0; border-radius: 50%; background: var(--forest); color: var(--white); box-shadow: var(--float); transition: transform .2s var(--ease), background-color .2s ease; }
.wa button:hover { transform: translateY(-.125rem); background: var(--forest-deep); }
.wa button .ic { width: 1.6rem; height: 1.6rem; }
.wa p { max-width: 16rem; padding: .85rem 1rem; border-radius: .75rem; background: var(--card); border: 1px solid var(--line); box-shadow: var(--lift); font-size: .9rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .rise, .js .wipe { opacity: 1; transform: none; clip-path: none; transition: none; }
  .js .sec .ic { stroke-dasharray: none; animation: none; }
  .card, .btn, .bar::before, .bar > * { transition: none; }
}

/* ---------- phones and tablets: the page simply flows ---------- */
@media (max-width: 1023px) {
  :root { --gut: 1.25rem; --bar: 4rem; }
  .sec { min-height: 0; padding: calc(var(--bar) + 2.5rem) var(--gut) 3.5rem; }
  h1 { font-size: 2.45rem; }
  h2 { font-size: 2.1rem; line-height: 1.15; }
  h1.h2 { font-size: 2.1rem; line-height: 1.15; }
  .head { margin-bottom: 1.75rem; }
  .bar { grid-template-columns: 1fr auto; gap: .75rem; }
  .nav { display: none; position: absolute; top: var(--bar); left: 0; right: 0; flex-direction: column; gap: 0; padding: .5rem var(--gut) 1rem; background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: var(--lift); }
  .nav.open { display: flex; }
  .nav a { height: 3rem; }
  .nav a[aria-current="page"] { height: 3rem; box-shadow: none; color: var(--forest); }
  .right .er, .right .btn { display: none; }
  .menu { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border: 1px solid var(--line-strong); border-radius: .625rem; background: var(--card); }
  .btn.small { height: 2.75rem; }
  .foot li + li { margin-top: 0; }
  .foot li a, .foot li span { display: inline-flex; align-items: center; min-height: 2.75rem; min-width: 2.75rem; }
  .foot { padding: 3rem var(--gut) 6rem; }
  .foot .wrap { grid-template-columns: 1fr; gap: 2rem; }
  .foot .base { flex-direction: column; }
}
