/* ============================================
   RhealSense, Stylesheet v3
   Modern health-tech: editorial + clinical
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;500;600;700;800&family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600&display=swap');

:root {
  /* Brand */
  --sovereign:   #52205E;        /* deep plum, primary */
  --plum-deep:   #2D0F37;
  --plum-soft:   #7B4A8A;
  --lavender:    #A878CC;        /* brand purple, secondary */
  --heather:     #D4B8E8;        /* soft accent */
  --cornflower:  #80B4E0;        /* blue accent */

  /* Surfaces */
  --white-lemon: #FDFDF5;        /* page background */
  --bloom-mist:  #F0E8F8;        /* card tint, mist */
  --sky-wash:    #D8EDF8;        /* tile tint */
  --paper:       #FFFFFF;
  --ink:         #1B0F22;
  --ink-soft:    #4A3E54;
  --ink-mute:    #847990;
  --line:        #ECE0F0;
  --line-soft:   #F4ECF5;

  /* Compatibility aliases (old names map to new) */
  --plum: var(--sovereign);
  --cream: var(--white-lemon);
  --cream-tint: var(--bloom-mist);
  --mist: var(--bloom-mist);
  --sky: var(--sky-wash);
  --lilac: var(--heather);
  --coral: var(--lavender);
  --sage: var(--cornflower);

  /* Type */
  --display: "Cormorant Garamond", "Times New Roman", serif;
  --sans:    "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* Radii */
  --r-sm: 6px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 28px;
  --r-pill: 999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(45, 15, 55, 0.04), 0 0 0 1px rgba(45, 15, 55, 0.04);
  --shadow-md: 0 4px 18px -6px rgba(45, 15, 55, 0.12), 0 0 0 1px rgba(45, 15, 55, 0.05);
  --shadow-lg: 0 24px 48px -16px rgba(45, 15, 55, 0.18), 0 0 0 1px rgba(45, 15, 55, 0.06);
}

/* ---------- BASE ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.55;
  font-weight: 400;
  font-feature-settings: "ss01", "ss02", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s, opacity 0.2s;
}

img { max-width: 100%; height: auto; display: block; }

svg { display: block; }

::selection { background: var(--plum); color: var(--cream); }

/* ---------- LAYOUT ---------- */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: 6.5rem 0;
}

.section-tight { padding: 4rem 0; }

.section-alt {
  background: var(--mist);
}

.section-dark {
  background: var(--plum-deep);
  color: var(--cream);
}

/* ---------- NAV ---------- */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(253, 253, 245, 0.78);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}
.site-nav.scrolled {
  border-bottom-color: var(--line);
  background: rgba(253, 253, 245, 0.92);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  gap: 2rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.nav-logo img {
  height: 38px;
  width: auto;
  object-fit: contain;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 0.25rem;
  align-items: center;
}

.nav-links a {
  display: inline-block;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-soft);
  letter-spacing: -0.005em;
  padding: 0.55rem 0.95rem;
  border-radius: var(--r-pill);
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover {
  color: var(--plum);
  background: rgba(82, 32, 94, 0.06);
}
.nav-links a.active {
  color: var(--plum);
  background: rgba(82, 32, 94, 0.08);
}

.nav-links a.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--plum);
  color: var(--cream);
  padding: 0.55rem 1.1rem;
  border-radius: var(--r-pill);
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.2s, transform 0.2s;
}
.nav-links a.nav-cta:hover,
.nav-links a.nav-cta.active {
  background: var(--plum-deep);
  color: var(--cream);
}
.nav-links a.nav-cta::after { display: none; }

/* Mobile menu */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  width: 40px;
  height: 40px;
}
.menu-toggle span {
  display: block;
  width: 22px;
  height: 1.8px;
  background: var(--plum);
  margin: 5px 0;
  transition: all 0.25s;
  border-radius: 2px;
}
.menu-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ---------- TYPE ---------- */
h1, h2, h3, h4 { font-weight: 600; letter-spacing: -0.02em; color: var(--ink); }

.display {
  font-family: var(--display);
  font-weight: 500;
  letter-spacing: -0.012em;
  line-height: 1.06;
}
.display em {
  font-style: italic;
  font-weight: 500;
  color: var(--sovereign);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--plum);
}
.eyebrow::before {
  content: '';
  display: block;
  width: 22px;
  height: 1px;
  background: var(--plum);
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.95rem 1.6rem;
  border-radius: var(--r-pill);
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
  letter-spacing: -0.005em;
  white-space: nowrap;
}

.btn-primary {
  background: var(--ink);
  color: var(--cream);
}
.btn-primary:hover {
  background: var(--plum-deep);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px -10px rgba(45, 15, 55, 0.5);
}

.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: rgba(45, 15, 55, 0.18);
}
.btn-outline:hover {
  background: var(--ink);
  color: var(--cream);
  border-color: var(--ink);
}

.btn-ghost {
  background: transparent;
  color: var(--plum);
  padding: 0.6rem 0.2rem;
}
.btn-ghost:hover { color: var(--plum-deep); gap: 0.7rem; }

.btn .arrow { transition: transform 0.2s; }
.btn:hover .arrow { transform: translateX(2px); }

/* ---------- HERO ---------- */
.hero {
  position: relative;
  padding: 9rem 0 5rem;
  overflow: hidden;
  background:
    radial-gradient(1100px 600px at 85% 10%, rgba(168, 120, 204, 0.22), transparent 60%),
    radial-gradient(800px 500px at 10% 90%, rgba(128, 180, 224, 0.18), transparent 60%),
    linear-gradient(180deg, var(--white-lemon) 0%, var(--bloom-mist) 100%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 5rem;
  align-items: center;
  position: relative;
  z-index: 2;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0.9rem 0.4rem 0.4rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ink-soft);
  margin-bottom: 1.75rem;
  box-shadow: var(--shadow-sm);
}
.hero-eyebrow .pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--plum);
  color: var(--cream);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: var(--r-pill);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.hero-eyebrow > span:last-child { white-space: nowrap; }
.hero-eyebrow .pill .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--heather);
  box-shadow: 0 0 0 3px rgba(212, 184, 232, 0.4);
  animation: pulse-dot 1.6s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 3px rgba(212, 184, 232, 0.4); }
  50%      { box-shadow: 0 0 0 5px rgba(212, 184, 232, 0.65); }
}

.hero h1.display {
  font-size: clamp(2.7rem, 5.6vw, 4.6rem);
  line-height: 1.05;
  margin-bottom: 1.75rem;
  color: var(--ink);
}

.hero-lede {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 540px;
  margin-bottom: 2.25rem;
  line-height: 1.65;
}

.hero-buttons {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--ink-mute);
}
.hero-meta .divider {
  width: 1px;
  height: 14px;
  background: var(--line);
}

/* Hero device mock */
.device-card {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 1.5rem;
  box-shadow: var(--shadow-lg);
  transform: rotate(0.5deg);
}
.device-card::after {
  content: '';
  position: absolute;
  inset: -22px;
  border-radius: calc(var(--r-xl) + 18px);
  border: 1px dashed rgba(82, 32, 94, 0.18);
  z-index: -1;
}

.device-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line-soft);
}
.device-head .patient {
  font-size: 0.78rem;
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.device-head .patient strong {
  display: block;
  color: var(--ink);
  font-size: 0.95rem;
  text-transform: none;
  letter-spacing: -0.005em;
  margin-top: 0.15rem;
  font-weight: 600;
}
.device-head .status,
.app-head .status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--sovereign);
  background: rgba(128, 180, 224, 0.22);
  padding: 0.28rem 0.6rem;
  border-radius: var(--r-pill);
  flex-shrink: 0;
}
.device-head .status .dot,
.app-head .status .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--cornflower);
  animation: pulse-dot-sage 1.8s ease-in-out infinite;
}
@keyframes pulse-dot-sage {
  0%, 100% { box-shadow: 0 0 0 2px rgba(128, 180, 224, 0.3); }
  50%      { box-shadow: 0 0 0 4px rgba(128, 180, 224, 0.55); }
}

.vital-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  margin-bottom: 1.2rem;
}
.vital {
  background: var(--cream);
  border-radius: var(--r-md);
  padding: 0.9rem 1rem;
  border: 1px solid var(--line-soft);
}
.vital .label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-mute);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.vital .value {
  font-family: var(--display);
  font-size: 2.2rem;
  line-height: 1;
  color: var(--ink);
  margin-top: 0.35rem;
}
.vital .unit {
  font-family: var(--sans);
  font-size: 0.85rem;
  color: var(--ink-mute);
  font-weight: 500;
  margin-left: 0.2rem;
}
.vital.coral .value { color: var(--sovereign); }

.ecg-wrap {
  background: var(--ink);
  border-radius: var(--r-md);
  padding: 1rem 1.1rem;
  position: relative;
  overflow: hidden;
}
.ecg-wrap .ecg-label {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.55);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.4rem;
}
.ecg-svg {
  width: 100%;
  height: 60px;
  display: block;
}
.ecg-svg path {
  stroke: var(--heather);
  stroke-width: 1.6;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 6px rgba(212, 184, 232, 0.5));
  stroke-dasharray: 1200;
  animation: ecg-draw 3s linear infinite;
}
@keyframes ecg-draw {
  0%   { stroke-dashoffset: 1200; }
  100% { stroke-dashoffset: 0; }
}

/* Floating tag near device */
.device-tag {
  position: absolute;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 0.45rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  box-shadow: var(--shadow-md);
}
.device-tag.tl { top: -16px; left: -28px; transform: rotate(-3deg); }
.device-tag.br { bottom: -20px; right: -10px; transform: rotate(2deg); }
.device-tag .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--sovereign); }

/* ---------- HERO PHONE MOCK ---------- */
.phone-mock {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 1.5rem 0;
}

.phone-frame {
  position: relative;
  width: 320px;
  background: linear-gradient(155deg, #1a0d24 0%, #0a0510 100%);
  border-radius: 50px;
  padding: 8px;
  box-shadow:
    0 40px 80px -28px rgba(45, 15, 55, 0.45),
    0 0 0 1.5px #2a1a36,
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transform: rotate(-1.2deg);
}

.phone-screen {
  position: relative;
  background: var(--white-lemon);
  border-radius: 44px;
  overflow: hidden;
  aspect-ratio: 9 / 17;
  display: flex;
  flex-direction: column;
}

.phone-island {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 96px;
  height: 26px;
  background: #0a0510;
  border-radius: 14px;
  z-index: 10;
}

.phone-statusbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px 0;
  height: 46px;
  flex-shrink: 0;
  position: relative;
  z-index: 5;
}
.phone-statusbar .time {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.phone-statusbar .status-icons {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--ink);
}

.phone-app {
  flex: 1;
  padding: 1.25rem 1rem 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  overflow: hidden;
}

.app-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  padding-top: 0.4rem;
}
.app-brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--sovereign), var(--lavender));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white-lemon);
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
}
.app-title {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.2rem;
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.app-subtitle {
  font-size: 0.62rem;
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 0.15rem;
  font-weight: 600;
}

/* Override vital sizing inside phone */
.phone-app .vital-row { margin-bottom: 0; gap: 0.55rem; }
.phone-app .vital { padding: 0.7rem 0.8rem; }
.phone-app .vital .label { font-size: 0.62rem; }
.phone-app .vital .value { font-size: 1.6rem; margin-top: 0.25rem; }
.phone-app .vital .unit { font-size: 0.7rem; }

.phone-app .ecg-wrap { padding: 0.7rem 0.85rem; border-radius: 14px; }
.phone-app .ecg-svg { height: 46px; }
.phone-app .ecg-label { font-size: 0.62rem; margin-bottom: 0.3rem; }

.app-footer-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  margin-top: auto;
}
.footer-meta-cell {
  background: var(--bloom-mist);
  border-radius: 12px;
  padding: 0.7rem 0.85rem;
}
.meta-label {
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  color: var(--ink-mute);
  margin-bottom: 0.2rem;
}
.meta-value {
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 500;
  color: var(--ink);
}
.meta-value.ok { color: var(--sovereign); }

.phone-home {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 110px;
  height: 4px;
  background: rgba(27, 15, 34, 0.32);
  border-radius: 2px;
  z-index: 10;
}

/* Floating tags around the phone */
.phone-mock .device-tag { position: absolute; z-index: 20; }
.phone-mock .device-tag.tl { top: 24px; left: -32px; transform: rotate(-4deg); bottom: auto; right: auto; }
.phone-mock .device-tag.br { bottom: 36px; right: -38px; transform: rotate(3deg); top: auto; left: auto; }

@media (max-width: 860px) {
  .phone-mock .device-tag.tl { left: -10px; top: 8px; }
  .phone-mock .device-tag.br { right: -10px; bottom: 16px; }
  .phone-frame { transform: none; }
}

/* ---------- STAT STRIP ---------- */
.stat-strip {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.stat-strip-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.stat-cell {
  padding: 2.5rem 1.5rem;
  text-align: left;
  border-right: 1px solid var(--line);
  position: relative;
}
.stat-cell:last-child { border-right: none; }
.stat-cell .stat-num {
  font-family: var(--display);
  font-size: 3.5rem;
  line-height: 1;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.stat-cell .stat-num em {
  color: var(--plum);
  font-style: italic;
}
.stat-cell .stat-label {
  font-size: 0.85rem;
  color: var(--ink-mute);
  margin-top: 0.75rem;
  max-width: 220px;
  line-height: 1.45;
}
.stat-cell .stat-source {
  font-size: 0.72rem;
  color: var(--ink-mute);
  opacity: 0.7;
  margin-top: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ---------- SECTION HEADER ---------- */
.section-header {
  max-width: 720px;
  margin-bottom: 4rem;
}
.section-header.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
.section-header .eyebrow { margin-bottom: 1.25rem; }
.section-header.center .eyebrow { justify-content: center; }
.section-header h2 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2.2rem, 4.4vw, 3.2rem);
  letter-spacing: -0.012em;
  line-height: 1.06;
  margin-bottom: 1rem;
}
.section-header h2 em {
  font-style: italic;
  color: var(--plum);
}
.section-header p {
  font-size: 1.1rem;
  color: var(--ink-soft);
  line-height: 1.6;
  max-width: 640px;
}
.section-header.center p { margin: 0 auto; }
.section-dark .section-header h2 { color: var(--cream); }
.section-dark .section-header p { color: rgba(255, 255, 255, 0.7); }
.section-dark .eyebrow { color: var(--lilac); }
.section-dark .eyebrow::before { background: var(--lilac); }

/* ---------- PAGE HEADER ---------- */
.page-header {
  padding: 10rem 0 4.5rem;
  background:
    radial-gradient(700px 360px at 50% 0%, rgba(212, 184, 232, 0.4), transparent 70%),
    var(--white-lemon);
  text-align: center;
  border-bottom: 1px solid var(--line);
}
.page-header .eyebrow { margin-bottom: 1.25rem; justify-content: center; }
.page-header h1 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2.6rem, 5.2vw, 4.2rem);
  letter-spacing: -0.015em;
  line-height: 1.05;
  margin-bottom: 1rem;
  color: var(--ink);
}
.page-header h1 em { font-style: italic; color: var(--plum); }
.page-header p {
  max-width: 600px;
  margin: 0 auto;
  font-size: 1.1rem;
  color: var(--ink-soft);
  line-height: 1.6;
}

/* ---------- FEATURE GRID ---------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.feature-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 2rem;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--heather);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--mist);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--plum);
  margin-bottom: 1.25rem;
}

.feature-card h3 {
  font-size: 1.15rem;
  color: var(--ink);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 0.2rem;
}

.feature-card p {
  font-size: 0.95rem;
  color: var(--ink-soft);
  line-height: 1.6;
}

.feature-num {
  position: absolute;
  top: 1.5rem;
  right: 1.75rem;
  font-family: var(--display);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--ink-mute);
  opacity: 0.55;
}

/* ---------- ABOUT / SPLIT ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
}
.split.reverse > :first-child { order: 2; }

.split-text h3 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.9rem;
  color: var(--ink);
  letter-spacing: -0.012em;
  line-height: 1.12;
  margin-bottom: 1.25rem;
}
.split-text h3 em { font-style: italic; color: var(--plum); }
.split-text p {
  font-size: 1rem;
  color: var(--ink-soft);
  margin-bottom: 1rem;
  line-height: 1.7;
}
.split-text p:last-child { margin-bottom: 0; }

.split-visual {
  background: linear-gradient(155deg, var(--mist) 0%, var(--sky) 100%);
  border-radius: var(--r-xl);
  padding: 2.5rem;
  border: 1px solid var(--line);
  min-height: 360px;
  position: relative;
  overflow: hidden;
}

/* Patch illustration */
.patch-illo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

/* ---------- TECH SPECS ---------- */
.tech-specs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 3rem;
}

.spec-item {
  background: var(--paper);
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  padding: 1.5rem 1.25rem;
  transition: border-color 0.2s;
}
.spec-item:hover { border-color: var(--heather); }
.spec-item .spec-icon {
  width: 28px;
  height: 28px;
  color: var(--plum);
  margin-bottom: 1rem;
}
.spec-item .spec-value {
  font-family: var(--display);
  font-size: 1.4rem;
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.spec-item .spec-label {
  font-size: 0.82rem;
  color: var(--ink-mute);
  margin-top: 0.35rem;
}

/* ---------- APPROACH STEPS ---------- */
.approach-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  counter-reset: step;
}

.approach-step {
  padding: 1.75rem;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
}
.approach-step:last-child { border-right: none; }

.approach-num {
  font-family: var(--display);
  font-style: italic;
  font-size: 2.5rem;
  color: var(--lilac);
  line-height: 1;
  margin-bottom: 1.5rem;
}

.approach-step h4 {
  font-size: 1.05rem;
  color: var(--cream);
  font-weight: 600;
  margin-bottom: 0.5rem;
  letter-spacing: -0.005em;
}

.approach-step p {
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.6;
}

/* ---------- TEAM ---------- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.team-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 2rem;
  transition: transform 0.25s, box-shadow 0.25s;
}
.team-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.team-photo {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--r-md);
  background: linear-gradient(155deg, var(--mist), var(--sky));
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--plum);
  overflow: hidden;
  position: relative;
}
.team-photo::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 40%, transparent 40%, rgba(82, 32, 94, 0.06) 100%);
}

.team-card h3 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.7rem;
  color: var(--ink);
  letter-spacing: -0.012em;
  margin-bottom: 0.2rem;
}

.team-card .role {
  font-size: 0.85rem;
  color: var(--plum);
  font-weight: 600;
  margin-bottom: 0.85rem;
  letter-spacing: 0.005em;
}

.team-card p {
  font-size: 0.92rem;
  color: var(--ink-soft);
  line-height: 1.65;
}

/* ---------- ARTICLES ---------- */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.article-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s;
  display: block;
  text-decoration: none;
  color: inherit;
}
.article-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.article-thumb {
  aspect-ratio: 16 / 9;
  background: linear-gradient(140deg, var(--mist), var(--sky));
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--plum);
}
.article-thumb svg {
  opacity: 0.5;
  width: 80px;
  height: 80px;
}

.article-card .card-body {
  padding: 1.75rem;
}

.article-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.3rem 0.7rem;
  border-radius: var(--r-pill);
  margin-bottom: 1rem;
}
.article-tag::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.tag-article { background: rgba(82, 32, 94, 0.08); color: var(--plum); }
.tag-news    { background: rgba(128, 180, 224, 0.22); color: #2C6494; }

.article-card h3 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.55rem;
  color: var(--ink);
  margin-bottom: 0.6rem;
  letter-spacing: -0.012em;
  line-height: 1.2;
}

.article-card .date {
  font-size: 0.82rem;
  color: var(--ink-mute);
  margin-bottom: 0.85rem;
}

.article-card p {
  font-size: 0.95rem;
  color: var(--ink-soft);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.article-card .read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--plum);
  transition: gap 0.2s;
}
.article-card:hover .read-more { gap: 0.6rem; }

/* Single article */
.article-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 2rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.88rem;
  color: var(--ink-mute);
  margin-bottom: 2rem;
  font-weight: 500;
  transition: color 0.2s, gap 0.2s;
}
.back-link:hover { color: var(--plum); gap: 0.55rem; }

.article-page h1 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2.4rem, 4.2vw, 3.2rem);
  color: var(--ink);
  letter-spacing: -0.012em;
  line-height: 1.1;
  margin: 1rem 0 1.25rem;
}

.article-meta {
  color: var(--ink-mute);
  font-size: 0.9rem;
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--line);
}

.article-body {
  font-size: 1.05rem;
  color: var(--ink);
  line-height: 1.75;
}

.article-body h2 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.9rem;
  color: var(--ink);
  letter-spacing: -0.012em;
  margin: 2.5rem 0 0.75rem;
}

.article-body h3 {
  font-size: 1.2rem;
  color: var(--ink);
  margin: 2rem 0 0.5rem;
}

.article-body p {
  margin-bottom: 1.25rem;
  color: var(--ink-soft);
}

.article-body ul, .article-body ol {
  margin: 0 0 1.25rem 1.5rem;
  color: var(--ink-soft);
}
.article-body li { margin-bottom: 0.35rem; }

.article-body blockquote {
  border-left: 2px solid var(--sovereign);
  margin: 2rem 0;
  padding: 0.25rem 0 0.25rem 1.5rem;
  font-family: var(--display);
  font-style: italic;
  font-size: 1.55rem;
  color: var(--ink);
  line-height: 1.35;
}

.article-body code {
  background: var(--mist);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-size: 0.88em;
  font-family: ui-monospace, monospace;
  color: var(--plum);
}

.article-body img {
  border-radius: var(--r-md);
  margin: 2rem 0;
}

/* ---------- CONTACT ---------- */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.contact-info h3 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.9rem;
  color: var(--ink);
  letter-spacing: -0.012em;
  margin-bottom: 1rem;
}
.contact-info h3 em { font-style: italic; color: var(--plum); }

.contact-info > p {
  color: var(--ink-soft);
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

.contact-detail {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--line);
}
.contact-detail:last-child { border-bottom: 1px solid var(--line); }

.contact-detail .icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--mist);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--plum);
  flex-shrink: 0;
}

.contact-detail .detail-text {
  flex: 1;
}
.contact-detail .detail-text span {
  display: block;
  font-size: 0.78rem;
  color: var(--ink-mute);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.2rem;
}
.contact-detail .detail-text strong {
  font-size: 1rem;
  color: var(--ink);
  font-weight: 500;
  letter-spacing: -0.005em;
}

/* Contact card */
.contact-card {
  background: var(--ink);
  color: var(--cream);
  border-radius: var(--r-xl);
  padding: 3rem 2.5rem;
  text-align: left;
  position: relative;
  overflow: hidden;
}
.contact-card::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -30%;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 163, 214, 0.2), transparent 70%);
}

.contact-card .contact-cta-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: rgba(201, 163, 214, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: var(--lilac);
  position: relative;
}

.contact-card h3 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 2.2rem;
  color: var(--white-lemon);
  margin-bottom: 0.75rem;
  letter-spacing: -0.012em;
  line-height: 1.12;
  position: relative;
}
.contact-card h3 em { font-style: italic; color: var(--lilac); }

.contact-card > p {
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 2rem;
  font-size: 0.98rem;
  line-height: 1.6;
  position: relative;
}

.contact-card .email-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--cream);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  padding: 0.9rem 1.4rem;
  border-radius: var(--r-pill);
  transition: background 0.2s;
  position: relative;
}
.contact-card .email-link:hover {
  background: rgba(255, 255, 255, 0.14);
}

/* ---------- CTA BANNER ---------- */
.cta-banner {
  background: var(--ink);
  color: var(--cream);
  border-radius: var(--r-xl);
  padding: 4rem 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(600px 300px at 20% 50%, rgba(168, 120, 204, 0.18), transparent 60%),
    radial-gradient(500px 250px at 90% 100%, rgba(128, 180, 224, 0.14), transparent 60%);
}
.cta-banner > * { position: relative; }
.cta-banner h2 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(2.2rem, 3.8vw, 3rem);
  letter-spacing: -0.012em;
  line-height: 1.08;
  margin-bottom: 1rem;
  color: var(--white-lemon);
}
.cta-banner h2 em { font-style: italic; color: var(--lilac); }
.cta-banner p {
  color: rgba(255, 255, 255, 0.7);
  max-width: 540px;
  margin: 0 auto 2rem;
  font-size: 1.05rem;
  line-height: 1.6;
}
.cta-banner .btn-primary {
  background: var(--cream);
  color: var(--ink);
}
.cta-banner .btn-primary:hover {
  background: var(--paper);
}

/* ---------- FOOTER ---------- */
.site-footer {
  background: var(--plum-deep);
  color: rgba(255, 255, 255, 0.7);
  padding: 5rem 0 2rem;
  margin-top: 0;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 4rem;
}

.footer-brand img {
  height: 30px;
  width: auto;
  margin-bottom: 1.25rem;
  filter: brightness(0) invert(1);
  opacity: 0.95;
}
.footer-brand p {
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.55);
  max-width: 280px;
  line-height: 1.6;
}

.footer-links h4 {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--cream);
  margin-bottom: 1.25rem;
}

.footer-links ul {
  list-style: none;
}
.footer-links li { margin-bottom: 0.65rem; }
.footer-links a {
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.6);
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--cream); }

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.75rem 2rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.4);
}
.footer-bottom .footer-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.footer-bottom .footer-meta .dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--heather);
  box-shadow: 0 0 0 2px rgba(212, 184, 232, 0.35);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 3.5rem; }
  .stat-strip-inner { grid-template-columns: repeat(2, 1fr); }
  .stat-cell:nth-child(2) { border-right: none; }
  .stat-cell:nth-child(1), .stat-cell:nth-child(2) { border-bottom: 1px solid var(--line); }
  .features-grid { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; gap: 2.5rem; }
  .split.reverse > :first-child { order: 0; }
  .tech-specs { grid-template-columns: repeat(2, 1fr); }
  .approach-list { grid-template-columns: 1fr 1fr; }
  .approach-step { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.08); }
  .approach-step:nth-child(odd) { border-right: 1px solid rgba(255,255,255,0.08); }
  .team-grid { grid-template-columns: 1fr 1fr; }
  .articles-grid { grid-template-columns: 1fr; }
  .contact-layout { grid-template-columns: 1fr; gap: 2.5rem; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

@media (max-width: 640px) {
  .container { padding: 0 1.25rem; }
  .section { padding: 4.5rem 0; }
  .nav-inner { padding: 0 1.25rem; height: 64px; }
  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--cream);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    gap: 0;
    padding: 1rem;
    box-shadow: var(--shadow-md);
  }
  .nav-links.open { display: flex; }
  .nav-links a { width: 100%; padding: 0.85rem 1rem; border-radius: var(--r-md); }
  .nav-cta { width: 100%; justify-content: center; }
  .menu-toggle { display: block; }

  .hero { padding: 7rem 0 4rem; }
  .stat-strip-inner { grid-template-columns: 1fr; }
  .stat-cell { border-right: none; border-bottom: 1px solid var(--line); }
  .stat-cell:last-child { border-bottom: none; }
  .stat-cell .stat-num { font-size: 2.8rem; }
  .team-grid { grid-template-columns: 1fr; }
  .tech-specs { grid-template-columns: 1fr; }
  .approach-list { grid-template-columns: 1fr; }
  .approach-step { border-right: none !important; }
  .footer-inner { grid-template-columns: 1fr; gap: 2.5rem; margin-bottom: 2.5rem; }
  .device-tag.tl { left: 0; top: -10px; }
  .device-tag.br { right: 0; bottom: -10px; }
}
