:root {
  --ink: #181c25;
  --muted: #697180;
  --line: #e4e8ee;
  --surface: #ffffff;
  --soft: #f6f7f9;
  --brand: #2644d8;
  --accent: #ff6b57;
  --shadow: 0 18px 55px rgba(20, 27, 43, .12);
  --radius: 10px;
  --container: 1220px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; }

.skip-link {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 1000;
  transform: translateY(-180%);
  background: #111;
  color: #fff;
  padding: .7rem 1rem;
  border-radius: 6px;
}
.skip-link:focus { transform: translateY(0); }

.shell {
  width: min(calc(100% - 40px), var(--container));
  margin: 0 auto;
}

.hero {
  min-height: 430px;
  padding: 78px 0 48px;
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(560px, 1.08fr);
  gap: 56px;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.hero-copy { max-width: 545px; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 1px;
  padding: 11px 16px;
  margin-bottom: 26px;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  font-weight: 900;
  letter-spacing: -.055em;
  line-height: 1;
  font-size: 1.72rem;
  border-radius: 4px;
}
.brand span { color: #91a2ff; padding: 0 2px; }
.brand-small { font-size: 1.2rem; margin: 0 0 16px; }

.hero h1 {
  margin: 0;
  color: #3c4350;
  font-size: clamp(2.5rem, 4.7vw, 4.6rem);
  line-height: .99;
  letter-spacing: -.055em;
  font-weight: 300;
}
.hero h1 strong { color: var(--ink); font-weight: 820; }
.hero-lede {
  max-width: 530px;
  margin: 25px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.feature-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.feature-grid li {
  min-width: 0;
  min-height: 170px;
  padding: 20px 14px 17px;
  border: 1px solid var(--line);
  border-radius: 999px 999px 18px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  text-align: center;
  background: linear-gradient(180deg, #fff, #fafbfc);
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.feature-grid li:hover {
  transform: translateY(-4px);
  border-color: #cfd6ff;
  box-shadow: 0 14px 36px rgba(38, 68, 216, .08);
}
.feature-mark {
  width: 57px;
  height: 57px;
  margin-bottom: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #eef1ff;
  color: var(--brand);
  font-weight: 850;
  font-size: .8rem;
}
.feature-grid small { color: var(--muted); font-size: .73rem; }
.feature-grid strong { margin-top: 2px; font-size: .9rem; line-height: 1.2; }

.utility-row {
  min-height: 82px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: .9rem;
}
.utility-row p { margin: 0; }
.utility-row nav, .site-footer nav { display: flex; flex-wrap: wrap; gap: 20px; }
.utility-row a, .site-footer a:not(.brand) {
  text-decoration: none;
  color: #4a5362;
  border-bottom: 1px dotted #c6ccd5;
}
.utility-row a:hover, .site-footer a:not(.brand):hover { color: var(--brand); border-color: var(--brand); }

.catalog { padding: 70px 0 84px; }
.section-heading { max-width: 720px; margin-bottom: 36px; }
.eyebrow {
  margin: 0 0 8px;
  color: var(--brand);
  font-size: .72rem;
  font-weight: 850;
  letter-spacing: .14em;
}
.section-heading h2 {
  margin: 0;
  font-size: clamp(2rem, 3.2vw, 3.3rem);
  line-height: 1.04;
  letter-spacing: -.045em;
}
.section-heading > p:last-child { color: var(--muted); max-width: 640px; margin: 14px 0 0; }

.template-card {
  --card-bg: #e9efff;
  --card-fg: #17213c;
  --card-accent: #2644d8;
  position: relative;
  overflow: hidden;
  min-height: 330px;
  margin: 0 0 28px;
  padding: 46px 54px;
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  align-items: center;
  gap: 40px;
  border-radius: var(--radius);
  background: var(--card-bg);
  color: var(--card-fg);
  box-shadow: 0 2px 0 rgba(20,27,43,.03);
}
.template-card::before {
  content: "";
  position: absolute;
  inset: auto -8% -55% 38%;
  height: 95%;
  border-radius: 50%;
  background: color-mix(in srgb, var(--card-accent) 12%, transparent);
  pointer-events: none;
}
.template-card:hover .desktop { transform: translateY(-6px); }

.template-ledger { --card-bg: #dfe8ff; --card-fg: #112350; --card-accent: #2e57d6; }
.template-counsel { --card-bg: #1f2430; --card-fg: #f7f4ee; --card-accent: #c5a26c; }
.template-habitat { --card-bg: #d5efe5; --card-fg: #183d33; --card-accent: #2d7c66; }
.template-clinic { --card-bg: #e9f6f8; --card-fg: #153947; --card-accent: #3b92aa; }
.template-table { --card-bg: #f3dfd2; --card-fg: #4b291e; --card-accent: #a85b3c; }
.template-launchpad { --card-bg: #e9e2ff; --card-fg: #261a51; --card-accent: #6c4bd6; }

.device-stage { position: relative; min-height: 235px; z-index: 1; }
.device {
  position: absolute;
  overflow: hidden;
  background: #fff;
  border: 6px solid #121721;
  box-shadow: 0 20px 40px rgba(10, 15, 25, .22);
}
.device::before {
  content: "";
  display: block;
  height: 22%;
  background: var(--card-accent);
}
.device span {
  display: block;
  height: 9px;
  margin: 10px 12px 0;
  border-radius: 20px;
  background: color-mix(in srgb, var(--card-accent) 20%, #e7eaf0);
}
.device span:nth-child(2) { width: 62%; }
.device span:nth-child(3) { width: 76%; }
.device span:nth-child(4) { height: 48px; width: calc(100% - 24px); border-radius: 5px; }
.desktop {
  width: min(390px, 70%);
  height: 220px;
  left: 17%;
  top: 3px;
  border-width: 8px 8px 18px;
  border-radius: 7px;
  transition: transform .25s ease;
}
.tablet {
  width: 125px;
  height: 184px;
  left: 0;
  top: 31px;
  z-index: 2;
  border-width: 5px;
  border-radius: 10px;
}
.phone {
  width: 82px;
  height: 155px;
  right: 2%;
  bottom: 3px;
  z-index: 3;
  border-width: 5px;
  border-radius: 12px;
}

.template-copy { position: relative; z-index: 2; max-width: 430px; }
.template-kicker {
  margin: 0 0 7px;
  font-size: .7rem;
  font-weight: 850;
  letter-spacing: .13em;
  opacity: .72;
}
.template-copy h3 {
  margin: 0;
  color: inherit;
  font-size: clamp(2.6rem, 4.5vw, 4rem);
  line-height: 1;
  letter-spacing: -.055em;
}
.template-copy > p:not(.template-kicker) { margin: 17px 0 23px; max-width: 390px; opacity: .82; }
.template-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 5px;
  text-decoration: none;
  font-size: .84rem;
  font-weight: 800;
  border: 1px solid color-mix(in srgb, currentColor 42%, transparent);
  transition: transform .18s ease, opacity .18s ease, background .18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-ghost { background: transparent; color: inherit; }
.btn-solid { background: var(--card-fg); color: var(--card-bg); border-color: var(--card-fg); }

.value-strip {
  margin-bottom: 70px;
  padding: 28px 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.value-strip div { padding: 0 24px; border-right: 1px solid var(--line); }
.value-strip div:first-child { padding-left: 0; }
.value-strip div:last-child { border-right: 0; }
.value-strip strong, .value-strip span { display: block; }
.value-strip strong { font-size: .9rem; }
.value-strip span { margin-top: 3px; color: var(--muted); font-size: .82rem; }

.site-footer {
  min-height: 230px;
  padding: 34px 0 55px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 30px 60px;
  color: var(--muted);
}
.site-footer > div { max-width: 540px; }
.site-footer > div p { margin: 0; }
.site-footer nav { align-self: start; padding-top: 10px; }
.copyright { grid-column: 1 / -1; margin: 0; font-size: .8rem; color: #8b93a0; }

/* Preview toolbar */
.preview-body { background: #171a21; overflow: hidden; }
.preview-bar {
  min-height: 58px;
  padding: 9px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #21252d;
  color: #fff;
  border-bottom: 1px solid #313640;
}
.preview-left, .preview-right { display: flex; align-items: center; gap: 12px; }
.preview-title { font-weight: 800; white-space: nowrap; }
.viewport-switcher { display: flex; gap: 4px; }
.viewport-switcher button, .preview-action {
  min-height: 36px;
  padding: 0 11px;
  border: 1px solid #3d4450;
  border-radius: 5px;
  background: #2a2f38;
  color: #c9ced6;
  text-decoration: none;
  cursor: pointer;
}
.viewport-switcher button[aria-pressed="true"] { background: #fff; color: #1c2129; border-color: #fff; }
.preview-action.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.preview-stage { height: calc(100vh - 58px); display: grid; place-items: center; background: #14171c; }
.preview-stage iframe { width: 100%; height: 100%; border: 0; background: #fff; transition: width .25s ease; box-shadow: 0 0 40px rgba(0,0,0,.28); }

/* Shared simple product preview pages */
.demo-page { min-height: 100vh; background: var(--demo-bg, #fff); color: var(--demo-ink, #151a22); }
.demo-container { width: min(calc(100% - 40px), 1120px); margin: 0 auto; }
.demo-nav { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 22px; }
.demo-logo { font-weight: 900; letter-spacing: -.04em; font-size: 1.2rem; }
.demo-nav-links { display: flex; gap: 18px; font-size: .86rem; }
.demo-nav-links a { text-decoration: none; color: inherit; opacity: .76; }
.demo-hero { min-height: 520px; display: grid; grid-template-columns: 1fr .9fr; gap: 60px; align-items: center; }
.demo-hero h1 { margin: 0; max-width: 690px; font-size: clamp(3rem, 7vw, 6.5rem); line-height: .92; letter-spacing: -.065em; }
.demo-hero p { max-width: 560px; font-size: 1.08rem; opacity: .72; }
.demo-cta { display: inline-flex; margin-top: 12px; padding: 13px 19px; background: var(--demo-accent, #2644d8); color: #fff; text-decoration: none; border-radius: 5px; font-weight: 800; }
.demo-panel { min-height: 380px; border-radius: 24px; background: var(--demo-panel, #eef1f6); box-shadow: var(--shadow); padding: 28px; display: flex; flex-direction: column; justify-content: flex-end; }
.demo-panel span { display: block; width: 70%; height: 11px; margin-top: 10px; border-radius: 12px; background: color-mix(in srgb, var(--demo-accent, #2644d8) 22%, #fff); }
.demo-panel span:nth-child(2) { width: 48%; }
.demo-panel span:nth-child(3) { height: 100px; width: 100%; border-radius: 12px; }
.demo-proof { padding: 70px 0 90px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.demo-proof article { border: 1px solid color-mix(in srgb, var(--demo-ink, #111) 12%, transparent); padding: 24px; border-radius: 12px; }
.demo-proof h2 { margin: 0 0 8px; font-size: 1.1rem; }
.demo-proof p { margin: 0; opacity: .68; }

@media (max-width: 1050px) {
  .hero { grid-template-columns: 1fr; padding-top: 60px; }
  .hero-copy { max-width: 720px; }
  .feature-grid { max-width: 760px; }
  .template-card { grid-template-columns: 1fr; min-height: 570px; }
  .device-stage { min-height: 260px; }
  .template-copy { max-width: 620px; }
  .value-strip { grid-template-columns: repeat(2, 1fr); row-gap: 22px; }
  .value-strip div:nth-child(2) { border-right: 0; }
  .demo-hero { grid-template-columns: 1fr; padding: 70px 0; }
  .demo-panel { min-height: 300px; }
}

@media (max-width: 720px) {
  .shell { width: min(calc(100% - 28px), var(--container)); }
  .hero { padding: 44px 0 34px; gap: 34px; }
  .hero h1 { font-size: clamp(2.7rem, 14vw, 4.2rem); }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-grid li { min-height: 150px; }
  .utility-row { align-items: flex-start; flex-direction: column; padding: 20px 0; }
  .catalog { padding-top: 52px; }
  .template-card { padding: 30px 22px; min-height: 520px; border-radius: 8px; }
  .device-stage { min-height: 220px; }
  .desktop { width: 72%; height: 180px; left: 15%; }
  .tablet { width: 92px; height: 150px; }
  .phone { width: 66px; height: 130px; }
  .template-copy h3 { font-size: 3.2rem; }
  .value-strip { grid-template-columns: 1fr; }
  .value-strip div { border-right: 0; border-bottom: 1px solid var(--line); padding: 14px 0; }
  .value-strip div:last-child { border-bottom: 0; }
  .site-footer { grid-template-columns: 1fr; }
  .copyright { grid-column: 1; }
  .preview-bar { align-items: flex-start; flex-direction: column; }
  .preview-left, .preview-right { width: 100%; justify-content: space-between; }
  .viewport-switcher button:nth-child(2) { display: none; }
  .preview-stage { height: calc(100vh - 112px); }
  .demo-nav-links { display: none; }
  .demo-hero { min-height: auto; }
  .demo-proof { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
