:root {
  --bg: #f3ecd9;
  --bg-soft: #fbf8f0;
  --ink: #16211e;
  --muted: #4d645e;
  --panel: rgba(255, 250, 241, 0.82);
  --line: rgba(22, 33, 30, 0.12);
  --brand: #175848;
  --brand-dark: #103b31;
  --accent: #c9803d;
  --accent-deep: #9f5f2a;
  --shadow: 0 24px 60px rgba(22, 33, 30, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Space Grotesk", "Avenir Next", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(201, 128, 61, 0.2), transparent 28%),
    radial-gradient(circle at 80% 10%, rgba(23, 88, 72, 0.22), transparent 24%),
    linear-gradient(180deg, #f8f2e4 0%, #f3ecd9 100%);
}

a {
  color: inherit;
}

.page-shell {
  position: relative;
  overflow: hidden;
}

.ambient {
  position: absolute;
  border-radius: 999px;
  filter: blur(18px);
  opacity: 0.35;
  pointer-events: none;
}

.ambient-left {
  top: 18rem;
  left: -8rem;
  width: 18rem;
  height: 18rem;
  background: rgba(23, 88, 72, 0.26);
}

.ambient-right {
  top: 46rem;
  right: -6rem;
  width: 22rem;
  height: 22rem;
  background: rgba(201, 128, 61, 0.28);
}

.masthead,
.section {
  width: min(1180px, calc(100% - 2.5rem));
  margin: 0 auto;
}

.masthead {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 2.25rem;
  padding: 1.35rem;
  align-items: stretch;
  position: relative;
  margin-top: 1rem;
  border: 1px solid rgba(22, 33, 30, 0.12);
  border-radius: 2.25rem;
  background:
    radial-gradient(circle at 12% 18%, rgba(23, 88, 72, 0.08), transparent 26%),
    radial-gradient(circle at 84% 14%, rgba(201, 128, 61, 0.11), transparent 22%),
    linear-gradient(135deg, rgba(255, 251, 244, 0.9), rgba(246, 238, 222, 0.78));
  box-shadow: 0 28px 80px rgba(22, 33, 30, 0.1);
  overflow: hidden;
}

.masthead::before {
  content: "";
  position: absolute;
  inset: auto -8% -35% 48%;
  height: 22rem;
  background: radial-gradient(circle, rgba(23, 88, 72, 0.08), transparent 68%);
  pointer-events: none;
}

.masthead > * {
  position: relative;
  z-index: 1;
}

.brand img {
  width: min(100%, 360px);
  display: block;
}

.masthead-copy {
  display: grid;
  gap: 1.05rem;
  align-content: center;
  padding: 0.75rem 0.35rem 0.75rem 0.15rem;
}

.eyebrow {
  margin: 0;
  color: var(--brand);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.8rem;
  font-weight: 700;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.05;
}

h1 {
  font-size: clamp(3rem, 7vw, 6rem);
  max-width: 11ch;
  text-wrap: balance;
  letter-spacing: -0.05em;
}

h2 {
  font-size: clamp(2rem, 4vw, 3.6rem);
  max-width: 12ch;
}

h3 {
  font-size: 1.15rem;
}

.lede,
.problem-list p,
.workflow-steps p,
.workflow-intro,
.security-points p,
.use-case-grid p,
.contact-copy,
.chat-intro,
.chat-status,
.message-text {
  font-size: 1.02rem;
  line-height: 1.65;
  color: var(--muted);
}

.workflow-intro a,
.contact-copy a {
  color: var(--brand);
  font-weight: 700;
  text-decoration-thickness: 0.12em;
  text-underline-offset: 0.18em;
}

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

.hero-signals {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.hero-signals span {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 250, 241, 0.72);
  border: 1px solid rgba(22, 33, 30, 0.08);
  color: var(--brand-dark);
  font-size: 0.92rem;
  font-weight: 700;
}

.hero-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  max-width: 41rem;
}

.hero-actions-grid .button {
  width: 100%;
  text-align: center;
  justify-content: center;
}

.button {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.9rem 1.4rem;
  font-weight: 700;
  text-decoration: none;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
  cursor: pointer;
}

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

.button-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #fff9f0;
}

.button-secondary {
  border-color: rgba(22, 33, 30, 0.12);
  background: rgba(255, 255, 255, 0.5);
}

.hero-card,
.chat-shell,
.problem-list article,
.workflow-steps article,
.use-case-grid article,
.three-up-grid article,
.pricing-cards article {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.masthead-visual {
  display: grid;
  align-content: start;
  gap: 1rem;
  padding: 0.45rem 0.1rem 0.45rem 0;
}

.brand-card {
  display: block;
  padding: 1.1rem 1.15rem;
  border-radius: 1.8rem;
  background: linear-gradient(180deg, rgba(255, 252, 247, 0.95), rgba(247, 240, 223, 0.88));
  border: 1px solid rgba(22, 33, 30, 0.12);
  box-shadow: 0 18px 40px rgba(22, 33, 30, 0.08);
  text-decoration: none;
}

.hero-card {
  padding: 1.45rem;
  border-radius: 1.8rem;
  background:
    linear-gradient(180deg, rgba(255, 251, 244, 0.92), rgba(255, 246, 231, 0.84));
}

.hero-card-intro {
  margin: 0.7rem 0 0.9rem;
  color: var(--brand-dark);
  line-height: 1.55;
  font-weight: 600;
}

.hero-card ul {
  margin: 0.8rem 0 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.8rem;
  color: var(--muted);
}

.card-kicker {
  font-family: "IBM Plex Mono", "SFMono-Regular", monospace;
  font-size: 0.85rem;
  color: var(--brand);
}

.hero-card li::marker {
  color: var(--accent-deep);
}

.section {
  padding: 2.5rem 0;
}

.problem-grid,
.security-strip,
.contact-strip,
.chat-section,
.audit-grid,
.diagram-section {
  display: grid;
  gap: 1.6rem;
}

.problem-list,
.workflow-steps,
.use-case-grid,
.three-up-grid,
.pricing-cards {
  display: grid;
  gap: 1rem;
}

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

.problem-list article,
.workflow-steps article,
.use-case-grid article,
.three-up-grid article,
.pricing-cards article {
  border-radius: 1.3rem;
  padding: 1.2rem;
}

.signup-shell,
.audit-shell {
  display: grid;
  gap: 1rem;
  padding: 1.2rem;
  border-radius: 1.8rem;
  background: rgba(255, 250, 241, 0.78);
  border: 1px solid rgba(22, 33, 30, 0.12);
  box-shadow: var(--shadow);
}

.diagram-shell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: clamp(34rem, 58vw, 46rem);
  border-radius: 1.8rem;
  padding: 1.2rem;
  background: linear-gradient(180deg, rgba(255, 250, 241, 0.9), rgba(255, 247, 233, 0.86));
  border: 1px solid rgba(22, 33, 30, 0.12);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.mermaid-diagram {
  display: flex;
  justify-content: center;
  width: 100%;
  background: transparent;
  overflow: auto;
  padding: 0.25rem;
}

.mermaid-diagram svg {
  width: 100%;
  max-width: 900px;
  height: auto;
}

.mermaid-diagram .node rect,
.mermaid-diagram .node polygon,
.mermaid-diagram .node circle {
  rx: 18;
  ry: 18;
  filter: drop-shadow(0 18px 28px rgba(22, 33, 30, 0.12));
}

.mermaid-diagram .nodeLabel {
  font-family: "Space Grotesk", "Avenir Next", "Segoe UI", sans-serif;
}

.mermaid-diagram .edgeLabel {
  font-family: "IBM Plex Mono", "SFMono-Regular", monospace;
  font-size: 12px;
}

.diagram-heading {
  max-width: 68rem;
}

@media (max-width: 960px) {
  .masthead {
    grid-template-columns: 1fr;
    padding: 1rem;
  }

  .masthead-copy {
    padding: 0.5rem 0.2rem 0.1rem;
  }

  .masthead-visual {
    grid-template-columns: 1fr;
  }

  .brand img {
    width: min(100%, 340px);
  }
}

@media (max-width: 720px) {
  .masthead,
  .section {
    width: min(100%, calc(100% - 1.2rem));
  }

  .masthead {
    gap: 1rem;
    border-radius: 1.6rem;
    margin-top: 0.75rem;
  }

  h1 {
    font-size: clamp(2.65rem, 12vw, 4.25rem);
  }

  .hero-actions-grid {
    grid-template-columns: 1fr;
    max-width: none;
  }

  .button {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .brand-card,
  .hero-card {
    border-radius: 1.45rem;
  }
}

.signup-form,
.signup-form-card {
  display: grid;
  gap: 0.85rem;
  margin: 0;
}

.signup-form label {
  display: grid;
  gap: 0.35rem;
  font-weight: 600;
  color: var(--ink);
}

.signup-form span {
  font-family: "IBM Plex Mono", "SFMono-Regular", monospace;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand);
}

.signup-form input {
  width: 100%;
  border: 1px solid rgba(22, 33, 30, 0.12);
  border-radius: 0.95rem;
  padding: 0.9rem 1rem;
  font: inherit;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.82);
}

.signup-form-card {
  margin-top: 1rem;
}

.signup-form-card .button {
  width: 100%;
}

.signup-form-disabled {
  opacity: 0.72;
}

.signup-form-disabled input,
.signup-form-disabled button {
  cursor: not-allowed;
}

.signup-form-disabled .button-primary {
  border-color: rgba(22, 33, 30, 0.08);
  background:
    linear-gradient(180deg, rgba(186, 181, 172, 0.98), rgba(160, 154, 145, 0.96));
  color: rgba(255, 249, 240, 0.98);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.24),
    0 8px 18px rgba(22, 33, 30, 0.08);
}

.audit-shell {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
}

.audit-summary {
  display: grid;
  gap: 0.8rem;
}

.audit-preview {
  display: grid;
  gap: 0.75rem;
  align-content: start;
}

.audit-item {
  display: grid;
  gap: 0.4rem;
  padding: 0.9rem 1rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(22, 33, 30, 0.08);
}

.audit-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.75rem;
  font-family: "IBM Plex Mono", "SFMono-Regular", monospace;
  font-size: 0.78rem;
  color: var(--muted);
}

.audit-decision {
  font-weight: 700;
}

.audit-allow {
  color: var(--brand);
}

.audit-deny {
  color: #9f4b38;
}

.audit-empty {
  margin: 0;
  padding: 1rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.65);
  color: var(--muted);
}

.section-heading {
  display: grid;
  gap: 0.8rem;
  margin-bottom: 1.4rem;
}

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

.workflow-steps span {
  display: inline-flex;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 999px;
  align-items: center;
  justify-content: center;
  background: rgba(23, 88, 72, 0.1);
  color: var(--brand);
  font-family: "IBM Plex Mono", "SFMono-Regular", monospace;
  font-size: 0.9rem;
  margin-bottom: 0.8rem;
}

.security-strip {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  padding: 2rem;
  border-radius: 1.8rem;
  background: linear-gradient(135deg, rgba(16, 59, 49, 0.96), rgba(23, 88, 72, 0.9));
  color: #f7f0e4;
  box-shadow: var(--shadow);
}

.security-strip .eyebrow,
.security-strip .security-points p {
  color: rgba(247, 240, 228, 0.82);
}

.security-points {
  display: grid;
  gap: 0.75rem;
}

.contact-strip {
  grid-template-columns: minmax(0, 1.4fr) auto;
  align-items: center;
  padding: 1.75rem 2rem;
  border-radius: 1.8rem;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(22, 33, 30, 0.12);
  box-shadow: var(--shadow);
}

.contact-strip .button {
  justify-self: end;
}

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

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

.pricing-cards {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.pricing-cards article {
  display: grid;
  gap: 0.85rem;
  align-content: start;
}

.pricing-card-coming-soon {
  opacity: 0.78;
  background: linear-gradient(180deg, rgba(239, 236, 229, 0.96), rgba(231, 227, 219, 0.92));
}

.coming-soon-label {
  margin: -0.2rem 0 0;
  font-family: "IBM Plex Mono", "SFMono-Regular", monospace;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(22, 33, 30, 0.66);
}

.pricing-cards .button {
  width: 100%;
  justify-content: center;
  text-align: center;
  min-height: 4.25rem;
  padding: 0.95rem 1.15rem;
  border-radius: 1.4rem;
  line-height: 1.28;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.55),
    0 12px 24px rgba(22, 33, 30, 0.08);
}

.pricing-cards .button-secondary {
  border-color: rgba(22, 33, 30, 0.09);
  background:
    linear-gradient(180deg, rgba(255, 252, 247, 0.98), rgba(248, 243, 233, 0.9));
}

.pricing-cards .button-secondary:hover {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(248, 243, 233, 0.96));
  border-color: rgba(23, 88, 72, 0.18);
}

.pricing-cards .button-primary {
  box-shadow:
    inset 0 1px 0 rgba(255, 244, 230, 0.32),
    0 14px 30px rgba(159, 95, 42, 0.18);
}

.price-tier {
  font-family: "IBM Plex Mono", "SFMono-Regular", monospace;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
}

.chat-shell {
  border-radius: 1.8rem;
  padding: 1.2rem;
  display: grid;
  gap: 1rem;
}

.demo-flow-card {
  display: grid;
  gap: 1rem;
  padding: 1.15rem 1.2rem;
  border-radius: 1.2rem;
  background: linear-gradient(180deg, rgba(255, 252, 247, 0.92), rgba(248, 242, 230, 0.82));
  border: 1px solid rgba(22, 33, 30, 0.1);
}

.demo-flow-card h3 {
  font-size: 1.12rem;
}

.demo-flow-list {
  margin: 0;
  padding-left: 1.25rem;
  display: grid;
  gap: 0.8rem;
  color: var(--muted);
}

.demo-flow-list li {
  line-height: 1.6;
}

.demo-flow-list code {
  font-family: "IBM Plex Mono", "SFMono-Regular", monospace;
  font-size: 0.86rem;
  color: var(--brand-dark);
  background: rgba(255, 255, 255, 0.66);
  padding: 0.12rem 0.32rem;
  border-radius: 0.35rem;
}

.demo-flow-list a {
  color: var(--brand);
  font-weight: 700;
  text-decoration-thickness: 0.12em;
  text-underline-offset: 0.16em;
}

.demo-wizard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 1.15rem;
  margin-top: 0.1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(22, 33, 30, 0.1);
}

.demo-wizard-copy,
.demo-wizard-controls {
  display: grid;
  gap: 0.8rem;
  align-content: start;
}

.demo-wizard-copy p,
.demo-wizard-hint {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.demo-wizard-copy h3 {
  font-size: 1.08rem;
}

.demo-wizard-copy code,
.demo-flow-card code {
  word-break: break-word;
}

.demo-wizard-label {
  font-family: "IBM Plex Mono", "SFMono-Regular", monospace;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand);
}

.demo-wizard input {
  width: 100%;
  border: 1px solid rgba(22, 33, 30, 0.12);
  border-radius: 0.95rem;
  padding: 0.95rem 1rem;
  font: inherit;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.82);
}

.demo-wizard-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.demo-wizard-buttons .button {
  min-height: 3.75rem;
  justify-content: center;
  text-align: center;
  line-height: 1.25;
}

.chat-log {
  min-height: 22rem;
  max-height: 32rem;
  overflow-y: auto;
  padding: 0.6rem;
  border-radius: 1.2rem;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(22, 33, 30, 0.08);
  display: grid;
  gap: 0.75rem;
}

.message {
  display: grid;
  gap: 0.35rem;
  padding: 0.85rem 1rem;
  border-radius: 1rem;
  border: 1px solid rgba(22, 33, 30, 0.08);
  background: rgba(255, 255, 255, 0.76);
}

.message[data-role="assistant"] {
  background: rgba(23, 88, 72, 0.07);
  border-color: rgba(23, 88, 72, 0.18);
}

.message-role {
  font-family: "IBM Plex Mono", "SFMono-Regular", monospace;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
}

.message-text {
  margin: 0;
  color: var(--ink);
  white-space: pre-wrap;
}

.chat-composer {
  display: grid;
  gap: 0.8rem;
}

.chat-composer textarea {
  width: 100%;
  resize: vertical;
  min-height: 7rem;
  border-radius: 1rem;
  border: 1px solid rgba(22, 33, 30, 0.12);
  padding: 1rem;
  font: inherit;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.76);
}

.chat-status {
  margin: 0;
  font-family: "IBM Plex Mono", "SFMono-Regular", monospace;
  font-size: 0.88rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

@media (max-width: 980px) {
  .masthead,
  .security-strip,
  .contact-strip,
  .audit-shell,
  .problem-list,
  .workflow-steps,
  .use-case-grid,
  .three-up-grid,
  .pricing-cards,
  .demo-wizard {
    grid-template-columns: 1fr;
  }

  .diagram-shell {
    padding: 0.9rem;
    min-height: clamp(26rem, 78vw, 38rem);
  }

  .mermaid-diagram {
    margin: 0 -0.15rem;
  }

  .masthead {
    padding-bottom: 2.5rem;
  }

  .demo-wizard-buttons {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  h1 {
    max-width: 100%;
  }

  .masthead,
  .section {
    width: min(100% - 1.4rem, 1180px);
  }

  .button,
  .chat-composer textarea {
    width: 100%;
  }

  .hero-actions-grid {
    grid-template-columns: 1fr;
  }
}
