:root {
  --text: #1c1915;
  --muted: #5c564c;
  --line: #d8d0c4;
  --primary: #1a2a44;
  --primary-deep: #0d1828;
  --gold: #b08d57;
  --gold-dark: #8c6d3f;
  --cream: #f7f4ee;
  --paper: #fffcf7;
  --serif: "Cormorant Garamond", "Times New Roman", Times, serif;
  --sans: "Source Sans 3", "Segoe UI", Arial, sans-serif;
}
* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
html, body { overflow-x: hidden; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background: var(--cream);
  line-height: 1.55;
  padding-bottom: env(safe-area-inset-bottom);
}
a { color: var(--gold-dark); text-decoration: none; }
a:hover { color: var(--primary); }
.container {
  width: min(1100px, calc(100% - 32px));
  margin: 0 auto;
}
.topbar {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  box-shadow: inset 0 -2px 0 var(--gold);
  position: sticky;
  top: 0;
  z-index: 50;
  padding-top: env(safe-area-inset-top);
}
.topbar-inner { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 0; }
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--primary);
  font-family: var(--serif);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.02em;
  min-width: 0;
}
.brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-logo { width: 34px; height: 34px; flex-shrink: 0; }
.hero {
  background:
    linear-gradient(180deg, rgba(13, 24, 40, 0.18), rgba(13, 24, 40, 0.18)),
    linear-gradient(145deg, #0d1828 0%, #1a2a44 58%, #243656 100%);
  color: #f4efe6;
  padding: 72px 0 64px;
  border-bottom: 3px solid var(--gold);
}
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 36px; align-items: start; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: 0.01em; }
h1 { margin: 10px 0 18px; font-size: clamp(28px, 7vw, 48px); line-height: 1.18; color: #f8f4ec; overflow-wrap: anywhere; }
h2 { font-size: clamp(26px, 6vw, 32px); margin: 0 0 24px; color: var(--primary); }
h3 { font-size: 22px; margin: 10px 0 8px; color: var(--primary); }
.eyebrow {
  color: var(--gold);
  margin: 0;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.45;
}
.lead { color: #d9d2c5; font-size: 18px; max-width: 38em; }
.checklist { padding-left: 18px; color: #ece6da; }
.checklist li { margin: 8px 0; }
.note { color: #cfc6b6; font-size: 13px; letter-spacing: 0.02em; }
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 24px;
  box-shadow: 0 16px 32px rgba(13, 24, 40, 0.08);
}
.form-card {
  color: var(--text);
  border-top: 3px solid var(--gold);
  scroll-margin-top: 84px;
}
.form-card h2 { font-size: clamp(22px, 5.5vw, 28px); margin-bottom: 8px; }
.form-card p { color: var(--muted); }
label { display: block; font-weight: 600; margin: 12px 0 6px; font-size: 13px; letter-spacing: 0.03em; color: var(--primary); }
input:not([type="checkbox"]), select, textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid #cfc6b8;
  border-radius: 2px;
  font-size: 16px;
  font-family: var(--sans);
  background: #fff;
  color: var(--text);
  appearance: none;
  -webkit-appearance: none;
}
select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%231a2a44' d='M1 1l5 5 5-5'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
textarea { min-height: 120px; resize: vertical; }
input:not([type="checkbox"]):focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(176, 141, 87, 0.18);
}
.checkbox {
  position: relative;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  column-gap: 12px;
  align-items: start;
  margin-top: 18px;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.55;
  color: var(--muted);
  cursor: pointer;
}
.checkbox input[type="checkbox"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  margin: 0;
  pointer-events: none;
}
.checkbox .check-mark {
  grid-column: 1;
  grid-row: 1;
  width: 26px;
  height: 26px;
  border: 2px solid #2563eb;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.checkbox .check-mark::after {
  content: "";
  width: 7px;
  height: 13px;
  margin-top: -2px;
  border: solid transparent;
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}
.checkbox input[type="checkbox"]:checked + .check-mark {
  background: #2563eb;
  border-color: #1d4ed8;
}
.checkbox input[type="checkbox"]:checked + .check-mark::after {
  border-color: #fff;
}
.checkbox input[type="checkbox"]:focus-visible + .check-mark {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.35);
}
.checkbox span:last-child { min-width: 0; }
.form-card .btn { width: 100%; text-align: center; }
.btn {
  border: 1px solid var(--gold-dark);
  background: var(--primary);
  color: #f8f4ec;
  border-radius: 2px;
  padding: 14px 18px;
  min-height: 48px;
  font-weight: 600;
  font-size: 16px;
  font-family: var(--sans);
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 14px;
  cursor: pointer;
  text-align: center;
  transition: background 0.2s ease, color 0.2s ease;
}
.btn:hover { background: var(--gold-dark); color: #fff; }
.btn-small { margin: 0; padding: 10px 14px; font-size: 14px; background: transparent; color: var(--primary); border-color: var(--gold); flex-shrink: 0; }
.btn-small:hover { background: var(--primary); color: #f8f4ec; }
.hp { display: none !important; }
.section { padding: 64px 0; background: var(--cream); }
.section.alt { background: #efeae1; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.num {
  width: 32px;
  height: 32px;
  border-radius: 0;
  background: var(--primary);
  color: var(--gold);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 16px;
}
.faq details {
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  border-radius: 0;
  background: var(--paper);
  padding: 16px;
  margin-bottom: 10px;
}
.faq summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--primary);
  list-style: none;
  padding: 4px 0;
  min-height: 44px;
  display: flex;
  align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq p { color: var(--muted); margin: 10px 0 0; }
.footer {
  background: var(--primary-deep);
  color: #cfc6b6;
  padding: 42px 0 calc(42px + env(safe-area-inset-bottom));
  border-top: 3px solid var(--gold);
}
.footer h2 { color: #f8f4ec; }
.footer a { color: var(--gold); overflow-wrap: anywhere; }

.chat-widget {
  position: fixed;
  right: max(12px, env(safe-area-inset-right));
  bottom: max(12px, env(safe-area-inset-bottom));
  z-index: 90;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
.chat-toggle {
  width: 56px;
  height: 56px;
  min-width: 56px;
  border: 1px solid var(--gold);
  border-radius: 2px;
  background: var(--primary);
  color: #f8f4ec;
  font-size: 22px;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(13, 24, 40, 0.28);
}
.chat-box {
  display: none;
  width: 360px;
  max-width: calc(100vw - 24px);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 2px;
  box-shadow: 0 20px 42px rgba(13, 24, 40, 0.28);
  overflow: hidden;
  margin-bottom: 10px;
}
.chat-box.open { display: flex; flex-direction: column; }
.chat-head {
  background: var(--primary);
  color: #f8f4ec;
  padding: 14px 44px 14px 16px;
  display: grid;
  gap: 2px;
  position: relative;
  border-bottom: 2px solid var(--gold);
}
.chat-head strong { font-family: var(--serif); font-size: 18px; }
.chat-head span { font-size: 12px; opacity: .95; color: #d9d2c5; }
.chat-close {
  position: absolute;
  right: 6px;
  top: 6px;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  color: #f8f4ec;
  font-size: 28px;
  cursor: pointer;
}
.chat-body { background: #f3eee6; max-height: 290px; overflow-y: auto; padding: 12px; -webkit-overflow-scrolling: touch; }
.msg { border-radius: 2px; padding: 10px 12px; font-size: 15px; line-height: 1.4; margin-bottom: 8px; }
.msg.bot { background: #e8e1d5; color: var(--text); }
.msg.user { background: var(--primary); color: #f8f4ec; margin-left: auto; max-width: 88%; }
.chat-input-wrap { padding: 10px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.chat-input-wrap input { min-height: 48px; }
.chat-input-wrap button {
  border: 1px solid var(--gold-dark);
  border-radius: 2px;
  background: var(--primary);
  color: #f8f4ec;
  padding: 10px 14px;
  min-height: 48px;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 16px;
}
.chat-options { padding: 10px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.chat-options button {
  border: 1px solid var(--line);
  border-radius: 2px;
  background: #fff;
  padding: 12px 12px;
  min-height: 48px;
  text-align: left;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 15px;
}
.chat-options button:hover { border-color: var(--gold); background: #f7f1e6; }

@media (max-width: 980px) {
  .hero-grid {
    display: flex;
    flex-direction: column-reverse;
    gap: 24px;
  }
  .grid-3 { grid-template-columns: 1fr; }
  .hero { padding: 28px 0 32px; }
  .section { padding: 40px 0; }
  body { padding-bottom: 84px; }
}

@media (max-width: 720px) {
  .container { width: calc(100% - 24px); }
  .topbar-inner {
    flex-wrap: wrap;
    padding: 10px 0 12px;
  }
  .brand { font-size: 16px; gap: 8px; }
  .brand-logo { width: 28px; height: 28px; }
  .btn-small {
    width: 100%;
    justify-content: center;
    min-height: 46px;
  }
  .eyebrow { letter-spacing: 0.08em; font-size: 11px; }
  .lead { font-size: 16px; }
  .card, .form-card { padding: 18px 16px; }
  .form-card { scroll-margin-top: 120px; }
  .checkbox { font-size: 14px; }
  .faq details { padding-right: 72px; }
  .footer { padding: 32px 0 96px; }

  .chat-widget:has(.chat-box.open) {
    inset: 0;
    right: 0;
    left: 0;
    top: 0;
    bottom: 0;
    padding: env(safe-area-inset-top) 0 0;
    background: rgba(13, 24, 40, 0.4);
    align-items: stretch;
  }
  .chat-widget:has(.chat-box.open) .chat-toggle { display: none; }
  .chat-box {
    width: 100%;
    max-width: none;
    margin: 0;
    border: 0;
    height: min(100dvh, 100%);
  }
  .chat-box.open {
    height: 100%;
    max-height: 100dvh;
  }
  .chat-body { flex: 1; max-height: none; }
}

@media (max-width: 400px) {
  .container { width: calc(100% - 20px); }
  h1 { font-size: 26px; }
  .checklist { padding-left: 16px; }
}
