/* ─── Reset ──────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --navy:     #0f172a;
  --navy-2:   #1e293b;
  --navy-3:   #334155;
  --gold:     #c9a84c;
  --gold-2:   #dbb96a;
  --gold-bg:  #fdf9ee;
  --cream:    #fafaf9;
  --white:    #ffffff;
  --border:   #e2e8f0;
  --border-2: #f1f5f9;
  --text:     #1c1917;
  --muted:    #64748b;
  --muted-2:  #94a3b8;
  --danger:   #dc2626;
  --danger-bg:#fef2f2;
  --success:  #16a34a;
  --r:        10px;
  --r-lg:     14px;
  --shadow:   0 1px 3px rgba(0,0,0,.07), 0 4px 14px rgba(0,0,0,.05);
  --shadow-lg:0 8px 32px rgba(0,0,0,.11);
  --font:     'Inter', system-ui, sans-serif;
  --serif:    'DM Serif Display', Georgia, serif;
}
html  { scroll-behavior: smooth; font-size: 16px; }
body  { font-family: var(--font); color: var(--text); background: var(--white); line-height: 1.6; -webkit-font-smoothing: antialiased; }
a     { color: inherit; text-decoration: none; }
img   { display: block; max-width: 100%; }
button, input, textarea, select { font-family: inherit; }
button { cursor: pointer; }

/* ─── Layout ────────────────────────────────────────────────────────────────── */
.container { max-width: 1160px; margin: 0 auto; padding: 0 28px; }

/* ─── Buttons ───────────────────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: none; border-radius: var(--r); font-weight: 500; transition: all .18s; white-space: nowrap; cursor: pointer; }
.btn-primary  { background: var(--navy); color: #fff; }
.btn-primary:hover  { background: var(--navy-2); }
.btn-gold     { background: var(--gold); color: var(--navy); font-weight: 600; }
.btn-gold:hover     { background: var(--gold-2); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(201,168,76,.35); }
.btn-outline  { background: transparent; color: var(--navy); border: 1.5px solid rgba(255,255,255,.25); color: #fff; }
.btn-outline:hover   { background: rgba(255,255,255,.08); }
.btn-sm  { padding: 8px 16px; font-size: .85rem; }
.btn-xl  { padding: 14px 30px; font-size: 1rem; border-radius: 11px; }

/* ─── Navbar ────────────────────────────────────────────────────────────────── */
.navbar { position: sticky; top: 0; z-index: 200; background: rgba(255,255,255,.96); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.nav-inner { max-width: 1160px; margin: 0 auto; padding: 0 28px; height: 64px; display: flex; align-items: center; gap: 28px; }
.logo { display: flex; align-items: center; gap: 9px; }
.logo-mark { display: flex; }
.logo span { font-size: 1.15rem; font-weight: 400; color: var(--navy); letter-spacing: -.02em; }
.logo span strong { color: var(--gold); font-weight: 700; }
.nav-links { display: flex; gap: 24px; margin-left: auto; }
.nav-links a { font-size: .88rem; color: var(--muted); font-weight: 500; transition: color .15s; }
.nav-links a:hover { color: var(--navy); }
.nav-cta { margin-left: 8px; }
.nav-burger { display: none; flex-direction: column; gap: 5px; background: none; border: none; padding: 4px; }
.nav-burger span { display: block; width: 22px; height: 2px; background: var(--navy); border-radius: 2px; transition: all .2s; }

/* ─── Hero ──────────────────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(145deg, #0c1524 0%, #162035 50%, #0c1828 100%);
  padding: 80px 28px 100px; display: flex; align-items: center;
  gap: 60px; max-width: 100%; overflow: hidden;
  min-height: calc(100vh - 64px);
}
.hero-inner { flex: 0 0 auto; max-width: 560px; }
.hero-eyebrow { display: flex; align-items: center; gap: 10px; font-size: .78rem; color: var(--muted-2); letter-spacing: .07em; text-transform: uppercase; margin-bottom: 24px; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); flex-shrink: 0; }
.hero-title { font-family: var(--serif); font-size: clamp(2.4rem, 4.5vw, 3.8rem); line-height: 1.15; color: #fff; margin-bottom: 22px; letter-spacing: -.01em; }
.hero-title em { color: var(--gold); font-style: normal; }
.hero-sub { font-size: 1.05rem; color: #94a3b8; line-height: 1.8; margin-bottom: 36px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Hero card */
.hero-card-wrap { flex: 1; min-width: 300px; max-width: 440px; }
.hero-card { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); border-radius: 14px; overflow: hidden; backdrop-filter: blur(8px); box-shadow: 0 20px 60px rgba(0,0,0,.4); }
.hc-header { background: rgba(255,255,255,.06); border-bottom: 1px solid rgba(255,255,255,.08); padding: 12px 16px; display: flex; align-items: center; gap: 10px; }
.hc-dots { display: flex; gap: 5px; }
.hc-dots span { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.15); }
.hc-label { font-size: .72rem; color: rgba(255,255,255,.4); letter-spacing: .05em; }
.hc-body { padding: 20px; }
.hc-section-tag { font-size: .68rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); margin-bottom: 8px; }
.hc-section-tag.mt { margin-top: 18px; }
.hc-text { font-size: .82rem; color: rgba(255,255,255,.7); line-height: 1.75; }
.hc-cite { color: var(--gold-2); font-style: italic; }
.hc-case { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.08); border-radius: 7px; padding: 10px 12px; margin-bottom: 8px; }
.hc-case:last-child { margin-bottom: 0; }
.hc-case-title { font-size: .82rem; font-weight: 600; color: rgba(255,255,255,.85); margin-bottom: 2px; }
.hc-case-cite { font-size: .75rem; color: var(--muted-2); }

/* ─── Trust bar ─────────────────────────────────────────────────────────────── */
.trust-bar { background: var(--navy); padding: 28px 28px; }
.trust-inner { max-width: 1160px; margin: 0 auto; display: flex; align-items: center; justify-content: center; gap: 40px; flex-wrap: wrap; }
.trust-stat { text-align: center; }
.ts-n { display: block; font-size: 1.35rem; font-weight: 700; color: #fff; }
.ts-l { display: block; font-size: .76rem; color: #64748b; margin-top: 2px; text-transform: uppercase; letter-spacing: .05em; }
.trust-div { width: 1px; height: 36px; background: rgba(255,255,255,.1); }

/* ─── Section shared ────────────────────────────────────────────────────────── */
.eyebrow { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--gold); margin-bottom: 10px; }
.section-h { font-family: var(--serif); font-size: clamp(1.8rem, 3vw, 2.6rem); color: var(--navy); margin-bottom: 52px; line-height: 1.2; }

/* ─── Features ──────────────────────────────────────────────────────────────── */
.features { padding: 100px 0; background: var(--cream); }
.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feat-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 28px; transition: box-shadow .2s, transform .2s; }
.feat-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.feat-icon { width: 42px; height: 42px; background: var(--gold-bg); border-radius: 9px; display: flex; align-items: center; justify-content: center; margin-bottom: 16px; color: var(--gold); }
.feat-icon svg { width: 20px; height: 20px; }
.feat-card h3 { font-size: 1rem; font-weight: 600; color: var(--navy); margin-bottom: 8px; }
.feat-card p  { font-size: .88rem; color: var(--muted); line-height: 1.7; }

/* ─── How it works ──────────────────────────────────────────────────────────── */
.how-it-works { padding: 100px 0; }
.steps-wrap { position: relative; }
.steps-line { display: none; }
.steps { display: flex; flex-direction: column; gap: 0; }
.step { display: flex; gap: 32px; padding: 32px 0; border-bottom: 1px solid var(--border-2); }
.step:last-child { border-bottom: none; }
.step-num { font-family: var(--serif); font-size: 3rem; line-height: 1; color: var(--border); flex-shrink: 0; width: 72px; }
.step-content h3 { font-size: 1.1rem; font-weight: 600; color: var(--navy); margin-bottom: 8px; }
.step-content p  { font-size: .93rem; color: var(--muted); line-height: 1.75; max-width: 560px; }

/* ─── Tool section ──────────────────────────────────────────────────────────── */
.tool-section { padding: 100px 0 120px; background: var(--cream); }
.tool-wrap { display: grid; grid-template-columns: 380px 1fr; gap: 28px; align-items: start; }

/* Input pane */
.input-pane { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 28px; box-shadow: var(--shadow); position: sticky; top: 80px; }
.ip-group { margin-bottom: 22px; }
.ip-group label { display: block; font-size: .84rem; font-weight: 600; color: var(--navy); margin-bottom: 7px; }
.field-hint { display: block; font-weight: 400; color: var(--muted-2); font-size: .78rem; margin-top: 2px; }
.req { color: var(--danger); margin-left: 2px; }
.opt { font-weight: 400; color: var(--muted-2); font-size: .78rem; }
.ip-group textarea, .ip-group input[type=number] { width: 100%; border: 1.5px solid var(--border); border-radius: var(--r); padding: 11px 14px; font-size: .92rem; color: var(--text); background: var(--white); outline: none; transition: border-color .15s; resize: vertical; }
.ip-group textarea:focus, .ip-group input[type=number]:focus { border-color: var(--navy); }
.charbar { text-align: right; font-size: .75rem; color: var(--muted-2); margin-top: 5px; }

/* Document types */
.doc-types { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.doc-type { border: 1.5px solid var(--border); border-radius: var(--r); padding: 10px 12px; cursor: pointer; display: flex; align-items: center; gap: 9px; transition: all .15s; user-select: none; }
.doc-type:hover { border-color: var(--navy-3); }
.doc-type.active { border-color: var(--navy); background: #f8fafc; }
.doc-type input[type=radio] { display: none; }
.dt-icon { width: 28px; height: 28px; background: var(--border-2); border-radius: 6px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.dt-icon svg { width: 14px; height: 14px; color: var(--navy-3); }
.doc-type.active .dt-icon { background: var(--navy); }
.doc-type.active .dt-icon svg { color: #fff; }
.doc-type span { font-size: .82rem; font-weight: 500; color: var(--navy-3); line-height: 1.2; }

/* Year range */
.year-row { display: flex; align-items: center; gap: 10px; }
.year-inp { flex: 1; }
.year-sep { color: var(--muted); font-size: .9rem; }

/* Generate button */
.btn-generate { width: 100%; background: var(--navy); color: #fff; padding: 13px; font-size: .95rem; font-weight: 600; border-radius: var(--r); border: none; display: flex; align-items: center; justify-content: center; gap: 9px; transition: all .18s; }
.btn-generate:hover:not(:disabled) { background: var(--navy-2); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(15,23,42,.22); }
.btn-generate:disabled { opacity: .6; cursor: not-allowed; transform: none !important; }
.btn-generate svg { width: 18px; height: 18px; }
.spin { animation: rotate .75s linear infinite; }
@keyframes rotate { to { transform: rotate(360deg); } }

.disclaimer { font-size: .75rem; color: var(--muted-2); margin-top: 14px; line-height: 1.55; }

/* Error */
.error-box { background: var(--danger-bg); border: 1px solid #fecaca; border-radius: var(--r); padding: 12px 14px; color: var(--danger); font-size: .86rem; line-height: 1.5; margin-top: 10px; }

/* Output pane */
.output-pane { background: var(--white); border: 1px solid var(--border); border-radius: var(--r-lg); min-height: 560px; box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden; }

/* Empty state */
.op-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 60px 40px; text-align: center; }
.op-empty-icon svg { width: 52px; height: 52px; }
.op-empty-title { font-size: 1rem; font-weight: 600; color: var(--navy-3); }
.op-empty-sub   { font-size: .86rem; color: var(--muted-2); }

/* Tab bar */
.op-tabbar { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--border); background: #fafafa; padding: 0 4px; flex-shrink: 0; }
.op-tabs { display: flex; }
.op-tab { display: flex; align-items: center; gap: 6px; padding: 13px 14px; font-size: .83rem; font-weight: 500; color: var(--muted); background: none; border: none; border-bottom: 2px solid transparent; cursor: pointer; transition: all .15s; white-space: nowrap; }
.op-tab svg { width: 14px; height: 14px; }
.op-tab.active { color: var(--navy); border-bottom-color: var(--navy); }
.op-tab:hover:not(.active) { color: var(--navy-3); }
.op-actions { display: flex; gap: 4px; padding-right: 8px; }
.action-btn { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; border-radius: 7px; border: none; background: transparent; color: var(--muted); transition: all .15s; }
.action-btn:hover { background: var(--border-2); color: var(--navy); }
.action-btn svg { width: 14px; height: 14px; }

/* Panels */
.op-panel { padding: 28px; overflow-y: auto; max-height: 680px; }

/* Draft document */
.draft-doc { font-size: .9rem; line-height: 1.85; color: var(--text); }
.draft-title-h { font-family: var(--serif); font-size: 1.15rem; color: var(--navy); margin-bottom: 20px; text-align: center; }
.draft-sec-head { font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--navy); border-bottom: 1px solid var(--border-2); padding-bottom: 6px; margin: 24px 0 10px; }
.draft-sec-head:first-child { margin-top: 0; }
.draft-para { margin-bottom: 10px; color: var(--text); }
.draft-para:last-child { margin-bottom: 0; }

/* Issues panel */
.issue-item { border: 1px solid var(--border); border-radius: var(--r); padding: 16px; margin-bottom: 12px; }
.issue-item:last-child { margin-bottom: 0; }
.issue-num-badge { display: inline-flex; align-items: center; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--gold); background: var(--gold-bg); padding: 3px 8px; border-radius: 100px; margin-bottom: 8px; }
.issue-question { font-weight: 600; color: var(--navy); font-size: .93rem; margin-bottom: 6px; }
.issue-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.issue-tag { font-size: .76rem; color: var(--muted); background: var(--border-2); padding: 3px 9px; border-radius: 100px; }

/* Precedents panel */
.panel-note { font-size: .82rem; color: var(--muted-2); margin-bottom: 16px; font-style: italic; }
.prec-item { display: flex; gap: 14px; align-items: flex-start; border: 1px solid var(--border); border-radius: var(--r); padding: 14px 16px; margin-bottom: 10px; }
.prec-sim { flex-shrink: 0; width: 44px; height: 44px; border-radius: 9px; background: var(--navy); display: flex; align-items: center; justify-content: center; font-size: .75rem; font-weight: 700; color: #fff; }
.prec-sim.low { background: var(--border-2); color: var(--navy-3); }
.prec-title { font-weight: 600; color: var(--navy); font-size: .9rem; margin-bottom: 3px; }
.prec-meta  { font-size: .78rem; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; }
.prec-tag   { background: var(--gold-bg); color: var(--gold); font-size: .7rem; font-weight: 600; padding: 2px 7px; border-radius: 100px; }

/* Arguments panel */
.arg-item { border: 1px solid var(--border); border-radius: var(--r-lg); padding: 20px; margin-bottom: 16px; }
.arg-issue-label { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--gold); margin-bottom: 6px; }
.arg-heading { font-weight: 600; color: var(--navy); font-size: .97rem; margin-bottom: 6px; }
.arg-prop { font-size: .86rem; color: var(--muted); font-style: italic; margin-bottom: 12px; padding-left: 10px; border-left: 2px solid var(--border); }
.arg-reasoning { font-size: .88rem; line-height: 1.8; color: var(--text); margin-bottom: 14px; }
.arg-cases-label { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.arg-case { background: #f8fafc; border-radius: var(--r); padding: 10px 13px; margin-bottom: 7px; }
.arg-case:last-child { margin-bottom: 0; }
.arg-case-name { font-weight: 600; font-size: .85rem; color: var(--navy); }
.arg-case-cite { font-size: .78rem; color: var(--gold); font-weight: 600; margin-left: 6px; }
.arg-case-ratio { font-size: .83rem; color: var(--muted); margin-top: 3px; line-height: 1.55; }

/* ─── Footer ────────────────────────────────────────────────────────────────── */
.footer { background: var(--navy); padding: 36px 0; }
.footer-inner { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer-logo .logo span { color: #fff; }
.footer-logo p { font-size: .8rem; color: #475569; margin-top: 8px; }
.footer-copy { font-size: .78rem; color: #475569; max-width: 380px; line-height: 1.6; }

/* ─── Utilities ─────────────────────────────────────────────────────────────── */
.hidden { display: none !important; }

/* ─── Print ─────────────────────────────────────────────────────────────────── */
.print-area { display: none; }
@media print {
  body > *:not(.print-area) { display: none !important; }
  .print-area { display: block !important; font-family: Georgia, serif; font-size: 12pt; line-height: 1.8; color: #000; padding: 2cm; }
  .print-area h1 { text-align: center; font-size: 16pt; margin-bottom: 24pt; }
  .print-area h2 { font-size: 12pt; text-transform: uppercase; border-bottom: 1px solid #000; padding-bottom: 3pt; margin: 18pt 0 8pt; }
  .print-area p  { margin-bottom: 10pt; }
}

/* ─── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 1060px) {
  .feat-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .hero { flex-direction: column; min-height: auto; padding: 64px 24px 72px; }
  .hero-card-wrap { max-width: 100%; width: 100%; }
  .tool-wrap { grid-template-columns: 1fr; }
  .input-pane { position: static; }
  .op-tabs { overflow-x: auto; }
  .nav-links, .nav-cta { display: none; }
  .nav-burger { display: flex; }
}
@media (max-width: 640px) {
  .feat-grid { grid-template-columns: 1fr; }
  .trust-div { display: none; }
  .trust-inner { gap: 24px; }
  .doc-types { grid-template-columns: 1fr 1fr; }
  .op-tab span { display: none; }
  .op-tab svg { width: 16px; height: 16px; }
}
