/* LegalDraft.org — Brand tokens */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* Primary palette — Bar & Bench */
  --navy: #0B1220;              /* Ink Navy — dark surfaces */
  --counsel: #1B2942;           /* Mid navy */
  --indigo: #2B4ACB;            /* Verdict Blue — primary action */
  --indigo-dark: #1F39A8;
  --amber: #A87843;             /* Bronze — restrained accent (replaces gold) */
  --bronze: #A87843;            /* alias */

  /* Neutrals — cool, not warm */
  --parchment: #FFFFFF;         /* Pure white page background */
  --cream: #F3F5F8;             /* Mist Gray — secondary surfaces */
  --stone: #E7EBF2;             /* Soft stone surface */
  --surface: #FFFFFF;
  --ink: #1A1D23;               /* Body text */
  --slate: #5A6477;             /* Muted text */
  --text-muted: #5A6477;        /* alias */
  --rule: #DDE3EC;              /* Stone Line — cool border */

  /* Status */
  --red: #8B1E2A;               /* Oxblood */
  --green: #1F5C3F;             /* Bottle */

  /* Type */
  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', -apple-system, Helvetica, Arial, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;

  /* Radius & spacing */
  --r-sm: 4px;
  --r: 6px;
  --r-lg: 10px;
  --radius-lg: 10px;            /* alias */
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--parchment);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--indigo); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

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

h1, h2, h3 { font-family: var(--serif); color: var(--navy); font-weight: 700; letter-spacing: -0.01em; margin: 0; }
h1 { font-size: clamp(40px, 5vw, 64px); line-height: 1.08; letter-spacing: -0.02em; }
h2 { font-size: clamp(30px, 3.4vw, 48px); line-height: 1.15; }
h3 { font-size: clamp(22px, 2.2vw, 32px); line-height: 1.2; font-weight: 600; }
h4 { font-family: var(--sans); font-weight: 600; font-size: 18px; margin: 0; color: var(--navy); }

p { margin: 0 0 1em; }
.lead { font-size: 20px; line-height: 1.7; color: #3a3a3a; }

/* Utility */
.mono { font-family: var(--mono); }
.label {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--indigo);
}
.label.slate { color: var(--slate); }
.label.amber { color: var(--amber); }
.divider { height: 1px; background: var(--rule); border: 0; margin: 0; }
.hairline-top { border-top: 1px solid var(--rule); }

/* Layout */
.container { width: min(1200px, 92%); margin-inline: auto; }
.container-narrow { width: min(960px, 92%); margin-inline: auto; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px;
  font-family: var(--sans); font-weight: 600; font-size: 15px;
  border-radius: 8px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all .18s ease;
  text-decoration: none;
  line-height: 1;
}
.btn-primary { background: var(--indigo); color: #fff; }
.btn-primary:hover { background: var(--indigo-dark); text-decoration: none; }
.btn-secondary { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-secondary:hover { background: var(--navy); color: #fff; text-decoration: none; }
.btn-ghost { background: transparent; color: var(--navy); padding: 10px 14px; }
.btn-ghost:hover { background: rgba(10,22,40,.06); text-decoration: none; }
.btn-lg { padding: 15px 26px; font-size: 16px; }
.btn-sm { padding: 8px 14px; font-size: 13px; }

/* Announcement banner (Harvey pattern 1 — site-wide, above nav) */
.announce {
  background: var(--navy);
  color: #fff;
  height: 40px;
  display: flex; align-items: center;
  font-size: 13px;
  border-bottom: 1px solid rgba(255,255,255,.06);
  position: relative;
  z-index: 41;
  overflow: hidden;
}
.announce.is-hidden { display: none; }
.announce-inner {
  width: min(1200px, 92%); margin-inline: auto;
  display: flex; align-items: center; justify-content: center;
  gap: 10px;
  position: relative;
  width: 100%;
}
.announce-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(168,120,67,.18);
  border: 1px solid rgba(168,120,67,.4);
  color: var(--bronze);
  font-size: 10.5px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  flex: 0 0 auto;
}
.announce-text {
  color: rgba(255,255,255,.92);
  font-weight: 500;
}
.announce-link {
  color: #fff;
  font-weight: 600;
  display: inline-flex; align-items: center; gap: 4px;
  border-bottom: 1px solid rgba(255,255,255,.35);
  padding-bottom: 1px;
  transition: border-color .15s ease;
}
.announce-link:hover { border-color: #fff; text-decoration: none; color: #fff; }
.announce-link svg { transition: transform .18s ease; }
.announce-link:hover svg { transform: translateX(2px); }
.announce-close {
  position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  background: transparent; border: 0;
  color: rgba(255,255,255,.55);
  cursor: pointer;
  padding: 6px;
  border-radius: 4px;
  display: inline-flex; align-items: center;
  transition: color .15s ease, background .15s ease;
}
.announce-close:hover { color: #fff; background: rgba(255,255,255,.08); }
.announce-close svg { width: 14px; height: 14px; display: block; }
@media (max-width: 720px) {
  .announce { height: 48px; font-size: 12.5px; }
  .announce-pill { display: none; }
  .announce-inner { padding-right: 32px; }
}
@media (max-width: 480px) {
  .announce-text { display: none; }
  .announce-text-compact { display: inline !important; }
}
.announce-text-compact { display: none; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 40;
  background: var(--navy);
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 0;
}
.brand { display: inline-flex; align-items: center; gap: 11px; color: #fff; font-family: var(--serif); font-weight: 700; letter-spacing: -0.015em; line-height: 1; }
.brand:hover { text-decoration: none; color: #fff; }
.brand-mark {
  width: 36px; height: 36px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 0 0 1px rgba(255,255,255,.08);
}
.brand-mark svg { width: 26px; height: 26px; display: block; }
.brand-word {
  color: #fff; font-size: 22px; font-weight: 700;
  letter-spacing: -0.02em;
}
.brand-word .tld { color: var(--amber); font-size: 14px; font-weight: 600; letter-spacing: 0.02em; margin-left: 2px; }
.footer .brand-word { font-size: 20px; }

.nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.nav a.navlink {
  color: rgba(255,255,255,.82);
  font-weight: 500; font-size: 14px;
  padding: 8px 12px; border-radius: 6px;
  transition: all .15s ease;
  display: inline-flex; align-items: center;
  white-space: nowrap;
}
.nav a.navlink:hover { color: #fff; background: rgba(255,255,255,.06); text-decoration: none; }
.nav a.navlink.active { color: #fff; background: rgba(255,255,255,.08); }
.nav-cta { display: flex; align-items: center; gap: 10px; }
.nav-cta .btn-primary { padding: 10px 18px; font-size: 14px; }
.nav-cta .signin { color: rgba(255,255,255,.82); font-weight: 500; font-size: 14px; padding: 8px 12px; }
.nav-cta .signin:hover { color: #fff; text-decoration: none; }

/* Mega dropdown */
.has-mega { position: relative; }
.mega {
  position: absolute;
  top: calc(100% + 10px); left: 50%; transform: translateX(-50%) translateY(8px);
  width: 640px;
  background: #fff;
  color: var(--ink);
  border-radius: 10px;
  box-shadow: 0 24px 48px rgba(10,22,40,.18), 0 0 0 1px rgba(0,0,0,.06);
  padding: 22px 26px 24px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 28px;
  opacity: 0; visibility: hidden;
  transition: opacity .18s ease, transform .18s ease, visibility 0s .18s;
  z-index: 50;
}
.has-mega:hover > .mega,
.has-mega:focus-within > .mega {
  opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0);
  transition: opacity .18s ease, transform .18s ease, visibility 0s;
}
.mega::before {
  content: ''; position: absolute; top: -8px; left: 50%; transform: translateX(-50%) rotate(45deg);
  width: 14px; height: 14px; background: #fff; border-radius: 2px;
  box-shadow: -1px -1px 0 rgba(0,0,0,.04);
}
.mega-col { display: flex; flex-direction: column; gap: 2px; }
.mega-head {
  font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--slate);
  padding: 4px 10px 10px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 6px;
}
.mega a {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: start;
  padding: 9px 10px;
  border-radius: 6px;
  color: var(--ink);
  line-height: 1.3;
  font-size: 14px;
  font-weight: 600;
}
.mega a em {
  font-family: var(--mono); font-style: normal;
  font-size: 11px; font-weight: 500; color: var(--indigo);
  letter-spacing: 0.04em;
  padding-top: 2px;
}
.mega a small { display: block; font-size: 12px; font-weight: 400; color: var(--slate); margin-top: 2px; }
.mega a:hover { background: var(--parchment); text-decoration: none; color: var(--navy); }
.mega a.mega-all {
  grid-template-columns: 1fr;
  color: var(--indigo);
  font-weight: 600;
  font-size: 13px;
  margin-top: 8px;
  padding: 10px;
  background: var(--parchment);
  border-radius: 6px;
  border: 1px dashed var(--rule);
}
.mega a.mega-all:hover { background: #fff; border-color: var(--indigo); }

/* Footer */
.footer {
  background: var(--navy); color: rgba(255,255,255,.78);
  padding: 64px 0 28px;
  margin-top: 96px;
}
.footer h5 { font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255,255,255,.55); margin: 0 0 16px; }
.footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.footer a { color: rgba(255,255,255,.78); font-size: 14.5px; }
.footer a:hover { color: #fff; text-decoration: none; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 48px; border-bottom: 1px solid rgba(255,255,255,.1); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 24px; font-size: 13px; color: rgba(255,255,255,.55); }
.footer-legal { max-width: 360px; font-size: 13.5px; line-height: 1.6; color: rgba(255,255,255,.6); margin-top: 18px; }

@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav ul.navlinks-main { display: none; }
}

/* Cards */
.card {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  padding: 28px;
}
.card.featured { position: relative; overflow: hidden; }
.card.featured::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--amber);
}
.card-cream { background: var(--cream); border-color: transparent; }

/* Forms */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label { font-size: 13px; font-weight: 600; color: var(--navy); letter-spacing: 0.01em; }
.field .hint { font-size: 12.5px; color: var(--slate); }
.field .err { font-size: 12.5px; color: var(--red); font-weight: 500; }
.input, .select, .textarea {
  width: 100%;
  font: inherit; font-size: 15px;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  padding: 11px 13px;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--indigo);
  box-shadow: 0 0 0 3px rgba(43,74,203,.18);
}
.input.error, .select.error { border-color: var(--red); box-shadow: 0 0 0 3px rgba(139,30,42,.12); }
.textarea { min-height: 120px; resize: vertical; font-family: var(--sans); line-height: 1.6; }

/* Toggle switch (segmented) */
.seg {
  display: inline-flex;
  background: var(--cream);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 4px;
  gap: 2px;
}
.seg button {
  font: inherit; font-size: 14px; font-weight: 500;
  padding: 9px 18px;
  border: 0; background: transparent; color: var(--slate);
  border-radius: 6px;
  cursor: pointer;
  transition: all .15s ease;
}
.seg button.on { background: var(--navy); color: #fff; font-weight: 600; }
.seg.indigo button.on { background: var(--indigo); }

/* Badge */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; letter-spacing: 0.02em; }
.badge-amber { background: rgba(168,120,67,.12); color: var(--bronze); border: 1px solid rgba(168,120,67,.32); }
.badge-bronze { background: rgba(168,120,67,.12); color: var(--bronze); border: 1px solid rgba(168,120,67,.32); }
.badge-green { background: rgba(31,92,63,.1); color: var(--green); }
.badge-indigo { background: rgba(43,74,203,.1); color: var(--indigo); }
.badge-slate { background: rgba(90,100,119,.12); color: var(--slate); }

/* Section spacing */
section { padding: 88px 0; }
section.tight { padding: 56px 0; }
.section-label { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.section-label::before { content: ''; display: block; width: 28px; height: 1.5px; background: var(--indigo); }

/* Dark section */
.dark { background: var(--navy); color: #fff; }
.dark h1, .dark h2, .dark h3, .dark h4 { color: #fff; }
.dark .lead { color: rgba(255,255,255,.82); }
.dark .section-label::before { background: var(--amber); }
.dark .label { color: var(--amber); }

/* WhatsApp FAB */
.wafab {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 50;
  display: flex; align-items: center; gap: 10px;
  background: #25D366;
  color: #fff;
  padding: 12px 18px 12px 14px;
  border-radius: 999px;
  font-weight: 600; font-size: 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease;
}
.wafab:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(0,0,0,.22); text-decoration: none; color: #fff; }
.wafab svg { width: 22px; height: 22px; }
.wafab .wa-label { max-width: 0; overflow: hidden; white-space: nowrap; transition: max-width .25s ease, margin .25s ease; }
.wafab:hover .wa-label { max-width: 320px; }

@media (max-width: 640px) {
  .wafab .wa-label { display: none; }
  .wafab { padding: 12px; }
}

/* Tweaks panel */
.tweaks {
  position: fixed; bottom: 24px; left: 24px; z-index: 60;
  width: 300px;
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: 10px;
  box-shadow: 0 20px 40px rgba(10,22,40,.18);
  padding: 18px;
  font-size: 13.5px;
  display: none;
}
.tweaks.on { display: block; }
.tweaks h4 { font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--slate); margin: 0 0 14px; font-weight: 600; }
.tweaks .row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; gap: 10px; }
.tweaks select { font: inherit; font-size: 13px; padding: 5px 8px; border: 1px solid var(--rule); border-radius: 4px; background: #fff; }

/* Chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 6px 12px; border-radius: 999px;
  background: #fff; border: 1px solid var(--rule);
  font-size: 13px; color: var(--navy); font-weight: 500;
  cursor: pointer;
  transition: all .15s;
}
.chip:hover { border-color: var(--indigo); color: var(--indigo); }
.chip.on { background: var(--navy); color: #fff; border-color: var(--navy); }

/* Tables */
.ld-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.ld-table th { font-family: var(--sans); font-weight: 600; text-align: left; color: var(--navy); padding: 14px 16px; border-bottom: 1px solid var(--rule); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.ld-table td { padding: 16px; border-bottom: 1px solid var(--rule); }
.ld-table tr:last-child td { border-bottom: 0; }
.ld-table tr:nth-child(even) td { background: var(--cream); }
