:root {
  --indigo: #4f46e5;
  --indigo-dark: #3730a3;
  --ink: #201c5c;
  --muted: #5b6472;
  --line: #e5e7eb;
  --soft: #f7f8fc;
  --white: #ffffff;
  --success: #16a34a;
  --radius: 8px;
  --shadow: 0 24px 70px rgba(17, 24, 39, 0.09);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family:
    "Inter",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
}

body.nav-open {
  overflow: hidden;
}

body.modal-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 0 5vw;
  background: rgba(255, 255, 255, 0.88);
  border-bottom: 1px solid rgba(229, 231, 235, 0.75);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: var(--white);
  background: var(--indigo);
  border-radius: var(--radius);
}

.site-nav {
  position: fixed;
  inset: 72px 0 auto 0;
  display: none;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1rem 5vw 1.5rem;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.nav-open .site-nav {
  display: flex;
}

.site-nav a {
  padding: 0.85rem 0;
  color: var(--muted);
  font-weight: 650;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--indigo);
}

.nav-cta {
  color: var(--indigo) !important;
}

.nav-toggle {
  display: grid;
  gap: 5px;
  width: 42px;
  height: 42px;
  place-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.nav-toggle span {
  width: 18px;
  height: 2px;
  background: var(--ink);
}

.hero {
  position: relative;
  min-height: calc(100vh - 72px);
  overflow: hidden;
  display: grid;
  align-items: center;
  padding: 4.5rem 5vw 5rem;
}

.hero-home {
  min-height: 86vh;
  background:
    linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.96) 0%,
      rgba(255, 255, 255, 0.86) 45%,
      rgba(255, 255, 255, 0.62) 100%
    ),
    url("assets/hero-spine-software.webp") center right / cover no-repeat;
}

.hero-subpage {
  min-height: 68vh;
}

.hero-tailoring {
  min-height: 86vh;
  background:
    linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.98) 0%,
      rgba(255, 255, 255, 0.94) 34%,
      rgba(255, 255, 255, 0.56) 66%,
      rgba(255, 255, 255, 0.18) 100%
    ),
    url("assets/hero-digitalni-krejcovstvi.webp") center right / cover no-repeat;
}

.hero-tailoring .hero-content {
  max-width: 980px;
}

.hero-tailoring .poly-canvas {
  background: rgba(255, 255, 255, 0.04);
  mask-image: linear-gradient(
    90deg,
    transparent 0%,
    rgba(0, 0, 0, 0.08) 34%,
    rgba(0, 0, 0, 0.45) 58%,
    rgba(0, 0, 0, 0.72) 100%
  );
  -webkit-mask-image: linear-gradient(
    90deg,
    transparent 0%,
    rgba(0, 0, 0, 0.08) 34%,
    rgba(0, 0, 0, 0.45) 58%,
    rgba(0, 0, 0, 0.72) 100%
  );
}

.poly-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, #ffffff 0%, #f7f8fc 100%);
}

.hero-home .poly-canvas {
  background: rgba(255, 255, 255, 0.04);
  mask-image: linear-gradient(
    90deg,
    transparent 0%,
    rgba(0, 0, 0, 0.12) 34%,
    rgba(0, 0, 0, 0.72) 56%,
    #000 100%
  );
  -webkit-mask-image: linear-gradient(
    90deg,
    transparent 0%,
    rgba(0, 0, 0, 0.12) 34%,
    rgba(0, 0, 0, 0.72) 56%,
    #000 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 760px;
}

.hero-subpage .hero-content {
  max-width: 1080px;
}

.hero-transition {
  position: relative;
  height: clamp(110px, 16vw, 210px);
  margin-top: calc(clamp(110px, 16vw, 210px) * -0.55);
  margin-bottom: -2px;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, var(--white) 72%);
  pointer-events: none;
  z-index: 3;
}

.hero-transition::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--white);
}

.transition-layer {
  position: absolute;
  inset: 0;
  display: block;
}

.layer-one {
  background: rgba(79, 70, 229, 0.08);
  clip-path: polygon(0 34%, 15% 42%, 31% 29%, 47% 48%, 63% 35%, 82% 43%, 100% 28%, 100% 100%, 0 100%);
}

.layer-two {
  background: rgba(79, 70, 229, 0.14);
  clip-path: polygon(0 48%, 14% 37%, 29% 45%, 44% 31%, 58% 44%, 73% 38%, 88% 47%, 100% 40%, 100% 100%, 0 100%);
}

.layer-three {
  background: rgba(55, 48, 163, 0.12);
  clip-path: polygon(0 64%, 12% 49%, 27% 56%, 43% 50%, 57% 66%, 72% 54%, 86% 61%, 100% 50%, 100% 100%, 0 100%);
}

.layer-four {
  background: var(--white);
  clip-path: polygon(0 78%, 15% 70%, 32% 76%, 48% 68%, 63% 80%, 78% 72%, 91% 77%, 100% 70%, 100% 100%, 0 100%);
}

.eyebrow {
  margin: 0 0 0.85rem;
  color: var(--indigo);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 1rem;
  max-width: 900px;
  font-size: clamp(1.65rem, 8vw, 5.6rem);
  line-height: 1.12;
  letter-spacing: 0;
}

.hero-subpage h1 {
  max-width: 1040px;
  font-size: clamp(1.65rem, 7vw, 4.7rem);
}

.hero-tailoring h1 {
  max-width: 980px;
}

h2 {
  margin-bottom: 1rem;
  font-size: clamp(1.7rem, 5vw, 3.4rem);
  line-height: 1.12;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 0.45rem;
  font-size: 1.05rem;
  line-height: 1.25;
}

.hero h2 {
  color: var(--indigo);
  font-size: clamp(1.4rem, 4vw, 2.5rem);
}

.lead {
  max-width: 650px;
  color: var(--muted);
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  align-items: center;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0.85rem 1.15rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 800;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.button:hover {
  transform: translateY(-2px);
}

.button.primary {
  color: var(--white);
  background: var(--indigo);
  box-shadow: 0 16px 34px rgba(79, 70, 229, 0.24);
}

.button.primary:hover {
  background: var(--indigo-dark);
}

.button.ghost {
  color: var(--indigo);
  background: rgba(79, 70, 229, 0.07);
  border-color: rgba(79, 70, 229, 0.14);
}

.section {
  padding: 5rem 5vw;
}

.split-section {
  display: grid;
  gap: 2.5rem;
}

.stack {
  display: grid;
  gap: 1rem;
}

.problem-item,
.feature-card,
.calculator-panel,
.calculator-result,
.contact-form {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.problem-item {
  padding: 1.3rem;
}

.problem-item span {
  color: var(--indigo);
  font-weight: 800;
}

.problem-item p,
.feature-card p,
.story-step p,
.contact-copy p {
  color: var(--muted);
}

.value-band {
  background: var(--soft);
}

.section-heading {
  max-width: 760px;
  margin-bottom: 2rem;
}

.feature-grid {
  display: grid;
  gap: 1rem;
}

.feature-card {
  padding: 1.4rem;
  box-shadow: 0 14px 44px rgba(17, 24, 39, 0.04);
}

.capabilities-section {
  background: var(--soft);
}

.capability-grid {
  display: grid;
  gap: 1rem;
}

.capability-card {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  grid-template-rows: auto auto 1fr;
  align-content: start;
  column-gap: 0.75rem;
  row-gap: 0.55rem;
  min-height: 100%;
  padding: 1.35rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 44px rgba(17, 24, 39, 0.045);
}

.capability-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: var(--indigo);
}

.capability-icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--indigo);
  border: 1px solid rgba(79, 70, 229, 0.16);
  border-radius: var(--radius);
  background: rgba(79, 70, 229, 0.08);
}

.capability-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.capability-card h3 {
  display: flex;
  align-items: center;
  margin-bottom: 0;
  min-height: 42px;
  line-height: 1.12;
}

.capability-card strong {
  display: block;
  grid-column: 1 / -1;
  margin-top: -0.1rem;
  color: var(--ink);
  line-height: 1.25;
}

.capability-card p {
  grid-column: 1 / -1;
  margin-bottom: 0;
  color: var(--muted);
}

.module-tabs-section {
  background: var(--white);
}

.module-tabs {
  display: grid;
  gap: 1rem;
}

.tab-list {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding: 0.2rem 0 0.8rem;
  scrollbar-width: thin;
}

.tab-button {
  flex: 0 0 132px;
  min-height: 42px;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: var(--white);
  cursor: pointer;
  font-weight: 800;
  text-align: center;
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.tab-button:hover {
  color: var(--indigo);
  border-color: rgba(79, 70, 229, 0.32);
  transform: translateY(-1px);
}

.tab-button.is-active {
  color: var(--white);
  border-color: var(--indigo);
  background: var(--indigo);
  box-shadow: 0 14px 30px rgba(79, 70, 229, 0.22);
}

.tab-panels {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(180deg, #FFFFFF 0%, #F7F8FC 100%);
  box-shadow: var(--shadow);
}

.tab-panel {
  display: grid;
  gap: 1.5rem;
  padding: 1.25rem;
  animation: tabFade 220ms ease;
}

.tab-panel[hidden] {
  display: none;
}

.module-copy {
  display: grid;
  align-content: center;
}

.module-copy h3 {
  font-size: clamp(1.6rem, 5vw, 3rem);
}

.module-copy p {
  max-width: 620px;
  color: var(--muted);
  font-size: 1.02rem;
}

.module-preview {
  position: relative;
  min-height: 280px;
  overflow: hidden;
  border: 1px solid rgba(79, 70, 229, 0.16);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 78% 22%, rgba(79, 70, 229, 0.18), transparent 26%),
    linear-gradient(135deg, #FFFFFF 0%, #EEF2FF 100%);
}

.module-preview::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(79, 70, 229, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79, 70, 229, 0.06) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(180deg, #000, transparent 86%);
}

.preview-topbar,
.preview-sidebar,
.preview-card,
.preview-chart,
.shelf-grid,
.timeline-row,
.machine-grid,
.profile-row,
.calendar-grid,
.approval-flow,
.document-stack,
.kanban-col,
.custom-nodes,
.maintenance-dial,
.tool-grid,
.file-list {
  position: absolute;
  z-index: 1;
}

.preview-topbar {
  top: 22px;
  right: 24px;
  left: 24px;
  height: 34px;
  border-radius: var(--radius);
  background: linear-gradient(90deg, var(--indigo), #7C3AED);
  box-shadow: 0 16px 30px rgba(79, 70, 229, 0.2);
}

.preview-sidebar {
  top: 74px;
  bottom: 24px;
  left: 24px;
  width: 78px;
  border-radius: var(--radius);
  background: rgba(79, 70, 229, 0.86);
}

.preview-card {
  width: 34%;
  height: 54px;
  border: 1px solid rgba(79, 70, 229, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 26px rgba(17, 24, 39, 0.08);
}

.preview-card.wide {
  top: 82px;
  left: 124px;
  width: calc(100% - 150px);
}

.crm-preview .preview-card:not(.wide):nth-of-type(4) {
  left: 124px;
  bottom: 30px;
}

.crm-preview .preview-card:not(.wide):nth-of-type(5) {
  right: 24px;
  bottom: 30px;
}

.line-chart {
  top: 158px;
  left: 124px;
  right: 24px;
  height: 68px;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, transparent 45%, var(--indigo) 46%, var(--indigo) 50%, transparent 51%),
    rgba(255, 255, 255, 0.78);
}

.shelf-grid {
  top: 82px;
  left: 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.7rem;
  width: 58%;
}

.shelf-grid span,
.machine-grid span,
.calendar-grid span {
  min-height: 54px;
  border-radius: var(--radius);
  background: rgba(79, 70, 229, 0.16);
  border: 1px solid rgba(79, 70, 229, 0.16);
}

.stock-card {
  right: 24px;
  top: 88px;
  height: 72px;
}

.stock-card.accent {
  top: 178px;
  background: rgba(79, 70, 229, 0.84);
}

.timeline-row {
  left: 28px;
  right: 34px;
  top: 92px;
  height: 34px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--indigo) 0 52%, rgba(79, 70, 229, 0.16) 52% 100%);
}

.timeline-row.short {
  top: 146px;
  right: 28%;
}

.timeline-row.medium {
  top: 200px;
  right: 16%;
}

.machine-grid {
  right: 32px;
  bottom: 28px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6rem;
  width: 54%;
}

.profile-row {
  left: 28px;
  right: 28px;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  height: 44px;
}

.profile-row:nth-of-type(2) {
  top: 90px;
}

.profile-row:nth-of-type(3) {
  top: 146px;
}

.profile-row:nth-of-type(4) {
  top: 202px;
}

.profile-row span {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--indigo);
}

.profile-row i {
  flex: 1;
  height: 18px;
  border-radius: 999px;
  background: rgba(79, 70, 229, 0.16);
}

.calendar-grid {
  right: 30px;
  bottom: 30px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.45rem;
  width: 34%;
}

.approval-flow {
  top: 94px;
  left: 34px;
  right: 34px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.approval-flow span {
  min-height: 78px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(79, 70, 229, 0.14);
}

.document-stack {
  right: 44px;
  bottom: 34px;
  width: 42%;
  height: 86px;
}

.document-stack span {
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  background: rgba(79, 70, 229, 0.12);
  border: 1px solid rgba(79, 70, 229, 0.14);
}

.document-stack span:nth-child(2) {
  transform: translate(-16px, -12px);
}

.document-stack span:nth-child(3) {
  transform: translate(-32px, -24px);
  background: var(--white);
}

.document-stack.large {
  top: 98px;
  left: 38px;
  right: auto;
  bottom: auto;
  width: 44%;
  height: 150px;
}

.kanban-col {
  top: 84px;
  bottom: 28px;
  display: grid;
  align-content: start;
  gap: 0.7rem;
  width: calc((100% - 92px) / 3);
  padding: 0.8rem;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(79, 70, 229, 0.12);
}

.kanban-col:nth-child(2) {
  left: 24px;
}

.kanban-col:nth-child(3) {
  left: calc(50% - ((100% - 92px) / 6));
}

.kanban-col:nth-child(4) {
  right: 24px;
}

.kanban-col span {
  min-height: 48px;
  border-radius: var(--radius);
  background: rgba(79, 70, 229, 0.18);
}

.custom-nodes {
  inset: 82px 28px 88px;
}

.custom-nodes span {
  position: absolute;
  width: 54px;
  height: 54px;
  border-radius: var(--radius);
  background: var(--indigo);
  box-shadow: 0 14px 28px rgba(79, 70, 229, 0.22);
}

.custom-nodes span:nth-child(1) { left: 6%; top: 18%; }
.custom-nodes span:nth-child(2) { left: 34%; top: 4%; }
.custom-nodes span:nth-child(3) { left: 58%; top: 34%; }
.custom-nodes span:nth-child(4) { right: 8%; top: 10%; }
.custom-nodes span:nth-child(5) { left: 42%; bottom: 0; }

.custom-preview .preview-card.wide {
  top: auto;
  bottom: 24px;
  left: 28px;
  width: calc(100% - 56px);
}

.maintenance-dial {
  top: 94px;
  left: 36px;
  width: 126px;
  height: 126px;
  border-radius: 50%;
  background:
    radial-gradient(circle, #FFFFFF 0 42%, transparent 43%),
    conic-gradient(var(--indigo) 0 72%, rgba(79, 70, 229, 0.16) 72% 100%);
  box-shadow: 0 18px 36px rgba(79, 70, 229, 0.16);
}

.cmms-preview .timeline-row {
  left: 194px;
  top: 104px;
}

.cmms-preview .timeline-row.short {
  left: 194px;
  top: 160px;
  right: 20%;
}

.tool-grid {
  right: 34px;
  bottom: 34px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.55rem;
  width: 52%;
}

.tool-grid span {
  min-height: 58px;
  border-radius: var(--radius);
  background: rgba(79, 70, 229, 0.16);
  border: 1px solid rgba(79, 70, 229, 0.16);
}

.file-list {
  top: 92px;
  right: 34px;
  display: grid;
  gap: 0.75rem;
  width: 42%;
}

.file-list span {
  height: 34px;
  border-radius: 999px;
  background: rgba(79, 70, 229, 0.16);
}

@keyframes tabFade {
  from {
    opacity: 0;
    transform: translateY(6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.site-footer {
  display: grid;
  gap: 2rem;
  padding: 3rem 5vw;
  color: #d1d5db;
  border-top: 4px solid var(--indigo);
  background: #0b1020;
}

.site-footer p,
.footer-billing h2 {
  margin: 0;
}

.site-footer .brand {
  color: var(--white);
}

.footer-brand {
  display: grid;
  gap: 0.45rem;
  align-content: start;
}

.footer-billing {
  display: grid;
  gap: 0.35rem;
}

.footer-billing h2 {
  color: var(--white);
  font-size: 1rem;
  line-height: 1.2;
}

.footer-billing strong {
  color: var(--white);
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  align-items: flex-start;
}

.footer-nav a {
  color: #e5e7eb;
  font-weight: 800;
}

.footer-nav a:hover {
  color: var(--white);
}

.footer-copyright {
  margin: 0;
  color: #9ca3af;
  font-size: 0.8rem;
  text-align: center;
}

.cta-form-section {
  display: grid;
  gap: 2rem;
  align-items: start;
  color: var(--ink);
  background: var(--soft);
}

.cta-copy {
  max-width: 700px;
}

.cta-copy p:not(.eyebrow) {
  color: #5f5870;
}

.mini-cta-form {
  display: grid;
  gap: 1rem;
  padding: 1.35rem;
  border: 1px solid rgba(124, 58, 237, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 24px 70px rgba(88, 69, 128, 0.14);
  backdrop-filter: blur(18px);
}

.mini-cta-form label {
  color: #5f5870;
}

.mini-cta-form input,
.mini-cta-form select,
.mini-cta-form textarea {
  border-color: rgba(124, 58, 237, 0.14);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.78);
}

.mini-cta-form input::placeholder,
.mini-cta-form textarea::placeholder {
  color: #8b8498;
}

.story-layout {
  display: grid;
  gap: 1.5rem;
  padding: 4rem 5vw;
  background: var(--white);
}

.story-visual {
  position: relative;
  top: auto;
  height: 320px;
  pointer-events: auto;
}

.story-canvas {
  border: 0;
  background: transparent;
}

.story-steps {
  display: grid;
  gap: 1.25rem;
}

.story-step {
  min-height: 38vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.story-step .eyebrow {
  color: var(--indigo);
}

.comparison-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.comparison-table {
  width: 100%;
  min-width: 820px;
  border-collapse: collapse;
  background: var(--white);
}

.comparison-table th,
.comparison-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.comparison-table thead th {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
}

.highlight-row {
  background: rgba(79, 70, 229, 0.07);
}

.page-intro {
  padding: 5rem 5vw 2rem;
}

.page-intro h1,
.contact-layout h1 {
  font-size: clamp(1.65rem, 7vw, 4.7rem);
}

.calculator-shell {
  display: grid;
  gap: 1rem;
  padding: 2rem 5vw 5rem;
}

.calculator-panel,
.calculator-result,
.contact-form {
  padding: 1.4rem;
  box-shadow: var(--shadow);
}

.calculator-panel {
  display: grid;
  gap: 1.2rem;
}

.calculator-panel h2,
.contact-form h2 {
  font-size: 1.35rem;
  line-height: 1.2;
}

label {
  display: grid;
  gap: 0.45rem;
  color: var(--muted);
  font-weight: 700;
}

.required-mark {
  color: var(--indigo);
  font-weight: 900;
}

input,
select,
textarea {
  width: 100%;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  padding: 0.9rem 1rem;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--indigo);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--ink);
  box-shadow: 0 0 0 1000px var(--white) inset;
  transition: background-color 9999s ease-out;
}

.mini-cta-form input:-webkit-autofill,
.mini-cta-form input:-webkit-autofill:hover,
.mini-cta-form input:-webkit-autofill:focus,
.mini-cta-form textarea:-webkit-autofill,
.mini-cta-form textarea:-webkit-autofill:hover,
.mini-cta-form textarea:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--ink);
  box-shadow: 0 0 0 1000px #ffffff inset;
}

.phone-input {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 0.55rem;
}

.phone-input select,
.phone-input input {
  min-width: 0;
}

input[type="range"] {
  accent-color: var(--indigo);
  padding: 0;
}

.calculator-result {
  display: grid;
  gap: 1.2rem;
  align-content: start;
  background: var(--ink);
  color: var(--white);
}

.insight {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
}

.module-box h2 {
  font-size: 1.25rem;
}

.module-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.module-pill {
  padding: 0.55rem 0.75rem;
  border-radius: 999px;
  color: #e0e7ff;
  background: rgba(79, 70, 229, 0.28);
  font-weight: 800;
}

.saving-box {
  display: grid;
  gap: 1rem;
}

.saving-box strong {
  font-size: clamp(2rem, 8vw, 4rem);
  line-height: 1;
}

.saving-chart {
  height: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
}

.saving-bar {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--indigo), var(--success));
  transition: width 260ms ease;
}

.contact-layout {
  display: grid;
  gap: 2rem;
  min-height: calc(100vh - 72px);
  align-items: center;
  padding: 5rem 5vw;
  background: linear-gradient(180deg, #ffffff 0%, #f7f8fc 100%);
}

.contact-proof {
  display: grid;
  gap: 0.75rem;
  margin-top: 2rem;
}

.contact-proof span {
  padding-left: 1rem;
  border-left: 3px solid var(--indigo);
  color: var(--ink);
  font-weight: 800;
}

.contact-form {
  display: grid;
  gap: 1rem;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: rgba(17, 24, 39, 0.58);
  backdrop-filter: blur(12px);
}

.modal-overlay[hidden] {
  display: none;
}

.modal-dialog {
  display: grid;
  width: min(100%, 520px);
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}

.modal-dialog h2 {
  font-size: clamp(1.7rem, 5vw, 2.6rem);
}

.modal-dialog p:not(.eyebrow) {
  color: var(--muted);
}

.modal-dialog .modal-close {
  justify-self: end;
}

@media (max-width: 420px) {
  h1,
  .hero-subpage h1,
  .page-intro h1,
  .contact-layout h1 {
    font-size: clamp(1.55rem, 7vw, 1.95rem);
  }
}

@media (min-width: 760px) {
  .feature-grid,
  .calculator-shell {
    grid-template-columns: repeat(3, 1fr);
  }

  .capability-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .calculator-panel {
    grid-column: span 1;
  }

  .calculator-result {
    grid-column: span 2;
  }

  .split-section,
  .cta-form-section,
  .contact-layout {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  }

  .story-zigzag {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0 3rem;
  }

  .story-zigzag .story-visual {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 0;
    width: calc(var(--story-visual-width, calc((100% - 3rem) / 2)) * 1.5);
    height: clamp(390px, 51vh, 540px);
    transform: translate(var(--story-visual-x, calc(100% + 3rem)), var(--story-visual-y, 0px));
    transition: transform 900ms cubic-bezier(0.22, 1, 0.36, 1);
  }

  .story-visual-left {
    grid-column: 1 / -1;
  }

  .story-zigzag .story-steps {
    display: contents;
  }

  .story-zigzag .story-step {
    position: relative;
    z-index: 1;
    min-height: 42vh;
    max-width: 620px;
  }

  .story-zigzag .story-step:nth-child(odd) {
    grid-column: 1;
  }

  .story-zigzag .story-step:nth-child(even) {
    grid-column: 2;
  }

  .story-zigzag .story-step:nth-child(1) {
    grid-row: 1;
  }

  .story-zigzag .story-step:nth-child(2) {
    grid-row: 2;
  }

  .story-zigzag .story-step:nth-child(3) {
    grid-row: 3;
  }

  .story-zigzag .story-step:nth-child(4) {
    grid-row: 4;
  }

  .tab-panel {
    grid-template-columns: 0.82fr 1.18fr;
    align-items: stretch;
    padding: 1.6rem;
  }

  .module-preview {
    min-height: 380px;
  }

  .tab-list {
    display: flex;
    flex-wrap: wrap;
    overflow: visible;
  }

  .tab-button {
    width: 132px;
  }

  .site-footer {
    grid-template-columns: 1fr 1fr 0.8fr;
    align-items: start;
  }

  .footer-copyright {
    grid-column: 1 / -1;
  }
}

@media (min-width: 940px) {
  .nav-toggle {
    display: none;
  }

  .site-nav {
    position: static;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1.35rem;
    padding: 0;
    border: 0;
    box-shadow: none;
    background: transparent;
  }

  .site-nav a {
    padding: 0;
  }

  .nav-cta {
    padding: 0.65rem 0.9rem !important;
    border: 1px solid rgba(79, 70, 229, 0.18);
    border-radius: var(--radius);
    background: rgba(79, 70, 229, 0.08);
  }

  .section,
  .story-layout,
  .page-intro,
  .calculator-shell,
  .cta-form-section,
  .contact-layout {
    padding-left: 7vw;
    padding-right: 7vw;
  }

  .site-header,
  .site-footer {
    padding-left: 7vw;
    padding-right: 7vw;
  }

  .hero {
    padding-left: 7vw;
    padding-right: 7vw;
  }

  .capability-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

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