:root {
  --navy: #0b1b3d;
  --navy-deep: #071229;
  --slate-card: #102249;
  --brass: #c5a059;
  --brass-bright: #d4af37;
  --paper: #f7f4ec;
  --paper-line: #e4dcc8;
  --charcoal: #1a1a1a;
  --muted: #5a6578;
  --success: #10b981;
  --pending: #f59e0b;
  --rule: rgba(11, 27, 61, 0.14);
  /* Heading color on paper backgrounds — separate from --navy because
     --navy is also used for solid navy panels (.band-navy, .hero), which
     must stay dark in both themes. Only this token flips for dark mode. */
  --heading: var(--navy);
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0a1730;
    --paper-line: #1c2e54;
    --charcoal: #edebe2;
    --muted: #9aa6c0;
    --rule: rgba(197, 160, 89, 0.22);
    --heading: #f4f1e6;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--paper);
  color: var(--charcoal);
  font-family: -apple-system, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.serif {
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, "Times New Roman", serif;
}
.mono {
  font-family: ui-monospace, "SF Mono", "Cascadia Code", Consolas, "Courier New", monospace;
}
h1, h2, h3 { margin: 0; }
p { margin: 0; }
a { color: inherit; }

.label {
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brass);
}

.cadastral {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(212, 175, 55, 0.5) 1px, transparent 1px),
    linear-gradient(90deg, rgba(212, 175, 55, 0.5) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: 0.16;
  pointer-events: none;
}

/* ===== HERO ===== */
.hero {
  position: relative;
  background: radial-gradient(ellipse 900px 500px at 18% -10%, #16295a 0%, var(--navy) 55%, var(--navy-deep) 100%);
  color: #f4f1e6;
  padding: 56px 8vw 88px;
  overflow: hidden;
}
.hero-inner { position: relative; max-width: 1180px; margin: 0 auto; }
.brandbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 56px; flex-wrap: wrap; gap: 16px; }
.wordmark { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.seal {
  width: 42px; height: 42px;
  border: 1.5px solid var(--brass-bright);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  position: relative; flex-shrink: 0;
}
.seal::before { content: ""; position: absolute; inset: 5px; border: 1px solid var(--brass-bright); border-radius: 50%; }
.seal span { font-family: "Iowan Old Style", Georgia, serif; font-size: 15px; color: var(--brass-bright); font-style: italic; }
.wordmark-text .name { font-family: "Iowan Old Style", Georgia, serif; font-size: 1.15rem; letter-spacing: 0.04em; color: #f4f1e6; }
.nav-links { display: flex; gap: 32px; font-size: 0.86rem; color: rgba(244, 241, 230, 0.72); flex-wrap: wrap; }
.nav-links a { text-decoration: none; }
.nav-links a:hover { color: var(--brass-bright); }

.eyebrow { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--brass-bright); }
.hero h1 {
  font-family: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  font-size: clamp(2.2rem, 4.2vw, 3.6rem);
  line-height: 1.1;
  font-weight: 400;
}
.hero h1 .accent { color: var(--brass-bright); }
.hero .dek { margin-top: 22px; font-size: 1.05rem; line-height: 1.6; color: rgba(244, 241, 230, 0.78); max-width: 58ch; }
.cta-row { display: flex; gap: 16px; margin-top: 36px; flex-wrap: wrap; }
.btn {
  font-size: 0.88rem; padding: 15px 26px; border-radius: 3px;
  text-decoration: none; display: inline-flex; align-items: center; gap: 10px;
  border: 1px solid transparent; cursor: pointer;
}
.btn-primary { background: var(--brass-bright); color: var(--navy-deep); font-weight: 600; border-color: var(--brass-bright); }
.btn-ghost { color: #f4f1e6; border-color: rgba(244, 241, 230, 0.28); background: transparent; }
.btn-ghost:hover { border-color: var(--brass-bright); color: var(--brass-bright); }

/* ===== SECTION SHELL ===== */
.shell { max-width: 1180px; margin: 0 auto; padding: 88px 8vw; }
.section-head { display: grid; grid-template-columns: 260px 1fr; gap: 40px; margin-bottom: 48px; }
.section-head h2 { font-family: "Iowan Old Style", Georgia, serif; font-size: clamp(1.7rem, 2.4vw, 2.3rem); line-height: 1.15; color: var(--heading); font-weight: 400; }
.section-head .desc { color: var(--muted); font-size: 1rem; line-height: 1.65; max-width: 56ch; margin-top: 12px; }
.section-head.light h2 { color: #f4f1e6; }
.section-head.light .desc { color: rgba(244, 241, 230, 0.62); }

/* ===== PRACTICE AREAS ===== */
.practice-list { display: flex; flex-direction: column; gap: 1px; overflow: hidden; border-radius: 4px; border: 1px solid var(--rule); background: var(--rule); }
.practice-item { display: grid; gap: 20px; background: var(--paper); padding: 32px; grid-template-columns: 1fr; }
.practice-item .num { font-family: ui-monospace, monospace; font-size: 0.72rem; color: var(--brass); letter-spacing: 0.08em; }
.practice-item h3 { font-family: "Iowan Old Style", Georgia, serif; font-size: 1.25rem; font-weight: 400; margin-top: 6px; color: var(--heading); }
.practice-item .intro { color: var(--muted); font-size: 0.92rem; line-height: 1.6; margin-top: 12px; }
.practice-item ul { margin: 16px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.practice-item li { position: relative; padding-left: 18px; font-size: 0.87rem; line-height: 1.55; color: var(--charcoal); opacity: 0.85; }
.practice-item li::before { content: "—"; position: absolute; left: 0; color: var(--brass); }
@media (min-width: 768px) {
  .practice-item { grid-template-columns: 200px 1fr; }
}

/* ===== SAFEGUARDS (navy band) ===== */
.band-navy { background: var(--navy); color: #f4f1e6; }
.safeguard-grid { display: grid; gap: 28px; grid-template-columns: 1fr; }
@media (min-width: 768px) { .safeguard-grid { grid-template-columns: repeat(3, 1fr); } }
.safeguard-card { border: 1px solid rgba(212, 175, 55, 0.22); background: rgba(16, 34, 73, 0.4); border-radius: 4px; padding: 28px; }
.safeguard-card .sk { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--brass); }
.safeguard-card h3 { font-family: "Iowan Old Style", Georgia, serif; font-size: 1.1rem; font-weight: 400; margin: 12px 0; }
.safeguard-card p { font-size: 0.88rem; line-height: 1.6; color: rgba(244, 241, 230, 0.62); }

/* ===== CONSULT FORM ===== */
.closer { position: relative; overflow: hidden; background: var(--navy-deep); padding: 88px 8vw; }
.closer-head { position: relative; max-width: 680px; margin: 0 auto; text-align: center; }
.closer .rule { width: 48px; height: 1px; background: var(--brass-bright); margin: 0 auto 24px; }
.closer h2 { font-family: "Iowan Old Style", Georgia, serif; font-size: clamp(1.8rem, 3.2vw, 2.6rem); font-weight: 400; color: #f4f1e6; max-width: 22ch; margin: 16px auto; }
.closer .dek { color: rgba(244, 241, 230, 0.6); font-size: 1rem; max-width: 48ch; margin: 0 auto; }

.form-card {
  position: relative; margin: 48px auto 0; max-width: 640px;
  display: grid; gap: 20px; grid-template-columns: 1fr;
  background: var(--paper); border: 1px solid var(--rule); border-radius: 4px;
  padding: 32px; box-shadow: 0 10px 30px rgba(11, 27, 61, 0.1);
}
@media (min-width: 640px) { .form-card { grid-template-columns: 1fr 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 0.78rem; font-weight: 500; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; border: 1px solid var(--rule); border-radius: 3px;
  background: transparent; padding: 10px 14px; font-size: 0.9rem;
  color: var(--charcoal); font-family: inherit;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--brass-bright);
}
.field .err { font-size: 0.76rem; color: #b91c1c; }
.form-actions { grid-column: 1 / -1; }
.form-submit {
  display: inline-flex; align-items: center; gap: 10px;
  border-radius: 3px; border: 1px solid var(--navy); background: var(--navy);
  color: #f4f1e6; font-weight: 600; font-size: 0.88rem; padding: 15px 26px;
  cursor: pointer;
}
.banner {
  max-width: 640px; margin: 48px auto 0; text-align: center;
  border: 1px solid rgba(212, 175, 55, 0.4); border-radius: 4px; padding: 36px;
  background: rgba(16, 34, 73, 0.4);
}
.banner h3 { font-family: "Iowan Old Style", Georgia, serif; font-size: 1.5rem; color: #f4f1e6; margin: 12px 0; }
.banner p { color: rgba(244, 241, 230, 0.6); }
.honeypot { position: absolute; left: -9999px; opacity: 0; }

footer.site-footer {
  display: flex; flex-direction: column; gap: 12px;
  border-top: 1px solid rgba(212, 175, 55, 0.14);
  background: var(--navy-deep); color: rgba(244, 241, 230, 0.4);
  font-size: 0.8rem; padding: 36px 8vw;
}
@media (min-width: 640px) { footer.site-footer { flex-direction: row; align-items: center; justify-content: space-between; } }
footer.site-footer .badge { color: rgba(197, 160, 89, 0.7); }
