:root {
  --bg: #0f1720;
  --bg-soft: #16212c;
  --surface: #f4f1eb;
  --surface-2: #ffffff;
  --ink: #111a22;
  --ink-soft: #3c4a58;
  --brand: #1c3042;
  --brand-2: #27465f;
  --gold: #b8944f;
  --gold-soft: #d4c29a;
  --line: #d6cfbf;
  --radius: 14px;
  --shadow: 0 18px 36px rgba(8, 14, 20, 0.18);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Inter", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #0c131b 0%, #182532 280px, #f4f1eb 281px, #f4f1eb 100%);
  line-height: 1.55;
}

.legal-pattern {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(184, 148, 79, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(184, 148, 79, 0.05) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at 50% 20%, black 25%, transparent 72%);
}

h1,
h2,
h3 {
  font-family: "Playfair Display", serif;
  margin: 0 0 0.5em;
  line-height: 1.2;
}

p {
  margin: 0;
}

a {
  color: inherit;
}

.container {
  width: min(1160px, calc(100% - 2rem));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgba(212, 194, 154, 0.2);
  background: rgba(10, 17, 24, 0.88);
  backdrop-filter: blur(10px);
}

.topbar-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  min-height: 74px;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  gap: 0.7rem;
  color: #fff;
}

.brand-seal {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid rgba(212, 194, 154, 0.42);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  letter-spacing: 0.08em;
  background: rgba(184, 148, 79, 0.12);
}

.brand-text {
  font-weight: 600;
  font-size: 0.95rem;
}

.top-nav {
  display: inline-flex;
  justify-content: center;
  gap: 1.1rem;
  color: #dbe4ec;
}

.top-nav a {
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s ease;
}

.top-nav a:hover {
  color: #fff;
}

.btn {
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 0.75rem 1.15rem;
  text-decoration: none;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border 0.2s ease;
}

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

.btn-primary {
  background: linear-gradient(110deg, var(--gold), #9f7a37);
  color: #0f1720;
}

.btn-primary:hover {
  background: linear-gradient(110deg, #c79f57, #a98340);
}

.btn-outline {
  border-color: rgba(17, 26, 34, 0.25);
  color: var(--ink);
  background: transparent;
}

.btn-outline:hover {
  background: rgba(39, 70, 95, 0.08);
}

.btn:focus-visible,
.clickable:focus-visible,
.modal-close:focus-visible {
  outline: 3px solid rgba(184, 148, 79, 0.58);
  outline-offset: 2px;
}

.hero {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 1.4rem;
  padding: 4.6rem 0 3.4rem;
}

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

.hero-main {
  padding: 2rem;
}

.hero-panel {
  padding: 1.4rem;
  position: relative;
  overflow: hidden;
}

.hero-panel::after {
  content: "";
  position: absolute;
  inset: auto -80px -80px auto;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(184, 148, 79, 0.18) 0%, transparent 65%);
}

.hero-main h1 {
  font-size: clamp(2rem, 4.7vw, 3.55rem);
}

.hero-subtitle {
  color: var(--ink-soft);
  font-size: 1.07rem;
  max-width: 60ch;
}

.hero-actions {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  margin-top: 1.45rem;
}

.kicker {
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: #7f632e;
  font-size: 0.76rem;
  font-weight: 700;
  margin-bottom: 0.9rem;
}

.hero-panel ul,
.investment-card ul,
.modal-content ul,
.modal-content ol {
  margin: 0;
  padding-left: 1rem;
  display: grid;
  gap: 0.52rem;
}

.trust-strip {
  background: linear-gradient(180deg, rgba(15, 23, 32, 0.96), rgba(15, 23, 32, 0.92));
  border-top: 1px solid rgba(212, 194, 154, 0.2);
  border-bottom: 1px solid rgba(212, 194, 154, 0.2);
  padding: 1.4rem 0;
}

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

.trust-grid article {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(212, 194, 154, 0.22);
  border-radius: 12px;
  padding: 1rem;
}

.trust-grid h2 {
  color: #f0e8d7;
  font-size: 1.2rem;
}

.trust-grid p {
  color: #d7cfc1;
  font-size: 0.95rem;
}

.section {
  padding: 4.3rem 0;
}

.demo-highlight {
  padding-top: 0.5rem;
}

.demo-callout {
  display: grid;
  grid-template-columns: 1.35fr auto;
  gap: 1rem;
  align-items: center;
  background: linear-gradient(120deg, #172a3a 0%, #24445d 100%);
  color: #f7f0e5;
  border: 1px solid rgba(212, 194, 154, 0.35);
  border-radius: 14px;
  padding: 1.3rem;
  box-shadow: 0 18px 32px rgba(10, 15, 22, 0.25);
}

.demo-callout .kicker {
  color: #e8d4a7;
}

.demo-callout h2 {
  color: #fff;
  font-size: clamp(1.25rem, 2.7vw, 2rem);
}

.demo-callout p {
  color: #dde8f1;
}

.demo-stage {
  margin-top: 1rem;
  background: linear-gradient(180deg, #e8e0d2 0%, #f8f5ed 100%);
  border: 1px solid #d7c8a8;
  border-radius: 14px;
  padding: 1rem;
  display: grid;
  place-items: center;
}

.section-alt {
  background: linear-gradient(180deg, #ece7dc 0%, #f6f2ea 100%);
  border-top: 1px solid #ddd3be;
  border-bottom: 1px solid #ddd3be;
}

.repo-intro {
  color: var(--ink-soft);
  max-width: 70ch;
}

.repo-lock,
.repo-panel {
  background: #fff;
  border: 1px solid #d8cebd;
  border-radius: 12px;
  padding: 1.1rem;
  box-shadow: 0 8px 20px rgba(14, 24, 33, 0.06);
}

.repo-lock-form,
.repo-upload-form {
  display: grid;
  gap: 0.65rem;
  margin-top: 0.8rem;
}

.repo-lock-form label,
.repo-upload-form label {
  font-weight: 600;
  color: #2f3f4c;
}

.repo-lock-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.6rem;
}

.repo-lock-actions input,
.repo-upload-form input {
  border: 1px solid #cfc4af;
  border-radius: 10px;
  padding: 0.7rem 0.75rem;
  font: inherit;
  background: #fffcf7;
}

.repo-feedback {
  min-height: 1.2rem;
  font-size: 0.92rem;
  color: #5e6770;
}

.repo-hint {
  color: #6a7683;
  font-size: 0.84rem;
}

.repo-feedback.success {
  color: #227144;
}

.repo-feedback.error {
  color: #8a2d2d;
}

.repo-panel {
  margin-top: 1rem;
}

.repo-tabs {
  display: inline-flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.repo-tab {
  border: 1px solid #cfc3ac;
  background: #f8f5ee;
  color: #30404e;
  border-radius: 999px;
  padding: 0.42rem 0.8rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.repo-tab.is-active {
  background: #1d3345;
  color: #fff;
  border-color: #1d3345;
}

.repo-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.6rem;
}

.repo-table-wrap {
  overflow-x: auto;
  border: 1px solid #d8cebd;
  border-radius: 10px;
}

.repo-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}

.repo-table th,
.repo-table td {
  padding: 0.62rem 0.68rem;
  text-align: left;
  border-bottom: 1px solid #ece4d6;
  font-size: 0.93rem;
}

.repo-table th {
  background: #f6f0e4;
  color: #324252;
}

.repo-file-meta {
  margin-top: 0.22rem;
  color: #687583;
  font-size: 0.78rem;
}

.repo-status-list {
  margin: 0;
  padding-left: 1rem;
  display: grid;
  gap: 0.4rem;
  color: #3f4f5d;
}

.section-head {
  margin-bottom: 1.7rem;
}

.section-head h2 {
  font-size: clamp(1.55rem, 3.2vw, 2.6rem);
  max-width: 30ch;
}

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

.timeline-item {
  background: var(--surface-2);
  border: 1px solid #d5c8af;
  border-radius: 12px;
  padding: 1rem;
  position: relative;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.timeline-item span {
  display: inline-flex;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #fff;
  background: var(--brand);
  margin-bottom: 0.6rem;
}

.timeline-item p,
.feature-card p,
.legal-column p,
.mini-card p {
  color: var(--ink-soft);
}

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

.feature-card {
  background: #fff;
  border: 1px solid #d9cfbd;
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 8px 20px rgba(14, 24, 33, 0.07);
}

.link {
  display: inline-flex;
  margin-top: 0.6rem;
  color: var(--brand);
  font-weight: 700;
}

.legal-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 1rem;
}

.legal-column {
  background: #fff;
  border: 1px solid #d8cebd;
  border-radius: 12px;
  padding: 1.2rem;
}

.legal-column.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.mini-card {
  border: 1px solid #d6cab2;
  border-radius: 10px;
  padding: 0.95rem;
  background: linear-gradient(180deg, #f9f6ee 0%, #ffffff 100%);
}

.clickable {
  cursor: pointer;
}

.clickable:hover {
  transform: translateY(-2px);
  border-color: #b8944f;
}

.investment {
  padding-top: 1rem;
  padding-bottom: 5rem;
}

.investment-card {
  background: linear-gradient(125deg, #122230 0%, #1f374a 60%, #2d4d65 100%);
  color: #f6efe2;
  border: 1px solid rgba(212, 194, 154, 0.38);
  border-radius: 16px;
  padding: 1.6rem;
  box-shadow: 0 24px 40px rgba(8, 14, 20, 0.28);
}

.investment-card .kicker {
  color: #e7d5ad;
}

.investment-card h2 {
  color: #fff;
}

.investment-card ul {
  margin-top: 0.8rem;
  margin-bottom: 1rem;
}

.price {
  font-family: "Playfair Display", serif;
  font-size: clamp(2.1rem, 4.2vw, 3rem);
  margin: 0.3rem 0;
}

.price span {
  font-family: "Inter", sans-serif;
  font-size: 0.95rem;
  color: #eadfca;
}

.footer {
  border-top: 1px solid #d6cebf;
  background: #efeae0;
  padding: 1.2rem 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: #495766;
  font-size: 0.9rem;
}

.floating-wa {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 38;
  background: linear-gradient(110deg, #1f8f4f, #28ad61);
  color: #fff;
  text-decoration: none;
  border-radius: 999px;
  padding: 0.78rem 1.1rem;
  box-shadow: 0 14px 28px rgba(31, 143, 79, 0.34);
  font-weight: 700;
}

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

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 15, 22, 0.56);
  z-index: 90;
  opacity: 0;
  transition: opacity 0.22s ease;
}

.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  z-index: 100;
}

.modal[data-state="open"] .modal-content {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.modal-overlay[data-state="open"] {
  opacity: 1;
}

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

.modal-content {
  background: #fff;
  border: 1px solid #d6c9af;
  border-radius: 14px;
  width: min(760px, 100%);
  padding: 1.2rem;
  box-shadow: 0 24px 40px rgba(10, 17, 24, 0.28);
  opacity: 0;
  transform: translateY(12px) scale(0.985);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.modal-demo {
  width: min(880px, 100%);
}

.phone-mock {
  background: #0f1820;
  border: 1px solid #3a4d5c;
  border-radius: 26px;
  padding: 0.6rem;
  max-width: 420px;
  margin: 1rem auto 0;
  box-shadow: 0 16px 28px rgba(8, 12, 18, 0.35);
}

.phone-header {
  background: #1f3446;
  color: #e8edf1;
  border-radius: 18px 18px 10px 10px;
  padding: 0.6rem 0.8rem;
  font-size: 0.85rem;
  font-weight: 600;
}

.chat-thread {
  background: linear-gradient(180deg, #e7e3da 0%, #f5f2ea 100%);
  border-radius: 10px 10px 18px 18px;
  padding: 0.8rem;
  display: grid;
  gap: 0.55rem;
  max-height: 440px;
  overflow: auto;
}

.chat-thread.animated .bubble {
  opacity: 0;
  transform: translateY(8px);
}

.chat-thread.animated .typing {
  opacity: 0;
  transform: translateY(8px);
}

.demo-stage.visible .chat-thread.animated .bubble {
  animation: bubbleLoop 7.2s ease-in-out infinite;
  animation-delay: var(--d, 0s);
}

.demo-stage.visible .chat-thread.animated .typing {
  animation: typingLoop 7.2s ease-in-out infinite;
  animation-delay: var(--d, 0s);
}

.typing {
  margin-right: auto;
  background: #ffffff;
  border: 1px solid #d5dddf;
  border-radius: 12px;
  padding: 0.5rem 0.65rem;
  display: inline-flex;
  gap: 0.2rem;
  width: fit-content;
}

.typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #99a8b3;
  display: inline-block;
  animation: dotPulse 0.9s ease-in-out infinite;
}

.typing span:nth-child(2) {
  animation-delay: 0.15s;
}

.typing span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes bubbleLoop {
  0%,
  12% {
    opacity: 0;
    transform: translateY(8px);
  }

  18%,
  72% {
    opacity: 1;
    transform: translateY(0);
  }

  86%,
  100% {
    opacity: 0;
    transform: translateY(8px);
  }
}

@keyframes typingLoop {
  0%,
  8% {
    opacity: 0;
    transform: translateY(8px);
  }

  15%,
  48% {
    opacity: 1;
    transform: translateY(0);
  }

  62%,
  100% {
    opacity: 0;
    transform: translateY(8px);
  }
}

@keyframes dotPulse {
  0%,
  80%,
  100% {
    opacity: 0.35;
    transform: translateY(0);
  }

  40% {
    opacity: 1;
    transform: translateY(-1px);
  }
}

.bubble {
  max-width: 92%;
  padding: 0.58rem 0.72rem;
  border-radius: 12px;
  font-size: 0.89rem;
  line-height: 1.45;
}

.bubble.lawyer {
  margin-left: auto;
  background: #d9f6c9;
  border: 1px solid #bfe5ab;
}

.bubble.agent {
  margin-right: auto;
  background: #ffffff;
  border: 1px solid #d5dddf;
}

.piece-preview {
  margin-top: 0.5rem;
  background: #f8f6f1;
  border: 1px solid #dfd4bf;
  border-left: 4px solid #b8944f;
  border-radius: 8px;
  padding: 0.55rem;
}

.piece-preview p {
  margin-top: 0.32rem;
  color: #33404c;
}

.modal-close {
  float: right;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid #ccc4b7;
  background: #fff;
  cursor: pointer;
}

.modal-content small {
  color: #5f6a75;
}

.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.38s ease, transform 0.38s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1020px) {
  .topbar-inner {
    grid-template-columns: 1fr auto;
  }

  .top-nav {
    display: none;
  }

  .hero,
  .trust-grid,
  .timeline,
  .feature-grid,
  .legal-grid {
    grid-template-columns: 1fr;
  }

  .legal-column.cards {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .repo-lock-actions,
  .repo-panel-head {
    grid-template-columns: 1fr;
    display: grid;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
