/* ==========================================================================
   Pabitra IT Hub - core stylesheet
   Design direction: "Bengal Rack" - the logo's rounded pixel cell is the atom.
   Contrast values in comments are measured, not estimated.
   ========================================================================== */

/* --------------------------------------------------------------- 1. fonts */
/* Self-hosted so there is no third-party request and no layout shift. */

@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../fonts/manrope-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../fonts/manrope-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('../fonts/jbmono-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Loaded only on Hindi pages - see includes/head-meta.php. */
@font-face {
  font-family: 'Noto Sans Devanagari';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/noto-devanagari.woff2') format('woff2');
  unicode-range: U+0900-097F, U+1CD0-1CF9, U+200C-200D, U+20A8, U+20B9, U+20F0,
    U+25CC, U+A830-A839, U+A8E0-A8FF;
}

/* -------------------------------------------------------------- 2. tokens */

:root {
  /* Brand, sampled straight from images/pabitra-logo.png */
  --brand-blue: #0057D9;
  --brand-orange: #FF7A00;
  --brand-slate: #33415C;

  /* Light theme (default) */
  --bg: #F7F9FC;
  --surface: #FFFFFF;
  --surface-2: #EEF2F9;
  --surface-3: #E3EAF5;
  --line: #D9E0EC;
  --line-strong: #BCC7DA;

  --ink: #0B1324;            /* 17.6:1 on --bg */
  --ink-muted: #46536B;      /*  7.4:1 on --bg */
  --ink-faint: #6B778D;      /*  4.6:1 on --bg - large text and icons only */

  --primary: #0057D9;        /*  5.9:1 on --bg  - links and text */
  --primary-fill: #0057D9;
  --primary-hover: #0047B3;
  --primary-soft: #E7EFFE;
  --on-primary: #FFFFFF;     /*  6.2:1 on --primary-fill */

  --accent: #FF7A00;         /* FILLS, LEDs and icons only - never text on light */
  --on-accent: #0B1324;      /*  7.1:1 on --accent */
  --accent-text: #B84E00;    /*  4.8:1 on --bg - orange when it must be text */
  --accent-soft: #FFF0E0;

  --wa: #0E7C4A;             /* WhatsApp green, darkened for AA */
  --on-wa: #FFFFFF;          /*  5.3:1 */
  --ok: #15803D;
  --ok-soft: #E4F6EA;
  --err: #B91C1C;
  --err-soft: #FDECEC;
  --warn-soft: #FFF6E0;

  /* Logo mark colours, overridden in dark mode */
  --logo-blue: #0057D9;
  --logo-accent: #FF7A00;

  /* Terminal panel is always dark, in both themes */
  --term-bg: #060B16;
  --term-line: #1C2840;
  --term-ink: #D7E2F5;
  --term-dim: #8695B2;
  --term-green: #4ADE80;
  --term-blue: #6FA8FF;
  --term-orange: #FF9A3C;

  /* Geometry taken from the logo: radius 22% of cell, gap 25% */
  --cell: 10px;
  --r-sm: 6px;
  --r: 12px;
  --r-lg: 18px;
  --r-pill: 999px;

  /* Type */
  --font-body: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-head: var(--font-body);
  --font-mono: 'JetBrains Mono', ui-monospace, 'Cascadia Mono', Menlo, monospace;
  --font-script: '';

  --fs-xs: 0.8125rem;
  --fs-sm: 0.9375rem;
  --fs-base: 1rem;
  --fs-lg: clamp(1.0625rem, 1.02rem + 0.22vw, 1.1875rem);
  --fs-xl: clamp(1.1875rem, 1.1rem + 0.4vw, 1.375rem);
  --fs-h3: clamp(1.1875rem, 1.09rem + 0.48vw, 1.5rem);
  --fs-h2: clamp(1.5rem, 1.22rem + 1.4vw, 2.375rem);
  --fs-h1: clamp(2rem, 1.42rem + 2.9vw, 3.5rem);
  --fs-display: clamp(2.25rem, 1.5rem + 3.6vw, 4rem);

  --lh-tight: 1.12;
  --lh-head: 1.2;
  --lh-body: 1.65;

  /* Spacing */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 3rem;
  --s-8: 4rem;
  --s-9: 6rem;

  --gutter: 1rem;
  --maxw: 1200px;
  --maxw-prose: 68ch;
  --header-h: 64px;

  --shadow-sm: 0 1px 2px rgba(11, 19, 36, 0.06), 0 1px 3px rgba(11, 19, 36, 0.05);
  --shadow: 0 2px 4px rgba(11, 19, 36, 0.05), 0 8px 24px rgba(11, 19, 36, 0.07);
  --shadow-lg: 0 4px 8px rgba(11, 19, 36, 0.06), 0 20px 48px rgba(11, 19, 36, 0.12);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur: 0.22s;

  color-scheme: light;
}

/* Dark theme. Declared twice on purpose: once for the system preference (unless
   the visitor forced light) and once for the explicit toggle. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --bg: #070C18;
    --surface: #0F1729;
    --surface-2: #16213A;
    --surface-3: #1D2A47;
    --line: #24314D;
    --line-strong: #35456A;

    --ink: #EAF0FB;          /* 17.1:1 on --bg */
    --ink-muted: #9AA8C2;    /*  8.1:1 on --bg */
    --ink-faint: #7C8BA8;    /*  5.3:1 on --bg */

    --primary: #5B9BFF;      /*  7.1:1 on --bg */
    --primary-fill: #1F6BFF;
    --primary-hover: #4A8CFF;
    --primary-soft: #14213C;
    --on-primary: #FFFFFF;   /*  4.6:1 on --primary-fill */

    --accent: #FF7A00;
    --on-accent: #0B1324;
    --accent-text: #FF9A3C;  /*  9.3:1 on --bg - orange is safe as text here */
    --accent-soft: #2A1B0A;

    --wa: #14A05E;
    --on-wa: #04130B;
    --ok: #4ADE80;
    --ok-soft: #0C2318;
    --err: #FF8A8A;
    --err-soft: #2A1215;
    --warn-soft: #2A2110;

    --logo-blue: #3D86FF;
    --logo-accent: #FF9A3C;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow: 0 2px 4px rgba(0, 0, 0, 0.35), 0 8px 24px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 4px 8px rgba(0, 0, 0, 0.4), 0 20px 48px rgba(0, 0, 0, 0.55);

    color-scheme: dark;
  }
}

:root[data-theme='dark'] {
  --bg: #070C18;
  --surface: #0F1729;
  --surface-2: #16213A;
  --surface-3: #1D2A47;
  --line: #24314D;
  --line-strong: #35456A;

  --ink: #EAF0FB;
  --ink-muted: #9AA8C2;
  --ink-faint: #7C8BA8;

  --primary: #5B9BFF;
  --primary-fill: #1F6BFF;
  --primary-hover: #4A8CFF;
  --primary-soft: #14213C;
  --on-primary: #FFFFFF;

  --accent: #FF7A00;
  --on-accent: #0B1324;
  --accent-text: #FF9A3C;
  --accent-soft: #2A1B0A;

  --wa: #14A05E;
  --on-wa: #04130B;
  --ok: #4ADE80;
  --ok-soft: #0C2318;
  --err: #FF8A8A;
  --err-soft: #2A1215;
  --warn-soft: #2A2110;

  --logo-blue: #3D86FF;
  --logo-accent: #FF9A3C;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow: 0 2px 4px rgba(0, 0, 0, 0.35), 0 8px 24px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 4px 8px rgba(0, 0, 0, 0.4), 0 20px 48px rgba(0, 0, 0, 0.55);

  color-scheme: dark;
}

/* Devanagari joins the stack only on Hindi pages. */
:root[lang^='hi'] {
  --font-script: 'Noto Sans Devanagari';
  --font-body: 'Manrope', 'Noto Sans Devanagari', system-ui, sans-serif;
}

/* ---------------------------------------------------------------- 3. base */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  font-weight: 450;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Room for the sticky mobile contact bar. */
@media (max-width: 767px) {
  body {
    padding-bottom: 64px;
  }
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  line-height: var(--lh-head);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 var(--s-3);
  text-wrap: balance;
}

h1 { font-size: var(--fs-h1); line-height: var(--lh-tight); letter-spacing: -0.03em; }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-xl); font-weight: 700; }

p {
  margin: 0 0 var(--s-4);
  text-wrap: pretty;
}

a {
  color: var(--primary);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}
a:hover { color: var(--primary-hover); }

img, svg, video, iframe {
  max-width: 100%;
  height: auto;
  display: block;
}

ul, ol { margin: 0 0 var(--s-4); padding-left: 1.25rem; }
li { margin-bottom: var(--s-2); }

strong, b { font-weight: 700; }

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: var(--s-6) 0;
}

code, kbd, samp, pre {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

/* Visible focus everywhere, for keyboard users only. */
:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

::selection {
  background: var(--accent);
  color: var(--on-accent);
}

/* --------------------------------------------------------- 4. a11y helpers */

.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 {
  position: absolute;
  top: -100px;
  left: var(--s-4);
  z-index: 200;
  background: var(--primary-fill);
  color: var(--on-primary);
  padding: var(--s-3) var(--s-5);
  border-radius: 0 0 var(--r) var(--r);
  font-weight: 700;
  text-decoration: none;
  transition: top var(--dur) var(--ease);
}
.skip-link:focus {
  top: 0;
  color: var(--on-primary);
}

/* Unfilled {{PLACEHOLDER}} tokens are meant to be obvious on screen. */
.ph {
  font-family: var(--font-mono);
  font-size: 0.85em;
  background: var(--warn-soft);
  color: var(--accent-text);
  border: 1px dashed var(--accent);
  border-radius: var(--r-sm);
  padding: 0.05em 0.35em;
  white-space: nowrap;
}

/* -------------------------------------------------------------- 5. layout */

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

@media (min-width: 560px) {
  :root { --gutter: 1.5rem; }
}
@media (min-width: 1024px) {
  :root { --gutter: 2rem; --header-h: 72px; }
}

.section {
  padding-block: clamp(2.5rem, 1.6rem + 4.5vw, 5rem);
}
.section--tight { padding-block: clamp(2rem, 1.4rem + 3vw, 3.5rem); }
.section--alt { background: var(--surface-2); }

/* A further block inside one section, used where a CMS widget has more than one
   part to show - hosting plans, then the comparison table, then the add-ons. */
.widget-block { margin-top: clamp(2.5rem, 1.6rem + 4.5vw, 5rem); }

.section-head {
  max-width: 62ch;
  margin-bottom: var(--s-6);
}
.section-head--center {
  margin-inline: auto;
  text-align: center;
}
.section-head p {
  color: var(--ink-muted);
  font-size: var(--fs-lg);
  margin-bottom: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin-bottom: var(--s-3);
}
.eyebrow::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--accent);
  flex: none;
}

.grid {
  display: grid;
  gap: var(--s-4);
}
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }

.stack > * + * { margin-top: var(--s-4); }
.cluster {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  align-items: center;
}

.prose { max-width: var(--maxw-prose); }
.prose h2 { margin-top: var(--s-7); }
.prose h3 { margin-top: var(--s-6); }
.prose li { color: var(--ink-muted); }

.text-muted { color: var(--ink-muted); }
.text-center { text-align: center; }
.mono { font-family: var(--font-mono); }

/* The pixel-cell texture, used sparingly behind hero and CTA blocks. */
.cell-texture {
  position: relative;
  isolation: isolate;
}
.cell-texture::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(var(--line-strong) 1.1px, transparent 1.1px);
  background-size: 22px 22px;
  opacity: 0.45;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
  pointer-events: none;
}

/* ------------------------------------------------------------ 6. buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  min-height: 48px;              /* comfortable tap target */
  padding: 0.7rem 1.35rem;
  border: 1.5px solid transparent;
  border-radius: var(--r);
  font-family: var(--font-head);
  font-size: var(--fs-base);
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease),
    color var(--dur) var(--ease), transform var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn .icon { flex: none; }

.btn--primary {
  background: var(--primary-fill);
  color: var(--on-primary);
  box-shadow: var(--shadow-sm);
}
.btn--primary:hover {
  background: var(--primary-hover);
  color: var(--on-primary);
  box-shadow: var(--shadow);
}

/* Orange is a fill with dark ink on top - white on orange is only 2.6:1. */
.btn--accent {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: var(--shadow-sm);
}
.btn--accent:hover {
  background: #E86D00;
  color: var(--on-accent);
  box-shadow: var(--shadow);
}

.btn--wa {
  background: var(--wa);
  color: var(--on-wa);
}
.btn--wa:hover {
  background: #0B6A3F;
  color: var(--on-wa);
}

.btn--ghost {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn--ghost:hover {
  background: var(--surface-2);
  color: var(--ink);
  border-color: var(--primary);
}

.btn--quiet {
  background: transparent;
  color: var(--primary);
  padding-inline: 0.5rem;
}
.btn--quiet:hover {
  background: var(--primary-soft);
}

.btn--sm { min-height: 40px; padding: 0.45rem 0.9rem; font-size: var(--fs-sm); }
.btn--lg { min-height: 56px; padding: 0.9rem 1.75rem; font-size: var(--fs-lg); }
.btn--block { width: 100%; }

.btn[aria-disabled='true'],
.btn:disabled {
  opacity: 0.55;
  pointer-events: none;
}

/* Text link that behaves like a CTA. */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-weight: 700;
  text-decoration: none;
}
.link-arrow .icon { transition: transform var(--dur) var(--ease); }
.link-arrow:hover { text-decoration: underline; }
.link-arrow:hover .icon { transform: translateX(3px); }

/* ------------------------------------------------------- 7. cards + chips */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--s-5);
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease);
}
.card--hover:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.card h3 { margin-bottom: var(--s-2); }
.card p { color: var(--ink-muted); margin-bottom: 0; }
.card > * + * { margin-top: var(--s-3); }

/* Rack-unit card: a thin orange rail on the left, like a 1U face plate. */
.card--rack {
  position: relative;
  padding-left: calc(var(--s-5) + 6px);
  overflow: hidden;
}
.card--rack::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--line-strong);
  transition: background var(--dur) var(--ease);
}
.card--rack:hover::before { background: var(--accent); }

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--r);
  background: var(--primary-soft);
  color: var(--primary);
  margin-bottom: var(--s-3);
}
.card-icon--accent {
  background: var(--accent-soft);
  color: var(--accent-text);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--s-1);
  padding: 0.2rem 0.6rem;
  border-radius: var(--r-pill);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.01em;
  background: var(--surface-2);
  color: var(--ink-muted);
  border: 1px solid var(--line);
}
.badge--accent {
  background: var(--accent);
  color: var(--on-accent);
  border-color: transparent;
}
.badge--ok {
  background: var(--ok-soft);
  color: var(--ok);
  border-color: transparent;
}

/* The orange status LED borrowed from the logo's two bowl cells. */
.led {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--accent);
  flex: none;
}
.led--ok { background: var(--ok); }
.led--pulse { animation: led-pulse 2.4s var(--ease) infinite; }

@keyframes led-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* ------------------------------------------------------------- 8. header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
}
@supports not (backdrop-filter: blur(4px)) {
  .site-header { background: var(--bg); }
}

.header-inner {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  min-height: var(--header-h);
}

/* Logo lockup: SVG mark + live text, so it themes correctly. */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  flex: none;
}
.logo-mark { flex: none; }
.logo-word {
  display: flex;
  flex-direction: column;
  line-height: 1;
}
.logo-name {
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.logo-name b { color: var(--logo-blue); font-weight: 800; }
.logo-name i { color: var(--accent); font-style: normal; font-weight: 800; }
.logo-sub {
  font-family: var(--font-head);
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-top: 2px;
}
a.logo-link { text-decoration: none; display: inline-flex; }

.nav {
  display: none;
  margin-left: auto;
}
.nav-list {
  display: flex;
  align-items: center;
  gap: var(--s-1);
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-list li { margin: 0; }
.nav-link {
  display: block;
  padding: 0.5rem 0.7rem;
  border-radius: var(--r-sm);
  color: var(--ink);
  font-size: var(--fs-sm);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.nav-link:hover { background: var(--surface-2); color: var(--ink); }
.nav-link[aria-current='page'] {
  color: var(--primary);
  background: var(--primary-soft);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  margin-left: auto;
}
.nav + .header-actions { margin-left: var(--s-2); }

/* Square icon button used for theme, language and the menu toggle. */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1.5px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.icon-btn:hover { background: var(--surface-2); border-color: var(--line-strong); }

.lang-switch {
  display: inline-flex;
  border: 1.5px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  background: var(--surface);
}
.lang-switch a {
  padding: 0 0.6rem;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--ink-muted);
  text-decoration: none;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
.lang-switch a:hover { background: var(--surface-2); color: var(--ink); }
.lang-switch a[aria-current='true'] {
  background: var(--primary-fill);
  color: var(--on-primary);
}

/* The switch always shows short codes. Full native names cost roughly 40px more
   per language, which breaks the header at 360px and again at 1024px once the
   seven-item desktop nav appears. The full name stays for screen readers and in
   the title attribute. */
.lang-full {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.lang-short {
  /* The bundled Devanagari webfont only loads on Hindi pages, so name the
     common system faces here - otherwise the matra sits badly in the fallback. */
  font-family: 'Noto Sans Devanagari', 'Nirmala UI', 'Mangal', var(--font-body);
}

/* Small-Android safety net below the 360px target. */
@media (max-width: 359px) {
  .logo-name { font-size: 1.02rem; }
  .logo-sub { letter-spacing: 0.3em; }
  .icon-btn { width: 42px; }
}

.header-cta { display: none; }

@media (min-width: 1024px) {
  .nav { display: block; }
  .nav-toggle { display: none; }
}

/* The quote button joins only when there is genuine room beside the seven-item
   nav - at 1024px it pushed the header 65px past the viewport. */
@media (min-width: 1200px) {
  .header-cta { display: inline-flex; }
}

/* Mobile navigation panel */
.nav-toggle { margin-left: auto; }
.nav + .nav-toggle,
.header-actions + .nav-toggle { margin-left: 0; }

.mobile-nav {
  position: fixed;
  inset: var(--header-h) 0 0;
  z-index: 99;
  background: var(--bg);
  border-top: 1px solid var(--line);
  padding: var(--s-5) var(--gutter) var(--s-8);
  overflow-y: auto;
  transform: translateY(-8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease),
    visibility var(--dur);
}
.mobile-nav[data-open='true'] {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}
.mobile-nav ul {
  list-style: none;
  margin: 0 0 var(--s-5);
  padding: 0;
}
.mobile-nav li { margin: 0; border-bottom: 1px solid var(--line); }
/* Scoped to the list: a bare `.mobile-nav a` would outrank .btn--primary and
   repaint the panel's CTA button text with the plain link colour. */
.mobile-nav ul a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--s-4) 0;
  min-height: 52px;
  color: var(--ink);
  font-size: var(--fs-lg);
  font-weight: 700;
  text-decoration: none;
}
.mobile-nav ul a[aria-current='page'] { color: var(--primary); }
.mobile-nav ul a .icon { color: var(--ink-faint); }

body[data-nav-open='true'] { overflow: hidden; }

@media (min-width: 1024px) {
  .mobile-nav { display: none; }
}

/* ------------------------------------------------- 9. sticky mobile CTA bar */

.mobile-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 98;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.mobile-bar a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  min-height: 56px;
  font-weight: 700;
  font-size: var(--fs-sm);
  text-decoration: none;
}
.mobile-bar .bar-wa { background: var(--wa); color: var(--on-wa); }
.mobile-bar .bar-call { background: var(--primary-fill); color: var(--on-primary); }

@media (min-width: 768px) {
  .mobile-bar { display: none; }
}

/* ------------------------------------------------------------- 10. footer */

.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding-block: var(--s-7) var(--s-5);
  margin-top: var(--s-7);
}
.footer-grid {
  display: grid;
  gap: var(--s-6);
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
  .footer-grid { grid-template-columns: 1.6fr repeat(var(--footer-links, 2), 1fr) 1.5fr; }
}

.footer-brand p {
  color: var(--ink-muted);
  font-size: var(--fs-sm);
  max-width: 34ch;
  margin-top: var(--s-4);
}
.footer h2,
.footer-col h2 {
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: var(--s-3);
}
.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-col li { margin-bottom: var(--s-2); }
.footer-col a {
  color: var(--ink-muted);
  font-size: var(--fs-sm);
  text-decoration: none;
}
.footer-col a:hover { color: var(--primary); text-decoration: underline; }

.footer-contact { font-size: var(--fs-sm); }
.footer-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--s-2);
  margin-bottom: var(--s-3);
}
.footer-links span {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  color: var(--ink-muted);
}
.footer-contact a {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  min-height: 32px;
}
.footer-contact a:hover { color: var(--primary); }
.footer-contact address {
  font-style: normal;
  color: var(--ink-muted);
  margin-top: var(--s-3);
}

.social-row {
  display: flex;
  gap: var(--s-2);
  margin-top: var(--s-4);
  flex-wrap: wrap;
}
.social-row a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--ink-muted);
}
.social-row a:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3) var(--s-5);
  align-items: center;
  justify-content: space-between;
  margin-top: var(--s-6);
  padding-top: var(--s-4);
  border-top: 1px solid var(--line);
  font-size: var(--fs-xs);
  color: var(--ink-faint);
}
.footer-coords {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--ink-faint);
  letter-spacing: 0.04em;
}

/* --------------------------------------------------------- 11. flash notes */

.flash {
  display: flex;
  align-items: flex-start;
  gap: var(--s-3);
  padding: var(--s-4);
  border-radius: var(--r);
  border: 1px solid transparent;
  margin-bottom: var(--s-5);
  font-size: var(--fs-sm);
}
.flash .icon { flex: none; margin-top: 2px; }
.flash--success {
  background: var(--ok-soft);
  border-color: var(--ok);
  color: var(--ink);
}
.flash--error {
  background: var(--err-soft);
  border-color: var(--err);
  color: var(--ink);
}

/* ------------------------------------------------------------- 12. motion */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    transition-delay: 0s !important;
    scroll-behavior: auto !important;
  }
}

/* Anything that animates in on scroll starts visible if JS never runs. */
.reveal { opacity: 1; }
.js .reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------- 13. print */

@media print {
  .site-header, .mobile-bar, .mobile-nav, .site-footer nav, .btn { display: none !important; }
  body { background: #fff; color: #000; padding: 0; }
}
