:root {
  --bg: #f8f6f2;
  --bg-rgb: 248, 246, 242;
  --surface: rgba(251, 250, 244, 0.76);
  --surface-solid: #fbfaf4;
  --text: #0b0f19;
  --text-dim: #475569;
  --accent: #d45d00;
  --accent-2: #9f3f00;
  --line: rgba(18, 31, 39, 0.13);
  --line-strong: rgba(18, 31, 39, 0.22);
  --shadow: 0 22px 70px rgba(28, 39, 37, 0.14);
  --radius: 8px;
  --font-display: "Newsreader", Georgia, serif;
  --font-body: "Instrument Sans", ui-sans-serif, system-ui, sans-serif;
  --page-pad: clamp(18px, 3vw, 40px);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 250, 0.58), rgba(var(--bg-rgb), 0.92) 42%, var(--bg)),
    var(--bg);
  color: var(--text);
  font-family: var(--font-body);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 1200 700' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23d45d00' stroke-opacity='.08' stroke-width='1.3'%3E%3Cpath d='M-80 120 C 160 40 290 210 520 140 S 920 70 1280 145'/%3E%3Cpath d='M-80 280 C 190 190 320 360 550 285 S 980 210 1280 300'/%3E%3Cpath d='M-80 500 C 170 410 330 560 570 500 S 980 420 1280 520'/%3E%3C/g%3E%3C/svg%3E");
  background-size: cover;
}

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

button,
input {
  font: inherit;
}

.site-nav {
  position: fixed;
  left: 50%;
  top: 14px;
  z-index: 50;
  width: min(calc(100% - 28px), 990px);
  transform: translateX(-50%);
}

.nav-shell {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  min-height: 56px;
  border: 1px solid rgba(18, 31, 39, 0.12);
  border-radius: 999px;
  background: rgba(251, 250, 244, 0.62);
  box-shadow: 0 8px 40px rgba(18, 31, 39, 0.06);
  backdrop-filter: blur(18px);
}

.site-nav.scrolled .nav-shell {
  background: rgba(var(--bg-rgb), 0.88);
  box-shadow: var(--shadow);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding-left: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(18, 31, 39, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--accent);
}

.nav-center {
  display: flex;
  justify-content: center;
  gap: 3px;
}

.nav-center a {
  border-radius: 999px;
  padding: 9px 13px;
  color: rgba(18, 31, 39, 0.72);
  font-size: 14px;
  font-weight: 750;
}

.nav-center a:hover,
.nav-center a.active {
  background: rgba(212, 93, 0, 0.08);
  color: var(--accent);
}

.nav-cta,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border: 1px solid rgba(18, 31, 39, 0.12);
  border-radius: 999px;
  padding: 12px 18px;
  font-weight: 850;
  cursor: pointer;
}

.nav-cta,
.button.dark {
  background: var(--text);
  color: #fffaf0;
}

.button.primary {
  border-color: rgba(212, 93, 0, 0.28);
  background: var(--accent);
  color: #fffaf0;
}

.button.ghost {
  background: rgba(251, 250, 244, 0.7);
  color: var(--text);
}

.container {
  width: min(100% - calc(var(--page-pad) * 2), 1120px);
  margin-inline: auto;
}

.page-hero {
  display: grid;
  min-height: min(840px, 100dvh);
  align-items: center;
  padding: 128px var(--page-pad) 70px;
  text-align: center;
}

.page-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 auto 18px;
  border: 1px solid rgba(212, 93, 0, 0.18);
  border-radius: 999px;
  background: rgba(212, 93, 0, 0.07);
  padding: 8px 12px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 650;
  letter-spacing: 0;
}

h1 {
  max-width: 980px;
  margin-inline: auto;
  font-size: clamp(48px, 8.5vw, 112px);
  line-height: 0.9;
}

h2 {
  font-size: clamp(38px, 5.4vw, 72px);
  line-height: 0.94;
}

.lead {
  max-width: 740px;
  margin: 24px auto 0;
  color: var(--text-dim);
  font-size: clamp(17px, 2vw, 21px);
  font-weight: 600;
  line-height: 1.56;
}

.hero-actions,
.action-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 34px;
}

.section {
  padding: clamp(82px, 11vw, 150px) 0;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1.1fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: start;
}

.panel,
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.panel {
  padding: clamp(24px, 4vw, 42px);
}

.card {
  padding: 24px;
}

.muted {
  color: var(--text-dim);
}

.metric {
  margin-top: 22px;
  border: 1px solid rgba(212, 93, 0, 0.18);
  border-radius: var(--radius);
  background: rgba(212, 93, 0, 0.08);
  padding: 22px;
}

.metric span {
  display: block;
  color: var(--accent);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.metric strong {
  display: block;
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: clamp(42px, 6vw, 72px);
  font-weight: 650;
  line-height: 0.94;
}

.slider-group {
  display: grid;
  gap: 22px;
}

.field-row {
  display: grid;
  gap: 10px;
}

label {
  color: var(--text-dim);
  font-weight: 800;
}

input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

input[type="text"],
input[type="tel"],
input[type="number"] {
  width: 100%;
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.58);
  padding: 0 16px;
  color: var(--text);
  font-weight: 700;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.hidden-field {
  display: none;
}

.form-grid .button {
  grid-column: 1 / -1;
  width: 100%;
}

.step-grid,
.matrix-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.step-card strong,
.card strong {
  display: block;
  font-size: 20px;
}

.step-card p,
.card p {
  margin: 10px 0 0;
  color: var(--text-dim);
  font-weight: 600;
  line-height: 1.55;
}

.tab-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.tab-button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(251, 250, 244, 0.7);
  padding: 9px 13px;
  color: var(--text-dim);
  font-weight: 850;
  cursor: pointer;
}

.tab-button.active {
  border-color: rgba(212, 93, 0, 0.26);
  background: rgba(212, 93, 0, 0.09);
  color: var(--accent);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.flow {
  display: grid;
  gap: 12px;
}

.flow-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 12px;
  align-items: center;
}

.flow-node {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.52);
  padding: 16px;
  font-weight: 850;
}

.flow-arrow {
  color: var(--accent);
  font-weight: 900;
}

table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: var(--radius);
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 15px;
  text-align: left;
}

th {
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.demo-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.76fr) minmax(360px, 1fr);
  gap: clamp(36px, 5vw, 78px);
  align-items: center;
}

.demo-hero {
  min-height: min(760px, 100dvh);
  padding-top: 116px;
}

.demo-hero-copy {
  text-align: left;
  max-width: 520px;
}

.demo-hero h1 {
  max-width: 560px;
  margin-inline: 0;
  font-size: clamp(62px, 7.2vw, 104px);
  line-height: 0.88;
}

.demo-hero .lead {
  max-width: 520px;
  margin-top: 24px;
  font-size: clamp(18px, 1.65vw, 22px);
}

.demo-note-strip {
  margin-top: 20px;
  max-width: 470px;
  border-left: 3px solid rgba(212, 93, 0, 0.72);
  padding-left: 14px;
  color: rgba(18, 31, 39, 0.62);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.5;
}

.call-card {
  min-height: 510px;
  overflow: hidden;
  align-self: center;
}

.call-top {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 18px;
  color: var(--text-dim);
  font-size: 13px;
  font-weight: 850;
  text-transform: uppercase;
}

.message-stack {
  display: grid;
  gap: 14px;
  padding: clamp(24px, 4vw, 42px);
}

.message {
  max-width: 78%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.54);
  padding: 16px 18px;
  color: rgba(18, 31, 39, 0.75);
  font-weight: 650;
  line-height: 1.48;
}

.message.ai {
  justify-self: end;
  border-color: rgba(212, 93, 0, 0.18);
  background: rgba(212, 93, 0, 0.08);
  color: #7a3000;
}

.demo-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  place-items: center;
  background: rgba(11, 15, 25, 0.52);
  padding: 16px;
}

.demo-modal.open {
  display: grid;
}

.demo-dialog {
  width: min(100%, 560px);
  overflow: hidden;
  border: 1px solid rgba(212, 93, 0, 0.22);
  border-radius: var(--radius);
  background: var(--surface-solid);
  box-shadow: var(--shadow);
}

.demo-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  background: var(--text);
  padding: 24px;
  color: #fffaf0;
}

.demo-header h2 {
  font-family: var(--font-body);
  font-size: 30px;
  line-height: 1.1;
}

.close-button {
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 250, 240, 0.2);
  border-radius: 999px;
  background: transparent;
  color: #fffaf0;
  cursor: pointer;
}

.demo-body {
  display: grid;
  gap: 18px;
  padding: 24px;
  text-align: center;
}

.demo-note {
  margin: 0;
  color: var(--text-dim);
  font-weight: 650;
  line-height: 1.55;
}

.footer {
  border-top: 1px solid rgba(18, 31, 39, 0.08);
  padding: 34px var(--page-pad);
}

.footer-inner {
  display: flex;
  max-width: 1120px;
  margin: 0 auto;
  justify-content: space-between;
  gap: 24px;
  color: var(--text-dim);
  font-size: 14px;
  font-weight: 700;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

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

  .nav-shell {
    grid-template-columns: 1fr auto;
  }

  .split,
  .demo-layout,
  .step-grid,
  .matrix-grid {
    grid-template-columns: 1fr;
  }

  .demo-hero-copy {
    max-width: none;
  }

  .demo-hero h1 {
    max-width: 760px;
    font-size: clamp(50px, 10vw, 76px);
  }

  .call-card {
    min-height: auto;
  }

  h1 {
    font-size: clamp(44px, 12vw, 70px);
  }
}

@media (max-width: 620px) {
  .site-nav {
    top: 10px;
    width: calc(100% - 16px);
  }

  .brand span {
    max-width: 96px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .nav-cta {
    padding-inline: 14px;
  }

  .page-hero {
    min-height: auto;
    padding-top: 112px;
  }

  .demo-hero {
    padding-top: 112px;
  }

  .demo-hero h1 {
    font-size: clamp(44px, 15vw, 64px);
  }

  .message {
    max-width: 100%;
  }

  .hero-actions,
  .action-row {
    align-items: stretch;
    flex-direction: column;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .flow-row {
    grid-template-columns: 1fr;
  }

  .flow-arrow {
    transform: rotate(90deg);
    justify-self: center;
  }

  .footer-inner {
    flex-direction: column;
  }
}
