*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --yellow: #F2D24B;
  --gold: #907904;
  --gold-hover: #786403;
  --gold-pale: rgba(144,121,4,0.1);
  --bg: #FAFAF5;
  --fg: #141008;
  --card: #FFFFFF;
  --input-bg: #F7F7F2;
  --border: #D8D4C4;
  --border-light: #E8E4D8;
  --border-dashed: #C8C0A8;
  --muted: #6E6A5A;
  --dark: #141008;
  --dark-2: #1C1710;
  --cream: #FAF6EE;
  --muted-dark: rgba(250,246,238,0.55);
  --border-dark: rgba(144,121,4,0.18);
  --destructive: #b83232;
  --radius: 6px;
}

html, body { min-height: 100%; }
body { font-family: 'Outfit', sans-serif; background: var(--bg); color: var(--fg); }

/* ── Layout ──────────────────────────────────────────────── */
.onboarding-layout {
  display: grid;
  grid-template-columns: 40% 60%;
  min-height: 100vh;
}

/* ── Brand panel (right) ─────────────────────────────────── */
.brand-panel {
  background: var(--dark);
  padding: 52px 56px;
  display: flex; flex-direction: column;
  position: sticky; top: 0; align-self: start; height: 100vh;
  overflow: hidden;
}
.brand-panel::before {
  content: '';
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(circle at 12% 8%, rgba(242,210,75,0.10) 0%, transparent 55%),
    radial-gradient(circle at 88% 92%, rgba(144,121,4,0.14) 0%, transparent 55%);
  pointer-events: none;
}
.brand-blob {
  position: absolute; z-index: 0; pointer-events: none;
  right: -12%; bottom: -18%; width: 62%; height: 62%; min-width: 340px; min-height: 340px;
  border-radius: 42% 58% 65% 35% / 45% 40% 60% 55%;
  background: radial-gradient(circle at 35% 30%, rgba(242,210,75,0.22) 0%, rgba(144,121,4,0.16) 45%, transparent 75%);
  filter: blur(2px);
}
.brand-inner { position: relative; z-index: 1; display: flex; flex-direction: column; height: 100%; }

.brand-logo { display: inline-block; }
.brand-logo img { height: 34px; width: auto; display: block; }

.brand-main { flex: 1; display: flex; flex-direction: column; justify-content: center; }

.brand-eyebrow {
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--yellow); margin-bottom: 18px;
}
.brand-eyebrow-top { margin-top: 16px; margin-bottom: auto; }
.brand-headline {
  font-family: 'Outfit', sans-serif; font-weight: 800;
  font-size: clamp(2.6rem, 5vw, 4rem); line-height: 1.05;
  color: var(--cream); margin-bottom: 28px;
}
.brand-headline em { font-style: normal; color: var(--yellow); font-weight: 800; }
.brand-sub {
  font-size: 1rem; font-weight: 300; color: var(--muted-dark);
  line-height: 1.75; max-width: 420px;
}

.brand-trustline {
  font-size: 0.86rem; color: var(--muted-dark);
  margin-top: 20px;
}
.brand-trustline strong { color: var(--yellow); font-weight: 600; }

/* ── Form panel (left) ───────────────────────────────────── */
.form-panel { position: relative; background: var(--bg); padding: 48px 56px; min-height: 100vh; display: flex; align-items: center; }
.form-panel-inner { max-width: 460px; margin: 0 auto; width: 100%; }

.form-mobile-logo { display: none; }
.form-mobile-logo img { height: 34px; }

.form-topbar {
  position: absolute; top: 48px; left: 56px; right: 56px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.form-back {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 0.84rem; font-weight: 500; color: var(--muted); text-decoration: none;
  transition: color 0.18s;
}
.form-back:hover { color: var(--fg); }
.form-back svg { width: 13px; height: 13px; }
.form-signin-link { font-size: 0.84rem; font-weight: 500; color: var(--gold); text-decoration: none; }
.form-signin-link:hover { text-decoration: underline; }

.form-hero { margin-bottom: 32px; text-align: center; }
.form-hero .hero-eyebrow { font-size: 0.68rem; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); margin-bottom: 14px; }
.form-hero h1 { font-family: 'Fraunces', serif; font-size: 2rem; font-weight: 900; line-height: 1.15; color: var(--fg); }
.form-hero h1 em { font-style: italic; color: var(--gold); }
.form-hero p { margin-top: 12px; margin-left: auto; margin-right: auto; font-size: 0.93rem; color: var(--muted); line-height: 1.7; max-width: 480px; }

/* ── Wizard steps ────────────────────────────────────────── */
.step-indicator { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); margin-bottom: 22px; }
.wizard-step { display: none; }
.wizard-step.active { display: block; animation: stepIn 0.25s ease; }
@keyframes stepIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }

.step-hero { margin-bottom: 28px; }
.step-hero h1 { font-family: 'Fraunces', serif; font-size: 1.9rem; font-weight: 900; color: var(--fg); line-height: 1.15; }
.step-hero p { margin-top: 8px; font-size: 0.92rem; color: var(--muted); line-height: 1.6; }

.step-next-btn {
  width: 100%; margin-top: 26px; padding: 15px 20px; border: none; border-radius: var(--radius);
  background: var(--fg); color: #fff; font-family: 'Outfit', sans-serif; font-size: 0.92rem; font-weight: 600;
  cursor: pointer; transition: background 0.2s;
}
.step-next-btn:hover { background: #2a2214; }
.step-back-btn {
  display: block; margin-top: 18px; background: none; border: none; color: var(--muted);
  font-family: 'Outfit', sans-serif; font-size: 0.84rem; padding: 4px 0; cursor: pointer;
}
.step-back-btn:hover { color: var(--fg); }

.yesno-row { display: flex; flex-direction: column; gap: 12px; margin-top: 6px; }
.yesno-btn {
  width: 100%; padding: 16px 20px; border-radius: var(--radius); text-align: left;
  font-family: 'Outfit', sans-serif; font-size: 0.92rem; font-weight: 600; cursor: pointer;
  border: 1.5px solid var(--border); background: #fff; color: var(--fg);
  box-shadow: 0 1px 2px rgba(0,0,0,0.03); transition: border-color 0.2s, background 0.2s;
}
.yesno-btn:hover { border-color: var(--gold); background: rgba(144,121,4,0.04); }
.yesno-btn.secondary { background: transparent; color: var(--muted); border-color: var(--border-light); font-weight: 500; box-shadow: none; }

.member-summary-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.member-chip { background: rgba(144,121,4,0.08); border: 1px solid var(--border-dark); color: var(--fg); font-size: 0.8rem; padding: 6px 12px; border-radius: 999px; }

.member-modal { max-width: 540px; }

/* ── Section headers ─────────────────────────────────────── */
.section-header { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.section-header > span { font-size: 0.68rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold); white-space: nowrap; }
.section-header .line { flex: 1; height: 1px; background: var(--border); }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 580px) { .grid2 { grid-template-columns: 1fr; } }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 0.82rem; font-weight: 500; color: var(--muted); }
.field label .req { color: var(--gold); margin-left: 2px; }
.error-text { font-size: 0.76rem; color: var(--destructive); display: none; }

input[type="text"], input[type="email"], select {
  background: var(--input-bg); border: 1.5px solid var(--border); border-radius: var(--radius);
  padding: 11px 14px; color: var(--fg); font-family: 'Outfit', sans-serif;
  font-size: 0.9rem; outline: none; transition: border-color 0.2s; width: 100%;
}
input[type="text"]::placeholder, input[type="email"]::placeholder { color: #b0a898; }
input[type="text"]:focus, input[type="email"]:focus, select:focus { border-color: var(--gold); }
.input-error { border-color: var(--destructive) !important; }
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23907904' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; cursor: pointer;
}

.section { margin-bottom: 36px; }

/* ── Member cards ────────────────────────────────────────── */
.member-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; margin-bottom: 12px; box-shadow: 0 1px 3px rgba(0,0,0,0.04); }
.member-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.member-header span { font-size: 0.68rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); }
.member-header button { background: none; border: none; color: var(--destructive); font-size: 0.78rem; cursor: pointer; padding: 2px 6px; border-radius: 3px; }
.member-fields { display: flex; flex-direction: column; gap: 12px; }
.add-member { width: 100%; padding: 14px; background: transparent; border: 1.5px dashed var(--border-dashed); border-radius: var(--radius); color: var(--gold); font-family: 'Outfit', sans-serif; font-size: 0.88rem; cursor: pointer; }
.add-member:hover { border-color: var(--gold); background: rgba(144,121,4,0.04); }

.form-card { background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: 36px 36px 40px; box-shadow: 0 1px 4px rgba(0,0,0,0.05); }
@media (max-width: 580px) { .form-card { padding: 24px 18px 32px; } }

/* ── Legal ───────────────────────────────────────────────── */
.legal-section { margin-top: 28px; }
.legal-note { font-size: 0.82rem; color: var(--muted); line-height: 1.55; text-align: center; }
.legal-note a { color: var(--gold); font-weight: 500; text-decoration: underline; }

/* ── T&C modal ───────────────────────────────────────────── */
.tc-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.35); z-index: 500; }
.tc-overlay.open { display: block; }
.tc-modal { display: none; position: fixed; top: 50%; left: 50%; transform: translate(-50%,-50%); background: var(--card); border: 1px solid var(--border); border-radius: 8px; width: min(680px,94vw); max-height: 80vh; overflow-y: auto; z-index: 600; padding: 28px 30px; box-shadow: 0 12px 40px rgba(0,0,0,0.15); }
.tc-modal.open { display: block; }
.tc-modal h2 { font-family: 'Fraunces', serif; font-size: 1.2rem; color: var(--fg); margin-bottom: 20px; }
.tc-grid { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.tc-clause { padding: 12px 14px; border-left: 2px solid var(--border); background: var(--bg); border-radius: 0 5px 5px 0; }
.tc-clause.warn { border-left-color: var(--gold); background: rgba(144,121,4,0.05); }
.tc-clause.nda-section { border-left-color: var(--fg); background: rgba(20,16,8,0.03); }
.tc-clause.nda-section h4 { color: var(--fg); }
.tc-clause h4 { font-size: 0.68rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.tc-clause p { font-size: 0.8rem; color: var(--fg); line-height: 1.7; }
.tc-copyright { font-size: 0.72rem; color: var(--muted); padding-top: 12px; border-top: 1px solid var(--border); margin-bottom: 18px; }
.tc-copyright a { color: var(--gold); text-decoration: none; }
.tc-copyright a:hover { text-decoration: underline; }
.tc-modal-footer { display: flex; justify-content: flex-end; gap: 10px; }
.tc-close-btn { padding: 8px 18px; border-radius: 4px; font-size: 0.84rem; font-weight: 500; cursor: pointer; font-family: inherit; background: var(--bg); color: var(--fg); border: 1px solid var(--border); }
.tc-accept-btn { padding: 8px 18px; border-radius: 4px; font-size: 0.84rem; font-weight: 500; cursor: pointer; font-family: inherit; background: var(--fg); color: #fff; border: none; }

/* ── Upload zones ────────────────────────────────────────── */
.upload-group { margin-bottom: 24px; }
.upload-group:last-child { margin-bottom: 0; }
.upload-group-label { font-size: 0.82rem; font-weight: 500; color: var(--muted); margin-bottom: 4px; }
.upload-group-label .req { color: var(--gold); margin-left: 2px; }
.upload-group-label .optional { color: var(--muted); font-weight: 400; font-style: italic; margin-left: 4px; }
.upload-group-hint { font-size: 0.76rem; color: var(--muted); margin-bottom: 10px; line-height: 1.5; }
.upload-group-hint strong { color: var(--fg); font-weight: 500; }
.drop-zone { border: 1.5px dashed var(--border-dashed); border-radius: var(--radius); padding: 28px 20px; text-align: center; cursor: pointer; background: var(--input-bg); transition: border-color 0.2s, background 0.2s; }
.drop-zone:hover, .drop-zone.dragover { border-color: var(--gold); background: rgba(144,121,4,0.04); }
.drop-zone svg { width: 26px; height: 26px; stroke: var(--gold); margin: 0 auto 8px; display: block; }
.drop-zone p { font-size: 0.88rem; color: var(--fg); }
.drop-zone .hint { margin-top: 4px; font-size: 0.76rem; color: var(--muted); }
.file-list { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.file-item { display: flex; align-items: center; justify-content: space-between; background: var(--input-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 9px 12px; font-size: 0.82rem; }
.file-item .name { color: var(--fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 78%; }
.file-item .size { color: var(--muted); font-size: 0.74rem; margin-left: 8px; flex-shrink: 0; }
.file-item .remove { background: none; border: none; color: var(--muted); cursor: pointer; font-size: 1.1rem; margin-left: 10px; flex-shrink: 0; }
.file-item .remove:hover { color: var(--destructive); }

/* ── Submit ──────────────────────────────────────────────── */
.submit-area { margin-top: 28px; text-align: center; }
.submit-btn { width: 100%; padding: 16px 24px; background: var(--yellow); border: none; border-radius: 5px; color: var(--fg); font-family: 'Outfit', sans-serif; font-size: 0.95rem; font-weight: 600; letter-spacing: 0.04em; cursor: pointer; transition: background 0.2s; }
.submit-btn:hover { background: #e8c83a; }
.submit-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.progress-bar { margin-top: 16px; background: var(--border); border-radius: 999px; height: 4px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--yellow); border-radius: 999px; transition: width 0.3s ease-out; }
.progress-label { margin-top: 8px; font-size: 0.78rem; color: var(--muted); }
.success-box { margin-top: 24px; background: rgba(242,210,75,0.1); border: 1px solid var(--gold); border-radius: var(--radius); padding: 20px 24px; text-align: left; }
.success-box p { font-size: 0.9rem; color: #5a4a02; }
.footer-note { margin-top: 14px; font-size: 0.76rem; color: var(--muted); line-height: 1.6; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 900px) {
  .onboarding-layout { grid-template-columns: 1fr; }
  .brand-panel { display: none; }
  .form-mobile-logo { display: block; margin-bottom: 24px; }
  .form-panel { padding: 76px 24px 64px; align-items: flex-start; min-height: auto; }
  .form-topbar { top: 24px; left: 24px; right: 24px; }
}
