/* ============================================================
   Radiance Survey — Shared Stylesheet
   Colors, typography, base resets, shared components
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600&family=Inter:wght@400;500;600&display=swap');

/* --- Custom properties ------------------------------------ */
:root {
  --teal:        #1B6873;
  --teal-light:  #2C8A96;
  --gold:        #C9A86A;
  --bg:          #FAF8F4;
  --text-dark:   #1F2937;
  --text-muted:  #6B7280;
  --radius:      1rem;
  --shadow:      0 2px 12px rgba(0,0,0,0.07);
  --transition:  0.3s ease;
}

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

html, body {
  min-height: 100%;
  background: var(--bg);
  color: var(--text-dark);
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-tap-highlight-color: transparent;
}

body {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* --- Typography ------------------------------------------- */
.font-serif {
  font-family: 'Cormorant Garamond', serif;
  letter-spacing: 0.025em;
}

h1, h2, .serif {
  font-family: 'Cormorant Garamond', serif;
  letter-spacing: 0.025em;
}

h1 { line-height: 1.2; }
h2 { line-height: 1.3; }

/* --- Layout helpers --------------------------------------- */
.page-wrapper {
  width: 100%;
  max-width: 480px;
  min-height: 100dvh;
  padding: 2rem 1.25rem 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* --- Logo ------------------------------------------------- */
.logo {
  width: 220px;
  max-width: 80%;
  height: auto;
  object-fit: contain;
  display: block;
  margin-bottom: 1.75rem;
}

@media (min-width: 480px) {
  .logo { width: 260px; }
}

/* --- Buttons ---------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.875rem 1.5rem;
  border-radius: var(--radius);
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  text-decoration: none;
  letter-spacing: 0.01em;
}

.btn:active { transform: scale(0.97); }
.btn:hover  { transform: scale(1.02); }

.btn-primary {
  background: var(--teal);
  color: #fff;
  box-shadow: var(--shadow);
}
.btn-primary:hover { background: var(--teal-light); box-shadow: 0 4px 16px rgba(27,104,115,0.25); }

.btn-outline {
  background: transparent;
  color: var(--teal);
  border-color: var(--teal);
}
.btn-outline:hover { background: rgba(27,104,115,0.06); }

.btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: transparent;
  font-weight: 500;
}
.btn-ghost:hover { color: var(--text-dark); }

/* --- Form fields ------------------------------------------ */
.field-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}

label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-dark);
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

input, textarea, select {
  width: 100%;
  padding: 0.9rem 1.125rem;
  border: 1.5px solid #DDD8CF;
  border-radius: 0.875rem;
  background: #FDFCF9;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 400;
  color: var(--text-dark);
  line-height: 1.5;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  box-shadow: 0 1px 3px rgba(0,0,0,0.045);
}

input:focus, textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3.5px rgba(27,104,115,0.13), 0 1px 3px rgba(0,0,0,0.04);
}

::placeholder {
  color: #B0A89F;
  font-weight: 400;
  opacity: 1;
}

textarea {
  resize: vertical;
  min-height: 148px;
  line-height: 1.75;
}

/* --- Card ------------------------------------------------- */
.card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.75rem 1.5rem;
  width: 100%;
}

/* --- Divider ---------------------------------------------- */
.divider {
  width: 56px;
  height: 1.5px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  border-radius: 2px;
  margin: 1.25rem auto;
}

/* --- Progress bar ----------------------------------------- */
.progress-bar-track {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 3px;
  background: rgba(27,104,115,0.15);
  z-index: 100;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--teal-light));
  border-radius: 0 2px 2px 0;
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  width: 0%;
}

/* --- MCQ options ------------------------------------------ */
.mcq-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
}

.mcq-btn {
  width: 100%;
  padding: 0.875rem 1.25rem;
  border: 1.5px solid #E5E7EB;
  border-radius: var(--radius);
  background: #fff;
  text-align: left;
  font-family: 'Inter', sans-serif;
  font-size: 0.975rem;
  color: var(--text-dark);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), transform 0.15s ease;
  letter-spacing: 0.01em;
}

.mcq-btn:hover { border-color: var(--teal); background: rgba(27,104,115,0.04); }
.mcq-btn:active { transform: scale(0.98); }

.mcq-btn.selected {
  border-color: var(--teal);
  background: rgba(27,104,115,0.08);
  color: var(--teal);
  font-weight: 600;
}

/* --- Star rating ------------------------------------------ */
.star-row {
  display: flex;
  gap: 0.625rem;
  justify-content: center;
  margin: 1rem 0 0.5rem;
}

.star {
  font-size: 2.25rem;
  cursor: pointer;
  color: #E5E7EB;
  transition: color 0.15s ease, transform 0.15s ease;
  line-height: 1;
  user-select: none;
}

.star.filled   { color: var(--gold); }
.star.selected { transform: scale(1.2); }

.star-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  padding: 0 0.25rem;
}

/* --- Question fade transition ----------------------------- */
.question-slide {
  width: 100%;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

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

.question-slide.exit {
  opacity: 0;
  transform: translateY(-18px);
  pointer-events: none;
}

/* --- Loading spinner -------------------------------------- */
@keyframes spin {
  to { transform: rotate(360deg); }
}

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
  vertical-align: middle;
  margin-right: 0.5rem;
  flex-shrink: 0;
}

/* --- Thank-you / success screens -------------------------- */
.success-screen {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 3rem 1rem;
}

.success-icon {
  font-size: 3rem;
  color: var(--teal);
}

/* --- Error notice ----------------------------------------- */
.error-notice {
  background: #FEF2F2;
  border: 1.5px solid #FECACA;
  border-radius: 0.75rem;
  padding: 0.75rem 1rem;
  color: #B91C1C;
  font-size: 0.875rem;
  display: none;
  width: 100%;
}

.error-notice.visible { display: block; }

/* --- Decorative SVG background (landing only) ------------- */
.bg-deco {
  position: fixed;
  bottom: -10%;
  right: -15%;
  width: 420px;
  opacity: 0.045;
  pointer-events: none;
  z-index: 0;
}

/* Keep content above decorative layer */
.page-wrapper { position: relative; z-index: 1; }

/* --- Google Review Inline Widget -------------------------- */
.google-review-inline {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.625rem;
  margin-top: 2rem;
  text-decoration: none;
  cursor: pointer;
}

.google-review-label {
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.01em;
  text-align: center;
  transition: color 0.2s ease;
}

.google-review-icon {
  width: 48px;
  height: 48px;
  background: #fff;
  border: 1px solid #E8E4DD;
  border-radius: 50%;
  box-shadow: 0 1px 5px rgba(0,0,0,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  flex-shrink: 0;
}

.google-review-inline:hover .google-review-icon,
.google-review-inline:focus-visible .google-review-icon {
  box-shadow: 0 3px 12px rgba(0,0,0,0.13);
  transform: scale(1.07);
  outline: none;
}

.google-review-inline:hover .google-review-label { color: var(--text-dark); }
.google-review-inline:active .google-review-icon { transform: scale(0.96); }

/* --- Utility ---------------------------------------------- */
.text-center { text-align: center; }
.w-full { width: 100%; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.gap-3 { gap: 0.75rem; }
.flex-col { flex-direction: column; }
.flex     { display: flex; }
