:root {
  --ink: #0f1419;
  --muted: #5a6570;
  --line: #e2e6ea;
  --paper: #ffffff;
  --soft: #f4f6f8;
  --brand: #0d5c5e;
  --brand-dark: #084244;
  --brand-soft: rgba(13, 92, 94, 0.12);
  --accent: #b87a28;
  --success: #1a6b42;
  --danger: #9e2f2f;
  --shadow: 0 12px 40px rgba(15, 20, 25, 0.08);
  --shadow-sm: 0 1px 3px rgba(15, 20, 25, 0.06);
  --radius: 8px;
  --radius-lg: 12px;
  --max: 1080px;
  --page-pad-x: max(1.25rem, calc(50vw - var(--max) / 2));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

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

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  padding: 0.875rem var(--page-pad-x);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #fff;
  background: var(--brand);
  border-radius: var(--radius);
  font-size: 0.9rem;
}

.brand-logo {
  display: block;
  width: 38px;
  height: 38px;
  object-fit: contain;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.125rem;
  color: var(--muted);
  font-size: 0.875rem;
}

.nav a {
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  transition: color 0.15s ease, background 0.15s ease;
}

.nav a:hover {
  color: var(--brand-dark);
  background: var(--brand-soft);
}

.topbar-cta,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0 1.125rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.topbar-cta:hover,
.button.primary:hover {
  background: var(--brand-dark);
}

.button.secondary:hover {
  border-color: #c5ccd4;
  background: var(--soft);
}

.topbar-cta,
.button.primary {
  color: #fff;
  background: var(--brand);
}

.button.secondary {
  color: var(--brand-dark);
  background: var(--paper);
  border-color: var(--line);
}

.button.full {
  width: 100%;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.92fr);
  align-items: center;
  gap: clamp(1.75rem, 4vw, 3rem);
  width: 100%;
  min-height: min(90vh, 52rem);
  padding: clamp(2.5rem, 6vw, 5rem) var(--page-pad-x) clamp(2.5rem, 5vw, 4rem);
  background: linear-gradient(180deg, #f8fafb 0%, var(--soft) 100%);
  border-bottom: 1px solid var(--line);
}

.hero-copy {
  max-width: 36rem;
}

.eyebrow {
  margin: 0 0 0.625rem;
  color: var(--brand);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: break-word;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 4.2vw + 0.5rem, 3.25rem);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.hero-copy > p:not(.eyebrow) {
  margin: 1.125rem 0 0;
  max-width: 32rem;
  color: var(--muted);
  font-size: 1.0625rem;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.trust-row span {
  padding: 0.375rem 0.75rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.8125rem;
}

.hero-panel {
  padding: 0.875rem;
  background: #1a2330;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.mini-browser {
  display: flex;
  gap: 0.375rem;
  padding-bottom: 0.75rem;
}

.mini-browser span {
  width: 9px;
  height: 9px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 999px;
}

.sample-card {
  padding: clamp(1.125rem, 3vw, 1.75rem);
  background: var(--paper);
  border-radius: var(--radius);
}

.sample-card strong {
  display: block;
  margin: 0.25rem 0 0.875rem;
  color: var(--brand-dark);
  font-size: clamp(1.5rem, 2.5vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.sample-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.sample-card ul,
.price-card ul {
  margin: 0;
  padding-left: 1.125rem;
  color: var(--muted);
  line-height: 1.65;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: 100%;
  padding: 0 var(--page-pad-x);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.metrics div {
  padding: 1.75rem 1rem;
  border-right: 1px solid var(--line);
}

.metrics div:first-child {
  padding-left: 0;
}

.metrics div:last-child {
  padding-right: 0;
  border-right: 0;
}

.metrics strong {
  display: block;
  font-size: 1.625rem;
  font-weight: 700;
  color: var(--brand-dark);
  letter-spacing: -0.02em;
}

.metrics span {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.875rem;
}

.early-access,
.workspace,
.workflow,
.pricing,
.saved {
  width: 100%;
  padding: clamp(3rem, 6vw, 5rem) var(--page-pad-x);
}

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

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.5rem, 2.2vw + 0.5rem, 2.125rem);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section-heading p:not(.eyebrow) {
  margin: 0.875rem 0 0;
  color: var(--muted);
  font-size: 1.0625rem;
  line-height: 1.6;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 1.5rem;
  align-items: start;
}

.quote-form,
.access-form,
.quote-preview,
.price-card,
.access-panel,
.saved-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.quote-form,
.access-form {
  display: grid;
  gap: 1.125rem;
  padding: 1.25rem;
}

.early-access {
  background: var(--soft);
  border-bottom: 1px solid var(--line);
}

.access-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 1.5rem;
  align-items: start;
}

.access-panel {
  padding: 1.5rem;
}

.access-panel ol {
  margin: 0.875rem 0 1.25rem;
  padding-left: 1.125rem;
  color: var(--muted);
  line-height: 1.65;
}

.form-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

.form-note.success {
  color: var(--success);
  font-weight: 600;
}

.legal-page {
  max-width: 42rem;
  min-height: calc(100vh - 10rem);
  padding: clamp(2.5rem, 6vw, 4rem) var(--page-pad-x);
  margin: 0 auto;
}

.legal-page h1 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
}

.legal-page h2 {
  margin-top: 2.25rem;
  font-size: 1.125rem;
}

.legal-page p,
.legal-page li {
  color: var(--muted);
  line-height: 1.7;
}

.legal-page a {
  color: var(--brand);
  font-weight: 600;
}

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

label {
  display: grid;
  gap: 0.375rem;
  color: #374151;
  font-size: 0.8125rem;
  font-weight: 600;
}

input,
textarea,
select {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.625rem 0.75rem;
  color: var(--ink);
  background: #fafbfc;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

textarea {
  resize: vertical;
  line-height: 1.5;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.quote-preview {
  position: sticky;
  top: 4.25rem;
  overflow: hidden;
}

.preview-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.125rem;
  border-bottom: 1px solid var(--line);
  background: #fafbfc;
}

.preview-toolbar h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.toolbar-actions {
  display: flex;
  flex-shrink: 0;
  gap: 0.5rem;
}

.icon-button {
  min-width: 3.25rem;
  min-height: 2.25rem;
  color: var(--brand-dark);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.8125rem;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.icon-button:hover {
  background: var(--soft);
}

.quote-document {
  min-height: 28rem;
  padding: 1.5rem;
  background: #fff;
}

.empty-state {
  display: grid;
  place-items: center;
  align-content: center;
  min-height: 24rem;
  padding: 1.5rem;
  color: var(--muted);
  text-align: center;
}

.empty-state strong {
  color: var(--ink);
  font-size: 1.125rem;
  font-weight: 600;
}

.quote-head {
  display: flex;
  justify-content: space-between;
  gap: 1.25rem;
  padding-bottom: 1.125rem;
  border-bottom: 2px solid var(--ink);
}

.quote-head h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
}

.quote-meta {
  display: grid;
  gap: 0.25rem;
  color: var(--muted);
  text-align: right;
  font-size: 0.8125rem;
}

.quote-section {
  margin-top: 1.375rem;
}

.quote-section h4 {
  margin: 0 0 0.5rem;
  color: var(--brand-dark);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.line-items {
  width: 100%;
  border-collapse: collapse;
}

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

.line-items th:last-child,
.line-items td:last-child {
  text-align: right;
}

.quote-total {
  display: grid;
  justify-content: end;
  gap: 0.25rem;
  margin-top: 1rem;
  text-align: right;
}

.quote-total strong {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--brand-dark);
}

.follow-up {
  padding: 0.875rem 1rem;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: #374151;
  line-height: 1.55;
}

.pricing {
  background: var(--paper);
  border-top: 1px solid var(--line);
}

.workspace {
  background: var(--paper);
}

.workflow {
  background: var(--soft);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.workflow-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.workflow-grid article {
  min-height: 11rem;
  padding: 1.125rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.workflow-grid span {
  display: grid;
  width: 1.875rem;
  height: 1.875rem;
  place-items: center;
  color: #fff;
  background: var(--brand);
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.8125rem;
}

.workflow-grid h3 {
  margin: 0.875rem 0 0.375rem;
  font-size: 1rem;
  font-weight: 600;
}

.workflow-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.55;
}

.pricing-grid {
  display: grid;
  gap: 1.125rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.price-card {
  padding: 1.5rem;
}

.price-card.featured {
  border-color: var(--brand);
  box-shadow: 0 0 0 1px rgba(13, 92, 94, 0.15), var(--shadow-sm);
}

.price-card.featured::before {
  display: none;
}

.plan {
  margin: 0;
  color: var(--brand);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.price-card h3 {
  margin: 0.5rem 0 0.375rem;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.price-card h3 span {
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 500;
}

.price-card p:not(.plan) {
  margin: 0 0 0.875rem;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.55;
}

.saved-list {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.saved-card {
  padding: 1.125rem;
}

.saved-card strong {
  display: block;
  margin-bottom: 0.375rem;
  font-weight: 600;
}

.saved-card span {
  display: block;
  color: var(--muted);
  font-size: 0.8125rem;
}

.saved-card button {
  margin-top: 0.875rem;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.5rem;
  width: 100%;
  padding: 1.75rem var(--page-pad-x) 2.25rem;
  color: rgba(255, 255, 255, 0.75);
  background: #0f1419;
  font-size: 0.875rem;
}

.footer span:first-child {
  color: #fff;
  font-weight: 700;
}

.footer span:nth-child(2) {
  flex: 1 1 12rem;
  min-width: 0;
  line-height: 1.5;
}

.footer a {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  transition: color 0.15s ease;
}

.footer a:hover {
  color: #fff;
}

@media (max-width: 1024px) {
  .workflow-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .nav {
    display: none;
  }

  .hero,
  .access-layout,
  .app-shell {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 0;
    padding-top: 2rem;
  }

  .quote-preview {
    position: static;
  }
}

@media (max-width: 900px) {
  .pricing-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  :root {
    --page-pad-x: 1.25rem;
  }

  .topbar-cta {
    display: none;
  }

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

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

  .saved-list {
    grid-template-columns: 1fr;
  }

  .metrics div {
    padding-left: 0;
    padding-right: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
  }

  .metrics div:last-child {
    border-bottom: 0;
  }

  .preview-toolbar,
  .quote-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .quote-meta {
    text-align: left;
  }

  .footer span:nth-child(2) {
    flex-basis: 100%;
  }
}

@media print {
  body * {
    visibility: hidden;
  }

  #leadDocument,
  #leadDocument * {
    visibility: visible;
  }

  #leadDocument {
    position: absolute;
    inset: 0;
    width: 100%;
    min-height: auto;
    padding: 1.5rem;
  }
}
