/* ========================================
   ANOTHR Survey — Styles
   Mobile-first | Brand-consistent
   ======================================== */

/* ----------------------------------------
   @FONT-FACE
   ---------------------------------------- */
@font-face {
  font-family: 'Etna Condensed';
  src: url('../fonts/fonnts.com-Etna-Condensed.otf') format('opentype');
  font-weight: 400;
  font-display: swap;
}

/* ----------------------------------------
   DESIGN TOKENS
   ---------------------------------------- */
:root {
  --gut-bg: #0a0a0a;
  --gut-bg-light: #FFFFFF;
  --gut-bg-warm: #F5F0E8;
  --gut-bg-peach: #F4D5C7;
  --gut-text: #FFFFFF;
  --gut-text-dark: #121212;
  --gut-text-muted: rgba(18, 18, 18, 0.5);
  --gut-accent: #F5A623;
  --gut-accent-green: #7DB95A;
  --gut-raspberry: #C94B6D;
  --gut-border: rgba(0, 0, 0, 0.08);

  --sv-card-bg: #FFFFFF;
  --sv-card-shadow: 0 1px 4px rgba(0,0,0,0.06);
  --sv-card-shadow-hover: 0 4px 16px rgba(0,0,0,0.10);
  --sv-slide-duration: 400ms;
  --sv-slide-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --sv-auto-advance-delay: 300ms;
}

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

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: 'IBM Plex Mono', monospace;
  background: var(--gut-bg-warm);
  color: var(--gut-text-dark);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}

h1, h2, h3 {
  font-family: 'Etna Condensed', 'Arial Black', sans-serif;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

button {
  font-family: inherit;
  cursor: pointer;
  -webkit-appearance: none;
}

/* ----------------------------------------
   PROGRESS BAR
   ---------------------------------------- */
.sv-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(0, 0, 0, 0.06);
  z-index: 100;
}

.sv-progress__bar {
  height: 100%;
  width: 0%;
  background: var(--gut-accent);
  border-radius: 0 2px 2px 0;
  transition: width var(--sv-slide-duration) var(--sv-slide-ease);
  will-change: width;
}

/* ----------------------------------------
   SURVEY CONTAINER & SLIDES
   ---------------------------------------- */
.sv-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.sv-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: translateX(100%);
  transition: transform var(--sv-slide-duration) var(--sv-slide-ease);
  will-change: transform;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.sv-slide--active {
  transform: translateX(0);
}

.sv-slide--prev {
  transform: translateX(-100%);
}

.sv-slide__inner {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  padding: 60px 24px 40px;
  justify-content: center;
}

.sv-slide__inner--center {
  align-items: center;
  text-align: center;
}

/* ----------------------------------------
   BACK BUTTON
   ---------------------------------------- */
.sv-back {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 90;
  background: none;
  border: none;
  color: var(--gut-text-dark);
  opacity: 0.4;
  padding: 8px;
  transition: opacity 0.2s ease;
  display: none;
}

.sv-back--visible {
  display: block;
}

.sv-back:active {
  opacity: 0.8;
}

/* ----------------------------------------
   LOGO
   ---------------------------------------- */
.sv-logo {
  width: 144px;
  margin-bottom: 28px;
  mix-blend-mode: multiply;
}

/* ----------------------------------------
   WELCOME SCREEN
   ---------------------------------------- */
.sv-welcome__title {
  font-size: 26px;
  margin-bottom: 16px;
  line-height: 1.2;
}

.sv-welcome__subtitle {
  font-size: 13px;
  color: var(--gut-text-muted);
  line-height: 1.65;
  max-width: 300px;
  margin-bottom: 8px;
}

.sv-welcome__sign {
  font-size: 13px;
  color: var(--gut-text-muted);
  font-style: italic;
  margin-bottom: 32px;
}

/* ----------------------------------------
   QUESTION TITLE
   ---------------------------------------- */
.sv-question__title {
  font-size: 24px;
  margin-bottom: 28px;
  line-height: 1.2;
}

/* ----------------------------------------
   PRIMARY BUTTON
   ---------------------------------------- */
.sv-btn--primary {
  display: block;
  width: 100%;
  padding: 16px;
  background: var(--gut-text-dark);
  color: var(--gut-bg-warm);
  border: none;
  border-radius: 12px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

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

.sv-btn--next {
  margin-top: 16px;
}

/* ----------------------------------------
   CARD OPTIONS
   ---------------------------------------- */
.sv-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sv-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  background: var(--sv-card-bg);
  border: 2px solid transparent;
  border-radius: 14px;
  box-shadow: var(--sv-card-shadow);
  font-size: 14px;
  font-weight: 500;
  color: var(--gut-text-dark);
  transition: all 0.2s ease;
  text-align: left;
  width: 100%;
}

.sv-card:active {
  transform: scale(0.97);
}

.sv-card--selected {
  border-color: var(--gut-accent);
  background: rgba(245, 166, 35, 0.06);
  box-shadow: 0 0 0 1px var(--gut-accent), var(--sv-card-shadow-hover);
}

.sv-card--selected::before {
  content: '\2713';
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: var(--gut-accent);
  color: white;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

/* ----------------------------------------
   IMAGE CARDS (Flavor Grid)
   ---------------------------------------- */
.sv-cards--image {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.sv-cards--image-5 {
  grid-template-columns: 1fr 1fr 1fr;
}

.sv-card--image {
  flex-direction: column;
  align-items: center;
  padding: 10px 8px 12px;
  text-align: center;
  gap: 4px;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
}

.sv-card--image::before {
  display: none;
}

.sv-card--image.sv-card--selected::before {
  display: flex;
  position: absolute;
  top: 6px;
  left: 6px;
  width: 22px;
  height: 22px;
  font-size: 11px;
  z-index: 2;
}

.sv-card__img-wrap {
  width: 100%;
  height: 110px;
  overflow: hidden;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sv-cards--image-5 .sv-card__img-wrap {
  height: 90px;
}

.sv-card--image img {
  height: 100px;
  width: auto;
  object-fit: contain;
  transform: scale(1.1);
  transition: transform 0.3s var(--sv-slide-ease);
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.15));
}

.sv-cards--image-5 .sv-card--image img {
  height: 82px;
}

.sv-card--image:active img,
.sv-card--image.sv-card--selected img {
  transform: scale(1.18);
}

/* Flavor-specific backgrounds */
.sv-card--flavor-litchi .sv-card__img-wrap { background: #E8B44D; }
.sv-card--flavor-lemon .sv-card__img-wrap { background: #9CC576; }
.sv-card--flavor-strawberry .sv-card__img-wrap { background: #E8BFB3; }
.sv-card--flavor-combo .sv-card__img-wrap { background: linear-gradient(135deg, #E8B44D 0%, #E8BFB3 50%, #9CC576 100%); }
.sv-card--flavor-variety .sv-card__img-wrap { background: linear-gradient(135deg, #9CC576 0%, #E8B44D 100%); }

.sv-card__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  margin-top: 2px;
}

/* Bestseller badge */
.sv-card--bestseller {
  position: relative;
}

.sv-card__badge {
  position: absolute;
  top: 6px;
  right: 6px;
  background: var(--gut-accent);
  color: #fff;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 6px;
  z-index: 2;
}

/* ----------------------------------------
   PRICING CARDS
   ---------------------------------------- */
.sv-cards--pricing {
  flex-direction: column;
}

.sv-card--pricing {
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 18px 20px;
}

.sv-card--pricing::before {
  display: none;
}

.sv-card--pricing.sv-card--selected::before {
  display: flex;
  position: absolute;
  top: 14px;
  right: 14px;
}

.sv-card--pricing.sv-card--selected {
  position: relative;
}

.sv-card__price {
  font-family: 'Etna Condensed', 'Arial Black', sans-serif;
  font-size: 26px;
  color: var(--gut-text-dark);
  letter-spacing: -0.01em;
}

.sv-card__desc {
  font-size: 12px;
  color: var(--gut-text-muted);
  line-height: 1.5;
}

/* ----------------------------------------
   EMOJI SCALE
   ---------------------------------------- */
.sv-emoji-scale {
  display: flex;
  justify-content: space-between;
  gap: 4px;
  padding: 0 4px;
}

.sv-emoji {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 6px;
  background: none;
  border: 2px solid transparent;
  border-radius: 14px;
  transition: all 0.2s ease;
  flex: 1;
}

.sv-emoji__icon {
  font-size: 36px;
  transition: transform 0.25s var(--sv-slide-ease);
}

.sv-emoji__label {
  font-size: 10px;
  color: var(--gut-text-muted);
  text-align: center;
  line-height: 1.3;
}

.sv-emoji--selected {
  border-color: var(--gut-accent);
  background: rgba(245, 166, 35, 0.06);
}

.sv-emoji--selected .sv-emoji__icon {
  transform: scale(1.3);
}

.sv-emoji--dimmed {
  opacity: 0.35;
  transition: opacity 0.3s ease;
}

/* ----------------------------------------
   PILL SELECTOR
   ---------------------------------------- */
.sv-pills {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sv-pill {
  display: block;
  width: 100%;
  padding: 16px 20px;
  background: var(--sv-card-bg);
  border: 2px solid transparent;
  border-radius: 14px;
  box-shadow: var(--sv-card-shadow);
  font-size: 14px;
  font-weight: 500;
  color: var(--gut-text-dark);
  transition: all 0.2s ease;
  text-align: center;
}

.sv-pill:active {
  transform: scale(0.97);
}

.sv-pill--selected {
  border-color: var(--gut-accent);
  background: rgba(245, 166, 35, 0.06);
  box-shadow: 0 0 0 1px var(--gut-accent), var(--sv-card-shadow-hover);
}

/* ----------------------------------------
   TEXT INPUTS
   ---------------------------------------- */
.sv-text-input {
  margin-bottom: 4px;
}

.sv-textarea,
.sv-input {
  width: 100%;
  padding: 16px;
  background: var(--sv-card-bg);
  border: 2px solid var(--gut-border);
  border-radius: 14px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 14px;
  color: var(--gut-text-dark);
  outline: none;
  transition: border-color 0.2s ease;
}

.sv-textarea {
  resize: none;
  min-height: 100px;
}

.sv-input {
  height: auto;
}

.sv-textarea:focus,
.sv-input:focus {
  border-color: var(--gut-accent);
}

.sv-textarea::placeholder,
.sv-input::placeholder {
  color: var(--gut-text-muted);
}

.sv-textarea__counter {
  display: block;
  text-align: right;
  font-size: 11px;
  color: var(--gut-text-muted);
  margin-top: 6px;
}

/* ----------------------------------------
   THANK YOU SCREEN
   ---------------------------------------- */
.sv-confetti {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 50;
}

.sv-thankyou__title {
  font-size: 32px;
  margin-bottom: 16px;
}

.sv-thankyou__text {
  font-size: 13px;
  color: var(--gut-text-muted);
  line-height: 1.7;
  max-width: 300px;
  margin-bottom: 8px;
}

.sv-thankyou__sign {
  font-size: 13px;
  color: var(--gut-text-muted);
  font-style: italic;
  margin-bottom: 28px;
}

.sv-thankyou__code {
  background: var(--sv-card-bg);
  border: 2px dashed var(--gut-accent);
  border-radius: 14px;
  padding: 20px;
  text-align: center;
  width: 100%;
  max-width: 320px;
}

.sv-thankyou__code-label {
  font-size: 12px;
  color: var(--gut-text-muted);
  margin-bottom: 8px;
}

.sv-thankyou__code-value {
  font-family: 'Etna Condensed', 'Arial Black', sans-serif;
  font-size: 28px;
  color: var(--gut-accent);
  letter-spacing: 0.05em;
  display: block;
}

/* Email / WhatsApp collection */
.sv-thankyou__send {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--gut-border);
  width: 100%;
  max-width: 320px;
}

.sv-thankyou__send-label {
  font-size: 11px;
  color: var(--gut-text-muted);
  text-align: center;
  margin-bottom: 10px;
  line-height: 1.5;
}

.sv-thankyou__send-row {
  display: flex;
  gap: 8px;
}

.sv-thankyou__send-input {
  flex: 1;
  padding: 12px 14px;
  background: var(--sv-card-bg);
  border: 1.5px solid var(--gut-border);
  border-radius: 10px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  color: var(--gut-text-dark);
  outline: none;
  transition: border-color 0.2s ease;
  min-width: 0;
}

.sv-thankyou__send-input:focus {
  border-color: var(--gut-accent);
}

.sv-thankyou__send-input::placeholder {
  color: rgba(18, 18, 18, 0.3);
  font-size: 12px;
}

.sv-thankyou__send-btn {
  padding: 12px 16px;
  background: var(--gut-text-dark);
  color: var(--gut-bg-warm);
  border: none;
  border-radius: 10px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  transition: transform 0.15s ease;
}

.sv-thankyou__send-btn:active {
  transform: scale(0.96);
}

.sv-thankyou__send-btn--sent {
  background: var(--gut-accent-green);
  pointer-events: none;
}

.sv-thankyou__send-skip {
  display: block;
  width: 100%;
  text-align: center;
  font-size: 11px;
  color: rgba(18, 18, 18, 0.3);
  margin-top: 8px;
  background: none;
  border: none;
  font-family: 'IBM Plex Mono', monospace;
}

.sv-thankyou__link {
  display: block;
  text-align: center;
  font-size: 13px;
  color: var(--gut-text-muted);
  text-decoration: none;
  margin-top: 20px;
  transition: color 0.2s ease;
}

/* ----------------------------------------
   SELECTION ANIMATION
   ---------------------------------------- */
@keyframes sv-bounce {
  0% { transform: scale(1); }
  50% { transform: scale(1.04); }
  100% { transform: scale(1); }
}

.sv-card--bounce,
.sv-pill--bounce {
  animation: sv-bounce 0.25s var(--sv-slide-ease);
}

/* ----------------------------------------
   REDUCED MOTION
   ---------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .sv-slide {
    transition: none;
  }
  .sv-progress__bar {
    transition: none;
  }
  .sv-emoji__icon {
    transition: none;
  }
  .sv-card--image img {
    transition: none;
  }
  .sv-card--bounce,
  .sv-pill--bounce {
    animation: none;
  }
}

/* ----------------------------------------
   DESKTOP (min 768px)
   ---------------------------------------- */
@media (min-width: 768px) {
  .sv-slide__inner {
    max-width: 480px;
    margin: 0 auto;
    padding: 80px 32px 60px;
  }

  .sv-welcome__title {
    font-size: 32px;
  }

  .sv-question__title {
    font-size: 28px;
  }

  .sv-thankyou__title {
    font-size: 38px;
  }

  .sv-emoji__icon {
    font-size: 42px;
  }
}
