:root {
  --bg: #faf8f4;
  --surface: #ffffff;
  --surface-alt: #f2eee6;
  --ink: #16202e;
  --muted: #4f5a6b;
  --line: #e1dbcf;
  --accent: #a24f1d;
  --accent-hover: #873f14;
  --accent-ink: #ffffff;
  --accent-soft: #f6e6d9;
  --hero-bg: #14233a;
  --hero-ink: #f4f1ea;
  --hero-muted: #c3cbd8;
  --error: #b42318;
  --success: #1d7a46;
  --focus: #2f6fdd;
  --radius: 12px;
  --shadow: 0 1px 2px rgb(20 35 58 / 6%), 0 8px 24px rgb(20 35 58 / 6%);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e141d;
    --surface: #161f2c;
    --surface-alt: #121a25;
    --ink: #eef1f5;
    --muted: #a7b0bf;
    --line: #2a3546;
    --accent: #e8955c;
    --accent-hover: #f1aa78;
    --accent-ink: #1a1007;
    --accent-soft: #3a2616;
    --hero-bg: #0a1320;
    --error: #ff8a80;
    --success: #6fd49b;
    --focus: #8ab4ff;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px rgb(0 0 0 / 25%);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.25rem; font-weight: 500; }
p { margin: 0 0 1em; }

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } }

.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }

/* Header */
.site-header { background: var(--hero-bg); color: var(--hero-ink); position: sticky; top: 0; z-index: 5; border-bottom: 1px solid rgb(255 255 255 / 8%); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; }
.logo { display: flex; align-items: baseline; gap: 8px; color: inherit; text-decoration: none; }
.logo:hover { color: inherit; }
.logo-word { font-family: var(--serif); font-size: 1.5rem; font-weight: 600; font-variant-ligatures: common-ligatures discretionary-ligatures; }
.logo-sub { font-size: 0.75rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--hero-muted); }
nav { display: flex; align-items: center; gap: 20px; }
nav a:not(.btn) { color: var(--hero-muted); text-decoration: none; font-size: 0.95rem; }
nav a:not(.btn):hover { color: var(--hero-ink); }
@media (max-width: 640px) { nav a:not(.btn) { display: none; } }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--accent); color: var(--accent-ink);
  border: 2px solid var(--accent); border-radius: 999px;
  padding: 12px 24px; font: 600 1rem/1.2 var(--sans);
  text-decoration: none; cursor: pointer; transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-ink); }
.btn:active { transform: translateY(1px); }
.btn-small { padding: 8px 16px; font-size: 0.9rem; }
.btn-ghost { background: transparent; color: var(--hero-ink); border-color: rgb(255 255 255 / 35%); }
.btn-ghost:hover { background: rgb(255 255 255 / 10%); border-color: var(--hero-ink); color: var(--hero-ink); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.7; cursor: progress; }

/* Hero */
.hero { background: var(--hero-bg); color: var(--hero-ink); padding: 72px 0 88px; }
.hero-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 56px; align-items: center; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.8rem; font-weight: 600; color: #f0a774; }
.lede { font-size: 1.15rem; color: var(--hero-muted); max-width: 40em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-note { border-left: 2px solid rgb(255 255 255 / 18%); padding-left: 28px; color: var(--hero-muted); }
.lig-demo { font-family: var(--serif); font-size: 3rem; color: var(--hero-ink); margin-bottom: 0.25em; letter-spacing: 0.04em; }
.lig-demo .joined { color: #f0a774; }
@media (max-width: 860px) {
  .hero { padding: 48px 0 56px; }
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-note { padding-left: 20px; }
}

/* Proof strip */
.proof { background: var(--surface); border-bottom: 1px solid var(--line); }
.proof-grid { list-style: none; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; padding-top: 32px; padding-bottom: 32px; }
.proof-grid li { display: flex; flex-direction: column; gap: 4px; }
.proof-grid strong { font-family: var(--serif); font-size: 2rem; font-weight: 600; color: var(--accent); line-height: 1.1; }
.proof-grid span { color: var(--muted); font-size: 0.92rem; line-height: 1.4; }
@media (max-width: 860px) { .proof-grid { grid-template-columns: repeat(2, 1fr); } }

/* Sections */
.section { padding: 88px 0; }
.section-alt { background: var(--surface-alt); }
.section-lede { color: var(--muted); font-size: 1.1rem; max-width: 40em; margin-bottom: 36px; }
@media (max-width: 600px) { .section { padding: 56px 0; } }

.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.cards-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 860px) { .cards, .cards-3 { grid-template-columns: 1fr; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.card p:last-child { margin-bottom: 0; color: var(--muted); }
.tag { display: inline-block; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 3px 10px; margin-bottom: 12px; }
.about { margin-top: 36px; color: var(--muted); max-width: 48em; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 56px; align-items: start; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; gap: 28px; } }
.contact-intro p { color: var(--muted); font-size: 1.1rem; }
.contact-points { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 10px; }
.contact-points li { padding-left: 28px; position: relative; }
.contact-points li::before { content: ""; position: absolute; left: 0; top: 0.5em; width: 14px; height: 8px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }

.contact-form { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 32px; box-shadow: var(--shadow); display: grid; gap: 20px; }
@media (max-width: 600px) { .contact-form { padding: 20px; } }

fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend, label { display: block; font-weight: 600; font-size: 0.95rem; margin-bottom: 8px; padding: 0; }
.req { color: var(--accent); }
.optional { font-weight: 400; color: var(--muted); }
.field { display: grid; }
.field[hidden] { display: none; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 520px) { .row-2 { grid-template-columns: 1fr; gap: 20px; } }

input, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--bg);
  border: 1.5px solid var(--line); border-radius: 10px; padding: 11px 14px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
textarea { resize: vertical; min-height: 140px; }
input::placeholder { color: var(--muted); opacity: 0.7; }
input:focus, textarea:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 25%, transparent); }
[aria-invalid="true"] { border-color: var(--error); }

.hint { font-size: 0.85rem; color: var(--muted); margin: 6px 0 0; }
.count { text-align: right; }
.error { font-size: 0.88rem; color: var(--error); margin: 6px 0 0; }
.error:empty { display: none; }

.segmented { display: inline-grid; grid-template-columns: 1fr 1fr; background: var(--bg); border: 1.5px solid var(--line); border-radius: 999px; padding: 4px; width: 100%; max-width: 360px; }
.segmented label { margin: 0; font-weight: 500; }
.segmented input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.segmented span { display: block; text-align: center; padding: 8px 14px; border-radius: 999px; cursor: pointer; transition: background 0.15s, color 0.15s; }
.segmented input:checked + span { background: var(--accent); color: var(--accent-ink); }
.segmented input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 1px; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font: 500 0.92rem/1.3 var(--sans); color: var(--ink); background: var(--bg);
  border: 1.5px solid var(--line); border-radius: 999px; padding: 8px 14px;
  cursor: pointer; text-align: left; transition: border-color 0.15s, background 0.15s;
}
.chip:hover { border-color: var(--accent); }
.chip[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent); color: var(--ink); }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.spinner { display: none; width: 18px; height: 18px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin 0.7s linear infinite; }
.is-sending .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

.status { margin: 0; font-weight: 500; }
.status:empty { display: none; }
.status.ok { color: var(--success); }
.status.err { color: var(--error); }

.sent { text-align: center; padding: 24px 8px; }
.sent h3 { font-size: 1.6rem; }
.sent p { color: var(--muted); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0; color: var(--muted); font-size: 0.9rem; }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }
.footer-row p { margin: 0; }
