:root {
  --bg: #06111f;
  --bg-2: #0a1a2e;
  --panel: rgba(255, 255, 255, 0.075);
  --panel-strong: rgba(255, 255, 255, 0.13);
  --text: #f5f8ff;
  --muted: #aab8cc;
  --line: rgba(255, 255, 255, 0.14);
  --blue: #35a8ff;
  --cyan: #4ce3ff;
  --green: #74ffc6;
  --warning: #ffd166;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
  --radius: 28px;
  --radius-sm: 18px;
  --max: 1180px;
}

* {
  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(--text);
  background:
    radial-gradient(circle at top left, rgba(53, 168, 255, 0.26), transparent 34rem),
    radial-gradient(circle at top right, rgba(116, 255, 198, 0.12), transparent 28rem),
    linear-gradient(140deg, #03101e 0%, #06111f 45%, #08182b 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.75), transparent 74%);
}

img {
  max-width: 100%;
  display: block;
}

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

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

button {
  cursor: pointer;
}

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

.topbar {
  position: sticky;
  top: 14px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(4, 17, 31, 0.76);
  backdrop-filter: blur(18px);
  box-shadow: 0 16px 54px rgba(0, 0, 0, 0.25);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  padding: 5px;
}

.brand span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.brand strong {
  font-size: 1rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.brand small {
  color: var(--muted);
  font-size: 0.75rem;
  white-space: nowrap;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.main-nav a {
  color: rgba(245, 248, 255, 0.82);
  font-size: 0.92rem;
  font-weight: 700;
  padding: 11px 14px;
  border-radius: 999px;
  transition: 180ms ease;
}

.main-nav a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
}

.main-nav .nav-cta {
  color: #04111e;
  background: linear-gradient(135deg, var(--cyan), var(--green));
  box-shadow: 0 14px 38px rgba(76, 227, 255, 0.22);
}

.menu-toggle {
  display: none;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--text);
  border-radius: 999px;
}

.section-padding {
  padding: 92px 0;
}

.compact-section {
  padding-top: 48px;
}

.compact-top {
  padding-top: 24px;
}

.hero {
  min-height: calc(100vh - 94px);
  display: grid;
  align-items: center;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
  align-items: center;
  gap: 42px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 8px 12px;
  border: 1px solid rgba(116, 255, 198, 0.22);
  border-radius: 999px;
  background: rgba(116, 255, 198, 0.08);
}

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

.hero h1,
.form-hero h1 {
  max-width: 850px;
  margin: 20px 0 20px;
  font-size: clamp(2.45rem, 7vw, 5.8rem);
  line-height: 0.95;
  letter-spacing: -0.075em;
}

.hero p,
.form-hero p,
.section-heading p,
.panel p,
.security-band p {
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.75;
}

.hero-copy p {
  max-width: 680px;
}

.hero-actions,
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 900;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

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

.btn.primary {
  color: #04111e;
  background: linear-gradient(135deg, var(--cyan), var(--green));
  box-shadow: 0 20px 48px rgba(76, 227, 255, 0.24);
  border-color: transparent;
}

.btn.primary.dark {
  color: #04111e;
}

.btn.secondary {
  color: var(--text);
  background: rgba(255, 255, 255, 0.075);
}

.trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.trust-strip span {
  color: rgba(245, 248, 255, 0.84);
  font-size: 0.82rem;
  font-weight: 800;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,0.055);
}

.hero-card {
  position: relative;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(145deg, rgba(255,255,255,0.13), rgba(255,255,255,0.045)),
    radial-gradient(circle at top right, rgba(76, 227, 255, 0.22), transparent 18rem);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: auto -20% -42% -20%;
  height: 240px;
  background: radial-gradient(circle, rgba(116, 255, 198, 0.2), transparent 68%);
  pointer-events: none;
}

.status-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(245,248,255,0.86);
  margin-bottom: 18px;
}

.pulse {
  width: 11px;
  height: 11px;
  border-radius: 99px;
  background: var(--green);
  box-shadow: 0 0 0 8px rgba(116, 255, 198, 0.12);
}

.metric-card {
  position: relative;
  z-index: 1;
  min-height: 118px;
  padding: 18px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 22px;
  background: rgba(4, 17, 31, 0.54);
}

.metric-card.big {
  min-height: 240px;
  display: grid;
  align-content: end;
  margin-bottom: 14px;
  background:
    linear-gradient(150deg, rgba(53, 168, 255, 0.2), rgba(255,255,255,0.06)),
    rgba(4, 17, 31, 0.44);
}

.metric-card span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.metric-card strong {
  display: block;
  margin-top: 10px;
  font-size: clamp(1.25rem, 2.8vw, 2.7rem);
  letter-spacing: -0.05em;
}

.metric-card small {
  display: block;
  max-width: 360px;
  color: var(--muted);
  margin-top: 10px;
  line-height: 1.6;
}

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

.section-heading {
  max-width: 740px;
  margin-bottom: 28px;
}

.section-heading h2,
.panel h2,
.security-band h2 {
  margin: 18px 0 12px;
  font-size: clamp(2rem, 4.6vw, 4rem);
  line-height: 1;
  letter-spacing: -0.06em;
}

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

.service-card,
.panel,
.preview-panel,
.form-card,
.security-band {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.07);
  box-shadow: 0 16px 54px rgba(0,0,0,0.18);
}

.service-card {
  padding: 24px;
  min-height: 280px;
}

.icon-box,
.form-kicker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 34px;
  padding: 0 10px;
  color: #04111e;
  font-size: 0.78rem;
  font-weight: 900;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--cyan), var(--green));
}

.service-card h3 {
  margin: 24px 0 12px;
  font-size: 1.25rem;
  letter-spacing: -0.035em;
}

.service-card p {
  color: var(--muted);
  line-height: 1.7;
}

.split-section {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 20px;
  align-items: stretch;
}

.panel,
.steps,
.security-band {
  padding: 34px;
}

.text-link {
  display: inline-flex;
  margin-top: 10px;
  color: var(--green);
  font-weight: 900;
}

.steps {
  display: grid;
  gap: 12px;
  border-radius: var(--radius);
  background: rgba(255,255,255,0.045);
}

.step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255,255,255,0.055);
}

.step span {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  color: #04111e;
  font-weight: 900;
  border-radius: 50%;
  background: var(--cyan);
}

.step p {
  margin: 4px 0 0;
  color: rgba(245,248,255,0.86);
  line-height: 1.55;
}

.security-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 54px;
  background:
    radial-gradient(circle at top right, rgba(116,255,198,0.16), transparent 20rem),
    rgba(255,255,255,0.07);
}

.security-band p {
  margin-bottom: 0;
  max-width: 720px;
}

.site-footer {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto 18px;
  display: grid;
  place-items: center;
  gap: 6px;
  color: var(--muted);
  text-align: center;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255,255,255,0.045);
}

.site-footer strong {
  color: var(--text);
}

.form-hero {
  padding-bottom: 22px;
}

.form-hero h1 {
  font-size: clamp(2.15rem, 5.6vw, 4.7rem);
}

.form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.82fr);
  gap: 20px;
  align-items: start;
}

.intake-form,
.preview-panel {
  display: grid;
  gap: 18px;
}

.form-card,
.preview-panel {
  padding: 22px;
}

.form-title-row,
.preview-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.form-title-row h2,
.preview-top h2 {
  margin: 8px 0 0;
  font-size: 1.2rem;
  letter-spacing: -0.04em;
}

.form-title-row small {
  color: var(--muted);
  font-weight: 800;
}

.field-grid {
  display: grid;
  gap: 14px;
}

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

label,
.single-field {
  display: grid;
  gap: 8px;
  color: rgba(245, 248, 255, 0.88);
  font-size: 0.9rem;
  font-weight: 800;
}

label b {
  color: var(--green);
}

.full {
  grid-column: 1 / -1;
}

input,
select,
textarea {
  width: 100%;
  min-height: 48px;
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 16px;
  outline: none;
  background: rgba(4, 17, 31, 0.62);
  padding: 12px 14px;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

select option {
  color: #071221;
}

textarea {
  resize: vertical;
  min-height: 120px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(76, 227, 255, 0.68);
  box-shadow: 0 0 0 4px rgba(76, 227, 255, 0.12);
  background: rgba(4, 17, 31, 0.84);
}

.small-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid rgba(76, 227, 255, 0.24);
  border-radius: 999px;
  color: var(--text);
  background: rgba(76, 227, 255, 0.1);
  padding: 0 12px;
  font-size: 0.82rem;
  font-weight: 900;
}

.small-btn.accent {
  color: #04111e;
  border-color: transparent;
  background: linear-gradient(135deg, var(--cyan), var(--green));
}

.helper-text {
  color: var(--muted);
  margin-bottom: 14px;
  line-height: 1.65;
}

.dynamic-list {
  display: grid;
  gap: 12px;
}

.dynamic-item {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  background: rgba(4, 17, 31, 0.38);
}

.dynamic-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.dynamic-head strong {
  letter-spacing: -0.02em;
}

.remove-btn {
  min-height: 34px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 999px;
  color: rgba(245,248,255,0.82);
  background: rgba(255,255,255,0.07);
  padding: 0 10px;
  font-size: 0.78rem;
  font-weight: 900;
}

.sticky-actions {
  position: sticky;
  bottom: 14px;
  z-index: 12;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(4,17,31,0.78);
  backdrop-filter: blur(18px);
}

.preview-panel {
  position: sticky;
  top: 98px;
  max-height: calc(100vh - 116px);
  overflow: auto;
}

.preview-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.print-area {
  color: #122033;
  background: #ffffff;
  border-radius: 22px;
  overflow: hidden;
}

.doc-cover {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 22px;
  background: linear-gradient(135deg, #06111f, #102a46);
  color: #ffffff;
}

.doc-cover img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  background: #ffffff;
  border-radius: 16px;
  padding: 6px;
}

.doc-cover h2 {
  margin: 0;
  letter-spacing: -0.04em;
}

.doc-cover p {
  margin: 4px 0 0;
  color: rgba(255,255,255,0.74);
}

.generated-doc {
  padding: 24px;
}

.empty-state {
  min-height: 280px;
  display: grid;
  place-items: center;
  text-align: center;
  color: #526171;
}

.empty-state h3 {
  margin: 0 0 8px;
  color: #132033;
}

.doc-section {
  margin-bottom: 22px;
  break-inside: avoid;
}

.doc-section h3 {
  margin: 0 0 10px;
  color: #071221;
  font-size: 1rem;
  padding-bottom: 8px;
  border-bottom: 2px solid #e7edf5;
}

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

.doc-field {
  padding: 10px 12px;
  border: 1px solid #e4eaf2;
  border-radius: 12px;
  background: #f8fafc;
}

.doc-field strong {
  display: block;
  color: #526171;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.doc-field span {
  color: #122033;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.doc-table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border-radius: 12px;
  font-size: 0.86rem;
}

.doc-table th,
.doc-table td {
  text-align: left;
  vertical-align: top;
  padding: 10px;
  border: 1px solid #e4eaf2;
}

.doc-table th {
  color: #071221;
  background: #eef6ff;
}

.doc-table td {
  color: #203047;
}

.doc-note {
  white-space: pre-wrap;
  line-height: 1.62;
  color: #203047;
  padding: 12px;
  border: 1px solid #e4eaf2;
  border-radius: 12px;
  background: #f8fafc;
}

.doc-footer {
  display: grid;
  place-items: center;
  gap: 4px;
  color: #5b6879;
  text-align: center;
  padding: 18px 22px;
  border-top: 1px solid #e4eaf2;
}

.doc-footer strong {
  color: #122033;
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  animation: reveal 720ms ease forwards;
}

.delay-1 { animation-delay: 120ms; }
.delay-2 { animation-delay: 220ms; }
.delay-3 { animation-delay: 320ms; }

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

@media (max-width: 980px) {
  .hero-grid,
  .split-section,
  .form-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

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

  .preview-panel {
    position: relative;
    top: auto;
    max-height: none;
  }

  .security-band {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 760px) {
  .site-shell {
    width: min(100% - 22px, var(--max));
  }

  .topbar {
    top: 8px;
    border-radius: 20px;
  }

  .brand img {
    width: 44px;
    height: 44px;
  }

  .brand small {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    left: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(4, 17, 31, 0.94);
    backdrop-filter: blur(18px);
  }

  .main-nav.is-open {
    display: flex;
  }

  .main-nav a {
    width: 100%;
    text-align: center;
  }

  .section-padding {
    padding: 58px 0;
  }

  .compact-top {
    padding-top: 12px;
  }

  .hero h1,
  .form-hero h1 {
    letter-spacing: -0.06em;
  }

  .hero-actions,
  .form-actions,
  .btn {
    width: 100%;
  }

  .btn {
    min-height: 54px;
  }

  .mini-grid,
  .service-grid,
  .field-grid.two,
  .doc-grid {
    grid-template-columns: 1fr;
  }

  .form-title-row,
  .preview-top {
    align-items: flex-start;
    flex-direction: column;
  }

  .small-btn,
  .preview-actions {
    width: 100%;
  }

  .preview-actions .small-btn {
    min-height: 44px;
  }

  .panel,
  .steps,
  .security-band,
  .form-card,
  .preview-panel {
    padding: 18px;
    border-radius: 22px;
  }

  .doc-cover {
    align-items: flex-start;
    flex-direction: column;
  }

  .doc-table {
    font-size: 0.78rem;
  }

  .doc-table th,
  .doc-table td {
    padding: 8px;
  }
}

@media print {
  body {
    background: #ffffff !important;
  }

  body::before,
  .topbar,
  .no-print,
  .intake-form,
  .site-footer,
  .form-hero {
    display: none !important;
  }

  .site-shell,
  .form-layout,
  .preview-panel,
  .print-area {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
    box-shadow: none !important;
    border: 0 !important;
    background: #ffffff !important;
    color: #111827 !important;
    position: static !important;
    max-height: none !important;
    overflow: visible !important;
  }

  .generated-doc,
  .doc-cover,
  .doc-footer {
    border-radius: 0 !important;
  }

  .doc-cover {
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  @page {
    margin: 0.45in;
  }
}
