/* ==========================================================================
   Sri Venkateswara Hospital — GLOBAL styles
   Loaded on every page. Page-specific styles live in css/pages/<page>.css

   CHANGE LOG (design correction pass):
   - Renamed base palette tokens to named brand colors instead of abstract
     shadcn-style tokens, so the palette reads as "this hospital's colors,"
     not a generic theme.
   - Warmed the background off near-white/blue-gray to a genuine warm paper
     tone.
   - Buttons are no longer uniformly pill-shaped — only Emergency and the
     floating emergency button stay full-pill, so "urgent" is visually
     distinct from "any other action," not just another rounded button.
   - Removed forced uppercase on .eyebrow (a common AI-page tell).
   - .soft-shadow is now reserved for one hero moment + the appointment
     form, not applied to every card uniformly.
   - Radius is now varied by role (photos > cards > buttons > structural
     bands) instead of one radius scaling uniformly across everything.
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  /* Named brand palette — the actual choices, not abstract roles */
  --trust-blue: oklch(0.51 0.13 243);       /* #1B6FA8 */
  --care-orange: oklch(0.61 0.19 43);        /* #F26522 */
  --healing-green: oklch(0.52 0.12 158);     /* #3CB878 */
  --soft-gold: oklch(0.7 0.14 78);           /* #F5A623 */
  --warm-paper: oklch(100% 0.00011 271.152);       /* genuinely warm off-white, not blue-gray */
  --charcoal: oklch(0.28 0.008 255);         /* #2D2D2D */

  /* Structural radius — varied by role, not one scale applied everywhere */
  --radius-button: 0.5rem;      /* buttons: rounded, not pill */
  --radius-card: 0.85rem;       /* cards, form panels */
  --radius-photo: 1.5rem;       /* photography gets the most generous curve */
  --radius-pill: 9999px;        /* reserved: emergency actions only */

  /* Role tokens — same names used throughout the rest of the file,
     now pointing at the named palette above instead of raw shadcn defaults */
  --background: var(--warm-paper);
  --foreground: var(--charcoal);
  --card: oklch(1 0 0);
  --primary: var(--trust-blue);
  --primary-foreground: oklch(0.99 0.002 240);
  --secondary: oklch(0.95 0.025 242);
  --muted: oklch(0.96 0.012 75);
  --muted-foreground: oklch(0.46 0.025 252);
  --accent: oklch(0.94 0.045 78);
  --accent-foreground: oklch(0.32 0.05 55);
  --border: oklch(0.89 0.02 242);
  --input: oklch(0.86 0.025 242);
  --ring: var(--trust-blue);
  --emergency: var(--care-orange);
  --emergency-foreground: oklch(0.99 0.003 55);
  --wellness: var(--healing-green);
  --wellness-foreground: oklch(0.99 0.003 158);
  --warm: var(--soft-gold);
  --warm-foreground: oklch(0.3 0.05 55);
  --soft: oklch(0.97 0.012 60);

  --font-sans: "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-display: "Poppins", ui-sans-serif, system-ui, sans-serif;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; border: 0 solid var(--border); }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  min-height: 100vh;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 200; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
address { font-style: normal; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; }
:focus-visible { outline: 3px solid var(--ring); outline-offset: 3px; }
::selection { background: var(--warm); color: var(--warm-foreground); }
[hidden] { display: none !important; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link:focus {
  position: fixed; left: 1rem; top: 1rem; z-index: 100; width: auto; height: auto;
  margin: 0; clip: auto; padding: 0.75rem 1rem;
  background: var(--background); border-radius: var(--radius-card);
}

/* ---------- Layout helpers ---------- */
.section-shell { margin-inline: auto; width: 100%; max-width: 76rem; padding-inline: 1.25rem; }
@media (min-width: 48rem) { .section-shell { padding-inline: 2rem; } }
@media (min-width: 80rem) { .section-shell { padding-inline: 3rem; } }

.section { padding-block: 4rem; }
@media (min-width: 48rem) { .section { padding-block: 6rem; } }
.bg-soft { background: var(--soft); }
.bg-wellness { background: var(--wellness); color: var(--wellness-foreground); }
.bg-primary { background: var(--primary); color: var(--primary-foreground); }

/* Reserved for ONE hero moment + the appointment form — not every card.
   Do not add .soft-shadow to routine cards; use .card.bordered instead. */
.soft-shadow { box-shadow: 0 18px 45px -30px color-mix(in oklab, var(--foreground) 25%, transparent); }

/* Kept for the one orchestrated hero entrance — avoid adding .fade-up to
   every section on scroll; that's the "scattered effects" tell. */
.fade-up { animation: fade-up 650ms ease-out both; }
@keyframes fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.icon { width: 1rem; height: 1rem; flex-shrink: 0; }

.grid { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
.grid-gap-4 { gap: 1rem; }
.mt-10 { margin-top: 2.5rem; }
@media (min-width: 40rem) { .cols-sm-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 48rem) { .cols-md-2 { grid-template-columns: repeat(2, 1fr); } .cols-md-3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 64rem) { .cols-lg-3 { grid-template-columns: repeat(3, 1fr); } }

.split { display: grid; gap: 2.5rem; align-items: center; grid-template-columns: 1fr; }
@media (min-width: 64rem) {
  .split { grid-template-columns: 1fr 1fr; }
  .split-img-first { grid-template-columns: 0.9fr 1.1fr; }
}

.photo { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-photo); }

/* ---------- Typography ---------- */
.eyebrow {
  font-size: 0.875rem; font-weight: 700;
  color: var(--primary);
  /* uppercase + heavy letter-spacing removed — was a generic template tell */
}
.h2 { margin-top: 0.5rem; font-size: 1.875rem; line-height: 1.25; }
@media (min-width: 48rem) { .h2 { font-size: 2.25rem; } }
.lead { margin-top: 1rem; line-height: 1.75; color: var(--muted-foreground); }
.section-heading { max-width: 42rem; }

.text-link {
  margin-top: 1.5rem; display: inline-flex; min-height: 2.75rem; align-items: center;
  gap: 0.5rem; font-weight: 600; color: var(--primary);
}
.text-link:hover { text-decoration: underline; }
.about-lead { font-size: 1.125rem; line-height: 2rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; min-height: 2.75rem; align-items: center; justify-content: center;
  gap: 0.5rem; padding: 0.5rem 1rem; white-space: nowrap;
  border-radius: var(--radius-button); /* was 9999px on every button */
  font-size: 0.875rem; font-weight: 600; line-height: 1.25; cursor: pointer;
  transition: all 0.15s ease;
}
.btn-lg { min-height: 3rem; padding-inline: 1.75rem; font-size: 1rem; }

/* Emergency keeps the pill shape deliberately — it's the one button on the
   site that should read as "different from every other action." */
.btn-emergency {
  border-radius: var(--radius-pill);
  background: var(--emergency); color: var(--emergency-foreground);
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.15);
}
.btn-emergency:hover { background: color-mix(in oklab, var(--emergency) 90%, transparent); transform: translateY(-2px); }

/* Book Appointment — healing green, same button shape as everything else
   (not pill), so it reads as "a normal important action," while Emergency
   alone reads as "urgent." */
.btn-booking {
  background: var(--wellness); color: var(--wellness-foreground);
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.15);
}
.btn-booking:hover { background: color-mix(in oklab, var(--wellness) 90%, transparent); transform: translateY(-2px); }

.btn-light { background: var(--background); color: var(--primary); box-shadow: 0 1px 3px rgb(0 0 0 / 0.15); }
.btn-light:hover { background: var(--secondary); transform: translateY(-2px); }
.btn-outline { border: 1px solid var(--input); background: var(--background); color: var(--foreground); box-shadow: 0 1px 2px rgb(0 0 0 / 0.06); }
.btn-outline:hover { background: var(--accent); color: var(--accent-foreground); }
.btn-icon { width: 2.75rem; padding: 0; border-radius: var(--radius-pill); }
.btn-icon .icon { width: 1.5rem; height: 1.5rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.btn-row.center { justify-content: center; }

/* ---------- Logo ---------- */
.logo { display: flex; min-width: 0; align-items: center; gap: 0.5rem; }
.logo-img { height: 3.75rem; width: auto; max-width: 14rem; flex-shrink: 0; display: block; object-fit: contain; }
/* The logo artwork sits on a white background, so on the dark footer we wrap it
   in a small white card to keep it legible instead of a hard white box. */
.logo.light .logo-img {
  height: 3.75rem;
  background: #fff;
  border-radius: 0.5rem;
  padding: 0.4rem 0.65rem;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in oklab, var(--background) 95%, transparent);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.06); backdrop-filter: blur(8px);
}
.topbar { display: none; background: var(--primary); color: var(--primary-foreground); padding-block: 0.5rem; font-size: 0.75rem; }
@media (min-width: 48rem) { .topbar { display: block; } }
.topbar .section-shell { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.topbar a, .topbar span { display: flex; align-items: center; gap: 0.5rem; }
.topbar a:hover { text-decoration: underline; }
.topbar .icon { width: 0.875rem; height: 0.875rem; }
.topbar-right { display: flex; align-items: center; gap: 1.5rem; }
.topbar-right a { font-weight: 600; }

.header-main { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0.75rem; min-height: 5rem; }
.main-nav { display: none; align-items: center; gap: 0.25rem; }
@media (min-width: 64rem) { .main-nav { display: flex; } .menu-toggle { display: none; } }
.main-nav a:not(.btn) {
  border-radius: var(--radius-pill); padding: 0.5rem 0.75rem; font-size: 0.875rem; font-weight: 500;
  color: var(--muted-foreground); transition: background 0.15s, color 0.15s;
}
.main-nav a:not(.btn):hover, .main-nav a[aria-current="page"]:not(.btn) { background: var(--secondary); color: var(--primary); }
.main-nav .btn { margin-left: 0.5rem; }
.main-nav .btn + .btn { margin-left: 0.5rem; } /* gap between Book Appointment + Emergency Call */

/* ---------- Mobile menu (native <dialog>) ---------- */
.mobile-menu {
  position: fixed; inset: 0; margin: 0; width: 100%; max-width: none; height: 100%; max-height: none;
  padding: 1.5rem; background: var(--background); color: var(--foreground); overflow-y: auto;
}
@media (min-width: 40rem) {
  .mobile-menu { left: auto; right: 0; max-width: 28rem; box-shadow: -10px 0 40px rgb(0 0 0 / 0.2); }
}
.mobile-menu::backdrop { background: rgb(0 0 0 / 0.5); }
.mobile-menu[open] { animation: slide-in 0.25s ease-out; }
@keyframes slide-in { from { transform: translateX(100%); } to { transform: translateX(0); } }
.mobile-menu-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.mobile-menu-sub { margin-top: 0.75rem; font-size: 0.875rem; color: var(--muted-foreground); }
.mobile-nav { margin-top: 2rem; display: flex; flex-direction: column; }
.mobile-nav a { border-bottom: 1px solid var(--border); padding-block: 1rem; font-size: 1.125rem; font-weight: 600; }
.mobile-nav a[aria-current="page"] { color: var(--primary); }
.help-box { margin-top: 2rem; border-radius: var(--radius-card); background: var(--secondary); padding: 1.25rem; }
.help-box p { font-family: var(--font-display); font-weight: 600; color: var(--primary); }
.help-box div { margin-top: 0.75rem; display: flex; flex-direction: column; gap: 0.5rem; }
.help-box a { display: flex; min-height: 2.75rem; align-items: center; gap: 0.5rem; font-weight: 600; }
.help-box .icon { color: var(--emergency); }

/* Mobile fixed action bar — Book Appointment + Emergency Call stay visible
   even with the menu closed, instead of only a single floating button. */
.mobile-action-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
  display: flex; gap: 0.5rem; padding: 0.75rem 1rem;
  background: var(--card); box-shadow: 0 -6px 20px rgb(0 0 0 / 0.12);
}
.mobile-action-bar .btn { flex: 1; }
@media (min-width: 64rem) { .mobile-action-bar { display: none; } }

/* ---------- Floating emergency button ---------- */
/* Superseded by .mobile-action-bar on small screens; kept for pages that
   only need the single emergency action floated. */
.floating-emergency { position: fixed; bottom: 1rem; right: 1rem; z-index: 50; box-shadow: 0 10px 25px rgb(0 0 0 / 0.25); }
@media (min-width: 64rem) { .floating-emergency { display: none; } }

/* ---------- Page hero (inner pages) ---------- */
.page-hero { background: var(--secondary); padding-block: 3.5rem; }
@media (min-width: 48rem) { .page-hero { padding-block: 5rem; } }
.page-hero .section-shell > div { max-width: 56rem; }
.page-hero .eyebrow { margin-bottom: 0.75rem; }
.page-hero h1 { max-width: 56rem; font-size: 2.25rem; line-height: 1.2; color: var(--foreground); }
@media (min-width: 48rem) { .page-hero h1 { font-size: 3.75rem; } }
.page-hero .intro { margin-top: 1.25rem; max-width: 48rem; font-size: 1.125rem; line-height: 2rem; color: var(--muted-foreground); }

/* ---------- Emergency banner ---------- */
/* Deliberately breaks the rounded-card rhythm of the rest of the site —
   full-bleed, no radius, no shadow — so it reads as urgent, not decorative. */
.emergency-banner { background: var(--emergency); color: var(--emergency-foreground); padding-block: 1.25rem; text-align: center; }
.emergency-banner.large { padding-block: 2.5rem; }
.emergency-banner .en { font-family: var(--font-display); font-weight: 700; font-size: 1rem; }
.emergency-banner.large .en { font-size: 1.5rem; }
@media (min-width: 48rem) { .emergency-banner .en { font-size: 1.125rem; } .emergency-banner.large .en { font-size: 1.875rem; } }
.emergency-banner .te { margin-top: 0.25rem; font-size: 0.875rem; font-weight: 600; }
@media (min-width: 48rem) { .emergency-banner .te { font-size: 1rem; } }
.emergency-phones { margin-top: 0.75rem; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem 1rem; }
.emergency-phones a {
  display: inline-flex; min-height: 2.75rem; align-items: center; gap: 0.5rem; font-weight: 700;
  text-decoration: underline; text-decoration-color: color-mix(in oklab, var(--emergency-foreground) 50%, transparent);
  text-underline-offset: 4px;
}

/* ---------- Cards ---------- */
/* No shadow by default — border only. Shadow is reserved for the hero
   image and the appointment-form card via .soft-shadow, applied in markup. */
.card { border-radius: var(--radius-card); background: var(--card); padding: 1.75rem; }
.card.bordered { border: 1px solid var(--border); }
.card h2, .card h3 { margin-top: 1.25rem; font-weight: 600; }
.badge-circle { display: grid; place-items: center; border-radius: var(--radius-pill); }
.badge-14 { width: 3.5rem; height: 3.5rem; }
.badge-16 { width: 4rem; height: 4rem; }
.badge-14 .icon { width: 1.75rem; height: 1.75rem; }
.badge-16 .icon { width: 2rem; height: 2rem; }
.tone-primary { background: var(--secondary); color: var(--primary); }
.tone-emergency { background: var(--accent); color: var(--emergency); }
.tone-muted { background: var(--muted); color: var(--primary); }
.tone-wellness { background: var(--soft); color: var(--wellness); }

/* ---------- Doctor cards ---------- */
/* Individual doctor photos: circular, consistent size, warm border. */
.doctor-photo {
  width: 6.5rem; height: 6.5rem; border-radius: var(--radius-pill);
  object-fit: cover; border: 3px solid var(--card);
  box-shadow: 0 4px 14px rgb(0 0 0 / 0.1);
}
.doctor-card { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.75rem; }
.doctor-specialty {
  display: inline-flex; align-items: center; border-radius: var(--radius-pill);
  padding: 0.2rem 0.75rem; font-size: 0.75rem; font-weight: 600;
}

/* ---------- Wellness band ---------- */
.wellness-band { padding-block: 3rem; text-align: center; }
.wellness-band h2 { font-size: 1.875rem; }
.wellness-band p { margin: 1rem auto 0; max-width: 48rem; line-height: 1.75; color: color-mix(in oklab, var(--wellness-foreground) 90%, transparent); }

/* ---------- Footer ---------- */
.site-footer { background: var(--primary); color: var(--primary-foreground); padding-bottom: 5rem; }
@media (min-width: 48rem) { .site-footer { padding-bottom: 0; } }
.footer-grid { display: grid; gap: 2.5rem; padding-block: 3rem; }
@media (min-width: 48rem) { .footer-grid { grid-template-columns: 1.2fr 0.8fr 1fr; } }
.footer-tagline { margin-top: 1.25rem; max-width: 24rem; font-size: 0.875rem; line-height: 1.5; color: color-mix(in oklab, var(--primary-foreground) 85%, transparent); }
.footer-grid h2 { font-size: 1rem; font-weight: 600; }
.footer-links { margin-top: 1rem; display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; font-size: 0.875rem; }
.footer-links a { color: color-mix(in oklab, var(--primary-foreground) 85%, transparent); }
.footer-links a:hover { color: var(--primary-foreground); text-decoration: underline; }
.footer-contact { margin-top: 1rem; display: flex; flex-direction: column; gap: 0.75rem; font-size: 0.875rem; color: color-mix(in oklab, var(--primary-foreground) 85%, transparent); }
.footer-contact > * { display: flex; gap: 0.5rem; }
.footer-contact a:hover { text-decoration: underline; }
.footer-contact a.mail { word-break: break-all; }
.footer-contact .icon { margin-top: 0.125rem; }
.footer-map {
  margin-top: 0.75rem; width: 100%; aspect-ratio: 16 / 9;
  border-radius: var(--radius-card); overflow: hidden; border: 0;
}
.footer-stripe { height: 0.5rem; background: var(--emergency); }
.footer-copy { background: var(--foreground); color: var(--background); padding-block: 1rem; text-align: center; font-size: 0.75rem; }

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