:root {
  --bg: #1a1a1a;
  --surface: #1e1e1e;
  --card: #252525;
  --line: #333130;
  --text: #f0ece4;
  --muted: #9a948d;
  --accent: #c07a5a;
  --accent-dark: #995940;
  --radius: 16px;
  --max: 1080px;
  --serif: "Playfair Display", Georgia, serif;
  --sans: "DM Sans", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
img { max-width: 100%; display: block; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

/* Nav */
.top-nav {
  position: sticky; top: 0; z-index: 10;
  background: rgba(26, 26, 26, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-container {
  max-width: var(--max); margin: 0 auto; padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.nav-brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--serif); font-size: 20px; font-weight: 700;
  color: var(--text); text-decoration: none;
}
.nav-brand img { width: 32px; height: 32px; border-radius: 8px; }
.nav-links { display: flex; gap: 22px; }
.nav-link { color: var(--muted); text-decoration: none; font-size: 15px; }
.nav-link:hover, .nav-link.active { color: var(--text); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 24px; border-radius: 999px; border: 1px solid transparent;
  font: 500 16px var(--sans); text-decoration: none; cursor: pointer;
  transition: background .2s, border-color .2s, transform .1s;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--accent); color: #1a1a1a; }
.btn-primary:hover { background: #cd8a6b; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent); }
.btn svg { width: 20px; height: 20px; flex: none; }

/* Hero */
.hero { padding: 96px 0 72px; text-align: center; }
.hero-icon {
  width: 104px; height: 104px; border-radius: 24px; margin: 0 auto 28px;
  box-shadow: 0 20px 60px rgba(192, 122, 90, 0.18);
}
.eyebrow {
  font-size: 12px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 16px;
}
.hero h1 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(38px, 7vw, 64px); line-height: 1.1; letter-spacing: -0.01em;
  max-width: 760px; margin: 0 auto 22px;
}
.hero h1 em { color: var(--accent); font-style: italic; }
.hero p { color: var(--muted); max-width: 600px; margin: 0 auto 36px; font-size: 18px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

/* Sections */
section.block { padding: 72px 0; border-top: 1px solid var(--line); }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 44px; }
.section-head h2 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(28px, 4.5vw, 40px); line-height: 1.2; margin-bottom: 12px;
}
.section-head p { color: var(--muted); }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px;
}
.feature-icon {
  width: 44px; height: 44px; border-radius: 12px; margin-bottom: 18px;
  display: grid; place-items: center;
  background: rgba(192, 122, 90, 0.14); color: var(--accent);
}
.feature-icon svg { width: 22px; height: 22px; }
.feature h3 { font-size: 18px; font-weight: 500; margin-bottom: 8px; }
.feature p { color: var(--muted); font-size: 15px; }

/* Partner / referral */
.partner {
  background: linear-gradient(160deg, #2a221e 0%, var(--card) 60%);
  border: 1px solid var(--line); border-radius: 24px;
  padding: 48px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center;
}
.partner h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(28px, 4vw, 38px); line-height: 1.2; margin-bottom: 14px; }
.partner p { color: var(--muted); margin-bottom: 26px; }
.partner ul { list-style: none; display: grid; gap: 14px; }
.partner li { display: flex; gap: 12px; color: var(--text); font-size: 15px; }
.partner li::before {
  content: ""; flex: none; width: 8px; height: 8px; margin-top: 9px;
  border-radius: 50%; background: var(--accent);
}

.notice { text-align: center; color: var(--muted); font-size: 14px; max-width: 640px; margin: 0 auto; }

/* Footer */
footer { border-top: 1px solid var(--line); padding: 36px 0 48px; margin-top: 24px; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; }
.footer-links { display: flex; flex-wrap: wrap; gap: 20px; }
.footer-links a { color: var(--muted); text-decoration: none; font-size: 14px; }
.footer-links a:hover { color: var(--text); }
.copyright { color: var(--muted); font-size: 13px; }

/* Modal */
dialog {
  border: 1px solid var(--line); border-radius: 20px; padding: 0;
  background: var(--surface); color: var(--text);
  width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 32px);
  margin: auto; overflow-x: hidden;
}
dialog::backdrop { background: rgba(0, 0, 0, 0.65); backdrop-filter: blur(4px); }
.modal-body { padding: 32px; }
.modal-head { display: flex; justify-content: space-between; align-items: start; gap: 16px; margin-bottom: 6px; }
.modal-head h3 { font-family: var(--serif); font-weight: 400; font-size: 28px; line-height: 1.2; }
.modal-close {
  background: none; border: 0; color: var(--muted); cursor: pointer;
  font-size: 28px; line-height: 1; padding: 0 4px;
}
.modal-close:hover { color: var(--text); }
.modal-sub { color: var(--muted); font-size: 15px; margin-bottom: 24px; }
.form-grid { display: grid; gap: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
label { display: grid; gap: 6px; min-width: 0; font-size: 14px; color: var(--muted); }
input, select, textarea {
  width: 100%; padding: 12px 14px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--card); color: var(--text);
  font: 16px var(--sans);
}
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); }
.segmented { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label {
  display: block; text-align: center; padding: 12px; cursor: pointer;
  border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--text);
}
.segmented input:checked + label { border-color: var(--accent); background: rgba(192, 122, 90, 0.14); }
.segmented input:focus-visible + label { outline: 2px solid var(--accent); outline-offset: 2px; }
.form-note { font-size: 13px; color: var(--muted); }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }

/* Legal pages */
.legal-page { padding: 64px 0 40px; }
.legal-page .container { max-width: 760px; }
.legal-header { margin-bottom: 40px; }
.legal-header h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(34px, 6vw, 48px); line-height: 1.15; margin-bottom: 8px; }
.legal-subtitle { color: var(--muted); font-size: 15px; }
.legal-section { padding: 28px 0; border-top: 1px solid var(--line); }
.legal-section h2 { font-size: 21px; font-weight: 500; margin-bottom: 12px; }
.legal-section p, .legal-section li { color: #cfc9c0; margin-bottom: 12px; }
.legal-section ol, .legal-section ul { padding-left: 22px; margin-bottom: 12px; }

@media (max-width: 820px) {
  .features { grid-template-columns: 1fr; }
  .partner { grid-template-columns: 1fr; padding: 32px 24px; gap: 28px; }
}
@media (max-width: 560px) {
  .hero { padding: 64px 0 52px; }
  .nav-links { gap: 14px; }
  .nav-brand span { display: none; }
  .form-row { grid-template-columns: 1fr; }
  .modal-body { padding: 24px 20px; }
  .hero-actions .btn { width: 100%; }
}
