/* Visimed — design tokens & base */
:root {
  --primary: #0E3A6B;
  --primary-deep: #082548;
  --primary-soft: #E8EEF5;
  --accent: #E8743C;
  --accent-soft: #FCE9DD;
  --ink: #0F1620;
  --ink-2: #2B3340;
  --muted: #5C6473;
  --muted-2: #8A92A0;
  --line: #E5E7EB;
  --line-2: #EEF0F3;
  --bg: #FFFFFF;
  --bg-soft: #F4F5F7;
  --bg-soft-2: #F8F9FB;
  --success: #16A34A;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(15, 22, 32, 0.04), 0 1px 1px rgba(15, 22, 32, 0.03);
  --shadow-md: 0 8px 24px rgba(15, 22, 32, 0.06), 0 2px 6px rgba(15, 22, 32, 0.04);
  --shadow-lg: 0 24px 60px rgba(15, 22, 32, 0.10), 0 6px 16px rgba(15, 22, 32, 0.05);
  --container: 1200px;
  --gap: 24px;
}

[data-density="compact"] {
  --gap: 18px;
}
[data-density="spacious"] {
  --gap: 32px;
}

[data-theme="dark"] {
  --ink: #ECEFF4;
  --ink-2: #C5CAD3;
  --muted: #9099A8;
  --muted-2: #6E7686;
  --line: #1F2733;
  --line-2: #18202B;
  --bg: #0B1118;
  --bg-soft: #0F161F;
  --bg-soft-2: #131B26;
  --primary-soft: #14283F;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "ss01", "cv11";
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* Typography */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--primary);
  background: var(--primary-soft);
  border-radius: 999px;
  padding: 6px 12px;
}
.eyebrow .dot {
  width: 6px; height: 6px; border-radius: 999px;
  background: var(--primary);
}

h1, h2, h3, h4 { color: var(--ink); margin: 0; letter-spacing: -0.02em; line-height: 1.08; text-wrap: balance; }
h1 { font-size: clamp(40px, 5.6vw, 68px); font-weight: 700; }
h2 { font-size: clamp(32px, 4.4vw, 52px); font-weight: 700; }
h3 { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }

.lead { font-size: 17px; color: var(--muted); max-width: 560px; text-wrap: pretty; }
.muted { color: var(--muted); }

.text-primary { color: var(--primary); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 18px;
  border-radius: 10px;
  font-weight: 500;
  font-size: 15px;
  transition: transform .15s ease, background .2s ease, box-shadow .2s ease, color .2s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255,255,255,0.15) inset, 0 6px 16px rgba(14, 58, 107, 0.25);
}
.btn-primary:hover { background: var(--primary-deep); transform: translateY(-1px); }
.btn-ghost {
  background: transparent; color: var(--ink);
}
.btn-ghost:hover { color: var(--primary); }
.btn-outline {
  background: transparent; color: var(--primary);
  border: 1px solid var(--line);
}
.btn-outline:hover { border-color: var(--primary); }

/* Pills */
.tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--primary-soft);
  border-radius: 999px;
  padding: 5px 10px;
}

/* Sections */
section { padding: 96px 0; }
section.tight { padding: 72px 0; }
.section-soft { background: var(--bg-soft); }

.section-head { text-align: center; margin-bottom: 56px; }
.section-head h2 { display: inline-block; position: relative; padding-bottom: 14px; }
.section-head h2::after {
  content: ""; position: absolute; left: 50%; bottom: 0;
  transform: translateX(-50%);
  width: 56px; height: 3px;
  background: var(--primary);
  border-radius: 2px;
}
.section-head .lead { margin: 16px auto 0; }

/* Cards */
.card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--line-2);
}

.icon-tile {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--bg-soft);
  display: grid; place-items: center;
  color: var(--primary);
  margin-bottom: 18px;
}
.icon-tile.solid {
  background: var(--primary);
  color: #fff;
}

/* Grid utilities */
.grid { display: grid; gap: var(--gap); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  section { padding: 72px 0; }
}

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}
[data-reveal="off"] .reveal {
  opacity: 1; transform: none;
}

/* Header */
.header {
  position: sticky; top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: background .25s ease, border-color .25s ease, box-shadow .25s ease;
}
[data-theme="dark"] .header { background: rgba(11, 17, 24, 0.78); }
.header.scrolled {
  border-bottom-color: var(--line);
}

.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.nav .links {
  display: flex; gap: 36px;
}
.nav .links a {
  font-size: 14.5px;
  color: var(--ink-2);
  font-weight: 500;
  position: relative;
  padding: 4px 0;
  transition: color .15s ease;
}
.nav .links a:hover { color: var(--primary); }
.nav .links a.active { color: var(--primary); }
.nav .links a.active::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -4px;
  height: 2px; background: var(--primary); border-radius: 2px;
}

.logo {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 700;
  font-size: 22px;
  color: var(--primary);
  letter-spacing: -0.01em;
}
.logo .mark {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--accent) 0%, #C9491A 100%);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  box-shadow: 0 2px 6px rgba(232, 116, 60, 0.35);
}

@media (max-width: 760px) {
  .nav .links { display: none; }
}

/* Hero */
.hero {
  padding: 64px 0 88px;
  position: relative;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 56px;
  align-items: center;
}
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
}
.hero h1 .accent { color: var(--primary); display: block; }
.hero .ctas { display: flex; gap: 12px; margin-top: 32px; flex-wrap: wrap; }

.hero-visual {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  box-shadow: var(--shadow-lg);
  background: #051324;
}
.hero-visual .placeholder {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at center, rgba(80, 200, 255, 0.55) 0%, rgba(20, 80, 130, 0.25) 35%, rgba(5, 20, 36, 0.95) 75%),
    repeating-linear-gradient(0deg, transparent 0, transparent 22px, rgba(80, 200, 255, 0.06) 22px, rgba(80, 200, 255, 0.06) 23px),
    repeating-linear-gradient(90deg, transparent 0, transparent 22px, rgba(80, 200, 255, 0.06) 22px, rgba(80, 200, 255, 0.06) 23px),
    #051324;
}
.hero-visual .ph-label {
  position: absolute; left: 16px; top: 14px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11px; color: rgba(180, 220, 255, 0.6);
  letter-spacing: 0.06em;
}
.hero-card {
  position: absolute;
  left: -32px; bottom: -28px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 18px;
  display: flex; align-items: center; gap: 14px;
  box-shadow: var(--shadow-md);
  max-width: 320px;
  animation: floaty 6s ease-in-out infinite;
}
[data-theme="dark"] .hero-card { background: var(--bg-soft); }
.hero-card .pulse {
  width: 36px; height: 36px; border-radius: 999px;
  background: rgba(22, 163, 74, 0.12);
  display: grid; place-items: center;
  color: var(--success);
  flex-shrink: 0;
  position: relative;
}
.hero-card .pulse::before {
  content: ""; position: absolute; inset: 0;
  border-radius: inherit;
  border: 2px solid rgba(22, 163, 74, 0.4);
  animation: ping 2.2s ease-out infinite;
}
.hero-card .meta { font-size: 11px; color: var(--muted); font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 2px; }
.hero-card .body { font-size: 13.5px; color: var(--ink-2); line-height: 1.4; }

@keyframes floaty {
  0%,100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes ping {
  0% { transform: scale(1); opacity: .8; }
  80%, 100% { transform: scale(1.7); opacity: 0; }
}

/* Product showcases */
.showcase-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 64px;
  align-items: center;
}
.showcase-grid.reverse { grid-template-columns: 1.1fr 1fr; }
.showcase-grid.reverse .copy { order: 2; }
.showcase-grid.reverse .visual { order: 1; }
@media (max-width: 980px) {
  .showcase-grid, .showcase-grid.reverse { grid-template-columns: 1fr; }
  .showcase-grid.reverse .copy, .showcase-grid.reverse .visual { order: initial; }
}
.showcase-grid .visual {
  border-radius: 18px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: #051324;
  position: relative;
  box-shadow: var(--shadow-lg);
}
.showcase-grid h2 { font-size: clamp(28px, 3.6vw, 40px); margin-top: 14px; }
.showcase-grid .lead { margin-top: 18px; }

.feature-list { margin: 28px 0 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.feature-list li {
  display: flex; gap: 12px; align-items: flex-start;
  font-size: 15px; color: var(--ink-2);
}
.feature-list li svg { flex-shrink: 0; color: var(--primary); margin-top: 2px; }

.callout {
  margin-top: 28px;
  background: var(--primary-soft);
  border-left: 3px solid var(--primary);
  padding: 16px 20px;
  border-radius: 4px 12px 12px 4px;
}
.callout .label {
  font-size: 11px; font-weight: 600; letter-spacing: 0.08em; color: var(--primary); text-transform: uppercase;
  margin-bottom: 6px;
}
.callout p { margin: 0; font-size: 14.5px; color: var(--ink-2); line-height: 1.5; }

/* Visi-Ray placeholder */
.viz-ray {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 30% 60%, rgba(120, 180, 255, 0.45) 0%, transparent 40%),
    radial-gradient(ellipse at 65% 45%, rgba(80, 200, 255, 0.5) 0%, transparent 40%),
    repeating-linear-gradient(90deg, transparent 0, transparent 30px, rgba(120, 200, 255, 0.07) 30px, rgba(120, 200, 255, 0.07) 31px),
    linear-gradient(180deg, #0a2030 0%, #051324 100%);
}
.viz-cds {
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 50% 50%, rgba(120, 220, 255, 0.55) 0%, transparent 35%),
    radial-gradient(circle at 50% 50%, rgba(80, 200, 255, 0.3) 0%, transparent 60%),
    repeating-radial-gradient(circle at 50% 50%, transparent 0 20px, rgba(120, 200, 255, 0.08) 20px 21px),
    linear-gradient(180deg, #06192c 0%, #02101e 100%);
}

/* Architecture */
.arch {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  gap: 24px;
  align-items: start;
  margin-top: 24px;
  max-width: 980px;
  margin-left: auto; margin-right: auto;
}
.arch .step { text-align: center; }
.arch .step .step-icon {
  width: 64px; height: 64px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line);
  display: grid; place-items: center;
  color: var(--primary);
  margin: 0 auto 18px;
  box-shadow: var(--shadow-sm);
}
.arch .step.featured .step-icon {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
  box-shadow: 0 8px 24px rgba(14, 58, 107, 0.22);
}
.arch .step h3 { margin-bottom: 8px; font-size: 18px; }
.arch .step p { margin: 0; color: var(--muted); font-size: 14.5px; max-width: 200px; margin-inline: auto; }
.arch .connector {
  height: 1px;
  border-top: 1px dashed #C5CCD6;
  margin-top: 32px;
  align-self: start;
  min-width: 40px;
}
@media (max-width: 900px) {
  .arch { grid-template-columns: 1fr; }
  .arch .connector { display: none; }
}

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
  align-items: center;
}
@media (max-width: 980px) { .stats-grid { grid-template-columns: 1fr; } }
.stats-row { display: flex; gap: 56px; margin: 28px 0; flex-wrap: wrap; }
.stat .num {
  font-size: 56px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.03em;
  line-height: 1;
  display: inline-block;
}
.stat .lbl {
  font-size: 13.5px;
  color: var(--muted);
  margin-top: 6px;
}

.testimonial {
  position: relative;
  background: var(--bg-soft);
  border-radius: 18px;
  padding: 36px 36px 32px;
  border: 1px solid var(--line);
}
.testimonial::after {
  content: "";
  position: absolute;
  top: -1px; right: -1px;
  width: 64px; height: 64px;
  background: var(--primary);
  border-radius: 0 18px 0 18px;
  clip-path: polygon(0 0, 100% 0, 100% 100%);
}
.testimonial blockquote {
  margin: 0; font-size: 19px; line-height: 1.5;
  color: var(--ink); font-weight: 400;
  font-family: "Source Serif Pro", Georgia, serif;
  letter-spacing: -0.005em;
}
.testimonial .by { display: flex; gap: 14px; align-items: center; margin-top: 22px; }
.testimonial .avatar {
  width: 44px; height: 44px; border-radius: 8px;
  background: var(--primary);
  display: grid; place-items: center;
  color: #fff; font-weight: 700; font-size: 15px;
  flex-shrink: 0;
}
.testimonial .name { font-weight: 600; font-size: 14.5px; color: var(--ink); }
.testimonial .role { font-size: 13px; color: var(--muted); margin-top: 2px; }

/* Roadmap */
.roadmap-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-bottom: 32px;
  gap: 24px; flex-wrap: wrap;
}
.roadmap-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  background: var(--bg-soft);
  padding: 24px;
  border-radius: 18px;
  border: 1px solid var(--line);
}
.roadmap-cards .rc {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px;
  display: flex; flex-direction: column; gap: 10px;
  transition: all .25s ease;
  cursor: pointer;
}
.roadmap-cards .rc:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.roadmap-cards .rc.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.roadmap-cards .quarter {
  font-size: 12px; color: var(--muted-2); font-weight: 600; letter-spacing: 0.04em;
}
.roadmap-cards h3 { font-size: 18px; }
.roadmap-cards p { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.5; }
@media (max-width: 900px) {
  .roadmap-cards { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .roadmap-cards { grid-template-columns: 1fr; }
}

/* Contact */
.contact-card {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
@media (max-width: 880px) { .contact-card { grid-template-columns: 1fr; } }

.contact-form { padding: 36px 36px 32px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
.field { display: block; margin-bottom: 16px; }
.field label {
  display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 6px; font-weight: 500;
}
.field input, .field textarea {
  width: 100%;
  background: var(--bg-soft);
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 12px 14px;
  font: inherit;
  color: var(--ink);
  transition: border-color .15s ease, background .15s ease;
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--primary); background: var(--bg);
}
.field textarea { min-height: 96px; resize: vertical; }
.field.error input, .field.error textarea {
  border-color: #DC2626; background: #FEF2F2;
}
.field .err {
  font-size: 12px; color: #DC2626; margin-top: 6px;
  opacity: 0; transition: opacity .15s ease; height: 0; overflow: hidden;
}
.field.error .err { opacity: 1; height: auto; }

.contact-cta {
  background: var(--primary);
  color: #fff;
  padding: 36px;
  position: relative;
  display: flex; flex-direction: column; justify-content: space-between;
  background-image:
    radial-gradient(circle at 100% 0%, rgba(255,255,255,0.08) 0%, transparent 40%),
    radial-gradient(circle at 0% 100%, rgba(255,255,255,0.05) 0%, transparent 40%);
}
.contact-cta::before {
  content: "";
  position: absolute; top: 0; right: 0;
  width: 80px; height: 80px;
  background: var(--primary-deep);
  clip-path: polygon(40% 0, 100% 0, 100% 60%);
}
.contact-cta h2 { color: #fff; font-size: 32px; margin-bottom: 16px; }
.contact-cta p { color: rgba(255,255,255,0.78); font-size: 14.5px; line-height: 1.55; max-width: 320px; }
.contact-cta .meta { margin-top: 32px; display: grid; gap: 12px; }
.contact-cta .meta div { display: flex; align-items: center; gap: 10px; font-size: 14px; color: rgba(255,255,255,0.92); }

.btn-submit {
  width: 100%;
  background: var(--primary);
  color: #fff;
  padding: 14px;
  border-radius: 10px;
  font-weight: 500;
  margin-top: 6px;
  transition: background .2s ease;
}
.btn-submit:hover { background: var(--primary-deep); }
.btn-submit:disabled { opacity: 0.6; cursor: not-allowed; }
.success-state {
  text-align: center; padding: 48px 24px;
}
.success-state .check {
  width: 56px; height: 56px;
  border-radius: 999px;
  background: rgba(22, 163, 74, 0.12);
  color: var(--success);
  display: grid; place-items: center;
  margin: 0 auto 18px;
}
.success-state h3 { margin-bottom: 8px; }
.success-state p { color: var(--muted); margin: 0; }

/* Footer */
.footer {
  border-top: 1px solid var(--line);
  background: var(--bg-soft);
  padding: 56px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}
@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
.footer p { color: var(--muted); font-size: 14px; margin: 16px 0 0; max-width: 280px; }
.footer h4 {
  font-size: 12px; color: var(--muted-2); font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 14px;
}
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer ul a { color: var(--ink-2); font-size: 14px; transition: color .15s ease; }
.footer ul a:hover { color: var(--primary); }
.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; color: var(--muted);
  flex-wrap: wrap; gap: 12px;
}
.footer-bottom .socials { display: flex; gap: 18px; }
.footer-bottom .socials a:hover { color: var(--primary); }
