:root {
  --navy: #10233f;
  --navy-2: #16345c;
  --accent: #d98e2a;
  --accent-dark: #b8721a;
  --bg: #f6f7fb;
  --card: #ffffff;
  --border: #e3e6ee;
  --text: #1c2333;
  --text-muted: #5a6478;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(16, 35, 63, 0.08);
  --font: 'Inter', system-ui, sans-serif;
  --font-serif: 'Lora', serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
}
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; font-weight: 800; }
p { margin: 0 0 1em; color: var(--text-muted); }
a { color: inherit; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; border-radius: 999px; font-weight: 600; text-decoration: none;
  border: 2px solid transparent; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
  font-family: var(--font);
}
.btn-primary { background: var(--accent); color: #fff; padding: 12px 22px; }
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-1px); }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--navy); padding: 12px 22px; }
.btn-ghost:hover { border-color: var(--navy); }
.btn-sm { padding: 8px 16px; font-size: .9rem; }
.btn-lg { padding: 14px 28px; font-size: 1.05rem; }
.link-btn { background: none; border: none; color: var(--accent-dark); text-decoration: underline; cursor: pointer; font-size: .85rem; padding: 0; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding-top: 14px; padding-bottom: 14px; }
.logo { font-family: var(--font-serif); font-size: 1.35rem; font-weight: 700; text-decoration: none; color: var(--navy); }
.logo span { color: var(--accent-dark); }
.main-nav { display: flex; gap: 26px; }
.main-nav a { text-decoration: none; color: var(--text-muted); font-weight: 500; font-size: .95rem; }
.main-nav a:hover { color: var(--navy); }

/* Ad slots */
.ad-slot {
  margin: 28px auto; min-height: 90px;
  border: 1px dashed #c9ceda; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: #eef0f6; position: relative;
}
.ad-label { position: absolute; top: 6px; left: 12px; font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: #9aa2b5; }

/* Hero */
.hero { padding: 56px 0 40px; background: linear-gradient(180deg, #eef2fb 0%, var(--bg) 100%); }
.hero-inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.pill { display: inline-block; background: #e7f0e9; color: #2f7a45; font-size: .8rem; font-weight: 600; padding: 6px 14px; border-radius: 999px; margin-bottom: 16px; }
.hero h1 { font-size: 2.6rem; letter-spacing: -0.02em; }
.hero h1 em { color: var(--accent-dark); font-style: normal; }
.hero p { font-size: 1.1rem; max-width: 46ch; }
.hero-actions { display: flex; gap: 14px; margin: 24px 0; flex-wrap: wrap; }
.trust-list { list-style: none; padding: 0; margin: 20px 0 0; display: flex; flex-wrap: wrap; gap: 16px 24px; }
.trust-list li { font-size: .9rem; color: var(--text-muted); font-weight: 500; }

.hero-card { display: flex; justify-content: center; }
.mock-doc {
  background: #fff; border-radius: 12px; box-shadow: var(--shadow);
  padding: 32px 28px; width: 100%; max-width: 360px; transform: rotate(1.5deg);
  border: 1px solid var(--border);
}
.mock-line { height: 10px; background: #e7e9f2; border-radius: 6px; margin-bottom: 14px; }
.mock-line.short { width: 60%; }
.mock-title { width: 80%; height: 16px; background: var(--navy); opacity: .85; margin-bottom: 22px; }
.mock-sign { display: flex; justify-content: space-between; margin-top: 30px; font-size: .7rem; color: var(--text-muted); border-top: 1px dashed var(--border); padding-top: 14px; }

/* How it works */
.how { padding: 50px 0; }
.how h2 { text-align: center; font-size: 1.8rem; margin-bottom: 34px; }
.how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.how-step { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; text-align: center; }
.how-num { width: 38px; height: 38px; border-radius: 50%; background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; margin: 0 auto 14px; }
.how-step h3 { font-size: 1.1rem; margin-bottom: 8px; }
.how-step p { font-size: .92rem; margin: 0; }

/* App / generator */
.app-section { padding: 20px 0 60px; }
.app-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 28px; align-items: start; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.form-panel { padding: 28px 30px 22px; }

.progress-bar { height: 6px; background: #eef0f6; border-radius: 999px; overflow: hidden; margin-bottom: 18px; }
.progress-fill { height: 100%; width: 25%; background: var(--accent); transition: width .3s ease; }
.steps-labels { display: flex; justify-content: space-between; margin-bottom: 24px; }
.steps-labels span { font-size: .78rem; color: var(--text-muted); font-weight: 600; }
.steps-labels span.active { color: var(--navy); }

fieldset { border: none; padding: 0; margin: 0; display: none; }
fieldset.active { display: block; animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
legend { font-weight: 700; font-size: 1.15rem; margin-bottom: 14px; padding: 0; color: var(--navy); }
fieldset h4 { margin: 18px 0 10px; font-size: .95rem; color: var(--navy); text-transform: uppercase; letter-spacing: .04em; }
fieldset h4:first-of-type { margin-top: 0; }

label { display: block; font-size: .85rem; font-weight: 600; color: var(--text); margin-bottom: 14px; }
label.checkbox-label { display: flex; align-items: center; gap: 8px; font-weight: 500; }
label.checkbox-label input { width: auto; }
input, select, textarea {
  width: 100%; margin-top: 6px; padding: 11px 13px; border: 1.5px solid var(--border);
  border-radius: 9px; font-family: var(--font); font-size: .93rem; color: var(--text); background: #fbfcfe;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); background: #fff; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field-error { color: #c1372f; font-size: .78rem; font-weight: 500; display: block; margin-top: 4px; min-height: 1em; }

.step-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); }

.draft-note { font-size: .8rem; color: var(--text-muted); margin: 16px 0 0; text-align: center; }

/* Preview */
.preview-panel { position: sticky; top: 90px; padding: 22px 24px 26px; max-height: calc(100vh - 120px); display: flex; flex-direction: column; }
.preview-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.preview-toolbar h3 { font-size: 1rem; margin: 0; }
.contract-preview {
  font-family: var(--font-serif); font-size: .82rem; color: #2a2f3d;
  background: #fffdf8; border: 1px solid var(--border); border-radius: 10px;
  padding: 22px 20px; overflow-y: auto; flex: 1; white-space: pre-wrap;
}
.contract-preview .cp-title { text-align: center; font-weight: 700; font-size: 1rem; margin-bottom: 14px; text-transform: uppercase; letter-spacing: .04em; }
.contract-preview .cp-clause-title { font-weight: 700; margin-top: 14px; display: block; }
.contract-preview .cp-empty { font-family: var(--font); text-align: center; color: var(--text-muted); padding: 40px 10px; }

/* Legal guide */
.legal-guide { padding: 60px 0; background: var(--navy); color: #fff; }
.legal-guide h2 { text-align: center; max-width: 60ch; margin: 0 auto 36px; font-size: 1.8rem; color: #fff; }
.legal-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.legal-card { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius); padding: 22px; }
.legal-card h3 { font-size: 1rem; color: #fff; margin-bottom: 8px; }
.legal-card p { color: #c4cbdc; font-size: .9rem; margin: 0; }
.legal-card strong { color: #fff; }
.legal-disclaimer { text-align: center; font-size: .78rem; color: #8b93a8; max-width: 70ch; margin: 32px auto 0; }

/* FAQ */
.faq { padding: 60px 0; }
.faq h2 { text-align: center; margin-bottom: 30px; font-size: 1.8rem; }
.faq details {
  background: var(--card); border: 1px solid var(--border); border-radius: 10px;
  padding: 16px 20px; margin-bottom: 12px;
}
.faq summary { font-weight: 700; cursor: pointer; color: var(--navy); }
.faq details p { margin-top: 10px; margin-bottom: 0; }

/* Footer */
.site-footer { background: #0c1830; color: #9aa4bb; padding: 30px 0; }
.site-footer p { color: #9aa4bb; font-size: .82rem; margin: 0 0 8px; }
.footer-meta { color: #6b7590; }

.print-only { display: none; }

.footer-links { font-size: .82rem; }
.footer-links a { color: #c4cbdc; text-decoration: underline; }

.cookie-banner {
  position: fixed; left: 20px; right: 20px; bottom: 20px; z-index: 100;
  max-width: 640px; margin: 0 auto; background: var(--navy); color: #fff;
  border-radius: 14px; padding: 18px 22px; box-shadow: 0 12px 34px rgba(0,0,0,.25);
  display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between;
}
.cookie-banner p { color: #dbe0ee; font-size: .85rem; margin: 0; flex: 1 1 320px; }
.cookie-banner a { color: #fff; text-decoration: underline; }
.cookie-actions { display: flex; gap: 10px; flex-shrink: 0; }
.cookie-banner .btn-ghost { color: #fff; border-color: rgba(255,255,255,.4); }
.cookie-banner .btn-ghost:hover { border-color: #fff; }

.legal-page { padding: 50px 0 70px; max-width: 820px; margin: 0 auto; }
.legal-page h1 { font-size: 1.9rem; margin-bottom: 18px; }
.legal-page h2 { font-size: 1.2rem; margin-top: 32px; }
.legal-page p, .legal-page li { color: var(--text-muted); font-size: .95rem; }
.legal-page .updated { font-size: .82rem; color: #9aa2b5; margin-bottom: 30px; }
.back-link { display: inline-block; margin: 24px 0 0 0; font-size: .9rem; font-weight: 600; color: var(--accent-dark); text-decoration: none; }

@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-card { order: -1; }
  .app-grid { grid-template-columns: 1fr; }
  .preview-panel { position: static; max-height: none; }
  .how-grid, .legal-grid { grid-template-columns: 1fr; }
  .main-nav { display: none; }
}
@media (max-width: 600px) {
  .field-row { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2rem; }
}

@media print {
  body * { visibility: hidden; }
  .print-only, .print-only * { visibility: visible; }
  .print-only {
    display: block; position: absolute; top: 0; left: 0; width: 100%;
    padding: 30px; font-family: var(--font-serif); font-size: 12.5pt; white-space: pre-wrap; color: #000;
  }
}
