/* ── RESET & ROOT ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* ── Brand palette ── */
  --maroon:      #8B1A1A;
  --maroon-dark: #5c0f0f;
  --maroon-light:#b52424;
  --gold:        #C9A84C;
  --gold-light:  #e8c96d;
  --gold-pale:   #f5e8c0;
  --cream:       #faf7f2;
  --cream-dk:    #f0e8d8;
  --white:       #ffffff;
  --text:        #1a1212;
  --text-muted:  #7a6e6e;
  --border:      #e8ddd4;
  --border-md:   #d4c4b8;
  --success:     #2d7a4f;
  --danger:      #b53131;

  /* ── Aliases used throughout ── */
  --navy:     var(--maroon);
  --navy-mid: var(--maroon-dark);
  --gold-lt:  var(--gold-light);
  --gold-dim: #a07c28;
  --ink:      var(--text);
  --ink-mid:  #4a3a3a;
  --muted:    var(--text-muted);
  --white:    #ffffff;

  /* ── Tokens ── */
  --radius:   10px;
  --radius-lg:16px;
  --shadow:   0 2px 16px rgba(139,26,26,.07);
  --shadow-md:0 4px 28px rgba(139,26,26,.12);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  color: var(--text);
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ============================
   HEADER
============================ */
.header {
  position: sticky;
  top: 0;
  z-index: 999;
  background: rgba(250, 247, 242, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1300px;
  margin: auto;
  height: 80px;
  padding: 0 22px;

  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ============================
   LOGO
============================ */
.header-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  min-width: 0;
}

.logo-img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  border-radius: 50%;
  border: 2px solid var(--gold);
  background: white;
  padding: 3px;
  flex-shrink: 0;
}

.logo-texts {
  display: flex;
  flex-direction: column;
}

.logo-text {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 800;
  color: var(--maroon);
  letter-spacing: 2px;
  line-height: 1;
}

.full-name {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .8px;
  margin-top: 2px;
}

/* ============================
   NAVIGATION
============================ */
.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}

.nav-links li a {
  text-decoration: none;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  padding: 10px 18px;
  border-radius: 40px;
  transition: .25s ease;
  display: block;
}

.nav-links li a:hover {
  background: var(--maroon);
  color: white;
}

/* ============================
   MENU BUTTON
============================ */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 30px;
  color: var(--maroon);
  cursor: pointer;
}

/* ============================
   MOBILE
============================ */
@media (max-width: 768px) {

  .header-inner {
    height: 72px;
    padding: 0 16px;
  }

  .logo-img {
    width: 42px;
    height: 42px;
  }

  .logo-text {
    font-size: 18px;
  }

  .full-name {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

  .nav {
    position: absolute;
    top: 72px;
    left: 0;
    width: 100%;
    background: white;

    border-bottom: 1px solid var(--border);

    max-height: 0;
    overflow: hidden;

    transition: max-height .35s ease;
  }

  .nav.active {
    max-height: 400px;
  }

  .nav-links {
    flex-direction: column;
    width: 100%;
    padding: 16px;
    gap: 10px;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links li a {
    width: 100%;
    text-align: center;
    background: #f7f7f7;
    border-radius: 12px;
    padding: 14px;
  }

  .nav-links li a:hover {
    background: var(--maroon);
  }
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  color: var(--maroon);
  cursor: pointer;
  padding: .3rem;
}

/* ── HERO ── */
.hero {
  background: linear-gradient(120deg, var(--maroon-dark) 0%, var(--maroon) 60%, var(--maroon-light) 100%);
  color: white;
  padding: 3.5rem 1.5rem 2.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -100px; right: -100px;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: rgba(201,168,76,.08);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -80px; left: 20%;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: rgba(255,255,255,.03);
  pointer-events: none;
}
.hero-inner { position: relative; max-width: 760px; margin: auto; z-index: 1; }

.hero-eyebrow {
  display: inline-block;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold-light);
  border: 1px solid rgba(201,168,76,.4);
  border-radius: 20px;
  padding: .3rem .9rem;
  margin-bottom: 1.2rem;
}
.hero h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: .8rem;
  color: white;
}
.hero h1 span { color: var(--gold-light); }
.hero-desc {
  color: rgba(255,255,255,.78);
  font-size: .95rem;
  max-width: 560px;
  margin: 0 auto 1.4rem;
}
.hero-theme {
  background: rgba(201,168,76,.1);
  border: 1px solid rgba(201,168,76,.35);
  border-radius: var(--radius);
  padding: .9rem 1.4rem;
  font-size: .84rem;
  color: var(--gold-light);
  max-width: 680px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}
.hero-theme strong { color: var(--gold-light); font-weight: 700; }

/* ── TYPE TABS ── */
.type-tabs {
  display: flex;
  gap: 0;
  justify-content: center;
  max-width: 480px;
  margin: 0 auto;
  background: rgba(255,255,255,.1);
  border-radius: 50px;
  padding: 4px;
}
.type-tab {
  flex: 1;
  background: transparent;
  border: none;
  color: rgba(255,255,255,.65);
  border-radius: 50px;
  padding: .58rem 1.2rem;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: all .25s;
}
.type-tab:hover:not(.active) { color: white; }
.type-tab.active {
  background: var(--gold);
  color: var(--maroon-dark);
  box-shadow: 0 2px 12px rgba(201,168,76,.4);
}

/* ── STEPPER ── */
.stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 1.6rem 1.5rem;
  max-width: 680px;
  margin: 0 auto;
}
.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .35rem;
  position: relative;
  flex: 1;
}
.step-item:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 15px;
  left: calc(50% + 15px);
  right: calc(-50% + 15px);
  height: 1.5px;
  background: var(--border-md);
  z-index: 0;
  transition: background .3s;
}
.step-item.done:not(:last-child)::after { background: var(--gold); }
.step-circle {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 2px solid var(--border-md);
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .78rem;
  font-weight: 700;
  color: var(--text-muted);
  position: relative;
  z-index: 1;
  transition: all .25s;
}
.step-item.active .step-circle {
  background: var(--maroon);
  border-color: var(--maroon);
  color: white;
}
.step-item.done .step-circle {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--maroon-dark);
}
.step-item.done .step-circle span::after { content: '✓'; }
.step-item.done .step-circle span { font-size: 0; }
.step-label {
  font-size: .7rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: .03em;
  white-space: nowrap;
}
.step-item.active .step-label { color: var(--maroon); font-weight: 700; }
.step-item.done .step-label   { color: var(--gold-dim); }

/* ── FORM WRAP + CARD ── */
.form-wrap {
  max-width: 720px;
  margin: 0 auto 3rem;
  padding: 0 1.2rem;
}
.form-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

/* ── FORM STEP ── */
.form-step { display: none; }
.form-step.active { display: block; }

/* ── STEP HEADER ── */
.step-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem 1.8rem;
  border-bottom: 1px solid var(--border);
  background: var(--cream);
}
.step-header-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--maroon);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}
.step-header-text h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--maroon);
  line-height: 1.2;
}
.step-header-text p { font-size: .82rem; color: var(--text-muted); margin-top: 2px; }

.step-body { padding: 1.8rem; }

/* ── FORM GRID ── */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
}
.field { display: flex; flex-direction: column; gap: .35rem; }
.field.full { grid-column: 1 / -1; }

label {
  font-size: .78rem;
  font-weight: 700;
  color: var(--ink-mid);
  letter-spacing: .04em;
  text-transform: uppercase;
}
.req { color: var(--danger); }

input, select, textarea {
  width: 100%;
  padding: .6rem .85rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: 'DM Sans', sans-serif;
  font-size: .9rem;
  color: var(--text);
  background: var(--white);
  transition: border-color .2s, box-shadow .2s;
  outline: none;
  appearance: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--maroon);
  box-shadow: 0 0 0 3px rgba(139,26,26,.08);
}
input.invalid, select.invalid { border-color: var(--danger); }
input::placeholder, textarea::placeholder { color: #c0b4b0; }
select {
  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='%237a6e6e' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .85rem center;
  padding-right: 2.2rem;
  cursor: pointer;
}
textarea { resize: vertical; min-height: 80px; }

.hint    { font-size: .75rem; color: var(--text-muted); }
.err-msg { font-size: .75rem; color: var(--danger); display: none; }
input.invalid ~ .err-msg,
select.invalid ~ .err-msg { display: block; }

/* ── COAUTHOR TOGGLE ── */
.coauthor-toggle {
  display: flex;
  align-items: center;
  gap: .6rem;
  cursor: pointer;
  font-size: .88rem;
  color: var(--ink-mid);
  margin-bottom: 1rem;
  font-weight: 500;
}
.coauthor-toggle input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; accent-color: var(--maroon); }
.coauthor-fields {
  display: none;
  border-top: 1.5px dashed var(--border-md);
  padding-top: 1rem;
  margin-top: .5rem;
}
.coauthor-fields.visible { display: grid; }

/* ── FILE UPLOAD ── */
.file-upload-zone {
  border: 2px dashed var(--border-md);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  position: relative;
  transition: border-color .2s, background .2s;
  background: var(--cream);
}
.file-upload-zone:hover { border-color: var(--maroon); background: rgba(139,26,26,.03); }
.file-upload-zone.has-file { border-color: var(--success); background: rgba(45,122,79,.04); }
.file-upload-zone input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  border: none;
  padding: 0;
  width: 100%;
  height: 100%;
}
.upload-icon  { font-size: 1.8rem; margin-bottom: .4rem; }
.upload-label { font-weight: 600; font-size: .9rem; color: var(--maroon); }
.upload-hint  { font-size: .76rem; color: var(--text-muted); margin-top: .2rem; }
.file-name    { font-size: .8rem; color: var(--success); margin-top: .5rem; font-weight: 500; }

/* ── STEP NAV ── */
.step-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 1.8rem;
  border-top: 1px solid var(--border);
  background: var(--cream);
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .6rem 1.4rem;
  border-radius: var(--radius);
  font-family: 'DM Sans', sans-serif;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background .18s, border-color .18s, color .18s, transform .12s;
  border: 2px solid transparent;
  line-height: 1;
}
.btn:active { transform: scale(.97); }

/* Primary – Maroon */
.btn-primary {
  background: var(--maroon);
  color: white;
  border-color: var(--maroon);
}
.btn-primary:hover {
  background: var(--maroon-dark);
  border-color: var(--maroon-dark);
  transform: translateY(-1px);
}

/* Ghost */
.btn-ghost {
  background: transparent;
  color: var(--maroon);
  border-color: var(--border-md);
}
.btn-ghost:hover {
  background: var(--cream-dk);
  border-color: var(--maroon);
}

/* Submit – Gold */
.btn-submit {
  background: var(--gold);
  color: var(--maroon-dark);
  border-color: var(--gold);
  font-weight: 700;
  letter-spacing: .01em;
  padding: .65rem 1.8rem;
}
.btn-submit:hover {
  background: var(--gold-light);
  border-color: var(--gold-light);
  transform: translateY(-1px);
}
.btn-submit:disabled {
  opacity: .55;
  cursor: not-allowed;
  transform: none;
}

/* ── REVIEW BLOCKS ── */
#reviewBody { display: flex; flex-direction: column; gap: 1rem; }
.review-block {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.review-block h3 {
  background: var(--cream-dk);
  padding: .6rem 1rem;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--maroon);
  border-bottom: 1px solid var(--border);
}
.review-row {
  display: flex;
  justify-content: space-between;
  padding: .55rem 1rem;
  font-size: .85rem;
  border-bottom: 1px solid var(--border);
  gap: 1rem;
}
.review-row:last-child { border-bottom: none; }
.review-label { color: var(--text-muted); font-weight: 500; flex-shrink: 0; }
.review-val   { color: var(--text); font-weight: 500; text-align: right; word-break: break-word; }

/* ── SUCCESS SCREEN ── */
.success-screen { display: none; text-align: center; padding: 3rem 2rem; }
.success-screen.active { display: block; }
.success-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: rgba(45,122,79,.12);
  color: var(--success);
  font-size: 1.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.2rem;
}
.success-screen h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.7rem;
  color: var(--maroon);
  margin-bottom: .6rem;
}
.success-screen > p {
  color: var(--text-muted);
  font-size: .9rem;
  max-width: 420px;
  margin: 0 auto 1.5rem;
}
.ref-box {
  background: var(--gold-pale);
  border: 1.5px dashed var(--gold);
  border-radius: var(--radius);
  padding: 1rem 1.5rem;
  max-width: 360px;
  margin: 0 auto 2rem;
}
.ref-label {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: .4rem;
}
.ref-code {
  font-family: 'DM Mono', monospace;
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--maroon);
  letter-spacing: .06em;
}
.ref-note { font-size: .74rem; color: var(--text-muted); margin-top: .5rem; }

/* ── TOAST ── */
.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(120%);
  background: var(--maroon);
  color: white;
  padding: .75rem 1.5rem;
  border-radius: 8px;
  font-size: .85rem;
  font-weight: 500;
  z-index: 9999;
  transition: transform .3s ease;
  white-space: nowrap;
  box-shadow: var(--shadow-md);
}
.toast.show  { transform: translateX(-50%) translateY(0); }
.toast.error { background: var(--danger); }

/* ── FOOTER ── */
footer {
  background: var(--maroon-dark);
  color: rgba(255,255,255,.5);
  text-align: center;
  padding: 1.4rem;
  font-size: .78rem;
  border-top: 3px solid var(--gold);
}
footer span { color: var(--gold-light); font-weight: 500; }

/* ── MOBILE ── */
@media (max-width: 768px) {
  .header-inner { height: 64px; padding: 0 1rem; position: relative; }
  .logo-sub { display: none; }
  .nav { display: none; }
  .nav.active {
    display: block;
    position: absolute; top: 64px; left: 0; right: 0;
    background: white;
    border-bottom: 1px solid var(--border);
    padding: 1rem;
  }
  .nav-links { flex-direction: column; gap: .5rem; }
  .nav-links li { width: 100%; }
  .nav-links li a { background: var(--cream); border-radius: 10px; text-align: center; padding: .85rem; }
  .nav-links li a:hover { background: var(--maroon); color: white; }
  .menu-toggle { display: block; }
  .form-grid { grid-template-columns: 1fr; }
  .field.full { grid-column: 1; }
  .step-body { padding: 1.2rem; }
  .step-nav  { padding: 1rem 1.2rem; }
  .stepper   { padding: 1.2rem .8rem; }
  .step-label { font-size: .62rem; }
  .hero h1   { font-size: 1.75rem; }
}