/* ============================================
   TOKENS
   ============================================ */
:root {
  --ink: #16241E;
  --ink-soft: #2A3B33;
  --paper: #F7F4EC;
  --paper-dim: #EFEADF;
  --brass: #B68D40;
  --brass-light: #D4B16C;
  --sage: #7C9885;
  --clay: #A9583E;
  --clay-dark: #8C4530;
  --line: rgba(22, 36, 30, 0.12);
  --line-light: rgba(247, 244, 236, 0.16);

  --font-display: 'Fraunces', serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius: 6px;
  --shadow-card: 0 12px 32px -8px rgba(22, 36, 30, 0.18);
  --max-width: 1140px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

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

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

:focus-visible {
  outline: 2px solid var(--clay);
  outline-offset: 3px;
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
}

.brand-mark {
  color: var(--clay);
  font-size: 1.4rem;
}

.header-phone {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--ink);
  text-decoration: none;
  border: 1px solid var(--line);
  padding: 8px 16px;
  border-radius: var(--radius);
  transition: border-color 0.2s, color 0.2s;
}

.header-phone:hover {
  border-color: var(--clay);
  color: var(--clay);
}

/* ============================================
   HERO
   ============================================ */
.hero {
  padding: 88px 0 64px;
  background:
    radial-gradient(ellipse 900px 500px at 85% -10%, rgba(182,141,64,0.14), transparent 60%),
    var(--paper);
}

.hero-inner { max-width: 760px; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--clay-dark);
  margin: 0 0 18px;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.4rem, 5.2vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 22px;
}

.hero-title em {
  font-style: italic;
  font-weight: 400;
  color: var(--clay);
}

.hero-sub {
  font-size: 1.1rem;
  color: var(--ink-soft);
  max-width: 540px;
  margin: 0 0 36px;
}

/* ---- Lookup form ---- */
.lookup-form { margin-bottom: 28px; }

.field-row {
  display: flex;
  gap: 10px;
  background: #fff;
  padding: 6px;
  border-radius: var(--radius);
  border: 1.5px solid var(--ink);
  box-shadow: var(--shadow-card);
}

.field-row input[type="text"] {
  flex: 1;
  border: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 14px 16px;
  color: var(--ink);
  min-width: 0;
}

.field-row input[type="text"]::placeholder { color: #8A8478; }
.field-row input[type="text"]:focus { outline: none; }

.btn-primary {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.96rem;
  background: var(--clay);
  color: #fff;
  border: none;
  padding: 14px 26px;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.18s, transform 0.18s;
}

.btn-primary:hover { background: var(--clay-dark); }
.btn-primary:active { transform: scale(0.98); }

.btn-primary--light {
  background: var(--brass);
  color: var(--ink);
}
.btn-primary--light:hover { background: var(--brass-light); }

.btn-primary--full { width: 100%; margin-top: 6px; }

.btn-primary[disabled] {
  opacity: 0.65;
  cursor: progress;
}

.form-microcopy {
  font-size: 0.82rem;
  color: #756F62;
  margin: 12px 4px 0;
}

.field-row.has-error {
  border-color: var(--clay);
  animation: shake 0.3s;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

/* ---- Trust row ---- */
.trust-row {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}

.trust-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.trust-num {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.3rem;
  color: var(--ink);
}

.trust-label {
  font-size: 0.78rem;
  color: #756F62;
}

.trust-divider {
  width: 1px;
  height: 32px;
  background: var(--line);
}

/* ============================================
   LEDGER (how it works)
   ============================================ */
.ledger-section {
  background: var(--paper-dim);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 56px 0;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sage);
  margin: 0 0 28px;
}

.section-label--light { color: var(--brass-light); }

.ledger {
  border-top: 1px solid var(--line);
}

.ledger-row {
  display: flex;
  align-items: baseline;
  gap: 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.ledger-tag {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--brass);
  flex-shrink: 0;
  width: 28px;
}

.ledger-text {
  font-size: 1.05rem;
  color: var(--ink-soft);
}

/* ============================================
   VIDEO SECTION
   ============================================ */
.video-section { padding: 80px 0; }

.video-inner {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 56px;
  align-items: center;
}

.video-copy h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.6rem, 2.8vw, 2.15rem);
  line-height: 1.2;
  margin: 0 0 18px;
}

.video-sub {
  color: var(--ink-soft);
  font-size: 1.02rem;
}

.video-frame {
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  padding: 10px;
  background: #fff;
  box-shadow: var(--shadow-card);
}

.video-embed {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  border-radius: 4px;
  overflow: hidden;
  background: var(--ink);
}

.video-embed iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: 0;
}

/* ============================================
   CTA SECTION (dark)
   ============================================ */
.cta-section {
  background: var(--ink);
  color: var(--paper);
  padding: 84px 0;
}

.cta-inner {
  max-width: 640px;
  text-align: left;
}

.cta-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  line-height: 1.15;
  margin: 0 0 32px;
  color: var(--paper);
}

.lookup-form--dark .field-row {
  background: var(--ink-soft);
  border-color: var(--line-light);
}

.lookup-form--dark input[type="text"] {
  color: var(--paper);
}
.lookup-form--dark input[type="text"]::placeholder {
  color: rgba(247,244,236,0.45);
}

.cta-footnote {
  font-size: 0.85rem;
  color: rgba(247,244,236,0.55);
  margin-top: 16px;
}

/* ============================================
   MODAL
   ============================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(22, 36, 30, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease;
  z-index: 100;
}

.modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--paper);
  border-radius: 10px;
  border: 1px solid var(--line);
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 40px 36px;
  position: relative;
  box-shadow: 0 30px 60px -15px rgba(0,0,0,0.35);
  transform: translateY(16px) scale(0.98);
  transition: transform 0.25s ease;
}

.modal-overlay.is-open .modal {
  transform: translateY(0) scale(1);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.6rem;
  line-height: 1;
  color: #8A8478;
  cursor: pointer;
  padding: 6px;
}
.modal-close:hover { color: var(--ink); }

.modal-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sage);
  margin: 0 0 18px;
}

.modal-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.5rem;
  line-height: 1.25;
  margin: 0 0 10px;
}

.modal-sub {
  color: var(--ink-soft);
  font-size: 0.96rem;
  margin: 0 0 26px;
}

/* ---- ledger print animation ---- */
.ledger-print {
  border-top: 1px solid var(--line);
  margin-top: 8px;
}

.ledger-print-line {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  opacity: 0;
  transform: translateY(6px);
}

.ledger-print-line.is-visible {
  animation: lineIn 0.4s ease forwards;
}

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

.lp-label {
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.lp-value {
  font-family: var(--font-mono);
  font-size: 0.92rem;
  color: var(--ink);
  text-align: right;
  flex-shrink: 0;
}

.ledger-print-line--total {
  border-bottom: none;
  padding-top: 22px;
}

.ledger-print-line--total .lp-label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--ink);
}

.ledger-print-line--total .lp-value {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--clay);
}

.lp-disclosure {
  font-size: 0.78rem;
  color: var(--sage);
  margin: 12px 0 0;
  line-height: 1.4;
}

/* ---- lead form ---- */
.modal-field { margin-bottom: 16px; }

.modal-field label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--ink);
}

.modal-field .optional {
  font-weight: 400;
  color: #8A8478;
}

.modal-field input,
.modal-field select {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.96rem;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  color: var(--ink);
}

.modal-field input:focus,
.modal-field select:focus {
  outline: none;
  border-color: var(--clay);
}

.modal-field.has-error input,
.modal-field.has-error select {
  border-color: var(--clay);
}

.field-error {
  font-size: 0.78rem;
  color: var(--clay-dark);
  margin-top: 4px;
}

.modal-disclaimer {
  font-size: 0.78rem;
  color: #8A8478;
  text-align: center;
  margin: 14px 0 0;
}

/* ---- success step ---- */
#step-success { text-align: center; padding: 12px 0; }

.success-mark {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--sage);
  color: #fff;
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 22px;
}

.btn-secondary {
  font-family: var(--font-body);
  font-weight: 600;
  background: transparent;
  border: 1.5px solid var(--ink);
  color: var(--ink);
  padding: 11px 24px;
  border-radius: 5px;
  cursor: pointer;
  margin-top: 8px;
}
.btn-secondary:hover { background: var(--ink); color: var(--paper); }

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  padding: 28px 0;
  border-top: 1px solid var(--line);
}

.footer-inner p {
  font-size: 0.8rem;
  color: #8A8478;
  margin: 0;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 860px) {
  .video-inner { grid-template-columns: 1fr; gap: 36px; }
}

@media (max-width: 600px) {
  .hero { padding: 56px 0 48px; }
  .header-phone { font-size: 0.8rem; padding: 7px 12px; }
  .field-row { flex-direction: column; }
  .field-row .btn-primary { width: 100%; }
  .trust-row { gap: 16px; }
  .trust-divider { display: none; }
  .modal { padding: 30px 22px; }
  .cta-section { padding: 60px 0; }
}
