/* ============================================================
   ASE Review Form Template — styles.css
   ALL colors via CSS custom properties. Zero hardcoded brand values.
   Defaults below are for ase-demo dark. Overridden by config-loader.
   ============================================================ */

:root {
  --brand-bg:          #0A0A0A;
  --brand-card:        #141414;
  --brand-elevated:    #1A1A1A;
  --brand-primary:     #F5F5F3;
  --brand-accent:      #C9A84C;
  --brand-text:        #F5F5F3;
  --brand-text-muted:  #B3B3B1;
  --brand-text-dim:    #666664;
  --brand-border:      #252524;
  --font-heading:      'Playfair Display';
  --font-body:         'DM Sans';
}

/* Background ambient glow — accent-derived, lower on light themes */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 25% 15%, color-mix(in srgb, var(--brand-accent) 8%, transparent) 0%, transparent 55%),
    radial-gradient(ellipse at 75% 85%, color-mix(in srgb, var(--brand-accent) 5%, transparent) 0%, transparent 55%);
  pointer-events: none;
  z-index: 0;
}

html[data-theme="light"] body::before {
  background:
    radial-gradient(ellipse at 25% 15%, color-mix(in srgb, var(--brand-accent) 4%, transparent) 0%, transparent 55%),
    radial-gradient(ellipse at 75% 85%, color-mix(in srgb, var(--brand-accent) 3%, transparent) 0%, transparent 55%);
}

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

body {
  background: var(--brand-bg);
  color: var(--brand-text);
  font-family: var(--font-body), 'DM Sans', sans-serif;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  position: relative;
  overflow-x: hidden;
}

@media (max-width: 480px) {
  body { align-items: flex-start; padding: 20px 14px 40px; }
}

/* Container */
.container {
  width: 100%;
  max-width: 440px;
  position: relative;
  z-index: 1;
}

/* ============================================================
   FORM HEADER — logo + badge + name + sub (outside card)
   ============================================================ */

.form-header {
  text-align: center;
  margin-bottom: 24px;
}

@media (max-width: 480px) {
  .form-header { margin-bottom: 18px; }
}

/* Logo — hidden until JS injects the img element */
.client-logo-wrap {
  display: none;
  justify-content: center;
  margin-bottom: 16px;
}

.client-logo {
  max-width: 80px;
  max-height: 80px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px color-mix(in srgb, var(--brand-accent) 25%, transparent));
}

/* Client-specific logo sizing — Chrysalide has a large round mark */
html[data-client="chrysalide"] .client-logo {
  max-width: 100px;
  max-height: 100px;
}

/* Badge pill with pulse dot */
.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 14px;
  border: 1px solid color-mix(in srgb, var(--brand-accent) 30%, var(--brand-border));
  border-radius: 100px;
  background: var(--brand-card);
  margin-bottom: 16px;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-accent);
  flex-shrink: 0;
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 0.4; }
  50% {
    opacity: 1;
    box-shadow: 0 0 6px color-mix(in srgb, var(--brand-accent) 50%, transparent);
  }
}

.badge-label {
  font-family: var(--font-body), sans-serif;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--brand-text-muted);
}

/* Client name — heading font, brand primary color */
.client-name {
  font-family: var(--font-heading), 'Playfair Display', Georgia, serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--brand-primary);
  line-height: 1.2;
  margin-bottom: 6px;
}

/* Great Vibes reads better larger */
html[data-client="chrysalide"] .client-name {
  font-size: 36px;
}

.client-sub {
  font-family: var(--font-body), sans-serif;
  font-size: 13px;
  color: var(--brand-text-muted);
  letter-spacing: 0.3px;
}

/* ============================================================
   CARD
   ============================================================ */

.card {
  background: var(--brand-card);
  border: 1px solid var(--brand-border);
  border-radius: 16px;
  padding: 28px 24px;
  width: 100%;
  box-shadow: 0 2px 16px color-mix(in srgb, var(--brand-primary) 6%, transparent);
}

@media (max-width: 480px) {
  .card { padding: 20px 16px; border-radius: 12px; }
}

/* Section visibility + enter animation */
.section { display: none; }
.section.active { display: block; }
.section.enter { animation: section-enter 0.35s ease forwards; }

@keyframes section-enter {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   FORM SECTION
   ============================================================ */

/* Card-title: the visit question from niche taxonomy */
.card-title {
  font-family: var(--font-body), sans-serif;
  font-size: 14px;
  font-weight: 500;
  color: var(--brand-text-muted);
  text-align: center;
  margin-bottom: 24px;
  letter-spacing: 0.2px;
}

/* Stars */
.star-row {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 10px;
}

.star-btn {
  width: 50px;
  height: 50px;
  border: none;
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: transform 0.2s ease;
}

.star-btn svg {
  width: 100%;
  height: 100%;
  fill: var(--brand-border);
  transition: fill 0.2s ease, filter 0.2s ease;
}

.star-btn.filled { transform: scale(1.1); }

.star-btn.filled svg {
  fill: var(--brand-accent);
  filter: drop-shadow(0 0 6px color-mix(in srgb, var(--brand-accent) 40%, transparent));
}

/* Star row shake — no-rating nudge (CSS only, no GSAP) */
@keyframes star-nudge {
  0%   { transform: translateX(0); }
  20%  { transform: translateX(-6px); }
  40%  { transform: translateX(6px); }
  60%  { transform: translateX(-3px); }
  80%  { transform: translateX(3px); }
  100% { transform: translateX(0); }
}
.star-row.nudge { animation: star-nudge 0.3s ease; }

/* Rating label — fades in after star selection */
.rating-label {
  text-align: center;
  font-family: var(--font-body), sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--brand-primary);
  height: 20px;
  margin-bottom: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
  letter-spacing: 0.2px;
}
.rating-label.visible { opacity: 1; }

/* Chips label */
.chips-label {
  font-family: var(--font-body), sans-serif;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-text-muted);
  display: block;
  margin-bottom: 10px;
}

/* Chips — 2-col grid, embossed depth */
.chips-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.chip-btn {
  width: 100%;
  height: 36px;
  text-align: center;
  border: 1px solid color-mix(in srgb, var(--brand-text-muted) 30%, transparent);
  border-radius: 999px;
  background: var(--brand-elevated);
  color: var(--brand-text);
  font-family: var(--font-body), sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 0 16px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.12),
    inset 0 -1px 0 rgba(0,0,0,0.08),
    0 1px 3px rgba(0,0,0,0.08);
  transition:
    background 0.2s cubic-bezier(0.1,0.4,0.2,1),
    color 0.2s cubic-bezier(0.1,0.4,0.2,1),
    border-color 0.2s cubic-bezier(0.1,0.4,0.2,1),
    transform 0.2s cubic-bezier(0.1,0.4,0.2,1),
    filter 0.2s cubic-bezier(0.1,0.4,0.2,1);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  white-space: nowrap;
}

.chip-btn:hover  { filter: brightness(1.05); }

.chip-btn.selected {
  background: var(--brand-primary);
  color: var(--brand-bg);
  border-color: var(--brand-primary);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.2),
    inset 0 -2px 0 rgba(0,0,0,0.15),
    0 2px 6px color-mix(in srgb, var(--brand-primary) 25%, transparent);
}

.chip-btn:active { transform: scale(0.97); }

/* Comment textarea */
.comment-area {
  width: 100%;
  min-height: 90px;
  background: var(--brand-elevated);
  border: 1px solid var(--brand-border);
  border-radius: 10px;
  color: var(--brand-text);
  font-family: var(--font-body), sans-serif;
  font-size: 14px;
  line-height: 1.5;
  padding: 13px 15px;
  resize: none;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  margin-bottom: 14px;
  display: block;
  -webkit-appearance: none;
}

.comment-area:focus {
  border-color: var(--brand-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-accent) 15%, transparent);
}

.comment-area::placeholder { color: var(--brand-text-dim); }

/* Submit button */
.submit-btn {
  width: 100%;
  padding: 15px;
  background: var(--brand-primary);
  color: var(--brand-bg);
  font-family: var(--font-body), sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.2px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.15s, box-shadow 0.15s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  margin-top: 6px;
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px color-mix(in srgb, var(--brand-primary) 20%, transparent);
  opacity: 1;
}
.submit-btn:active { transform: scale(0.97); opacity: 0.85; }

/* ============================================================
   RESULT SECTION
   ============================================================ */

.result-badge {
  font-family: var(--font-body), sans-serif;
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-variant: small-caps;
  color: var(--brand-text-muted);
  display: block;
  margin-bottom: 8px;
  text-align: center;
}

.result-headline {
  font-family: var(--font-heading), serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--brand-primary);
  margin-bottom: 8px;
  text-align: center;
}

@media (max-width: 480px) {
  .result-headline { font-size: 22px; }
}

.result-subtext {
  font-family: var(--font-body), sans-serif;
  font-size: 14px;
  color: var(--brand-text-muted);
  line-height: 1.6;
  margin-bottom: 20px;
  text-align: center;
}

.result-divider {
  width: 100%;
  height: 1px;
  background: var(--brand-border);
  margin-bottom: 16px;
}

/* Platform buttons */
.platform-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 10px;
}

.platform-btn {
  width: 100%;
  padding: 14px;
  background: var(--brand-primary);
  color: var(--brand-bg);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-body), sans-serif;
  font-size: 15px;
  font-weight: 600;
  transition: opacity 0.15s, transform 0.15s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.platform-btn:hover  { opacity: 0.92; }
.platform-btn:active { opacity: 0.85; transform: scale(0.98); }

.platform-icon-img {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  object-fit: contain;
}

/* Private feedback button — same structure as platform-btn */
.private-btn {
  width: 100%;
  padding: 14px;
  background: var(--brand-primary);
  color: var(--brand-bg);
  border: none;
  border-radius: 10px;
  font-family: var(--font-body), sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.15s;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  -webkit-tap-highlight-color: transparent;
}

.private-btn:hover  { opacity: 0.92; }
.private-btn:active { opacity: 0.85; transform: scale(0.98); }

/* Progress bar — thank-you screen only */
.progress-bar-track {
  width: 100%;
  height: 2px;
  background: #F0F0F0;
  border-radius: 1px;
  margin-bottom: 20px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--brand-primary);
  border-radius: 1px;
  width: 0%;
  transition: width 300ms ease-out;
}

/* Clipboard toast — CSS-only slide + fade */
.toast {
  background: var(--brand-elevated);
  border: 1px solid var(--brand-border);
  border-radius: 8px;
  padding: 10px 14px;
  font-family: var(--font-body), sans-serif;
  font-size: 13px;
  color: var(--brand-text-muted);
  text-align: center;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  pointer-events: none;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* ============================================================
   PRIVATE CONFIRM SECTION
   ============================================================ */

.private-confirm-text {
  font-family: var(--font-heading), serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--brand-primary);
  margin-bottom: 8px;
  text-align: center;
}

.private-confirm-sub {
  font-family: var(--font-body), sans-serif;
  font-size: 14px;
  color: var(--brand-text-muted);
  line-height: 1.5;
  text-align: center;
}

/* ============================================================
   FOOTER
   ============================================================ */

.form-footer {
  text-align: center;
  padding: 16px 0 4px;
}

.form-footer a {
  font-family: var(--font-body), sans-serif;
  font-size: 11px;
  color: var(--brand-text-dim);
  text-decoration: none;
  letter-spacing: 0.5px;
}