/* ═══════════════════════════════════════════════════════════════
   Luna NPS — Design System
   ═══════════════════════════════════════════════════════════════ */

/* ── RESET & GLOBAL ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
[hidden] { display: none !important; }
body {
  background: #FFFFFF;
  font-family: 'Manrope', system-ui, sans-serif;
  color: #1A1A1A;
  -webkit-font-smoothing: antialiased;
}
::selection { background: #EBEBE9; }
input, textarea, button { font-family: inherit; }
textarea { resize: vertical; }
input::placeholder, textarea::placeholder { color: #ABABA9; }
button { outline: none; }
input:focus, textarea:focus { outline: none; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap;
}

/* ── ANIMATIONS ─────────────────────────────────────────────── */
@keyframes lunaBounce {
  0%, 100% { transform: translateY(0); opacity: .55; }
  50%       { transform: translateY(7px); opacity: 1; }
}
@keyframes heartPop {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.32); }
  70%  { transform: scale(.92); }
  100% { transform: scale(1); }
}
@keyframes heartPulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.09); }
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
@keyframes recDot {
  0%, 100% { opacity: 1; }
  50%      { opacity: .25; }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes commentIn {
  from { opacity: 0; max-height: 0; transform: translateY(-6px); }
  to   { opacity: 1; max-height: 500px; transform: translateY(0); }
}
@keyframes haloPulse {
  0%   { transform: scale(.85); opacity: .45; }
  70%  { transform: scale(1.55); opacity: 0; }
  100% { opacity: 0; }
}

/* ── HERO ───────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: clamp(440px, 58vh, 660px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 56px 26px 108px;
  overflow: hidden;
  background: linear-gradient(165deg, #FFFFFF 0%, #F5F5F4 52%, #EFEFEE 100%);
}
.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(24px);
  pointer-events: none;
}
.hero-blob--pink {
  top: -10%; left: -8%;
  width: 52%; height: 52%;
  background: radial-gradient(circle, rgba(216,153,157,.16), transparent 68%);
}
.hero-blob--grey {
  bottom: -8%; right: -10%;
  width: 55%; height: 55%;
  background: radial-gradient(circle, rgba(0,0,0,.05), transparent 70%);
}
.hero-content {
  position: relative;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: fadeUp .8s ease both;
}
.hero-logo {
  width: clamp(90px, 20vw, 118px);
  height: auto;
  display: block;
  margin-bottom: 24px;
  opacity: .9;
}
.hero-divider {
  width: 46px;
  height: 1px;
  background: #E0E0DE;
  margin-bottom: 26px;
}
.hero-heart {
  margin-bottom: 24px;
  animation: heartPulse 1.9s ease-in-out infinite;
  filter: drop-shadow(0 9px 18px rgba(216,153,157,.5));
}
.hero-title {
  font-size: clamp(34px, 8.5vw, 56px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -.015em;
  margin: 0;
}
.hero-subtitle {
  font-size: clamp(15px, 3.6vw, 18px);
  line-height: 1.6;
  color: #7E7E7C;
  margin: 22px auto 0;
  max-width: 430px;
}
.hero-pill {
  margin-top: 28px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #E6E6E4;
  border-radius: 999px;
  padding: 10px 20px;
  background: rgba(255,255,255,.55);
}
.hero-pill__dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #D8999D;
  flex: none;
}
.hero-pill__text {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .02em;
  color: #5A5A58;
}
.hero-scroll {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.hero-scroll__label {
  font-size: 10px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: #A2A2A0;
}
.hero-scroll__chevron {
  animation: lunaBounce 1.8s ease-in-out infinite;
}

/* ── FORM LAYOUT ─────────────────────────────────────────────── */
.form-main {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 24px 120px;
}
.form-section { display: block; }
.section-contacts { margin-top: 64px; }
.section-chips    { margin-top: 62px; }
.section-ratings  { margin-top: 70px; display: flex; flex-direction: column; gap: 14px; }
.section-brands   { margin-top: 44px; border-top: 1px solid #EDEDEB; padding-top: 30px; }
.section-comment  { margin-top: 48px; }
.section-submit   { margin-top: 44px; }

/* ── TYPOGRAPHY ─────────────────────────────────────────────── */
.section-heading {
  font-size: clamp(15px, 4vw, 18px);
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #1A1A1A;
  margin: 0 0 26px;
}
.section-chips .section-heading,
.section-comment .section-heading { margin-bottom: 6px; }

.section-sub {
  font-size: 12.5px;
  color: #9A9A98;
  margin: 0 0 20px;
  display: flex;
  align-items: center;
  gap: .35em;
}
.question-title {
  font-size: clamp(14.5px, 4vw, 18px);
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  line-height: 1.4;
  margin: 0;
}
.question-num {
  color: #D8999D;
  font-weight: 800;
  margin-right: 8px;
}
.question-hint {
  font-size: 12.5px;
  color: #D5D5D5;
  margin: 10px 0 0;
  line-height: 1.5;
}
.inline-heart {
  display: inline-block;
  vertical-align: middle;
}

/* ── CONTACTS GRID ───────────────────────────────────────────── */
.contacts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px 28px;
}
.field-wrap { position: relative; }

/* ── UNDERLINE INPUTS ────────────────────────────────────────── */
.input-underline {
  width: 100%;
  border: none;
  border-bottom: 1px solid #E4E4E2;
  background: transparent;
  padding: 12px 2px;
  font-size: 15px;
  color: #1A1A1A;
  transition: border-color .35s;
}
.input-underline:focus { border-bottom-color: #1A1A1A; }
.input-underline.err   { border-bottom-color: #D9534F; }
.brands-input { width: 100%; margin-top: 18px; }

/* ── ERROR MESSAGES ──────────────────────────────────────────── */
.field-err {
  font-size: 12px;
  color: #D9534F;
  font-weight: 600;
  margin: 10px 0 0;
  display: block;
}

/* ── CHIPS ───────────────────────────────────────────────────── */
.chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
}
.chip {
  border-radius: 999px;
  padding: 11px 20px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all .28s ease;
  background: #fff;
  border: 1px solid #E2E2E0;
  color: #3A3A38;
}
.chip.selected {
  background: #D8999D;
  border-color: #D8999D;
  color: #fff;
}

/* ── QUESTION CARD ───────────────────────────────────────────── */
.question-card {
  border-top: 1px solid #EDEDEB;
  padding-top: 30px;
}

/* ── HEARTS ROW ──────────────────────────────────────────────── */
.hearts-row {
  display: flex;
  justify-content: space-between;
  width: 100%;
  max-width: 470px;
  margin-top: 20px;
}
.heart-btn {
  position: relative;
  width: clamp(24px, 6.6vw, 34px);
  height: clamp(24px, 6.6vw, 34px);
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  transition: transform .18s ease;
  display: block;
  flex: none;
}
.heart-btn .heart-path {
  fill: none;
  stroke: #D7D7D5;
  stroke-width: 1;
  transition: fill .15s, stroke .15s;
}
.heart-btn.filled .heart-path {
  fill: #D8999D;
  stroke: none;
}
.heart-btn .heart-num {
  position: absolute;
  left: 0; right: 0;
  top: 45%;
  transform: translateY(-50%);
  text-align: center;
  font-size: clamp(8.5px, 2.3vw, 11px);
  font-weight: 600;
  line-height: 1;
  pointer-events: none;
  color: #ADADAB;
  transition: color .15s;
}
.heart-btn.filled .heart-num { color: #FFFFFF; }
.heart-btn.popping { animation: heartPop .34s ease; }

/* ── CONDITIONAL COMMENT FIELD ───────────────────────────────── */
.comment-wrap {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height .35s ease, opacity .3s ease;
}
.comment-wrap.visible {
  max-height: 500px;
  opacity: 1;
  animation: commentIn .36s ease both;
}
.textarea-comment {
  width: 100%;
  margin-top: 16px;
  min-height: 104px;
  border: 1px solid #E4E4E2;
  background: #fff;
  border-radius: 16px;
  padding: 16px 18px 24px;
  font-size: 15px;
  line-height: 1.6;
  color: #1A1A1A;
  transition: border-color .3s;
}
.textarea-comment:focus { border-color: #1A1A1A; }
.textarea-comment.err   { border-color: #D9534F; }

/* ── MAIN COMMENT TEXTAREA ───────────────────────────────────── */
.textarea-main {
  width: 100%;
  min-height: 120px;
  border: 1px solid #E4E4E2;
  background: #fff;
  border-radius: 16px;
  padding: 16px 18px;
  font-size: 15px;
  line-height: 1.6;
  color: #1A1A1A;
  transition: border-color .3s;
  display: block;
}
.textarea-main:focus { border-color: #1A1A1A; }

/* ── MEDIA GRID ──────────────────────────────────────────────── */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 16px;
}

/* ── MEDIA ZONE (shared) ─────────────────────────────────────── */
.media-zone {
  min-height: 142px;
  border-radius: 16px;
  border: 1.5px dashed #D6D6D4;
  background: #FAFAF9;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 14px;
  transition: border-color .3s, background .3s;
}
.media-zone.has-photos { border-color: #D2D2D0; }
.media-zone.audio-recording { border-color: #E0BEC0; background: #FBF4F4; }
.media-zone.audio-done      { border-color: #D2D2D0; }

.media-title {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #4A4A48;
}
.media-desc {
  display: block;
  font-size: 11px;
  color: #9A9A98;
  line-height: 1.4;
  margin-top: 2px;
}

/* ── PHOTO ZONE ──────────────────────────────────────────────── */
.audio-state { width: 100%; }

.photo-empty {
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  width: 100%;
}
.photo-filled {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: center;
  width: 100%;
}
.photo-thumbs {
  display: contents;
}
.photo-thumb {
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 11px;
  background-size: cover;
  background-position: center;
  flex: none;
}
.photo-remove {
  position: absolute;
  top: -7px; right: -7px;
  width: 21px; height: 21px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: #1A1A1A;
  color: #fff;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.photo-add-tile {
  width: 52px; height: 52px;
  border-radius: 11px;
  border: 1.5px dashed #CCCCCA;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #9A9A98;
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
  transition: border-color .25s, color .25s;
  flex: none;
}
.photo-add-tile:hover { border-color: #1A1A1A; color: #1A1A1A; }

/* ── AUDIO ZONE ──────────────────────────────────────────────── */
.audio-idle-btn {
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  width: 100%;
}
.rec-indicator {
  display: flex;
  align-items: center;
  gap: 9px;
  justify-content: center;
}
.rec-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #C85A54;
  animation: recDot 1s ease-in-out infinite;
}
.rec-timer {
  font-variant-numeric: tabular-nums;
  font-size: 22px;
  font-weight: 700;
  color: #1A1A1A;
  letter-spacing: .04em;
}
.btn-stop-rec {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: none;
  cursor: pointer;
  background: #1A1A1A;
  color: #fff;
  border-radius: 11px;
  padding: 11px 22px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.stop-icon {
  width: 10px; height: 10px;
  background: #fff;
  border-radius: 2px;
}
.audio-recording-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
}
.rec-done-player {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
}
.btn-play-audio {
  border: none;
  cursor: pointer;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: #1A1A1A;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.waveform {
  display: flex;
  align-items: flex-end;
  gap: 2.5px;
  height: 24px;
}
.waveform span {
  width: 3px;
  border-radius: 2px;
  display: block;
}
.rec-done-time {
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  font-weight: 600;
  color: #7A7A78;
}
.rec-done-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 11px;
  justify-content: center;
}
.btn-rec-redo {
  border: none;
  cursor: pointer;
  background: transparent;
  color: #4A4A48;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .02em;
  text-decoration: underline;
  text-underline-offset: 3px;
  padding: 0;
}
.btn-rec-delete {
  border: none;
  cursor: pointer;
  background: transparent;
  color: #9A9A98;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .02em;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  transition: color .2s;
}
.btn-rec-delete:hover { color: #C85A54; }
.audio-done-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 11px;
  width: 100%;
}

/* ── SUBMIT ──────────────────────────────────────────────────── */
.submit-err {
  background: #FEE2E2;
  color: #991B1B;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  margin-bottom: 16px;
  display: block;
}
.btn-submit {
  margin-top: 0;
  width: 100%;
  border: none;
  cursor: pointer;
  background: #1A1A1A;
  color: #fff;
  border-radius: 16px;
  padding: 21px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition: background .3s, transform .15s, box-shadow .3s;
  box-shadow: 0 14px 34px -18px rgba(0,0,0,.6);
}
.btn-submit:hover   { background: #000; box-shadow: 0 18px 40px -16px rgba(0,0,0,.55); }
.btn-submit:active  { transform: scale(.99); }
.btn-submit:disabled { opacity: .6; cursor: not-allowed; }
.btn-spinner {
  width: 17px; height: 17px;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: inline-block;
  flex: none;
}
.disclaimer {
  text-align: center;
  font-size: 11.5px;
  color: #A8A8A6;
  margin: 18px 0 0;
  line-height: 1.5;
}
.disclaimer-link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ── MOBILE: prevent iOS zoom on input focus ─────────────────── */
@media (max-width: 768px) {
  .input-underline,
  .textarea-comment,
  .textarea-main {
    font-size: 16px;
  }
  .textarea-comment {
    padding-bottom: 30px;
  }
}
