/* ============================================
   BRIEFING — Page styles
   ============================================ */

/* ---------- Hero ---------- */
.briefing-hero {
  padding: 160px 0 60px;
  position: relative;
}
.briefing-hero h1 {
  margin: 28px 0 0;
  font-size: clamp(44px, 7vw, 96px);
}
.briefing-hero h1 .accent-word {
  color: var(--accent);
  font-style: italic;
}
.briefing-hero-sub {
  margin-top: 24px;
  max-width: 520px;
  font-size: 18px;
  color: var(--fg-muted);
  line-height: 1.55;
}

/* ---------- Progress bar ---------- */
.briefing-progress {
  position: sticky;
  top: 64px;
  z-index: 50;
  padding: 20px 0;
  background: color-mix(in oklch, var(--bg) 85%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: opacity 300ms, transform 300ms;
}
.briefing-progress.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px);
}
.progress-bar {
  width: 100%;
  height: 3px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 16px;
}
.progress-fill {
  height: 100%;
  width: 25%;
  background: var(--accent);
  border-radius: 999px;
  transition: width 400ms cubic-bezier(.2,.7,.2,1);
}
.progress-steps {
  display: flex;
  justify-content: space-between;
  max-width: 480px;
}
.progress-step {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  transition: opacity 200ms;
}
.progress-step:not(.active):not(.completed) {
  opacity: 0.4;
  cursor: default;
}
.step-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  transition: all 200ms;
}
.progress-step.active .step-dot {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}
.progress-step.completed .step-dot {
  background: var(--accent);
  border-color: var(--accent);
}
.step-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.progress-step.active .step-label {
  color: var(--fg);
}

/* ---------- Form section ---------- */
.briefing-form-section {
  padding: 60px 0 120px;
  min-height: 60vh;
}

/* ---------- Steps ---------- */
.form-step {
  display: none;
  animation: fadeSlideIn 400ms cubic-bezier(.2,.7,.2,1) both;
}
.form-step.active {
  display: block;
}
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.step-header {
  margin-bottom: 48px;
}
.step-num-label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-dim);
  letter-spacing: 0.06em;
  display: block;
  margin-bottom: 16px;
}
.step-header h2 {
  margin: 0;
  font-size: clamp(34px, 4.5vw, 56px);
  line-height: 1;
}
.step-desc {
  margin: 16px 0 0;
  color: var(--fg-muted);
  font-size: 16px;
  max-width: 52ch;
}

/* ---------- Section separator ---------- */
.field-separator {
  height: 1px;
  background: var(--border);
  margin: 40px 0;
}
.field-label-section {
  margin-bottom: 24px;
}
.section-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.dynamic-section-title {
  margin-bottom: 28px;
}

/* ---------- Type selection cards ---------- */
.type-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.type-card {
  cursor: pointer;
  position: relative;
}
.type-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.type-card-inner {
  padding: 28px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-elev);
  transition: border-color 200ms, transform 200ms, box-shadow 200ms;
  position: relative;
  min-height: 180px;
  display: flex;
  flex-direction: column;
}
.type-card-inner:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}
.type-card input:checked ~ .type-card-inner {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 8px 32px -8px rgba(232, 90, 26, 0.15);
}
.type-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fg-muted);
  margin-bottom: 20px;
  transition: color 200ms, border-color 200ms;
}
.type-card input:checked ~ .type-card-inner .type-icon {
  color: var(--accent);
  border-color: var(--accent);
}
.type-card-inner h3 {
  margin: 0 0 8px;
  font-size: 24px;
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.type-card-inner p {
  margin: 0;
  color: var(--fg-muted);
  font-size: 14px;
  line-height: 1.55;
  flex: 1;
}
.type-check {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 600;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 200ms, transform 200ms cubic-bezier(.2,.7,.2,1);
}
.type-card input:checked ~ .type-card-inner .type-check {
  opacity: 1;
  transform: scale(1);
}

@media (max-width: 640px) {
  .type-grid { grid-template-columns: 1fr; }
}

/* ---------- Fields grid ---------- */
.fields-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px 32px;
}
.fields-grid .field.full-width {
  grid-column: 1 / -1;
}
@media (max-width: 640px) {
  .fields-grid { grid-template-columns: 1fr; }
  .fields-grid .field.full-width { grid-column: 1; }
}

/* ---------- Dynamic fields ---------- */
.dynamic-fields {
  display: none;
  animation: fadeSlideIn 350ms cubic-bezier(.2,.7,.2,1) both;
}
.dynamic-fields.active {
  display: block;
}

/* ---------- Step actions ---------- */
.step-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.btn-next:disabled,
.form-submit:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none !important;
}

/* ---------- Loading state ---------- */
.btn-loading {
  position: relative;
  pointer-events: none;
  color: transparent !important;
}
.btn-loading::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid var(--accent-ink);
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 600ms linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---------- Error banner ---------- */
.form-error-banner {
  display: none;
  padding: 16px 20px;
  border: 1px solid #E85A1A;
  border-radius: var(--radius-md);
  background: rgba(232, 90, 26, 0.08);
  color: var(--fg);
  font-size: 14px;
  margin-bottom: 24px;
  animation: fadeSlideIn 300ms both;
}
.form-error-banner.visible {
  display: block;
}

/* ---------- Success state ---------- */
.briefing-success {
  display: none;
  text-align: center;
  padding: 80px 20px;
  animation: fadeSlideIn 500ms cubic-bezier(.2,.7,.2,1) both;
}
.briefing-success.visible {
  display: block;
}
.success-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 32px;
  font-size: 36px;
  font-weight: 600;
}
.briefing-success h2 {
  margin: 0 0 16px;
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1;
}
.briefing-success p {
  color: var(--fg-muted);
  font-size: 17px;
  line-height: 1.6;
  margin: 0 auto 40px;
  max-width: 480px;
}
.success-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---------- Form fields ---------- */
.briefing-form-section .field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 0;
}
.briefing-form-section .field label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-muted);
}
.briefing-form-section .field input,
.briefing-form-section .field textarea {
  font: inherit;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--border-strong);
  padding: 10px 0;
  color: var(--fg);
  transition: border-color 180ms;
  font-size: 16px;
  font-family: var(--font-sans);
  resize: vertical;
}
.briefing-form-section .field input:focus,
.briefing-form-section .field textarea:focus {
  outline: 0;
  border-bottom-color: var(--accent);
}
.briefing-form-section .field textarea {
  min-height: 100px;
}
.briefing-form-section .field.invalid input,
.briefing-form-section .field.invalid textarea {
  border-bottom-color: #E85A1A;
}
.briefing-form-section .field .error-msg {
  color: #E85A1A;
  font-family: var(--font-mono);
  font-size: 11px;
  display: none;
}
.briefing-form-section .field.invalid .error-msg {
  display: block;
}

/* ---------- Chips ---------- */
.briefing-form-section .chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}
.briefing-form-section .chip {
  padding: 8px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--fg-muted);
  cursor: pointer;
  transition: all 160ms ease;
  user-select: none;
}
.briefing-form-section .chip:hover {
  color: var(--fg);
  border-color: var(--fg-dim);
}
.briefing-form-section .chip.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

/* ---------- Responsive nav ---------- */
@media (max-width: 820px) {
  .nav-links { display: none; }
  .briefing-hero { padding: 130px 0 40px; }
}
