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

:root {
  --bg:            #e6eae6;
  --surface:       #ffffff;
  --surface-hover: #f2f4f2;
  --border:        #d0d4d0;
  --accent:        #eb461f;
  --accent-light:  #c73a18;
  --accent-glow:   rgba(235, 70, 31, 0.1);
  --success:       #16a34a;
  --error:         #dc2626;
  --text:          #171d1d;
  --text-muted:    #4a5454;
  --text-dim:      #7a8484;
  --radius:        12px;
  --radius-sm:     8px;
  --shadow:        0 4px 24px rgba(0,0,0,0.08);
  --transition:    0.18s ease;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-size: 15px;
  line-height: 1.6;
}

h1, h2, h3 {
  font-family: 'Playfair Display', Georgia, serif;
}

/* ── Header ───────────────────────────────────────────────────────────── */
header {
  background: none;
  border-bottom: none;
  min-height: 100vh;
  padding: 0 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.28) 0%, rgba(0,0,0,0.52) 100%);
  z-index: 1;
  pointer-events: none;
}

.header-bg {
  position: absolute;
  top: -70px;
  left: 0;
  width: 100%;
  height: calc(100% + 70px);
  object-fit: cover;
  object-position: center top;
  z-index: 0;
}

.header-inner { position: relative; z-index: 2; }
body.external .header-inner { margin-top: 100px; }

.logo {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 2.75rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #ffffff;
  background: none;
  -webkit-text-fill-color: #ffffff;
  margin-bottom: 0;
  line-height: 1;
  text-shadow: 0 2px 16px rgba(0,0,0,0.35);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.logo-the {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: 1rem;
  letter-spacing: 0.18em;
  opacity: 0.82;
  text-transform: lowercase;
}

.header-sub {
  color: rgba(255, 255, 255, 0.82);
  font-size: 1rem;
}

.partnership-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 0;
}

.partnership-text {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.75);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.partner-logo {
  height: 130px;
  width: auto;
}

/* ── Scroll cue ───────────────────────────────────────────────────────── */
.scroll-cue {
  position: absolute;
  bottom: 36px;
  left: 50%;
  z-index: 2;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color var(--transition), transform var(--transition);
}

.scroll-cue:hover {
  color: #fff;
  transform: translateX(-50%) translateY(3px);
}

.scroll-cue-arrow {
  width: 48px;
  height: 48px;
  opacity: 0.75;
  animation: bounce 1.8s ease-in-out infinite;
  transition: opacity var(--transition);
}

.scroll-cue:hover .scroll-cue-arrow { opacity: 1; }

.hero-about-link {
  position: absolute;
  top: 28px;
  right: 32px;
  z-index: 2;
  color: rgba(255,255,255,0.7);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.25);
  padding-bottom: 1px;
  transition: color var(--transition), border-color var(--transition);
  white-space: nowrap;
}

.hero-about-link:hover {
  color: rgba(255,255,255,0.95);
  border-color: rgba(255,255,255,0.6);
}

.hero-intro {
  position: relative;
  z-index: 2;
  margin-top: 8px;
  max-width: 620px;
  text-align: center;
}

.hero-intro-headline {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.4;
  margin-bottom: 16px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.35);
}

.hero-intro-sub {
  font-size: 1rem;
  color: rgba(255,255,255,0.8);
  line-height: 1.7;
  margin: 0;
}

.ext-intro-h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
}

.ext-intro-body {
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 14px;
}

.ext-intro-cta {
  margin-top: 24px;
  font-weight: 600;
  color: var(--text);
}

.ext-intro-close {
  font-weight: 400;
  color: var(--text-muted);
  margin-left: 8px;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(5px); }
}

/* ── Main ─────────────────────────────────────────────────────────────── */
main {
  flex: 1;
  max-width: 960px;
  width: 100%;
  margin: 0 auto;
  padding: 48px 24px 64px;
}

/* ── Steps ────────────────────────────────────────────────────────────── */
.step { display: none; }
.step.active { display: block; animation: fadeIn 0.25s ease; }

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

/* ── Section header ───────────────────────────────────────────────────── */
.section-header {
  margin-bottom: 36px;
}

.step-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-light);
  background: var(--accent-glow);
  border: 1px solid rgba(235,70,31,0.3);
  border-radius: 99px;
  padding: 3px 12px;
  margin-bottom: 12px;
}

.section-header h2 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin-bottom: 8px;
}

.section-header p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ── Rules block ──────────────────────────────────────────────────────── */
.rules-block {
  background: #d8dcd8;
  border: none;
  border-radius: var(--radius);
  padding: 40px 36px;
  margin-bottom: 32px;
}

.rules-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 24px;
}

.rules-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px 40px;
}

.rules-list li {
  display: flex;
  gap: 12px;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.rules-list li strong { color: var(--text); }
.rule-link { display: inline-block; margin-top: 6px; font-size: 0.82rem; color: var(--accent); text-decoration: none; font-weight: 500; }
.rule-link:hover { text-decoration: underline; }

.rule-icon {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--text-dim);
}

.rule-icon svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  display: block;
}

/* ── Categories grid ──────────────────────────────────────────────────── */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.category-card {
  background: var(--bg);
  border: none;
  padding: 32px 28px;
  cursor: pointer;
  text-align: left;
  display: flex;
  flex-direction: column;
  min-height: 270px;
  transition: background var(--transition);
}

.category-card:hover { background: var(--surface); }

.category-card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.cat-icon-wrap {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  margin-bottom: 24px;
  flex-shrink: 0;
}

.cat-icon-wrap svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
}

.category-card h3 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
  flex: 1;
}

.category-card p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-top: 20px;
}

/* ── Form card ────────────────────────────────────────────────────────── */
.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

/* ── Rising Star warning ──────────────────────────────────────────────── */
.rising-star-warning {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 24px;
  background: #fff5f5;
  border-bottom: 1px solid #fecaca;
  font-size: 0.875rem;
  color: #991b1b;
  line-height: 1.6;
}

.rising-star-warning[hidden] { display: none; }

.rising-star-warning svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  flex-shrink: 0;
  margin-top: 2px;
}

.rising-star-warning strong { color: #7f1d1d; }

/* ── Selected category banner ─────────────────────────────────────────── */
.selected-category-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: var(--accent-glow);
  border-bottom: 1px solid rgba(235,70,31,0.25);
  flex-wrap: wrap;
  gap: 8px;
}

.back-btn {
  background: none;
  border: none;
  color: var(--accent-light);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 4px 0;
  transition: color var(--transition);
}

.back-btn:hover { color: var(--accent); }

.selected-cat-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.selected-cat-number {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-muted);
  background: rgba(255,255,255,0.06);
  border-radius: 4px;
  padding: 2px 7px;
}

.selected-cat-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text);
}

.selected-cat-desc {
  width: 100%;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
  padding-top: 4px;
}

/* ── Form ─────────────────────────────────────────────────────────────── */
form {
  padding: 28px 28px 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.form-row { display: flex; gap: 20px; }
.form-row.two-col > * { flex: 1; min-width: 0; }

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 4px;
}

.required { color: var(--accent-light); }

.char-hint {
  margin-left: auto;
  font-weight: 400;
  font-size: 0.75rem;
  color: var(--text-dim);
}

input[type="text"],
input[type="email"],
textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.9rem;
  font-family: inherit;
  padding: 10px 14px;
  transition: border-color var(--transition), box-shadow var(--transition);
  resize: vertical;
}

input::placeholder,
textarea::placeholder { color: var(--text-dim); }

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

input.invalid,
textarea.invalid {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgba(248,113,113,0.12);
}

.field-error {
  font-size: 0.78rem;
  color: var(--error);
  min-height: 1em;
}

/* ── Form actions ─────────────────────────────────────────────────────── */
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 4px;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 11px 24px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}

.btn-primary:hover {
  background: var(--accent-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(235,70,31,0.35);
}

.btn-primary:active { transform: none; }

.btn-secondary {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 20px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition);
}

.btn-secondary:hover {
  border-color: var(--text-muted);
  color: var(--text);
}

/* ── Success card ─────────────────────────────────────────────────────── */
.success-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 56px 40px;
  text-align: center;
  max-width: 540px;
  margin: 0 auto;
}

.success-icon {
  font-size: 3.5rem;
  margin-bottom: 20px;
  display: block;
  animation: pop 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes pop {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.success-card h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.success-card > p {
  color: var(--text-muted);
  margin-bottom: 28px;
  line-height: 1.7;
}

.success-details {
  background: var(--surface-hover);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  text-align: left;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 32px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.success-details strong { color: var(--text); }

.success-actions { display: flex; justify-content: center; }

/* ── Supporter hint ───────────────────────────────────────────────────── */
.supporter-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-top: -8px;
}

/* ── Minimal header (supporter page) ─────────────────────────────────── */
header.header--minimal {
  min-height: 180px;
  justify-content: center;
}

/* ── Footer ───────────────────────────────────────────────────────────── */
footer {
  text-align: center;
  padding: 20px 24px;
  font-size: 0.78rem;
  color: var(--text-dim);
  border-top: 1px solid var(--border);
}

footer a {
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--transition);
}

footer a:hover { color: var(--text); }

/* ── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .categories-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .form-row.two-col { flex-direction: column; }
  form { padding: 20px 16px 24px; }
  .selected-category-banner { flex-direction: column; align-items: flex-start; }
  .categories-grid { grid-template-columns: 1fr; }
  .category-card { min-height: auto; }
  .rules-list { grid-template-columns: 1fr; }
  .success-card { padding: 36px 20px; }
}
