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

:root {
  --primary: hsl(355, 68%, 18%);
  /* Deep Burgundy */
  --primary-light: hsl(355, 68%, 25%);
  --secondary: hsl(42, 54%, 50%);
  /* Gold */
  --accent: hsl(34, 45%, 96%);
  /* Cream/Off-white */
  --text: hsl(210, 20%, 15%);
  --text-dim: hsl(210, 10%, 45%);
  --bg: #f8f3ed;
  --card-bg: white;
  --success: hsl(150, 60%, 40%);
  --shadow: rgba(75, 14, 14, 0.08);
  /* Sophisticated subtle shadow */

  --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --border-radius: 12px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  letter-spacing: -0.01em;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

button,
input,
select,
textarea {
  cursor: pointer;
  border: none;
  background: none;
  outline: none;
  font-family: inherit;
  transition: var(--transition);
}

/* Prevent iOS auto-zoom on focus while keeping the design intent */

input,
select,
textarea {
  font-size: 16px !important;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Glassmorphism & Surface Styles */

.glass {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 8px 32px 0 var(--shadow);
}

.premium-card {
  background: white;
  border-radius: var(--border-radius);
  padding: 2.5rem;
  box-shadow: 0 10px 40px -10px var(--shadow);
  border: 1px solid hsl(0, 0%, 93%);
}

.quiz-card,
.lead-card {
  width: 736px !important;
  height: 420px !important;
  min-width: 736px !important;
  min-height: 420px !important;
  max-width: 736px !important;
  max-height: 420px !important;
  margin: 0 auto !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  flex-shrink: 0 !important;
  box-sizing: border-box !important;
}

/* Typography Utilities */

.text-gold {
  color: var(--secondary);
}

.text-wine {
  color: var(--primary);
}

.serif {
  font-family: 'Cormorant Garamond', serif;
}

/* Custom Animations */

@keyframes float {
  0% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-10px);
  }

  100% {
    transform: translateY(0px);
  }
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.float {
  animation: float 6s ease-in-out infinite;
}

.fade-in {
  animation: fadeInScale 0.8s forwards ease-out;
}

/* Progress Bar Components */

.progress-container {
  height: 6px;
  background: hsl(0, 0%, 90%);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  margin: 1.5rem 0;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 10px;
}

.btn-wine {
  background: var(--primary);
  color: white;
  padding: 0.8rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  box-shadow: 0 4px 12px var(--shadow);
  transition: var(--transition);
}

.btn-wine:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px var(--shadow);
}

.btn-wine:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* Quiz Answer Scale */

.answer-scale {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 2.5rem 0;
  width: 100%;
}

.scale-btn {
  flex: 1;
  aspect-ratio: 1;
  max-width: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid hsl(0, 0%, 88%);
  border-radius: 8px;
  font-weight: 500;
  background: white;
}

.scale-btn:hover {
  background: var(--accent);
  border-color: var(--primary);
  color: var(--primary);
}

.scale-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(75, 14, 14, 0.2);
}

/* Result Dimension Bars */

.dimension-row {
  margin-bottom: 1.5rem;
}

.dimension-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: capitalize;
}

.dimension-bar-bg {
  height: 12px;
  background: hsl(0, 0%, 92%);
  border-radius: 6px;
  overflow: hidden;
}

.dimension-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transition: width 1.5s ease-out;
  border-radius: 6px;
}

/* Results and Lead Form specific mobile fixes */

.results-page {
  min-height: 100vh;
  background: #f8f3ed;
  padding: 4rem 0;
}

.results-container {
  max-width: 900px;
}

.grid-2-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.results-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.dimension-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem 4rem;
}

/* Responsive Scaling */

@media (max-width: 768px) {
  html {
    font-size: 16px;
  }

  .container {
    padding: 0 1rem !important;
    width: 100% !important;
    max-width: none !important;
  }

  .results-container {
    max-width: none !important;
    padding: 0 !important;
  }

  .premium-card {
    padding: 2rem 1.5rem;
  }

  h1 {
    font-size: 2.8rem !important;
    line-height: 1.1 !important;
    word-break: break-word !important;
  }

  h2 {
    font-size: 1.8rem !important;
  }

  h3 {
    font-size: 1.5rem !important;
    line-height: 1.3 !important;
  }

  /* Quiz and Lead Cards - Full Width on Mobile */
  .quiz-card,
  .lead-card,
  .results-page .premium-card {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    height: auto !important;
    min-height: 320px !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 1rem 1.25rem !important; /* Added horizontal padding */
    box-shadow: none !important;
    border-radius: 0 !important;
    border-left: none !important;
    border-right: none !important;
  }

  .results-page {
    padding: 0 !important;
    background: white !important;
  }

  .results-page .premium-card {
    border-top: 1px solid #eee !important;
    margin-top: -1px !important;
  }

  /* Answer Scale - 2 rows of 5 buttons */
  .answer-scale {
    display: grid !important;
    grid-template-columns: repeat(5, 1fr) !important;
    gap: 8px !important;
    margin: 2rem auto !important;
    width: 100% !important;
    max-width: 320px !important;
    justify-content: center !important;
  }

  .scale-btn {
    font-size: 1.1rem;
    height: 46px !important;
    aspect-ratio: 1;
    max-width: none;
    border-radius: 6px;
    color: var(--primary) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  /* Grids and Columns */
  .results-grid-2,
  .grid-2-cols,
  .lead-form-grid .grid-2-cols {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }

  .dimension-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1rem !important;
    padding: 0 0.5rem;
  }

  /* Mobile specific elements */
  .mobile-only {
    display: flex !important;
  }

  .desktop-only {
    display: none !important;
  }

  /* iOS/Android Optimization */
  button {
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    touch-action: manipulation;
  }
}

.mobile-only,
.mobile-legend,
.answer-labels {
  display: none !important;
}

@media (max-width: 768px) {

  .mobile-only,
  .mobile-legend {
    display: flex !important;
  }
}

.desktop-only {
  display: flex !important;
}

@media (max-width: 768px) {
  .desktop-only {
    display: none !important;
  }
}