/* ==========================================================================
   Matrix Therapeutics Pvt. Ltd.
   Design language: cold clinical neutrals + one cyan accent taken from the logo.
   Dials: VARIANCE 7 / MOTION 6 / DENSITY 4.
   Theme: follows prefers-color-scheme, one theme per visit (no mid-page inversion).
   Shape system (one rule, used everywhere):
     - interactive elements and chips: full pill
     - outer shells: 32px, inner cores: 26px (concentric, 6px bezel)
     - tiles and panels: 28px
     - form fields: 16px
   Z-index scale: 1 content lift, 40 nav, 60 mobile menu.
   ========================================================================== */

@font-face {
  font-family: "Geist";
  src: url("fonts/geist-vf.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Tinos";
  src: url("fonts/tinos-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Tinos";
  src: url("fonts/tinos-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {

  --bg: #f3f7f7;
  --bg-2: #e8f0f0;
  --surface: #fbfdfd;
  --ink: #0a1213;
  --ink-2: #2a393c;
  --muted: #4b5e62;
  --line: rgba(10, 18, 19, 0.12);
  --line-strong: rgba(10, 18, 19, 0.26);

  --accent: #8ef2f7;
  --accent-soft: #d6f9fb;
  --accent-ink: #006069;
  --on-accent: #06191b;

  --tile-dark: #0b1a1c;
  --tile-dark-ink: #e9f5f5;
  --tile-dark-muted: #a9c0c3;

  --plate: #fbfefe;
  --shadow: 0 40px 70px -36px rgba(0, 70, 80, 0.32);
  --shadow-sm: 0 18px 36px -22px rgba(0, 70, 80, 0.28);

  --bezel-hi: rgba(255, 255, 255, 0.55);
  --brand-ink: #0b1213;
  --mark-op: 1;
  --ellipse-op: 0.9;
  --photo-filter: none;
  --err: #a3201f;

  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-brand: "Tinos", "Times New Roman", Georgia, serif;

  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --r-shell: 32px;
  --r-core: 26px;
  --r-tile: 28px;
  --r-field: 16px;

  --gutter: clamp(1rem, 4vw, 2.5rem);
  --maxw: 1240px;
  --section-y: clamp(5rem, 10vw, 9rem);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #060b0c;
    --bg-2: #0a1314;
    --surface: #0e1819;
    --ink: #e9f3f3;
    --ink-2: #c3d3d5;
    --muted: #95aaad;
    --line: rgba(233, 243, 243, 0.12);
    --line-strong: rgba(233, 243, 243, 0.28);

    --accent-soft: rgba(142, 242, 247, 0.1);
    --accent-ink: #8ef2f7;

    --tile-dark: #11313a;
    --tile-dark-ink: #e9f5f5;
    --tile-dark-muted: #a9c6ca;

    --plate: #f3f9f9;
    --shadow: 0 40px 80px -36px rgba(0, 0, 0, 0.8);
    --shadow-sm: 0 18px 36px -22px rgba(0, 0, 0, 0.7);

    --bezel-hi: rgba(255, 255, 255, 0.07);
    --brand-ink: #e9f3f3;
    --mark-op: 0.55;
    --ellipse-op: 0.3;
    --photo-filter: brightness(0.88) contrast(1.05);
    --err: #ff9b97;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #060b0c;
  --bg-2: #0a1314;
  --surface: #0e1819;
  --ink: #e9f3f3;
  --ink-2: #c3d3d5;
  --muted: #95aaad;
  --line: rgba(233, 243, 243, 0.12);
  --line-strong: rgba(233, 243, 243, 0.28);

  --accent-soft: rgba(142, 242, 247, 0.1);
  --accent-ink: #8ef2f7;

  --tile-dark: #11313a;
  --tile-dark-ink: #e9f5f5;
  --tile-dark-muted: #a9c6ca;

  --plate: #f3f9f9;
  --shadow: 0 40px 80px -36px rgba(0, 0, 0, 0.8);
  --shadow-sm: 0 18px 36px -22px rgba(0, 0, 0, 0.7);

  --bezel-hi: rgba(255, 255, 255, 0.07);
  --brand-ink: #e9f3f3;
  --mark-op: 0.55;
  --ellipse-op: 0.3;
  --photo-filter: brightness(0.88) contrast(1.05);
  --err: #ff9b97;
  color-scheme: dark;
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4, p, ul, ol, figure, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--accent); color: var(--on-accent); }

.skip {
  position: fixed; left: 1rem; top: -4rem; z-index: 70;
  background: var(--accent); color: var(--on-accent);
  padding: 0.75rem 1.25rem; border-radius: 999px; font-weight: 600;
  transition: top 0.3s var(--ease);
}
.skip:focus { top: 1rem; }

.icon { width: 1.25em; height: 1.25em; fill: currentColor; flex: none; }

.wrap { width: min(var(--maxw), 100% - 2 * var(--gutter)); margin-inline: auto; }
.section { padding-block: var(--section-y); scroll-margin-top: 4rem; position: relative; }
.section--tint { background: var(--bg-2); }

/* ---------- Type ---------- */
.h1 {
  font-size: clamp(2.5rem, 4.7vw, 4.6rem);
  font-weight: 600;
  line-height: 1.03;
  letter-spacing: -0.04em;
}
.h2 {
  font-size: clamp(2rem, 3.7vw, 3.5rem);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.035em;
}
.h3 { font-size: clamp(1.25rem, 1.6vw, 1.5rem); font-weight: 600; line-height: 1.2; letter-spacing: -0.02em; }
.lead { font-size: clamp(1.125rem, 1.45vw, 1.35rem); line-height: 1.55; color: var(--ink-2); max-width: 62ch; }
.body { color: var(--muted); max-width: 62ch; }
.soft { color: var(--muted); }
.block { display: block; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  color: var(--ink);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* ---------- Buttons (pill + nested icon island) ---------- */
.btn {
  --h: 3.25rem;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  height: var(--h);
  padding: 0 0.5rem 0 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.005em;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease), background-color 0.4s var(--ease);
}
.btn__ico {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  transition: transform 0.5s var(--ease);
}
.btn:hover .btn__ico { transform: translate(2px, -1px) scale(1.06); }
.btn:active { transform: scale(0.98); }
.btn--primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 14px 30px -16px color-mix(in srgb, var(--accent) 90%, #00525a); }
.btn--primary .btn__ico { background: var(--on-accent); color: var(--accent); }
.btn--primary:hover { box-shadow: 0 18px 38px -14px color-mix(in srgb, var(--accent) 95%, #00525a); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn--ghost .btn__ico { background: var(--accent-soft); color: var(--accent-ink); }
.btn--ghost:hover { background: var(--accent-soft); }
.btn--sm { --h: 2.75rem; padding: 0 0.375rem 0 1.1rem; font-size: 0.875rem; gap: 0.6rem; }
.btn--sm .btn__ico { width: 2rem; height: 2rem; }

/* ---------- Double-bezel ---------- */
.bezel {
  padding: 6px;
  border-radius: var(--r-shell);
  background: color-mix(in srgb, var(--ink) 4%, transparent);
  border: 1px solid var(--line);
}
.bezel__core {
  border-radius: var(--r-core);
  background: var(--surface);
  box-shadow: inset 0 1px 0 var(--bezel-hi);
  overflow: hidden;
  height: 100%;
}

/* ---------- Reveal (only when JS is on) ---------- */
.js [data-reveal] {
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease), filter 0.9s var(--ease);
  transition-delay: calc(var(--d, 0) * 80ms);
}
.js [data-reveal].hide { opacity: 0; transform: translateY(28px); filter: blur(8px); }
.js [data-reveal].hide.in { opacity: 1; transform: none; filter: none; }
.js [data-reveal].enter { animation: rise 0.9s var(--ease) both; animation-delay: calc(var(--d, 0) * 80ms); }
@keyframes rise {
  from { opacity: 0; transform: translateY(28px); filter: blur(8px); }
  to { opacity: 1; transform: none; filter: none; }
}

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: calc(14px + env(safe-area-inset-top, 0px));
  left: 50%;
  translate: -50% 0;
  z-index: 40;
  width: min(1120px, 100% - 1.5rem);
  height: 64px;
  padding: 0 0.5rem 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 62%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(1.5);
  backdrop-filter: blur(18px) saturate(1.5);
  transition: background-color 0.5s var(--ease), box-shadow 0.5s var(--ease), border-color 0.5s var(--ease);
}
.nav.is-scrolled {
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  box-shadow: var(--shadow-sm);
  border-color: var(--line-strong);
}
.brand { position: relative; display: inline-flex; align-items: baseline; gap: 0.5rem; isolation: isolate; padding-block: 0.25rem; }
.brand__mark {
  position: absolute;
  left: -0.6rem; top: -0.1rem;
  width: 3.4rem; height: 1.55rem;
  border-radius: 50%;
  background: var(--accent);
  rotate: 17deg;
  z-index: -1;
  opacity: var(--mark-op);
}
.brand__word { font-family: var(--font-brand); font-weight: 700; font-size: 1.65rem; line-height: 1; letter-spacing: -0.01em; color: var(--brand-ink); }
.brand__sub { font-family: var(--font-brand); font-size: 0.95rem; color: var(--ink-2); }
.nav__links { display: flex; align-items: center; gap: 0.25rem; }
.nav__links a {
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--ink-2);
  transition: background-color 0.4s var(--ease), color 0.4s var(--ease);
}
.nav__links a:hover, .nav__links a[aria-current="true"] { background: var(--accent-soft); color: var(--ink); }
.nav__cta { display: flex; align-items: center; gap: 0.5rem; }

.burger { display: none; width: 3rem; height: 3rem; position: relative; border-radius: 50%; border: 1px solid var(--line-strong); }
.burger span {
  position: absolute; left: 50%; top: 50%;
  width: 18px; height: 1.5px; background: var(--ink); border-radius: 2px;
  translate: -50% -50%;
  transition: transform 0.6s var(--ease), translate 0.6s var(--ease);
}
.burger span:nth-child(1) { translate: -50% calc(-50% - 4px); }
.burger span:nth-child(2) { translate: -50% calc(-50% + 4px); }
.burger[aria-expanded="true"] span:nth-child(1) { translate: -50% -50%; transform: rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { translate: -50% -50%; transform: rotate(-45deg); }

.menu {
  position: fixed; inset: 0; z-index: 60;
  display: grid; align-content: center; gap: 0.25rem;
  padding: calc(6rem + env(safe-area-inset-top, 0px)) var(--gutter) calc(3rem + env(safe-area-inset-bottom, 0px));
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  -webkit-backdrop-filter: blur(28px) saturate(1.4);
  backdrop-filter: blur(28px) saturate(1.4);
  opacity: 0; visibility: hidden;
  transition: opacity 0.6s var(--ease), visibility 0s linear 0.6s;
}
.menu.open { opacity: 1; visibility: visible; transition: opacity 0.6s var(--ease); }
.menu a.menu__link {
  display: block; overflow: hidden;
  font-size: clamp(2.25rem, 10vw, 3.5rem); font-weight: 600; letter-spacing: -0.035em; line-height: 1.15;
  padding-block: 0.25rem;
  opacity: 0; transform: translateY(2.5rem);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: 0s;
}
.menu.open a.menu__link { opacity: 1; transform: none; transition-delay: calc(80ms + var(--i) * 60ms); }
.menu .btn { margin-top: 2rem; justify-self: start; }
.menu__close { position: absolute; top: 14px; right: calc(var(--gutter) - 0.25rem); }

@media (max-width: 900px) {
  .nav__links, .nav__cta .btn { display: none; }
  .burger { display: block; }
  .brand__sub { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 6rem 0 clamp(5rem, 8vw, 7rem);
  min-height: min(100dvh, 900px);
  display: grid;
  align-items: center;
  overflow: clip;
  isolation: isolate;
}
.hero::before {
  content: "";
  position: absolute; inset: 0; z-index: -2;
  background: radial-gradient(60% 55% at 92% 8%, color-mix(in srgb, var(--accent) 24%, transparent), transparent 70%);
}
.hero__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(1.5rem, 3vw, 3rem); align-items: center; }
.hero__copy { grid-column: 1 / span 7; display: grid; gap: 1.5rem; justify-items: start; }
.hero__copy .h1 .soft { display: block; }
.hero__sub { font-size: clamp(1.05rem, 1.35vw, 1.25rem); line-height: 1.55; color: var(--ink-2); max-width: 46ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 0.5rem; }
.hero__visual { grid-column: 8 / span 5; position: relative; isolation: isolate; }
.hero__ellipse {
  position: absolute; z-index: -1;
  width: 132%; aspect-ratio: 2.1 / 1;
  left: -38%; top: -9%;
  border-radius: 50%;
  background: var(--accent);
  rotate: 17deg;
  opacity: var(--ellipse-op);
}
.hero__shell { box-shadow: var(--shadow); }
.hero__img { aspect-ratio: 4 / 4.6; width: 100%; height: auto; object-fit: cover; object-position: 38% 50%; }

@media (max-width: 900px) {
  .hero { min-height: 0; padding-top: 6.5rem; }
  .hero__copy, .hero__visual { grid-column: 1 / -1; }
  .hero__visual { margin-top: 1.5rem; }
  .hero__img { aspect-ratio: 4 / 3.6; }
  .hero__ellipse { width: 120%; left: -20%; top: -6%; }
}

/* ---------- Stats ---------- */
.stats { position: relative; z-index: 1; margin-top: -3.25rem; padding-bottom: 1rem; }
.stats__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: clamp(1.5rem, 3vw, 2.25rem) clamp(1.25rem, 2.5vw, 2rem); }
.stat + .stat { border-left: 1px solid var(--line); }
.stat__num { font-size: clamp(2.25rem, 4.2vw, 3.6rem); font-weight: 600; letter-spacing: -0.045em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat__label { margin-top: 0.6rem; color: var(--muted); font-size: 0.9rem; font-weight: 500; }
@media (max-width: 760px) {
  .stats { margin-top: -2rem; }
  .stats__grid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3) { border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
}

/* ---------- Story ---------- */
.story__head { max-width: 62rem; display: grid; gap: 1.75rem; }
.story__lead { font-size: clamp(1.5rem, 2.8vw, 2.5rem); font-weight: 500; letter-spacing: -0.03em; line-height: 1.2; max-width: 26ch; color: var(--ink); }
.story__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(2rem, 4vw, 4rem); margin-top: clamp(3rem, 6vw, 5rem); }
.timeline { grid-column: 1 / span 5; display: grid; gap: 2.5rem; position: relative; padding-left: 2.25rem; align-content: start; }
.timeline::before { content: ""; position: absolute; left: 0.45rem; top: 0.6rem; bottom: 0.6rem; width: 1px; background: var(--line-strong); }
.tl { position: relative; display: grid; gap: 0.5rem; }
.tl::before {
  content: ""; position: absolute; left: -2.25rem; top: 0.55rem;
  width: 0.95rem; height: 0.95rem; border-radius: 50%;
  background: var(--accent); border: 2px solid var(--bg);
  box-shadow: 0 0 0 1px var(--line-strong);
}
.tl__when { font-size: clamp(1.75rem, 3vw, 2.5rem); font-weight: 600; letter-spacing: -0.04em; line-height: 1.1; }
.story__side { grid-column: 7 / span 6; display: grid; gap: 1.75rem; align-content: start; }
.mission { padding: clamp(1.5rem, 3vw, 2.25rem); background: var(--accent-soft); }
.mission p:first-child { color: var(--accent-ink); font-weight: 600; font-size: 0.875rem; margin-bottom: 0.75rem; }
.mission p:last-child { font-size: clamp(1.2rem, 1.9vw, 1.6rem); line-height: 1.35; letter-spacing: -0.02em; font-weight: 500; }
.photo { position: relative; overflow: hidden; border-radius: var(--r-tile); }
.photo img { width: 100%; height: 100%; object-fit: cover; }
.story__band { margin-top: clamp(3rem, 6vw, 5rem); height: clamp(260px, 38vw, 460px); }
.photo img { filter: var(--photo-filter); }
@media (max-width: 860px) {
  .timeline, .story__side { grid-column: 1 / -1; }
}

/* ---------- Who we are ---------- */
.who__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.who__media { grid-column: 1 / span 5; }
.who__media .photo { aspect-ratio: 4 / 5; border-radius: var(--r-core); }
.who__copy { grid-column: 7 / span 6; display: grid; gap: 1.5rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip {
  display: inline-flex; align-items: center;
  padding: 0.5rem 1rem; border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-size: 0.875rem; font-weight: 500; color: var(--ink-2);
  background: var(--surface);
}
.chip--accent { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 60%, transparent); color: var(--ink); }
.facts { display: grid; gap: 0; margin-top: 0.5rem; }
.fact { display: grid; grid-template-columns: 2.75rem 1fr; gap: 1rem; padding-block: 1.25rem; align-items: start; }
.fact + .fact { border-top: 1px solid var(--line); }
.fact__ico { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); font-size: 1.35rem; }
.fact p { color: var(--ink-2); max-width: 56ch; padding-top: 0.2rem; }
@media (max-width: 860px) {
  .who__media, .who__copy { grid-column: 1 / -1; }
  .who__media .photo { aspect-ratio: 4 / 3.4; }
}

/* ---------- Values ---------- */
.values__head { margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.values__list { border-bottom: 1px solid var(--line-strong); }
.value {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) 3.5rem; gap: clamp(1rem, 3vw, 3rem);
  align-items: center;
  padding: clamp(1.75rem, 3.5vw, 3rem) clamp(1rem, 2.5vw, 2rem);
  border-top: 1px solid var(--line-strong);
  transition: color 0.5s var(--ease);
}
.value::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--accent);
  transform: scaleX(0); transform-origin: left center;
  transition: transform 0.8s var(--ease);
}
.value:hover::before { transform: scaleX(1); }
.value:hover { color: var(--on-accent); }
.value:hover .value__text { color: var(--on-accent); }
.value__name { font-size: clamp(2.25rem, 6vw, 5rem); font-weight: 600; letter-spacing: -0.045em; line-height: 1; }
.value__text { color: var(--muted); max-width: 44ch; transition: color 0.5s var(--ease); }
.value__ico { justify-self: end; font-size: 2.25rem; color: var(--accent-ink); transition: color 0.5s var(--ease), transform 0.6s var(--ease); }
.value:hover .value__ico { color: var(--on-accent); transform: translate(-4px, 0) scale(1.08); }
@media (max-width: 760px) {
  .value { grid-template-columns: 1fr auto; row-gap: 0.75rem; }
  .value__text { grid-column: 1 / -1; grid-row: 2; }
  .value__ico { grid-column: 2; grid-row: 1; font-size: 1.75rem; }
}

/* ---------- Advantage bento ---------- */
.adv__head { margin-bottom: clamp(2.5rem, 5vw, 4rem); max-width: 40rem; }
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 1rem; }
.tile {
  position: relative; isolation: isolate; overflow: hidden;
  min-height: 17rem;
  padding: clamp(1.5rem, 2.5vw, 2.25rem);
  border-radius: var(--r-tile);
  display: flex; flex-direction: column; justify-content: space-between; gap: 2rem;
  border: 1px solid var(--line);
  background: var(--surface);
  transition: transform 0.7s var(--ease), box-shadow 0.7s var(--ease);
}
.tile:hover { transform: translateY(-4px); box-shadow: var(--shadow-sm); }
.tile__ico { display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 50%; font-size: 1.5rem; background: var(--accent-soft); color: var(--accent-ink); }
.tile h3 { margin-bottom: 0.6rem; }
.tile p { color: var(--muted); max-width: 46ch; }
.t-a { grid-column: span 7; color: #eef8f8; border-color: transparent; }
.t-a::before { content: ""; position: absolute; inset: 0; z-index: -2; background: url("img/operating-theatre.jpg") center 35% / cover; }
.t-a::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(4, 14, 16, 0.35) 0%, rgba(4, 14, 16, 0.88) 78%); }
.t-a p { color: #d3e6e8; }
.t-a .tile__ico { background: var(--accent); color: var(--on-accent); }
.t-b { grid-column: span 5; background: var(--accent); border-color: transparent; color: var(--on-accent); }
.t-b p { color: color-mix(in srgb, var(--on-accent) 82%, transparent); }
.t-b .tile__ico { background: var(--on-accent); color: var(--accent); }
.t-c { grid-column: span 5; }
.t-d { grid-column: span 7; background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 50%, transparent); }
.t-e { grid-column: span 7; background: var(--tile-dark); color: var(--tile-dark-ink); border-color: transparent; }
.t-e p { color: var(--tile-dark-muted); }
.t-e .tile__ico { background: var(--accent); color: var(--on-accent); }
.t-f { grid-column: span 5; background:
  radial-gradient(120% 90% at 100% 100%, color-mix(in srgb, var(--accent) 55%, transparent), transparent 62%), var(--surface); }
@media (max-width: 860px) {
  .bento > .tile { grid-column: 1 / -1; min-height: 14rem; }
}

/* ---------- Assets: sticky stack ---------- */
.assets__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.assets__head { grid-column: 1 / span 5; position: sticky; top: 7rem; display: grid; gap: 1.25rem; }
.stack { grid-column: 7 / span 6; display: grid; }
.stack__card {
  position: sticky;
  top: calc(6.5rem + var(--i) * 1.1rem);
  margin-bottom: 1.25rem;
  padding: clamp(1.5rem, 2.5vw, 2.25rem);
  min-height: 15rem;
  border-radius: var(--r-tile);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-sm);
  display: grid; gap: 1.5rem; align-content: space-between;
}
.stack__card:nth-child(even) { background: color-mix(in srgb, var(--accent) 14%, var(--surface)); }
.stack__card .tile__ico { width: 3rem; height: 3rem; }
.stack__card h3 { margin-bottom: 0.5rem; }
.stack__card p { color: var(--muted); max-width: 40ch; }
@media (max-width: 860px) {
  .assets__head, .stack { grid-column: 1 / -1; }
  .assets__head { position: static; }
  .stack__card { top: calc(5.5rem + var(--i) * 0.9rem); min-height: 12rem; }
}

/* ---------- Products ---------- */
.products__head { display: grid; gap: 1.25rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); max-width: 46rem; }
.products__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 1.25rem; }
.pline { grid-column: span 7; }
.pline--ortho { grid-column: span 5; }
.pline__media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; }
.pline--ortho .pline__media { aspect-ratio: 16 / 10.2; }
.pline__media img { width: 100%; height: 100%; object-fit: cover; }
.pline__media img { filter: var(--photo-filter); }
.pline__body { padding: clamp(1.5rem, 2.5vw, 2.25rem); display: grid; gap: 1.5rem; }
.pline__title { display: flex; align-items: center; gap: 0.9rem; }
.pline__title .tile__ico { width: 2.75rem; height: 2.75rem; }
.pgroup { display: grid; gap: 0.75rem; }
.pgroup__label { font-size: 0.875rem; font-weight: 600; color: var(--accent-ink); }
.rows { display: grid; }
.prow { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding-block: 1rem; font-weight: 500; font-size: 1.1rem; letter-spacing: -0.01em; }
.prow + .prow { border-top: 1px solid var(--line); }
.prow span { color: var(--muted); font-weight: 400; font-size: 0.95rem; text-align: right; }
@media (max-width: 960px) {
  .pline, .pline--ortho { grid-column: 1 / -1; }
}

/* ---------- Team ---------- */
.team__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(2rem, 5vw, 5rem); }
.team__head { grid-column: 1 / span 4; }
.team__body { grid-column: 6 / span 7; display: grid; gap: clamp(2rem, 4vw, 3.5rem); }
.roster__label { font-size: 0.875rem; font-weight: 600; color: var(--accent-ink); margin-bottom: 1rem; }
.directors { display: grid; gap: 0.25rem; }
.director { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.director__name { font-size: clamp(2rem, 4.4vw, 3.75rem); font-weight: 600; letter-spacing: -0.045em; line-height: 1.12; }
.in-link {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 0.95rem 0.5rem 0.7rem; border-radius: 999px;
  border: 1px solid var(--line-strong); font-size: 0.85rem; font-weight: 500;
  transition: background-color 0.4s var(--ease), transform 0.5s var(--ease);
}
.in-link:hover { background: var(--accent-soft); }
.in-link:active { transform: scale(0.97); }
.in-link .icon { font-size: 1.1rem; color: var(--accent-ink); }
.mgmt { display: grid; }
.mgmt__row { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding-block: 1.1rem; font-size: clamp(1.25rem, 2vw, 1.6rem); font-weight: 500; letter-spacing: -0.02em; }
.mgmt__row + .mgmt__row { border-top: 1px solid var(--line); }
.mgmt__row span { color: var(--muted); font-size: 1rem; font-weight: 400; letter-spacing: 0; }
@media (max-width: 860px) {
  .team__head, .team__body { grid-column: 1 / -1; }
}

/* ---------- Partners ---------- */
.partners__head { display: grid; gap: 1.25rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); max-width: 44rem; }
.partners__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 1.25rem; align-items: stretch; }
.ptabs { grid-column: 1 / span 5; display: grid; gap: 0.75rem; align-content: start; }
.ptab {
  display: grid; place-items: center start;
  height: 6.25rem; padding: 0 2rem;
  border-radius: var(--r-tile);
  background: var(--plate);
  border: 1px solid var(--line);
  transition: transform 0.6s var(--ease), box-shadow 0.6s var(--ease), border-color 0.4s var(--ease), outline-color 0.4s;
  outline: 2px solid transparent; outline-offset: -2px;
}
.ptab img { height: 2.6rem; width: auto; max-width: 11rem; object-fit: contain; }
.ptab[data-p="meril"] img { height: 5.4rem; }
.ptab[data-p="maxx"] img { height: 3.7rem; }
.ptab:hover { transform: translateX(4px); }
.ptab[aria-selected="true"] { border-color: transparent; outline-color: var(--accent); box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 32%, transparent), var(--shadow-sm); transform: translateX(8px); }
.ppanel-wrap { grid-column: 6 / span 7; }
.ppanel { padding: clamp(1.75rem, 3vw, 2.75rem); display: grid; gap: 1.5rem; min-height: 100%; align-content: start; }
.ppanel[hidden] { display: none; }
.ppanel.enter { animation: panelIn 0.7s var(--ease) both; }
@keyframes panelIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.ppanel__facts { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.ppanel p { color: var(--ink-2); max-width: 56ch; }
.ppanel .in-link { justify-self: start; }
@media (max-width: 860px) {
  .ptabs, .ppanel-wrap { grid-column: 1 / -1; }
  .ptabs { grid-template-columns: repeat(3, 1fr); }
  .ptab { height: 5.25rem; padding: 0 1rem; place-items: center; }
  .ptab img { max-width: 100%; height: 1.7rem; }
  .ptab[data-p="meril"] img { height: 4.4rem; }
  .ptab[data-p="maxx"] img { height: 2.6rem; }
  .ptab[aria-selected="true"], .ptab:hover { transform: none; }
}
@media (max-width: 520px) {
  .ptabs { grid-template-columns: 1fr; }
  .ptab { place-items: center start; padding: 0 1.5rem; }
}

/* ---------- Contact ---------- */
.contact { background: var(--accent-soft); border-block: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); }
.contact__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.contact__copy { grid-column: 1 / span 5; display: grid; gap: 1.75rem; }
.contact__copy .h2 { font-size: clamp(2.25rem, 4.4vw, 4rem); }
.reach { display: grid; margin-top: 0.5rem; }
.reach a, .reach address { display: grid; grid-template-columns: 2.75rem 1fr; gap: 1rem; align-items: center; padding-block: 1rem; font-style: normal; }
.reach > * + * { border-top: 1px solid var(--line-strong); }
.reach .fact__ico { background: var(--surface); }
.reach a:hover span:last-child { text-decoration: underline; text-underline-offset: 4px; }
.reach small { display: block; color: var(--muted); font-size: 0.8125rem; }
.contact__form { grid-column: 7 / span 6; }
.form { padding: clamp(1.5rem, 3vw, 2.5rem); display: grid; gap: 1.5rem; }
.field { display: grid; gap: 0.5rem; }
.field label { font-weight: 600; font-size: 0.9rem; }
.field input, .field textarea {
  width: 100%;
  padding: 0.95rem 1.1rem;
  border-radius: var(--r-field);
  border: 1px solid var(--line-strong);
  background: var(--bg);
  color: var(--ink);
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.field textarea { min-height: 9.5rem; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent-ink); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 45%, transparent); }
.field input::placeholder, .field textarea::placeholder { color: var(--muted); opacity: 1; }
.field .err { color: var(--err); font-size: 0.85rem; font-weight: 500; min-height: 1.2em; }
.field[data-invalid="true"] input, .field[data-invalid="true"] textarea { border-color: var(--err); }
.form__note { color: var(--muted); font-size: 0.85rem; }
.form__done { padding: clamp(1.75rem, 3vw, 2.75rem); display: grid; gap: 1rem; }
.form__done[hidden], .form[hidden] { display: none; }
.form__done .tile__ico { width: 3.25rem; height: 3.25rem; }
@media (max-width: 860px) {
  .contact__copy, .contact__form { grid-column: 1 / -1; }
}

/* ---------- Footer ---------- */
.footer { padding-block: clamp(3.5rem, 6vw, 5.5rem) 2rem; background: var(--bg); }
.footer__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 2.5rem clamp(1.5rem, 4vw, 4rem); }
.footer__brand { grid-column: 1 / span 5; display: grid; gap: 1.5rem; justify-items: start; }
.logo-plate { background: var(--plate); border-radius: var(--r-tile); padding: 0.75rem 1.25rem; box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.logo-plate img { height: 5.25rem; width: auto; }
.footer__col { display: grid; gap: 0.6rem; align-content: start; }
.footer__col--a { grid-column: 7 / span 2; }
.footer__col--b { grid-column: 9 / span 4; }
.footer h4 { font-size: 0.875rem; font-weight: 600; color: var(--accent-ink); margin-bottom: 0.4rem; }
.footer__col a, .footer__col address { color: var(--ink-2); font-style: normal; font-size: 0.95rem; }
.footer__col a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.footer__legal { margin-top: clamp(2.5rem, 5vw, 4rem); padding-top: 1.5rem; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem 2rem; color: var(--muted); font-size: 0.85rem; }
@media (max-width: 860px) {
  .footer__brand, .footer__col--a, .footer__col--b { grid-column: 1 / -1; }
}

/* ---------- Scroll-driven polish (progressive enhancement) ---------- */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .parallax img { animation: drift linear both; animation-timeline: view(); animation-range: cover; transform-origin: center; }
    @keyframes drift { from { transform: translateY(-7%) scale(1.14); } to { transform: translateY(7%) scale(1.14); } }
    .hero__img { animation: heroDrift linear both; animation-timeline: view(); animation-range: exit; }
    @keyframes heroDrift { to { transform: scale(1.08) translateY(4%); } }
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; transition-delay: 0s !important; }
  .js [data-reveal].hide { opacity: 1; transform: none; filter: none; }
}

.stat{display:flex;flex-direction:column-reverse}
.stat dd{margin:0}

/* ---------- Revision 2: product tiles, directors, contact card, product pages ---------- */
.ptiles { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 1.25rem; }
.ptile { position: relative; isolation: isolate; overflow: hidden; border-radius: var(--r-tile); min-height: 26rem; display: flex; align-items: flex-end; color: #eef8f8; grid-column: span 6; border: 1px solid var(--line); }
.ptile--a, .ptile--d { grid-column: span 7; }
.ptile--b, .ptile--c { grid-column: span 5; }
.ptile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 1s var(--ease); }
.ptile::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(4, 14, 16, 0.05) 20%, rgba(4, 14, 16, 0.9)); }
.ptile:hover img { transform: scale(1.04); }
.ptile__body { padding: clamp(1.5rem, 2.5vw, 2.25rem); display: grid; gap: 0.75rem; justify-items: start; }
.ptile__partner { font-size: 0.875rem; font-weight: 600; color: var(--accent); }
.ptile p:not(.ptile__partner) { color: #d3e6e8; max-width: 40ch; }
.ptile .btn { margin-top: 0.5rem; }
@media (max-width: 860px) { .ptile, .ptile--a, .ptile--b, .ptile--c, .ptile--d { grid-column: 1 / -1; min-height: 22rem; } }

.team2__head { margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.dirs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.dir { display: grid; grid-template-columns: minmax(0, 10rem) minmax(0, 1fr); gap: 1.5rem; align-items: center; padding: 1.25rem; }
.dir__photo { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 20px; }
.dir__photo--mono { display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); font-size: 2.5rem; font-weight: 600; letter-spacing: -0.04em; }
.dir .director__name { font-size: clamp(1.5rem, 2.4vw, 2.1rem); }
.dir__text { display: grid; gap: 0.6rem; justify-items: start; }
.dir__text .roster__label { margin-bottom: 0; }
.team2__mgmt { margin-top: clamp(2.5rem, 5vw, 4rem); max-width: 44rem; }
@media (max-width: 960px) { .dirs { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .dir { grid-template-columns: 1fr; } .dir__photo { max-width: 12rem; } }

.contact__copy { grid-column: 1 / span 5; }
.contact__card { grid-column: 7 / span 6; }
.crow { display: grid; grid-template-columns: 2.75rem minmax(0, 1fr) auto; gap: 1rem; align-items: center; padding: 1.15rem 1.5rem; transition: background-color 0.4s var(--ease); }
.crow + .crow { border-top: 1px solid var(--line); }
.crow:hover { background: var(--accent-soft); }
.crow .fact__ico { background: var(--accent-soft); }
.crow__text small { display: block; color: var(--muted); font-size: 0.8125rem; }
.crow__text > span { font-weight: 500; font-size: 1.05rem; overflow-wrap: anywhere; }
.crow__go { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); transition: transform 0.5s var(--ease); }
.crow:hover .crow__go { transform: translate(2px, -1px) scale(1.06); }
@media (max-width: 860px) { .contact__copy, .contact__card { grid-column: 1 / -1; } }

.footer__brand { grid-column: 1 / span 4; }
.footer__col--a { grid-column: 5 / span 2; }
.footer__col--p { grid-column: 7 / span 3; display: grid; gap: 0.6rem; align-content: start; }
.footer__col--b { grid-column: 10 / span 3; }
@media (max-width: 860px) { .footer__brand, .footer__col--a, .footer__col--p, .footer__col--b { grid-column: 1 / -1; } }

.phero { position: relative; isolation: isolate; overflow: clip; padding: 7.5rem 0 clamp(3rem, 6vw, 5rem); }
.phero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(55% 60% at 95% 0%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%); }
.phero__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(1.5rem, 3vw, 3rem); align-items: center; }
.phero__copy { grid-column: 1 / span 6; display: grid; gap: 1.5rem; justify-items: start; }
.phero__visual { grid-column: 7 / span 6; }
.phero__img { width: 100%; height: auto; aspect-ratio: 16 / 11; object-fit: cover; }
.back { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.9rem; font-weight: 500; color: var(--ink-2); padding: 0.4rem 0.95rem 0.4rem 0.6rem; border-radius: 999px; border: 1px solid var(--line-strong); transition: background-color 0.4s var(--ease); }
.back:hover { background: var(--accent-soft); }
.pgs { margin-top: clamp(2rem, 4vw, 3rem); display: grid; }
.pg { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 1.5rem; padding-block: 1.75rem; align-items: start; }
.pg + .pg { border-top: 1px solid var(--line-strong); }
.pg__head p { color: var(--accent-ink); font-size: 0.875rem; font-weight: 600; margin-top: 0.25rem; }
.pg .chip { border-radius: 1.1rem; line-height: 1.4; }
.pnote { margin-top: 2rem; color: var(--muted); font-size: 0.9rem; }
.enq { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.enq__copy { grid-column: 1 / span 7; display: grid; gap: 1.5rem; justify-items: start; }
.enq__others { grid-column: 9 / span 4; display: grid; gap: 0.5rem; }
.olink { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 1.25rem; border: 1px solid var(--line-strong); border-radius: 999px; font-weight: 500; transition: background-color 0.4s var(--ease); }
.olink:hover { background: var(--accent-soft); }
@media (max-width: 900px) { .phero__copy, .phero__visual, .enq__copy, .enq__others { grid-column: 1 / -1; } .pg { grid-template-columns: 1fr; gap: 1rem; } }

/* partner logo sizing and address wrapping */
.ptab[data-p="acandis"] img { height: 5.4rem; }
.ptab[data-p="nfd"] img { height: 4.4rem; }
.crow__text > span { overflow-wrap: break-word; line-height: 1.5; }
@media (max-width: 860px) {
  .ptab[data-p="acandis"] img { height: 4.2rem; }
  .ptab[data-p="nfd"] img { height: 3.4rem; }
}
.ptab img { object-fit: contain; }
@media (max-width: 860px) { .ptab[data-p="nfd"] img { height: 2.8rem; } }

/* ---------- Products dropdown ---------- */
.dd { position: relative; display: flex; align-items: center; }
.nav__links .dd > a { padding-right: 0.55rem; }
.dd__btn { display: grid; place-items: center; width: 1.75rem; height: 1.75rem; margin-left: -0.45rem; border-radius: 50%; color: var(--ink-2); transition: background-color 0.4s var(--ease); }
.dd__btn:hover { background: var(--accent-soft); }
.dd__btn .icon { width: 1em; height: 1em; transition: rotate 0.5s var(--ease); }
.dd__btn[aria-expanded="true"] .icon, .dd:hover .dd__btn .icon { rotate: 180deg; }
.dd__menu { position: absolute; top: calc(100% + 12px); left: 50%; translate: -50% 8px; min-width: 20rem; padding: 0.5rem; border-radius: var(--r-tile); background: var(--bg); border: 1px solid var(--line-strong); box-shadow: var(--shadow); opacity: 0; visibility: hidden; transition: opacity 0.4s var(--ease), translate 0.5s var(--ease), visibility 0s linear 0.4s; }
.dd__menu::before { content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 14px; }
.dd.open .dd__menu, .dd:hover .dd__menu, .dd:focus-within .dd__menu { opacity: 1; visibility: visible; translate: -50% 0; transition: opacity 0.4s var(--ease), translate 0.5s var(--ease); }
.nav__links .dd__menu a { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 0.8rem 1rem; border-radius: 999px; font-size: 0.95rem; font-weight: 500; color: var(--ink); }
.nav__links .dd__menu a:hover { background: var(--accent-soft); }
.menu__sub { display: grid; gap: 0; padding: 0 0 0.5rem 1rem; opacity: 0; transform: translateY(1.5rem); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.menu.open .menu__sub { opacity: 1; transform: none; transition-delay: calc(120ms + var(--i) * 60ms); }
.menu__sub a { font-size: 1.2rem; font-weight: 500; color: var(--ink-2); padding-block: 0.3rem; }
.menu { overflow-y: auto; }
@media (max-height: 760px) { .menu { align-content: start; } }
