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

:root {
  --gold: #f0c96a;
  --gold-dark: #c9a84c;
  --gold-dim: rgba(240,201,106,0.1);
  --bg: #0b0b0d;
  --bg2: #111113;
  --bg3: #18181b;
  --border: rgba(240,201,106,0.15);
  --border2: rgba(255,255,255,0.07);
  --text: #f0ede8;
  --text2: #c9c1ae;
  --text3: #948b7e;
  --success: rgba(29,158,117,0.1);
  --success-border: rgba(29,158,117,0.25);
  --success-text: #5dcaa5;
}

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--gold);
  color: #111;
  padding: 0.5rem 1.2rem;
  border-radius: 0 0 8px 8px;
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
  z-index: 10001;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 0;
}

.verify-link {
  font-size: 0.65rem;
  color: var(--gold);
  text-decoration: none;
}

.verify-link:hover {
  text-decoration: underline;
}

.brand-lic-caps {
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.secure-note {
  background: rgba(29,158,117,0.08);
  border: 1px solid rgba(29,158,117,0.2);
  border-radius: 8px;
  padding: 0.6rem 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 1rem;
}

.secure-note .lock {
  font-size: 16px;
  color: var(--success-text);
}

.secure-note p {
  font-size: 12px;
  color: var(--success-text);
  margin: 0;
}

/* ── Header ───────────────────────────────── */
.header {
  border-bottom: 1px solid var(--border2);
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(11,11,13,0.95);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.brand img      { width: 44px; height: 44px; border-radius: 10px; }
.brand-name     { font-size: 0.9rem;  font-weight: 700; color: var(--text); margin: 0; line-height: 1.2; }
.brand-lic      { font-size: 0.7rem;  color: var(--gold); margin: 0; }
.header-phone   { background: var(--gold); color: #0b0b0d; font-weight: 700; font-size: 0.82rem; padding: 0.5rem 1.1rem; border-radius: 8px; text-decoration: none; white-space: nowrap; }
.header-actions { display: flex; align-items: center; gap: 0.6rem; }
.lang-btn       { background: transparent; border: 1px solid var(--gold-dark); color: var(--gold); font-weight: 700; font-size: 0.82rem; padding: 0.5rem 1.1rem; border-radius: 8px; text-decoration: none; white-space: nowrap; transition: background 0.2s ease, border-color 0.2s ease; }
.lang-btn:hover { background: var(--gold-dim); border-color: var(--gold); }

.autocomplete-wrap { position: relative; }
.autocomplete-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 50;
  margin: 0;
  padding: 0.3rem;
  list-style: none;
  max-height: 220px;
  overflow-y: auto;
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.35);
  display: none;
}
.autocomplete-list.open { display: block; }
.autocomplete-option {
  padding: 0.55rem 0.75rem;
  border-radius: 6px;
  font-size: 0.88rem;
  color: var(--text);
  cursor: pointer;
}
.autocomplete-option:hover,
.autocomplete-option.active { background: var(--gold-dim); }

/* ── Hero ─────────────────────────────────── */
.intake-hero {
  background: var(--bg2);
  border-bottom: 1px solid var(--border2);
  padding: 3rem 2rem 2.5rem;
  text-align: center;
}

.intake-eyebrow {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  border: 1px solid var(--border);
  padding: 0.3rem 0.9rem;
  border-radius: 100px;
  margin-bottom: 1rem;
}

.intake-hero h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 800; color: var(--text); margin-bottom: 0.75rem; letter-spacing: -0.02em; }
.intake-hero p  { font-size: 0.95rem; color: var(--text2); max-width: 520px; margin: 0 auto; line-height: 1.7; }

/* ── Progress ─────────────────────────────── */
.progress-wrap   { max-width: 680px; margin: 2rem auto 0; padding: 0 2rem; }
.progress-labels { display: flex; justify-content: space-between; margin-bottom: 0.5rem; }
.progress-label  { font-size: 0.72rem; color: var(--text3); }
.progress-bar    { height: 3px; background: var(--border2); border-radius: 3px; overflow: hidden; }
.progress-fill   { height: 100%; background: var(--gold); border-radius: 3px; transition: width 0.4s ease; }

/* ── Form container ───────────────────────── */
.form-container { max-width: 680px; margin: 2rem auto 4rem; padding: 0 1.5rem; }

/* ── Section cards ────────────────────────── */
.form-section         { background: var(--bg3); border: 1px solid var(--border2); border-radius: 16px; padding: 2rem; margin-bottom: 1.25rem; display: none; }
.form-section.active  { display: block; animation: fadeIn 0.3s ease; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.section-num   { font-size: 0.7rem;  font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); margin-bottom: 0.4rem; }
.section-title { font-size: 1.15rem; font-weight: 700; color: var(--text); margin-bottom: 0.3rem; }
.section-desc  { font-size: 0.85rem; color: var(--text2); margin-bottom: 1.5rem; line-height: 1.6; }
.divider       { border: none; border-top: 1px solid var(--border2); margin: 1.25rem 0; }

/* ── Fields ───────────────────────────────── */
.field         { margin-bottom: 1rem; }
.field-label   { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text3); margin-bottom: 0.4rem; display: block; }
.field-label .req { color: var(--gold); margin-left: 2px; }

.field-input,
.field-select,
.field-textarea {
  width: 100%;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 8px;
  padding: 0.7rem 0.9rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
}

.field-input::placeholder,
.field-textarea::placeholder { color: var(--text3); }

.field-input:focus,
.field-select:focus,
.field-textarea:focus { border-color: var(--gold-dark); }

.field-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237a7268' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

.field-select option  { background: var(--bg2); }
.field-textarea       { resize: vertical; min-height: 100px; line-height: 1.6; }
.field-grid           { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field-hint           { font-size: 0.76rem; color: var(--text3); margin-top: 0.3rem; }

/* ── Radio / Checkbox ─────────────────────── */
.radio-group  { display: flex; flex-direction: column; gap: 0.5rem; }
.radio-option {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 0.9rem;
  background: var(--bg2);
  border: 1px solid var(--border2);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.2s;
}
.radio-option:hover      { border-color: var(--border); }
.radio-option.selected   { border-color: var(--gold-dark); background: var(--gold-dim); }
.radio-option input      { display: none; }

.radio-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--text3);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.radio-option.selected .radio-dot               { border-color: var(--gold); background: var(--gold); }
.radio-option.selected .radio-dot::after        { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #0b0b0d; }

.radio-label  { font-size: 0.88rem; color: var(--text); }
.radio-grid   { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }

/* ── Navigation ───────────────────────────── */
.form-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.5rem;
}

.btn-back {
  background: transparent;
  border: 1px solid var(--border2);
  border-radius: 8px;
  padding: 0.7rem 1.4rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  color: var(--text2);
  cursor: pointer;
  transition: border-color 0.2s;
}
.btn-back:hover   { border-color: var(--border); }

.btn-next {
  background: var(--gold);
  border: none;
  border-radius: 8px;
  padding: 0.7rem 1.8rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  color: #0b0b0d;
  cursor: pointer;
  letter-spacing: 0.04em;
  transition: background 0.2s;
}
.btn-next:hover      { background: #e8bb55; }
.btn-next:disabled   { opacity: 0.5; cursor: not-allowed; }

.step-indicator { font-size: 0.78rem; color: var(--text3); }

/* ── Success screen ───────────────────────── */
.success-screen         { display: none; text-align: center; padding: 4rem 2rem; }
.success-screen.visible { display: block; animation: fadeIn 0.4s ease; }

.success-icon {
  width: 64px;
  height: 64px;
  background: rgba(29,158,117,0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 28px;
}

.success-screen h2 { font-size: 1.6rem; font-weight: 700; color: var(--text); margin-bottom: 0.75rem; }
.success-screen p  { font-size: 0.95rem; color: var(--text2); max-width: 480px; margin: 0 auto 1.5rem; line-height: 1.7; }

.success-detail {
  background: var(--bg3);
  border: 1px solid var(--border2);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  max-width: 400px;
  margin: 0 auto;
  text-align: left;
}
.success-detail p       { font-size: 0.85rem; color: var(--text2); margin-bottom: 0.5rem; display: flex; align-items: center; gap: 0.5rem; }
.success-detail p:last-child { margin-bottom: 0; }
.check                  { color: var(--gold); font-weight: 700; }

/* ── Field errors ─────────────────────────── */
.field-error { font-size: 0.78rem; color: #f09595; margin-top: 0.3rem; display: none; }
.field-input.error,
.field-select.error,
.field-textarea.error { border-color: #f09595; }

/* ── Footer ───────────────────────────────── */
.intake-footer {
  border-top: 1px solid var(--border2);
  padding: 1.5rem 2rem;
  text-align: center;
  font-size: 0.78rem;
  color: var(--text3);
}

/* ── Responsive ───────────────────────────── */
@media (max-width: 560px) {
  .field-grid    { grid-template-columns: 1fr; }
  .radio-grid    { grid-template-columns: 1fr; }
  .intake-hero   { padding: 2rem 1.25rem 1.75rem; }
  .form-container { padding: 0 1rem; }
  .form-section  { padding: 1.5rem; }
  .header        { padding: 0.85rem 1.25rem; flex-wrap: wrap; row-gap: 0.6rem; }
  .header-actions { width: 100%; justify-content: flex-end; }
  .form-nav {
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
  }
  .form-nav > span:empty { display: none; }
  .btn-next       { order: 1; width: 100%; text-align: center; }
  .btn-back       { order: 2; width: 100%; text-align: center; }
  .step-indicator { order: 3; text-align: center; }
  .form-nav p     { order: 4; margin-top: 0 !important; }
}

/* ── Date/Time quick-pick widget ─────────────────────────── */
.dt-wrap { position: relative; display: block; }
.dt-wrap .field-input { padding-right: 2.5rem; }
.dt-wrap input[type="date"]::-webkit-calendar-picker-indicator,
.dt-wrap input[type="time"]::-webkit-calendar-picker-indicator { display: none; }

.dt-quickbtn {
  position: absolute;
  right: 0.4rem;
  top: 50%;
  transform: translateY(-50%);
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--text3);
  cursor: pointer;
  padding: 0;
}
.dt-quickbtn svg     { width: 17px; height: 17px; }
.dt-quickbtn:hover,
.dt-quickbtn.active  { color: var(--gold); background: var(--bg3); }

.dt-popover {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 50;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.65rem;
  min-width: 190px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.4);
  display: none;
}
.dt-popover.open        { display: block; }
.dt-popover-label       { font-size: 0.7rem; color: var(--text3); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.3rem; }
.dt-popover-value       { font-size: 0.92rem; color: var(--text); margin-bottom: 0.55rem; font-weight: 600; }
.dt-popover-btn {
  width: 100%;
  padding: 0.5rem 0.7rem;
  background: var(--gold);
  color: #0b0b0d;
  border: none;
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.02em;
}
.dt-popover-btn:hover   { background: #e8bb55; }

/* ── "Other" free-text reveal (Cause of Loss select) ─────── */
.field-other {
  margin-top: 0.55rem;
  display: none;
}
.field-other.visible { display: block; }
