/* ===========================================================
   Crown Briefs — design brief form
   Palette: black background, white fields, magenta accent (#E6007E)
   =========================================================== */

:root {
  --bg: #0a0a0a;
  --bg-soft: #141414;
  --surface: #ffffff;
  --surface-muted: #f4f4f4;
  --text: #111111;
  --text-on-dark: #ffffff;
  --text-muted-dark: #9a9a9a;
  --border: #d8d8d8;
  --border-strong: #111111;
  --accent: #E6007E;
  --accent-hover: #c20068;
  --error: #ff5468;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 18px 48px rgba(0,0,0,0.35);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: 'Heebo', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  background: var(--bg);
  color: var(--text-on-dark);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1100px 600px at 80% -10%, rgba(230,0,126,0.18), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(230,0,126,0.10), transparent 60%),
    var(--bg);
}

/* ---------- header ---------- */
.site-header {
  padding: 24px 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
}
.brand {
  display: flex;
  align-items: center;
  line-height: 0;
  text-decoration: none;
}
.brand img {
  display: block;
  width: auto;
  user-select: none;
  -webkit-user-drag: none;
}
.brand-crown img { height: 38px; }
.brand-idfwo img { height: 64px; }
.brand-divider {
  width: 1px;
  height: 44px;
  background: rgba(255, 255, 255, 0.22);
}
@media (max-width: 560px) {
  .site-header { gap: 18px; padding: 20px 16px; }
  .brand-crown img { height: 30px; }
  .brand-idfwo img { height: 52px; }
  .brand-divider { height: 36px; }
}

/* legacy text-logo classes (kept for email template compatibility) */
.logo {
  font-family: 'Heebo', sans-serif;
  font-weight: 900;
  font-size: 36px;
  letter-spacing: -1px;
  text-decoration: none;
  line-height: 1;
}
.logo-c { color: var(--accent); }
.logo-rest { color: var(--text-on-dark); }
.logo-dot { color: var(--accent); }

/* ---------- page wrapper ---------- */
.page {
  flex: 1;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 24px 24px 64px;
}

.hero { margin: 8px 0 32px; }
.hero h1 {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 900;
  margin: 0 0 10px;
  letter-spacing: -0.5px;
}
.hero h1::after {
  content: '';
  display: block;
  width: 56px;
  height: 4px;
  background: var(--accent);
  margin-top: 14px;
  border-radius: 2px;
}
.lead {
  color: var(--text-muted-dark);
  font-size: 17px;
  margin: 0;
}

/* ---------- flash messages ---------- */
.flash-stack { margin-bottom: 20px; display: grid; gap: 8px; }
.flash {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-weight: 500;
}
.flash-error { background: rgba(255,84,104,0.15); color: #ffd5da; border: 1px solid rgba(255,84,104,0.4); }
.flash-success { background: rgba(76,217,123,0.15); color: #d4ffe2; border: 1px solid rgba(76,217,123,0.4); }

/* ---------- form ---------- */
.brief-form {
  background: var(--bg-soft);
  border: 1px solid #1f1f1f;
  border-radius: var(--radius);
  padding: 28px;
  display: grid;
  gap: 22px;
  box-shadow: var(--shadow);
}

.field { display: flex; flex-direction: column; gap: 8px; }

.field label,
.label-text {
  font-weight: 700;
  font-size: 15px;
  color: var(--text-on-dark);
}
.req { color: var(--accent); margin-inline-start: 4px; }

input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  padding: 13px 14px;
  font-family: inherit;
  font-size: 16px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.15s, box-shadow 0.15s;
}
input[type="text"]:hover,
textarea:hover {
  border-color: #aaa;
}
input[type="text"]:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(230,0,126,0.18);
}
textarea { resize: vertical; min-height: 90px; }

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 560px) {
  .row { grid-template-columns: 1fr; }
}

/* ---------- radio pills ---------- */
.radio-group, .checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.radio-pill, .check-pill {
  position: relative;
  cursor: pointer;
  user-select: none;
}
.radio-pill input, .check-pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.radio-pill span, .check-pill span {
  display: inline-block;
  padding: 11px 20px;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  transition: all 0.15s;
}
.radio-pill:hover span, .check-pill:hover span { border-color: var(--accent); }
.radio-pill input:checked + span,
.check-pill input:checked + span {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 6px 20px rgba(230,0,126,0.35);
}
.radio-pill input:focus-visible + span,
.check-pill input:focus-visible + span {
  box-shadow: 0 0 0 3px rgba(230,0,126,0.35);
}

.goal-other {
  margin-top: 8px;
  max-height: 200px;
  opacity: 1;
  transition: opacity 0.15s, max-height 0.2s;
}
.goal-other.hidden {
  opacity: 0;
  max-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  pointer-events: none;
}

/* ---------- file drop ---------- */
.file-drop {
  position: relative;
  background: var(--surface);
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 26px 18px;
  text-align: center;
  transition: border-color 0.15s, background 0.15s;
}
.file-drop:hover { border-color: var(--accent); }
.file-drop.drag-over {
  border-color: var(--accent);
  background: rgba(230,0,126,0.05);
}
.file-drop input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.file-drop-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text);
  pointer-events: none;
}
.file-drop-cta {
  font-weight: 700;
  color: var(--accent);
  font-size: 16px;
}
.file-drop-hint {
  font-size: 13px;
  color: #666;
}
.file-list {
  margin-top: 14px;
  display: grid;
  gap: 6px;
}
.file-item {
  background: var(--surface-muted);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  text-align: start;
}

/* ---------- submit ---------- */
.submit-btn {
  margin-top: 8px;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 16px 28px;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 800;
  font-size: 17px;
  cursor: pointer;
  transition: transform 0.1s, background 0.15s, box-shadow 0.15s;
  box-shadow: 0 12px 28px rgba(230,0,126,0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  letter-spacing: 0.3px;
}
.submit-btn:hover { background: var(--accent-hover); }
.submit-btn:active { transform: translateY(1px); }
.submit-btn:disabled {
  opacity: 0.7;
  cursor: progress;
}
.submit-loader {
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- footer ---------- */
.site-footer {
  padding: 24px 32px;
  text-align: center;
  color: var(--text-muted-dark);
  font-size: 13px;
}

/* ---------- thank-you page ---------- */
.thanks-page { display: flex; align-items: center; justify-content: center; }
.thanks-card {
  text-align: center;
  background: var(--bg-soft);
  border: 1px solid #1f1f1f;
  border-radius: var(--radius);
  padding: 56px 32px;
  width: 100%;
  max-width: 520px;
  box-shadow: var(--shadow);
}
.checkmark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: rgba(230,0,126,0.12);
  color: var(--accent);
  margin-bottom: 18px;
  animation: pop 0.45s cubic-bezier(0.2, 1, 0.4, 1.2);
}
@keyframes pop {
  0% { transform: scale(0.5); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.thanks-card h1 {
  font-size: 42px;
  font-weight: 900;
  margin: 0 0 12px;
}
.thanks-msg {
  font-size: 19px;
  color: var(--text-muted-dark);
  margin: 0 0 28px;
}
.back-link {
  display: inline-block;
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s;
}
.back-link:hover { border-bottom-color: var(--accent); }
