/* ─────────────────────────────────────────────────────────────
   style.css — My Rollover Hub
   ───────────────────────────────────────────────────────────── */

/* ── Variables ── */
:root {
  --navy:        #0d1f3c;
  --navy-mid:    #1a3460;
  --gold:        #c9a84c;
  --gold-light:  #e2c97e;
  --cream:       #f8f5ef;
  --white:       #ffffff;
  --gray-100:    #f3f1ec;
  --gray-200:    #e5e0d8;
  --gray-400:    #9e9589;
  --gray-600:    #5c5650;
  --gray-800:    #2e2b28;
  --red:         #c0392b;
  --radius:      6px;
  --shadow-card: 0 4px 32px rgba(13,31,60,0.13);
}

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

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  color: var(--gray-800);
  min-height: 100vh;
}

/* ── Header ── */
header {
  background: var(--navy);
  padding: 0 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 20px rgba(0,0,0,0.25);
}
.logo { display: flex; align-items: center; gap: 12px; }
.logo-mark {
  width: 36px; height: 36px;
  background: var(--gold);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  color: var(--navy);
  font-size: 16px;
}
.logo-text {
  font-family: 'Playfair Display', serif;
  color: var(--white);
  font-size: 18px;
  letter-spacing: 0.02em;
}
.logo-text span { color: var(--gold-light); }
.header-subtitle {
  color: var(--gray-400);
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ── Hero ── */
.hero {
  background: linear-gradient(135deg, var(--navy-mid) 0%, var(--navy) 100%);
  padding: 56px 48px 52px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  right: -80px; top: -80px;
  width: 420px; height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201,168,76,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.hero-inner { max-width: 760px; position: relative; }
.hero-tag {
  display: inline-block;
  background: rgba(201,168,76,0.18);
  border: 1px solid rgba(201,168,76,0.35);
  color: var(--gold-light);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 18px;
}
.hero h1 {
  font-family: 'Playfair Display', serif;
  color: var(--white);
  font-size: 38px;
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 14px;
}
.hero h1 em { color: var(--gold-light); font-style: normal; }
.hero p {
  color: rgba(255,255,255,0.65);
  font-size: 15px;
  line-height: 1.7;
  font-weight: 300;
  max-width: 520px;
}

/* Step indicator */
.step-indicator { display: flex; gap: 0; margin-top: 32px; }
.step {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: rgba(255,255,255,0.45);
  letter-spacing: 0.05em;
}
.step.active { color: var(--gold-light); }
.step-num {
  width: 24px; height: 24px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600;
}
.step.active .step-num {
  background: var(--gold); border-color: var(--gold); color: var(--navy);
}
.step-divider {
  width: 32px; height: 1px;
  background: rgba(255,255,255,0.15);
  margin: 0 8px; align-self: center;
}

/* ── Layout ── */
main {
  max-width: 860px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

/* ── Section cards ── */
.section-card {
  background: var(--white);
  border-radius: 12px;
  box-shadow: var(--shadow-card);
  margin-bottom: 32px;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.5s ease forwards;
}
.section-card:nth-child(1) { animation-delay: 0.10s; }
.section-card:nth-child(2) { animation-delay: 0.18s; }
.section-card:nth-child(3) { animation-delay: 0.26s; }
.section-card:nth-child(4) { animation-delay: 0.34s; }

@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

.card-header {
  padding: 24px 32px 20px;
  border-bottom: 1px solid var(--gray-200);
  display: flex; align-items: center; gap: 14px;
}
.card-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--navy);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.card-icon svg { width: 18px; height: 18px; fill: var(--gold); }
.card-header-text h2 {
  font-family: 'Playfair Display', serif;
  font-size: 20px; color: var(--navy); font-weight: 600;
}
.card-header-text p {
  font-size: 13px; color: var(--gray-400); margin-top: 2px; font-weight: 300;
}
.card-body { padding: 28px 32px; }

/* ── Form elements ── */
.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 24px;
}
.field { display: flex; flex-direction: column; gap: 6px; }

label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--gray-600);
}
label .req { color: var(--gold); margin-left: 2px; }

input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: var(--gray-800);
  background: var(--gray-100);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 10px 14px;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  outline: none;
  width: 100%;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--navy-mid);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(26,52,96,0.1);
}
input.invalid, select.invalid, textarea.invalid {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(192,57,43,0.1);
}
textarea { resize: vertical; min-height: 80px; }
select { cursor: pointer; }

.field-error {
  font-size: 12px;
  color: var(--red);
  min-height: 16px;
  display: block;
}

/* Honeypot field */
.hp-field {
  position: absolute;
  left: -5000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ── Motivation table ── */
.motiv-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.motiv-table th {
  text-align: left;
  font-size: 11px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--gray-400);
  font-weight: 600;
  padding: 0 12px 12px;
  border-bottom: 1.5px solid var(--gray-200);
}
.motiv-table th:first-child { padding-left: 0; }
.motiv-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--gray-100);
  vertical-align: middle;
}
.motiv-table td:first-child { padding-left: 0; }
.motiv-table tr:last-child td { border-bottom: none; }
.motiv-table tr:hover td { background: var(--gray-100); transition: background 0.15s; }
.motiv-check { width: 18px; height: 18px; accent-color: var(--navy); cursor: pointer; }
.motiv-label { font-weight: 400; color: var(--gray-800); }
.motiv-desc  { color: var(--gray-400); font-size: 12px; }

/* ── Account cards ── */
.accounts-container { display: flex; flex-direction: column; gap: 20px; }

.account-card {
  border: 1.5px solid var(--gray-200);
  border-radius: 10px;
  overflow: hidden;
  transition: border-color 0.2s;
}
.account-card:focus-within { border-color: var(--navy-mid); }

.account-header {
  background: var(--gray-100);
  padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between;
}
.account-title {
  font-size: 13px; font-weight: 600; color: var(--navy);
  letter-spacing: 0.03em;
  display: flex; align-items: center; gap: 8px;
}
.account-badge {
  background: var(--navy);
  color: var(--gold-light);
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.08em;
  padding: 2px 8px; border-radius: 100px;
}
.account-actions { display: flex; gap: 8px; }

.btn-ghost {
  background: none;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 5px 12px;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px; font-weight: 500;
  color: var(--gray-600);
  cursor: pointer;
  transition: all 0.2s;
  display: flex; align-items: center; gap: 5px;
}
.btn-ghost:hover { border-color: var(--navy); color: var(--navy); background: rgba(13,31,60,0.04); }
.btn-ghost.btn-danger { border-color: rgba(192,57,43,0.3); color: var(--red); }
.btn-ghost.btn-danger:hover { border-color: var(--red); background: rgba(192,57,43,0.05); }

.account-body { padding: 20px; }

.account-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: end;
  margin-bottom: 4px;
}
.arrow-col {
  display: flex; align-items: flex-end;
  padding-bottom: 10px;
  color: var(--gold);
}
.arrow-col svg { width: 20px; height: 20px; }

/* Details panel */
.details-panel {
  display: none;
  border-top: 1.5px dashed var(--gray-200);
  margin-top: 16px;
  padding-top: 18px;
}
.details-panel.open { display: block; }
.details-panel-inner {
  background: var(--gray-100);
  border-radius: 8px;
  padding: 18px 20px;
}
.details-title {
  font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--gray-400);
  font-weight: 600; margin-bottom: 14px;
}
.details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 20px;
  margin-bottom: 16px;
}

/* Account type pills */
.account-type-grid { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.type-pill {
  display: flex; align-items: center; gap: 6px;
  border: 1.5px solid var(--gray-200);
  border-radius: 100px;
  padding: 6px 14px;
  font-size: 12.5px; font-weight: 500;
  color: var(--gray-600);
  cursor: pointer;
  transition: all 0.18s;
  background: var(--white);
  user-select: none;
}
.type-pill:hover { border-color: var(--navy-mid); color: var(--navy); }
.type-pill.selected { border-color: var(--navy); background: var(--navy); color: var(--white); }

/* ── Add account button ── */
.btn-add {
  display: flex; align-items: center; gap: 10px;
  background: none;
  border: 2px dashed var(--gray-200);
  border-radius: 10px;
  padding: 16px 24px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px; font-weight: 500;
  color: var(--gray-400);
  cursor: pointer; width: 100%;
  transition: all 0.2s;
  margin-top: 20px;
}
.btn-add:hover { border-color: var(--navy-mid); color: var(--navy); background: rgba(13,31,60,0.03); }
.btn-add svg { width: 18px; height: 18px; }

/* ── Guidance ── */
.guidance-cards { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

.guidance-option { position: relative; cursor: pointer; }
.guidance-option input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }

.guidance-inner {
  border: 2px solid var(--gray-200);
  border-radius: 10px; padding: 20px;
  transition: all 0.2s; height: 100%;
}
.guidance-option:hover .guidance-inner { border-color: var(--navy-mid); }
.guidance-option input:checked ~ .guidance-inner {
  border-color: var(--navy);
  background: rgba(13,31,60,0.03);
  box-shadow: 0 0 0 3px rgba(13,31,60,0.08);
}

.guidance-check {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--gray-200);
  margin-bottom: 14px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.guidance-option input:checked ~ .guidance-inner .guidance-check {
  border-color: var(--navy); background: var(--navy);
}
.guidance-check::after {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%; background: var(--white); display: none;
}
.guidance-option input:checked ~ .guidance-inner .guidance-check::after { display: block; }

.guidance-inner h3 {
  font-family: 'Playfair Display', serif;
  font-size: 16px; color: var(--navy); margin-bottom: 6px;
}
.guidance-inner p { font-size: 12.5px; color: var(--gray-400); line-height: 1.6; font-weight: 300; }

.guidance-tag {
  display: inline-block; margin-top: 12px;
  font-size: 10px; letter-spacing: 0.1em;
  text-transform: uppercase; font-weight: 700;
  color: var(--gray-400); background: var(--gray-100);
  padding: 3px 10px; border-radius: 100px;
}
.guidance-option input:checked ~ .guidance-inner .guidance-tag { background: var(--gold); color: var(--navy); }

.guidance-notes { margin-top: 20px; }

/* ── Submit row ── */
.submit-row {
  display: flex; align-items: center;
  justify-content: space-between;
  margin-top: 40px; padding: 0 4px;
}
.submit-note {
  font-size: 12.5px; color: var(--gray-400);
  font-weight: 300;
  display: flex; align-items: center; gap: 6px;
}
.submit-note svg { width: 14px; height: 14px; opacity: 0.6; }

.btn-primary {
  background: var(--navy); color: var(--white);
  border: none; border-radius: var(--radius);
  padding: 14px 36px;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px; font-weight: 600;
  cursor: pointer; letter-spacing: 0.03em;
  transition: all 0.2s;
  display: flex; align-items: center; gap: 10px;
}
.btn-primary:hover:not(:disabled) {
  background: var(--navy-mid);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(13,31,60,0.3);
}
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-primary svg { width: 16px; height: 16px; }

/* Spinner */
.spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Banners ── */
.banner {
  margin-top: 16px;
  padding: 14px 20px;
  border-radius: 8px;
  font-size: 14px;
  display: flex; gap: 10px; align-items: flex-start;
}
.banner-error { background: rgba(192,57,43,0.08); border: 1.5px solid rgba(192,57,43,0.3); color: var(--red); }

/* ── Success overlay ── */
.success-overlay {
  position: fixed; inset: 0;
  background: rgba(13,31,60,0.85);
  display: flex; align-items: center; justify-content: center;
  z-index: 200;
  animation: fadeIn 0.3s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.success-box {
  background: var(--white);
  border-radius: 16px;
  padding: 48px 56px;
  text-align: center;
  max-width: 440px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.4);
  animation: popUp 0.35s cubic-bezier(.22,1,.36,1);
}
@keyframes popUp { from { transform: scale(0.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.success-icon {
  width: 64px; height: 64px;
  background: var(--navy);
  color: var(--gold-light);
  border-radius: 50%;
  font-size: 28px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
}
.success-box h2 {
  font-family: 'Playfair Display', serif;
  font-size: 26px; color: var(--navy); margin-bottom: 12px;
}
.success-box p { color: var(--gray-600); font-size: 14px; line-height: 1.7; }
.success-id { margin-top: 20px; font-size: 12px; color: var(--gray-400); }

/* ── Utility ── */
.hidden { display: none !important; }

/* ── Responsive ── */
@media (max-width: 700px) {
  header { padding: 0 20px; }
  .hero { padding: 36px 20px 32px; }
  .hero h1 { font-size: 26px; }
  main { padding: 32px 12px 60px; }
  .card-header, .card-body { padding: 20px; }
  .field-grid, .details-grid { grid-template-columns: 1fr; }
  .guidance-cards { grid-template-columns: 1fr; }
  .account-row { grid-template-columns: 1fr; }
  .arrow-col { display: none; }
  .submit-row { flex-direction: column; gap: 16px; }
  .success-box { padding: 32px 24px; margin: 24px; }
}
