/* =================================================================
   Orris Health — Marketing UI kit
   Numbers-led, calm, clinical. One page: Nav · Hero · KPI · Trio · Quote · CTA · Footer.
   ================================================================= */

html, body { background: var(--neutral-0); color: var(--fg-1); }

/* ===== Nav ===== */
.mk-nav {
  position: fixed; top: 0; left: 32px; right: 32px; z-index: 50;
  background: rgba(255, 255, 255, 0.62);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-bottom-left-radius: 14px;
  border-bottom-right-radius: 14px;
  transition: transform 280ms var(--ease-out), box-shadow 220ms var(--ease-out), background 220ms var(--ease-out);
  will-change: transform;
}
/* Slightly more opaque once content scrolls under it for readability */
.mk-nav.elevated { background: rgba(255, 255, 255, 0.78); }
.mk-nav.elevated { box-shadow: 0 4px 20px -8px rgba(6, 46, 28, 0.12); }
.mk-nav.hidden { transform: translateY(-100%); }
/* Push the page so the fixed nav doesn't cover the hero */
body { padding-top: 64px; }
.mk-nav-inner { max-width: var(--container-max); margin: 0 auto; display: flex; align-items: center; gap: 28px; padding: 16px 28px; }
.mk-brand { display: flex; align-items: center; gap: 8px; }
.mk-brand-logo { height: 32px; width: auto; display: block; }
.mk-links { display: flex; gap: 22px; flex: 1; }
.mk-links a { font-size: 14px; color: var(--fg-2); font-weight: 500; }
.mk-links a:hover { color: var(--fg-1); text-decoration: none; }
.mk-nav-cta { display: flex; gap: 10px; align-items: center; }
.mk-signin { font-size: 14px; color: var(--fg-2); font-weight: 500; padding: 8px 6px; }
.mk-signin:hover { color: var(--fg-1); text-decoration: none; }

/* Lang toggle (kept from prior version) */
.lang-toggle { display: inline-flex; gap: 0; border: 1px solid var(--neutral-200); border-radius: 999px; padding: 2px; background: var(--neutral-0); }
.lang-toggle button { font: 600 11px/1 var(--font-mono); letter-spacing: 0.04em; padding: 6px 9px; background: transparent; border: 0; color: var(--fg-3); border-radius: 999px; cursor: pointer; }
.lang-toggle button.on { background: var(--brand-forest-900); color: var(--neutral-0); }

/* ===== Buttons (marketing-flat) ===== */
.btn { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-body); font-weight: 600; border-radius: 6px; cursor: pointer; border: none; outline: none; text-decoration: none; transition: background 160ms var(--ease-out), color 160ms var(--ease-out); letter-spacing: -0.005em; }
.btn.primary { background: var(--brand-spring-600); color: #fff; padding: 10px 16px; font-size: 14px; }
.btn.primary:hover { background: var(--brand-spring-700); color: #fff; text-decoration: none; }
.btn.primary:active { background: var(--brand-forest-700); }
.btn.primary:focus, .btn.primary:focus-visible { outline: none; box-shadow: none; }
.btn.ghost { background: transparent; color: var(--brand-forest-900); padding: 13px 18px; font-size: 14px; }
.btn.ghost:hover { color: var(--brand-spring-700); background: transparent; text-decoration: none; }

/* ===== Container ===== */
.section { max-width: var(--container-max); margin: 0 auto; padding: 96px 28px; }
.section.tight { padding: 64px 28px; }

/* ===== Hero ===== */
/* Outer "frame" — white margin around the dark hero card, à la Swappy */
.hero-frame {
  background: var(--neutral-0);
  padding: 14px 32px;
}
.hero {
  background: var(--brand-forest-900);
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-radius: 28px;
  /* Full-viewport height — accounts for nav (64px) + frame paddings (14px × 2) */
  min-height: calc(100vh - 92px);
  display: flex;
  align-items: center;
}
.hero > .section { width: 100%; padding-top: 32px; padding-bottom: 32px; }
/* SVG fractal-noise grain — subtle texture so the dark surface doesn't read flat */
.hero::before {
  content: '';
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix type='saturate' values='0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.55'/></svg>");
  opacity: 0.18;
  mix-blend-mode: overlay;
  pointer-events: none;
  z-index: 0;
}
/* Soft top-center spring glow to add depth */
.hero::after {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(80% 60% at 50% -10%, rgba(50, 213, 131, 0.08) 0%, transparent 55%),
    radial-gradient(40% 40% at 90% 0%, rgba(18, 183, 106, 0.06) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}
.hero > .section { position: relative; z-index: 1; }

/* Concentrated white-speck grain in the bottom-left corner.
   feColorMatrix forces RGB to white and amplifies alpha so only the brightest
   noise pixels survive — produces sparse, starry dust. Masked with a radial
   gradient anchored bottom-left so the effect fades into the dark surface. */
.hero-specks {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='s' x='0%25' y='0%25' width='100%25' height='100%25'><feTurbulence type='fractalNoise' baseFrequency='1.7' numOctaves='2' seed='4' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  1.9 0 0 0 -0.55'/></filter><rect width='100%25' height='100%25' filter='url(%23s)'/></svg>");
  background-size: 240px 240px;
  -webkit-mask-image: radial-gradient(ellipse 50% 70% at -10% 115%, #000 0%, rgba(0,0,0,0.65) 35%, transparent 75%);
          mask-image: radial-gradient(ellipse 50% 70% at -10% 115%, #000 0%, rgba(0,0,0,0.65) 35%, transparent 75%);
  opacity: 0.7;
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: 0;
}

.hero-grid { display: flex; gap: 64px; align-items: center; }
.hero-grid > .hero-text { flex: 1.1 1 0; min-width: 0; }
.hero-grid > .hero-cal { flex: 1 1 0; min-width: 0; }

.eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: 0.12em; font-weight: 600; color: var(--brand-spring-700); display: inline-flex; align-items: center; gap: 8px; }
.eyebrow .d { width: 6px; height: 6px; border-radius: 999px; background: var(--brand-spring-500); }

/* Hero text — flipped for dark forest background. Sizes scale with viewport. */
.hero .eyebrow {
  color: var(--brand-spring-400);
  font-size: clamp(11px, 0.85vw, 13px);
}
.hero .eyebrow .d {
  position: relative;
  background: var(--brand-spring-400);
  box-shadow: 0 0 12px rgba(50, 213, 131, 0.6);
}
/* Two staggered "live" rings propagating outward — radar feel */
.hero .eyebrow .d::before,
.hero .eyebrow .d::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--brand-spring-400);
  pointer-events: none;
  animation: live-ping 2.4s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}
.hero .eyebrow .d::after { animation-delay: 1.2s; }

@keyframes live-ping {
  0%   { transform: scale(1);   opacity: 0.65; }
  70%  { transform: scale(4);   opacity: 0; }
  100% { transform: scale(4);   opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .hero .eyebrow .d::before,
  .hero .eyebrow .d::after { animation: none; display: none; }
}
.hero h1 {
  font-size: clamp(36px, 4.6vw, 64px);
  line-height: 1.05; letter-spacing: -0.025em; color: #fff;
  margin: 0.4em 0 0.35em; font-weight: 800;
}
.hero h1 em { font-style: normal; color: var(--brand-spring-400); }
.hero p.lede {
  font-size: clamp(15px, 1.3vw, 19px);
  line-height: 1.55; color: rgba(255, 255, 255, 0.72); max-width: 32em;
}
.hero .ctas { display: flex; gap: 12px; margin-top: clamp(20px, 2.4vw, 32px); align-items: center; flex-wrap: wrap; }
.hero .ctas .btn.primary { padding: 0.9em 1.5em; font-size: clamp(14px, 1.1vw, 16px); background: var(--brand-spring-500); color: var(--brand-forest-900); }
.hero .ctas .btn.primary:hover { background: var(--brand-spring-400); color: var(--brand-forest-900); }
.hero .ctas .btn.ghost { color: #fff; font-size: clamp(13px, 1vw, 15px); }
.hero .ctas .btn.ghost:hover { color: var(--brand-spring-300); background: transparent; }
.hero .trust {
  margin-top: clamp(24px, 3vw, 40px);
  font-family: var(--font-mono);
  font-size: clamp(10px, 0.8vw, 12px);
  color: rgba(255, 255, 255, 0.55);
  display: flex; gap: 18px; flex-wrap: wrap;
}
.hero .trust b { color: rgba(255, 255, 255, 0.85); }

/* Hero visual: an animated "block schedule auto-filling" mockup */
.hero-cal {
  background: var(--brand-forest-800); border-radius: var(--r-2xl);
  padding: 22px; color: white;
  position: relative; overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow:
    0 30px 60px -20px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(50, 213, 131, 0.04) inset;
}
.hero-cal::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(120% 80% at 100% 0%, rgba(50, 213, 131, 0.20) 0%, rgba(50, 213, 131, 0) 60%);
  pointer-events: none;
}
.cal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; position: relative; }
.cal-title { font-family: var(--font-mono); font-size: clamp(10px, 0.85vw, 12px); color: rgba(255,255,255,0.6); }
.cal-pill {
  background: var(--brand-spring-500); color: var(--brand-forest-900);
  padding: 4px 10px; border-radius: 999px;
  font-size: clamp(10px, 0.85vw, 12px); font-weight: 700;
  display: inline-flex; align-items: center; gap: 6px;
  flex: 0 0 auto;
}
.cal-pill .d {
  width: 6px; height: 6px; border-radius: 999px;
  background: var(--brand-forest-900);
  animation: cal-pulse 1.6s var(--ease-out) infinite;
}
@keyframes cal-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.7); }
}

.cal-grid {
  display: flex; flex-direction: column; gap: 4px;
  margin-top: 18px; position: relative;
  font-family: var(--font-mono); font-size: 10px;
}
.cal-head-row, .cal-row { display: flex; gap: 4px; align-items: center; }
.cal-head-row .spacer, .cal-row .hr { flex: 0 0 50px; padding-right: 8px; text-align: right; }
.cal-row .hr { color: rgba(255,255,255,0.32); font-weight: 500; }
.cal-head-row .hd {
  flex: 1 1 0; text-align: center;
  font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase;
  color: rgba(255,255,255,0.45); padding: 4px 0;
}
.cal-cell {
  flex: 1 1 0; height: 26px; border-radius: 4px;
  position: relative;
}
.cal-cell.empty {
  background: rgba(255,255,255,0.025);
  /* Outline instead of border so the cell's effective size matches filled cells (no layout shift). */
  outline: 1px dashed rgba(255,255,255,0.10);
  outline-offset: -1px;
}
.cal-cell.filled {
  background: var(--brand-spring-500);
  animation: cal-pop 420ms var(--ease-out) backwards;
}
.cal-cell.filled.late { background: var(--warning-500); }
.cal-cell.filled.amb {
  background: var(--brand-spring-400); opacity: 0.85;
}
.cal-cell.gap {
  background:
    repeating-linear-gradient(135deg, rgba(240, 68, 56, 0.22) 0 6px, transparent 6px 12px),
    rgba(240, 68, 56, 0.06);
  outline: 1px solid rgba(240, 68, 56, 0.4);
  outline-offset: -1px;
  animation: cal-pop 420ms var(--ease-out) backwards;
}
@keyframes cal-pop {
  from { transform: scaleY(0); transform-origin: bottom; opacity: 0; }
  to   { transform: scaleY(1); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .cal-cell.filled, .cal-cell.gap { animation: none; }
  .cal-pill .d { animation: none; }
}

.cal-foot {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  margin-top: 18px; padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.07);
  font-family: var(--font-mono); font-size: 11px;
  color: rgba(255,255,255,0.5);
  opacity: 0;
  animation: cal-foot-in 600ms var(--ease-out) 1500ms forwards;
}
.cal-foot b { color: var(--brand-spring-400); font-weight: 700; }
@keyframes cal-foot-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== KPI band ===== */
/* Light cream surface — breaks the "dark hero → dark KPI" sequence */
.kpi-band { background: var(--neutral-0); color: var(--brand-forest-900); border-bottom: 1px solid var(--neutral-100); }
.kpi-band .section { padding-top: 64px; padding-bottom: 64px; }
.kpi-band-grid { display: flex; flex-wrap: wrap; gap: 32px; }
.kpi-band-grid > .kpi-stat { flex: 1 1 calc(25% - 24px); min-width: 0; }
.kpi-stat { display: flex; flex-direction: column; gap: 8px; padding: 0 8px 0 18px; border-left: 2px solid var(--brand-spring-500); }
.kpi-stat .num { font-family: var(--font-display); font-weight: 800; font-size: 48px; line-height: 1; color: var(--brand-forest-900); letter-spacing: -0.022em; font-variant-numeric: tabular-nums; }
.kpi-stat .lbl { font-size: 13px; line-height: 1.5; color: var(--fg-3); max-width: 200px; }

/* ===== Features ===== */
.feat-h { text-align: center; max-width: 720px; margin: 0 auto 48px; }
.feat-h .eyebrow { justify-content: center; display: inline-flex; }
.feat-h h2 { font-size: 40px; line-height: 1.15; letter-spacing: -0.022em; margin: 14px 0 12px; color: var(--brand-forest-900); }
.feat-h p { font-size: 17px; line-height: 1.55; color: var(--fg-2); }
.feat-grid { display: flex; flex-wrap: wrap; gap: 20px; }
.feat-grid > .feat-card { flex: 1 1 calc(33.333% - 14px); min-width: 0; }

/* Dark forest cards with per-card pattern + grain — Swappy-style */
.feat-card {
  position: relative; isolation: isolate;
  background: var(--brand-forest-900);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  padding: 28px;
  display: flex; flex-direction: column; gap: 14px;
  color: #fff; overflow: hidden;
  min-height: 320px;
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
.feat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 50px -16px rgba(0, 0, 0, 0.4);
}

/* No CSS grain on cards anymore — the Swappy webp images carry their own grain */
.feat-card::before { display: none; }

/* Per-card pattern: real Swappy-derived images, hue-rotated to spring green */
.feat-card .feat-pattern {
  position: absolute; inset: 0;
  z-index: 0; pointer-events: none; overflow: hidden;
  border-radius: inherit;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center bottom;
}
.feat-card .feat-pattern::after {
  content: ''; position: absolute; inset: 0;
  pointer-events: none; z-index: 1;
}
.feat-pattern .sh {
  position: absolute; display: block;
  border-radius: 6px;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  z-index: 2;
}

/* === V1 — frame backdrop + 2 pillars (rect-66) === */
.feat-card.v1 .feat-pattern {
  background-image: url('assets/swappy/frame.webp');
  background-position: center 70%;
}
.feat-card.v1 .feat-pattern::after {
  background: radial-gradient(ellipse 90% 80% at 100% 110%, rgba(50, 213, 131, 0.18) 0%, transparent 55%);
}
.feat-card.v1 .sh {
  bottom: 0;
  background-image: url('assets/swappy/rect-66.webp');
  background-position: center bottom;
  border-radius: 6px 6px 0 0;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    -8px 0 22px -8px rgba(0, 0, 0, 0.45);
}
.feat-card.v1 .sh:nth-child(1) { left: 14%; width: 16%; height: 56%; }
.feat-card.v1 .sh:nth-child(2) { left: 36%; width: 16%; height: 78%; }
.feat-card.v1 .sh:nth-child(3) { display: none; }

/* === V2 — avantage backdrop + 2 horizontal shelves (shelf-01) === */
.feat-card.v2 .feat-pattern {
  background-image: url('assets/swappy/avantage.webp');
  background-position: center bottom;
}
.feat-card.v2 .feat-pattern::after {
  background: radial-gradient(ellipse 90% 70% at -10% 115%, rgba(50, 213, 131, 0.18) 0%, transparent 55%);
}
.feat-card.v2 .sh {
  left: 0; right: 0;
  background-image: url('assets/swappy/shelf-01.webp');
  background-size: cover;
  background-position: center;
  border-radius: 0;
  box-shadow: 0 -8px 18px -8px rgba(0, 0, 0, 0.4);
}
.feat-card.v2 .sh:nth-child(1) { bottom: 22%; height: 18%; }
.feat-card.v2 .sh:nth-child(2) { bottom: 0;   height: 18%; opacity: 0.85; }
.feat-card.v2 .sh:nth-child(3) { display: none; }

/* === V3 — staggered blocks composite (single image carries all shapes) === */
.feat-card.v3 .feat-pattern {
  background-image: url('assets/swappy/blocks.webp');
  background-position: center 60%;
  background-size: 115% auto;
}
.feat-card.v3 .feat-pattern::after {
  background: radial-gradient(ellipse 110% 80% at 50% 115%, rgba(50, 213, 131, 0.12) 0%, transparent 55%);
}
.feat-card.v3 .sh { display: none; }

.feat-card > h3,
.feat-card > p,
.feat-card > .meta { position: relative; z-index: 1; }

.feat-card h3 { font-size: 20px; font-weight: 700; letter-spacing: -0.010em; color: #fff; text-shadow: 0 1px 8px rgba(0,0,0,0.35); }
.feat-card p { font-size: 14px; line-height: 1.6; color: rgba(255, 255, 255, 0.92); text-shadow: 0 1px 6px rgba(0,0,0,0.30); }
.feat-card .meta {
  font-family: var(--font-mono); font-size: 11px;
  color: var(--brand-spring-200);
  font-weight: 600; padding-top: 12px;
  border-top: 1px dashed rgba(255, 255, 255, 0.18);
  margin-top: auto;
  text-shadow: 0 1px 6px rgba(0,0,0,0.30);
}

/* ===== Quote ===== */
.quote-section { background: var(--neutral-50); }
.quote-card { max-width: 880px; margin: 0 auto; text-align: center; }
.quote-card blockquote { font-family: var(--font-display); font-size: 30px; line-height: 1.3; letter-spacing: -0.014em; color: var(--brand-forest-900); margin: 0; font-weight: 600; text-wrap: balance; }
.quote-card blockquote em { font-style: normal; color: var(--brand-spring-600); }
.quote-card .by { margin-top: 22px; display: inline-flex; align-items: center; gap: 12px; font-size: 13px; color: var(--fg-3); }
.quote-card .by .who { text-align: left; }
.quote-card .by .who b { color: var(--fg-1); font-weight: 600; }
.av { width: 28px; height: 28px; border-radius: 999px; background: var(--brand-spring-100); color: var(--brand-spring-700); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 11px; font-family: var(--font-display); flex: none; }
.av.lg { width: 36px; height: 36px; font-size: 13px; }
.av.forest { background: var(--brand-forest-50); color: var(--brand-forest-700); }

/* ===== CTA ===== */
.cta-section { background: var(--brand-forest-900); color: white; }
.cta-grid { display: flex; gap: 48px; align-items: center; flex-wrap: wrap; }
.cta-grid > .cta-text { flex: 1 1 0; min-width: 0; }
.cta-grid > .cta-actions { flex: 0 0 auto; }
.cta-section h2 { font-size: 40px; letter-spacing: -0.022em; line-height: 1.1; margin: 0 0 12px; color: white; }
.cta-section p { font-size: 16px; color: rgba(255,255,255,0.72); max-width: 540px; }
.cta-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.btn-on-dark { background: var(--brand-spring-500); color: var(--brand-forest-900); padding: 12px 20px; border-radius: 6px; font-weight: 600; font-size: 15px; cursor: pointer; border: none; outline: none; letter-spacing: -0.005em; box-shadow: none; transition: background 160ms var(--ease-out); font-family: var(--font-body); display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.btn-on-dark:hover { background: var(--brand-spring-400); box-shadow: none; color: var(--brand-forest-900); text-decoration: none; }
.btn-on-dark:focus, .btn-on-dark:focus-visible { box-shadow: none; outline: none; }
.btn-on-dark.secondary { background: transparent; color: white; border: 1px solid rgba(255,255,255,0.22); }
.btn-on-dark.secondary:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.36); color: white; }

/* ===== Security & compliance ===== */
.security-section { background: var(--neutral-50); }
.sec-grid { display: flex; gap: 64px; align-items: flex-start; flex-wrap: wrap; }
.sec-grid > .sec-h { flex: 0.85 1 0; min-width: 280px; }
.sec-grid > .sec-tiles { flex: 1.15 1 0; min-width: 0; }
.sec-h .eyebrow { color: var(--brand-spring-700); margin-bottom: 14px; }
.sec-h .eyebrow .d { background: var(--brand-spring-500); }
.sec-h h2 { font-family: var(--font-display); font-weight: 800; font-size: 36px; line-height: 1.12; letter-spacing: -0.022em; color: var(--brand-forest-900); margin-bottom: 16px; text-wrap: balance; }
.sec-h p { font-size: 16px; color: var(--fg-2); line-height: 1.6; max-width: 380px; }
.sec-tiles { display: flex; flex-wrap: wrap; gap: 16px; }
.sec-tiles > .sec-tile { flex: 1 1 calc(50% - 8px); min-width: 0; }
.sec-tile { background: #fff; border: 1px solid var(--neutral-200); border-radius: 16px; padding: 24px; transition: all var(--dur-base) var(--ease-out); }
.sec-tile:hover { border-color: var(--brand-spring-200); box-shadow: var(--shadow-md); transform: translateY(-2px); }
.sec-badge { display: inline-block; font: 700 10px/1 var(--font-mono); letter-spacing: 0.10em; text-transform: uppercase; padding: 6px 10px; border-radius: 999px; background: var(--brand-spring-50); color: var(--brand-spring-700); margin-bottom: 14px; }
.sec-badge.alt { background: var(--brand-forest-50); color: var(--brand-forest-700); }
.sec-tile h3 { font-family: var(--font-display); font-size: 17px; font-weight: 700; line-height: 1.3; letter-spacing: -0.008em; color: var(--brand-forest-900); margin-bottom: 8px; }
.sec-tile p { font-size: 13px; line-height: 1.55; color: var(--fg-2); }

/* ===== Footer (minimal) ===== */
.mk-foot { border-top: 1px solid var(--neutral-100); background: var(--neutral-0); }
.mk-foot-inner { max-width: var(--container-max); margin: 0 auto; padding: 32px 28px; display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.mk-foot .mk-brand-logo { height: 26px; }
.mk-foot-links { display: flex; gap: 24px; flex-wrap: wrap; }
.mk-foot-links a { font-size: 13px; color: var(--fg-2); font-weight: 500; }
.mk-foot-links a:hover { color: var(--brand-forest-900); text-decoration: none; }
.mk-foot-legal { font-size: 12px; color: var(--fg-3); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.mk-foot-legal .sep { color: var(--neutral-300); }

/* ===== Responsive ===== */
@media (max-width: 980px) {
  .hero-grid, .cta-grid, .sec-grid { flex-direction: column; gap: 48px; }
  .hero-grid > .hero-text, .hero-grid > .hero-cal,
  .sec-grid > .sec-h, .sec-grid > .sec-tiles,
  .cta-grid > .cta-text, .cta-grid > .cta-actions { flex: 1 1 100%; min-width: 0; }
  .kpi-band-grid > .kpi-stat { flex: 1 1 calc(50% - 16px); }
  .feat-grid > .feat-card { flex: 1 1 calc(50% - 10px); }
  .mk-links { display: none; }
  .hero h1 { font-size: clamp(40px, 8vw, 48px); }
  .section { padding: 72px 28px; }
  .cta-actions { justify-content: flex-start; }
}
@media (max-width: 600px) {
  .kpi-band-grid > .kpi-stat,
  .feat-grid > .feat-card,
  .sec-tiles > .sec-tile,
  .form-row > .form-field { flex: 1 1 100%; }
  .mk-nav-inner { gap: 12px; padding: 14px 20px; }
  .section { padding: 56px 20px; }
  .hero-frame { padding: 8px 14px; }
  .hero { border-radius: 20px; }
  .mk-nav { left: 14px; right: 14px; border-bottom-left-radius: 12px; border-bottom-right-radius: 12px; }
  .hero-cal { padding: 18px; }
  .cal-head-row .spacer, .cal-row .hr { flex: 0 0 38px; padding-right: 6px; }
  .cal-cell { height: 22px; }
  .cal-foot { font-size: 10px; }
  .mk-foot-inner { flex-direction: column; align-items: flex-start; gap: 20px; padding: 28px 20px; }
  .sec-h h2 { font-size: 28px; }
}

/* =================================================================
   Contact modal
   ================================================================= */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(3, 32, 15, 0.42);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0; visibility: hidden;
  transition: opacity 220ms var(--ease-out), visibility 220ms var(--ease-out);
}
.modal-backdrop.open { opacity: 1; visibility: visible; }

.modal {
  width: 100%; max-width: 640px; max-height: calc(100vh - 48px);
  background: #fff; border-radius: 20px;
  box-shadow: 0 30px 80px -20px rgba(3, 32, 15, 0.35), 0 12px 24px -8px rgba(3, 32, 15, 0.18);
  padding: 40px 44px 32px;
  position: relative; overflow-y: auto;
  transform: translateY(16px) scale(0.96);
  opacity: 0;
  transition: transform 320ms var(--ease-out), opacity 220ms var(--ease-out);
}
.modal-backdrop.open .modal { transform: translateY(0) scale(1); opacity: 1; }

.modal-close {
  position: absolute; top: 18px; right: 18px;
  width: 36px; height: 36px; border-radius: 999px;
  background: var(--neutral-100); border: 0; color: var(--fg-2);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background 160ms var(--ease-out), color 160ms var(--ease-out);
}
.modal-close:hover { background: var(--neutral-200); color: var(--fg-1); }
.modal-close:focus-visible { outline: 2px solid var(--brand-spring-500); outline-offset: 2px; }

.modal-pill {
  display: inline-block;
  font-size: 13px; font-weight: 600; color: var(--brand-forest-900);
  padding: 8px 16px; border-radius: 999px;
  background: var(--brand-spring-50); border: 1px solid var(--brand-spring-100);
  margin-bottom: 18px;
}

.modal h2 {
  font-family: var(--font-display); font-weight: 800;
  font-size: 32px; line-height: 1.15; letter-spacing: -0.022em;
  color: var(--brand-forest-900); margin-bottom: 14px;
}
.modal h2 em { font-style: normal; color: var(--brand-spring-600); }

.modal .lede {
  font-size: 15px; line-height: 1.55; color: var(--fg-2);
  margin-bottom: 28px; max-width: 520px;
}

.contact-form { display: flex; flex-direction: column; gap: 18px; }
.hp-field {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.form-row { display: flex; gap: 14px; flex-wrap: wrap; }
.form-row > .form-field { flex: 1 1 calc(50% - 7px); min-width: 0; }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field label {
  font-size: 13px; font-weight: 600; color: var(--fg-1);
}
.form-field input,
.form-field textarea {
  font-family: var(--font-body); font-size: 14px; color: var(--fg-1);
  padding: 12px 14px;
  background: #fff;
  border: 1px solid var(--neutral-200); border-radius: 10px;
  outline: none; transition: border-color 160ms var(--ease-out), box-shadow 160ms var(--ease-out);
  width: 100%;
}
.form-field input::placeholder,
.form-field textarea::placeholder { color: var(--neutral-400); }
.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--brand-spring-500);
  box-shadow: var(--shadow-focus);
}
.form-field textarea { min-height: 110px; resize: vertical; }
.form-field.error input,
.form-field.error textarea { border-color: var(--critical-500); }
.form-field .err { font-size: 12px; color: var(--critical-700); display: none; }
.form-field.error .err { display: block; }

.contact-submit {
  margin-top: 6px;
  background: var(--brand-spring-600); color: #fff;
  border: 0; border-radius: 10px;
  padding: 14px 20px; font: 600 15px/1 var(--font-body);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: background 160ms var(--ease-out);
}
.contact-submit:hover { background: var(--brand-spring-700); }
.contact-submit:disabled { opacity: 0.65; cursor: progress; }
.contact-submit .spin {
  width: 14px; height: 14px; border-radius: 999px;
  border: 2px solid rgba(255,255,255,0.4); border-top-color: #fff;
  animation: spin 720ms linear infinite; display: none;
}
.contact-submit.loading .spin { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.contact-meta {
  font-size: 12px; color: var(--fg-3); text-align: center; margin-top: 4px;
}
.contact-meta a { color: var(--fg-link); }

.contact-success {
  display: none; text-align: center; padding: 32px 8px 8px;
}
.contact-success.show { display: block; }
.contact-success .check {
  width: 56px; height: 56px; border-radius: 999px;
  background: var(--brand-spring-50); color: var(--brand-spring-700);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
  animation: pop 360ms var(--ease-spring) backwards;
}
.contact-success h3 {
  font-family: var(--font-display); font-weight: 700; font-size: 22px;
  color: var(--brand-forest-900); margin-bottom: 8px;
}
.contact-success p { font-size: 14px; color: var(--fg-2); }
@keyframes pop {
  from { transform: scale(0.5); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.contact-error {
  display: none; padding: 12px 14px; border-radius: 10px;
  background: var(--critical-50); border: 1px solid var(--critical-100);
  color: var(--critical-700); font-size: 13px; line-height: 1.5;
}
.contact-error.show { display: block; }

body.modal-open { overflow: hidden; }

@media (max-width: 600px) {
  .modal { padding: 32px 24px 24px; border-radius: 16px; }
  .modal h2 { font-size: 26px; }
  .form-row > .form-field { flex: 1 1 100%; }
}
