/* ================================================
   CLEAN CRAVINGS — FORM STYLES
   Colors: pink #E8749C · sage green #7BA05B · cream #F5F0EB
   ================================================ */

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

:root {
  --pink:       #E8749C;
  --pink-hover: #D4618A;
  --pink-light: #FBE8F1;
  --green:      #7BA05B;
  --cream:      #F5F0EB;
  --border:     #E8E2DC;
  --text:       #3A3330;
  --muted:      #9A928D;
  --white:      #FFFFFF;
  --shadow:     0 4px 24px rgba(0,0,0,0.08);
  --radius:     18px;
}

body {
  font-family: 'Nunito', sans-serif;
  background: var(--cream);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---- HEADER ------------------------------------------------ */
.site-header {
  background: var(--white);
  text-align: center;
  padding: 20px 24px 16px;
  border-bottom: 2px solid var(--pink-light);
}

.logo-brand {
  font-family: 'Nunito', sans-serif;
  font-size: 2.1rem;
  font-weight: 700;
  color: var(--green);
  letter-spacing: 0.18em;
  line-height: 1.1;
}

.logo-sub {
  font-family: 'Dancing Script', cursive;
  font-size: 1.15rem;
  color: var(--pink);
}

/* ---- PROGRESS BAR ------------------------------------------ */
.progress-container {
  background: var(--white);
  padding: 10px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}

.progress-track {
  flex: 1;
  height: 7px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--pink), var(--green));
  border-radius: 4px;
  width: 0%;
  transition: width 0.4s ease;
}

.progress-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}

/* ---- FORM CONTAINER ---------------------------------------- */
.form-container {
  flex: 1;
  padding: 28px 20px 40px;
  max-width: 580px;
  width: 100%;
  margin: 0 auto;
}

/* ---- STEPS ------------------------------------------------- */
.step { display: none; }
.step.active { display: block; animation: fadeUp 0.3s ease; }

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

.step-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow);
}

/* ---- WELCOME CARD ------------------------------------------ */
.welcome-card { text-align: center; padding: 40px 28px; }

.product-images {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 28px;
}

.product-img {
  width: 128px;
  height: 128px;
  object-fit: cover;
  border-radius: 14px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.13);
}

.welcome-heading {
  font-family: 'Dancing Script', cursive;
  font-size: 2.4rem;
  color: var(--green);
  margin-bottom: 12px;
  line-height: 1.2;
}

.welcome-body {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.65;
  margin-bottom: 28px;
}

.thank-icon { font-size: 4rem; margin-bottom: 16px; }

.sign-off {
  margin-top: 24px;
  font-style: italic;
  color: var(--green);
  font-weight: 700;
}

/* ---- QUESTION TEXT ----------------------------------------- */
.question {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.45;
  margin-bottom: 6px;
}

.hint {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 18px;
}

/* ---- OPTION CARDS ------------------------------------------ */
.options-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 20px 0;
}

.options-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 20px 0;
}

.opt-card {
  display: block;
  border: 2px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.opt-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.opt-inner {
  display: block;
  padding: 16px 14px;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.5;
}

.opt-wide .opt-inner { text-align: left; padding: 14px 18px; }

.opt-card:hover {
  border-color: var(--pink);
  background: var(--pink-light);
}

.opt-card:has(input:checked) {
  border-color: var(--pink);
  background: var(--pink-light);
}

.opt-card:has(input:checked) .opt-inner {
  color: var(--pink);
}

/* ---- STAR RATING ------------------------------------------- */
.star-rating {
  display: flex;
  flex-direction: row-reverse;
  justify-content: center;
  gap: 6px;
  margin: 22px 0;
}

.star-rating input { display: none; }

.star-rating label {
  font-size: 3.2rem;
  color: var(--border);
  cursor: pointer;
  transition: color 0.15s;
  line-height: 1;
}

/* Highlight hovered star and all stars to its left (lower numbers = later in DOM = siblings after) */
.star-rating label:hover,
.star-rating label:hover ~ label,
.star-rating input:checked ~ label {
  color: var(--pink);
}

/* ---- TEXT INPUTS ------------------------------------------- */
.textarea {
  width: 100%;
  margin-top: 18px;
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 13px 14px;
  font-family: 'Nunito', sans-serif;
  font-size: 0.97rem;
  color: var(--text);
  resize: vertical;
  transition: border-color 0.2s;
  line-height: 1.55;
}

.textarea:focus { outline: none; border-color: var(--pink); }
.textarea::placeholder { color: #C8C2BC; }

.field-group { margin-top: 18px; }

.field-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.text-input {
  width: 100%;
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  font-family: 'Nunito', sans-serif;
  font-size: 0.97rem;
  color: var(--text);
  transition: border-color 0.2s;
}

.text-input:focus { outline: none; border-color: var(--pink); }
.text-input::placeholder { color: #C8C2BC; }

/* ---- BUTTONS ----------------------------------------------- */
.btn-primary {
  background: var(--pink);
  color: var(--white);
  border: none;
  border-radius: 100px;
  padding: 12px 28px;
  font-family: 'Nunito', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.btn-primary:hover  { background: var(--pink-hover); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { background: var(--border); color: var(--muted); cursor: not-allowed; transform: none; }

.btn-lg { font-size: 1.1rem; padding: 14px 40px; }

.btn-back {
  background: transparent;
  color: var(--muted);
  border: 2px solid var(--border);
  border-radius: 100px;
  padding: 12px 22px;
  font-family: 'Nunito', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}

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

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 28px;
  gap: 12px;
}

/* ---- ERROR MESSAGE ----------------------------------------- */
.form-error {
  color: var(--pink);
  font-size: 0.85rem;
  font-weight: 700;
  margin-top: 10px;
}

/* ---- FOOTER ------------------------------------------------ */
.site-footer {
  text-align: center;
  padding: 20px;
  font-size: 0.8rem;
  color: var(--muted);
}

.site-footer a { color: var(--pink); text-decoration: none; }

/* ---- MOBILE ------------------------------------------------ */
@media (max-width: 480px) {
  .step-card    { padding: 24px 18px; }
  .welcome-card { padding: 32px 18px; }
  .product-img  { width: 108px; height: 108px; }
  .welcome-heading { font-size: 2rem; }
  .star-rating label { font-size: 2.6rem; }
  .question { font-size: 1.1rem; }
}
