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

:root {
  --cream: #FAF6F0;
  --gold: #C8A96E;
  --deep-gold: #9A7B4F;
  --champagne: #F5E6C8;
  --wine: #5C2028;
  --charcoal: #3A3530;
  --warm-white: #FFF8F0;
  --terracotta: #C67D4A;
  --sage: #A8B5A0;
  --font-serif: 'Cormorant Garamond', 'Georgia', serif;
  --font-sans: 'DM Sans', 'Helvetica Neue', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--cream);
  color: var(--charcoal);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ═══════════════════════════════════════
   HERO SECTION
   ═══════════════════════════════════════ */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(200, 169, 110, 0.15) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 30%, rgba(92, 32, 40, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(198, 125, 74, 0.08) 0%, transparent 50%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 640px;
}

.hero-badge {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--deep-gold);
  border: 1px solid var(--gold);
  padding: 0.4rem 1.4rem;
  border-radius: 100px;
  margin-bottom: 2.5rem;
  opacity: 0;
  animation: fadeIn 1s ease 0.3s forwards;
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(3.75rem, 10vw, 6.875rem);
  font-weight: 400;
  color: var(--charcoal);
  line-height: 1.05;
  margin-bottom: 1.5rem;
  opacity: 0;
  animation: fadeInUp 1s ease 0.6s forwards;
}

.hero h1 em {
  font-style: italic;
  color: var(--wine);
}

.hero-sub {
  font-family: var(--font-serif);
  font-size: 1.5625rem;
  color: var(--deep-gold);
  font-weight: 400;
  font-style: italic;
  margin-bottom: 3rem;
  opacity: 0;
  animation: fadeInUp 1s ease 0.9s forwards;
}

.hero-cta {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--warm-white);
  background: var(--charcoal);
  border: none;
  padding: 1rem 2.5rem;
  cursor: pointer;
  transition: all 0.4s ease;
  opacity: 0;
  animation: fadeInUp 1s ease 1.2s forwards;
}

.hero-cta:hover {
  background: var(--wine);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(92, 32, 40, 0.2);
}

.hero-scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  animation: fadeIn 1s ease 2s forwards, gentleBounce 2s ease-in-out 3s infinite;
}

.hero-scroll-hint svg {
  width: 24px;
  height: 24px;
  stroke: var(--gold);
  stroke-width: 1.5;
  fill: none;
}

/* ═══════════════════════════════════════
   CARDS SECTION
   ═══════════════════════════════════════ */

.cards-section {
  padding: 4rem 1.5rem 6rem;
  max-width: 960px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-header h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 400;
  color: var(--charcoal);
  margin-bottom: 0.75rem;
}

.section-header p {
  font-size: 0.95rem;
  color: var(--deep-gold);
  max-width: 480px;
  margin: 0 auto;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.75rem;
}

@media (max-width: 680px) {
  .cards-grid {
    grid-template-columns: 1fr;
    max-width: 420px;
    margin: 0 auto;
  }
}

/* ═══════════════════════════════════════
   INDIVIDUAL CARD — CLIP-PATH REVEAL
   ═══════════════════════════════════════ */

.card {
  position: relative;
  aspect-ratio: 3/4;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(58, 53, 48, 0.08);
  transition: box-shadow 0.4s ease, transform 0.4s ease;
  opacity: 0;
  transform: translateY(40px);
}

.card.visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.8s ease, transform 0.8s ease, box-shadow 0.4s ease;
}

.card:hover {
  box-shadow: 0 12px 40px rgba(58, 53, 48, 0.15);
  transform: translateY(-4px);
}

.card.visible:hover {
  transform: translateY(-4px);
}

.card-layer {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
}

/* Champagne layer (below) — always visible */
.card-champagne {
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-champagne-content {
  text-align: center;
  padding: 2rem;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.5s ease 0.2s, transform 0.5s ease 0.2s;
  max-width: 85%;
  background: rgba(250, 246, 240, 0.88);
  border-radius: 12px;
  backdrop-filter: blur(8px);
}

.card:hover .card-champagne-content,
.card.touched .card-champagne-content {
  opacity: 1;
  transform: translateY(0);
}

.champagne-label {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--warm-white);
  background: var(--deep-gold);
  border: none;
  padding: 0.3rem 0.9rem;
  border-radius: 100px;
  margin-bottom: 0.75rem;
}

.card-champagne-content h3 {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.card-champagne-content .card-quote {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-style: italic;
  color: var(--wine);
  line-height: 1.5;
}

/* Horse layer (above) — clip-path animated */
.card-horse {
  z-index: 2;
  clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
  transition: clip-path 0.7s cubic-bezier(0.4, 0, 0.15, 1);
}

.card:hover .card-horse,
.card.touched .card-horse {
  clip-path: polygon(0 0, 35% 0, 0 40%, 0 0);
}

.card-horse-content {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 1.5rem;
  background: linear-gradient(180deg, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.2) 60%, transparent 100%);
  transition: opacity 0.5s ease;
}

.card:hover .card-horse-content,
.card.touched .card-horse-content {
  opacity: 0;
}

.card-horse-content h3 {
  font-family: var(--font-serif);
  font-size: 1.7rem;
  font-weight: 500;
  color: #fff;
  margin-bottom: 0.2rem;
  text-shadow: 0 1px 6px rgba(0,0,0,0.3);
}

.card-horse-content span {
  font-size: 0.75rem;
  font-weight: 400;
  color: rgba(255,255,255,0.85);
  letter-spacing: 0.06em;
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

/* Shimmer on champagne corner */
.card-shimmer {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 80px;
  height: 80px;
  z-index: 3;
  background: radial-gradient(circle at center, rgba(200, 169, 110, 0.5) 0%, transparent 70%);
  clip-path: polygon(100% 100%, 100% 0%, 0% 100%);
  animation: shimmer 2.5s ease-in-out infinite;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.card:hover .card-shimmer,
.card.touched .card-shimmer {
  opacity: 0;
}

/* Tap hint for mobile */
.card-tap-hint {
  position: absolute;
  bottom: 8px;
  right: 10px;
  z-index: 4;
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(200, 169, 110, 0.8);
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.card:hover .card-tap-hint,
.card.touched .card-tap-hint {
  opacity: 0;
}

@media (min-width: 681px) {
  .card-tap-hint { display: none; }
}

/* ═══════════════════════════════════════
   SELECT PROMPT (appears after reveal)
   ═══════════════════════════════════════ */

.card-select-btn {
  position: absolute;
  bottom: 1.2rem;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  z-index: 5;
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--warm-white);
  background: var(--wine);
  border: none;
  padding: 0.6rem 1.6rem;
  cursor: pointer;
  opacity: 0;
  transition: all 0.4s ease 0.4s;
  pointer-events: none;
}

.card:hover .card-select-btn,
.card.touched .card-select-btn {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.card-select-btn:hover {
  background: var(--charcoal);
}

/* ═══════════════════════════════════════
   RESULT OVERLAY
   ═══════════════════════════════════════ */

.result-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(58, 53, 48, 0);
  backdrop-filter: blur(0px);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: background 0.6s ease, backdrop-filter 0.6s ease;
  padding: 1.5rem;
}

.result-overlay.active {
  background: rgba(58, 53, 48, 0.7);
  backdrop-filter: blur(12px);
  pointer-events: auto;
}

.result-card {
  background: var(--cream);
  border-radius: 16px;
  max-width: 780px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 80px rgba(0,0,0,0.25);
  opacity: 0;
  transform: translateY(40px) scale(0.96);
  transition: opacity 0.5s ease 0.15s, transform 0.5s cubic-bezier(0.4, 0, 0.15, 1) 0.15s;
}

.result-overlay.active .result-card {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.result-close {
  position: sticky;
  top: 0;
  float: right;
  margin: 1rem 1rem 0 0;
  z-index: 10;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(58, 53, 48, 0.15);
  background: var(--cream);
  color: var(--charcoal);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  font-family: var(--font-sans);
}

.result-close:hover {
  background: var(--charcoal);
  color: var(--cream);
}

.result-visual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 320px;
}

@media (max-width: 600px) {
  .result-visual {
    grid-template-columns: 1fr;
    min-height: auto;
  }
}

.result-horse-side,
.result-champagne-side {
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 260px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.result-horse-side::after,
.result-champagne-side::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.result-horse-side {
  border-radius: 16px 0 0 0;
  position: relative;
}

.result-horse-side::after {
  background: linear-gradient(135deg, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0.3) 100%);
  border-radius: 16px 0 0 0;
}

@media (max-width: 600px) {
  .result-horse-side { border-radius: 16px 16px 0 0; }
  .result-horse-side::after { border-radius: 16px 16px 0 0; }
}

.result-horse-side > * { position: relative; z-index: 1; }

.result-horse-side .result-breed-label {
  font-family: var(--font-sans);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  margin-bottom: 0.5rem;
}

.result-horse-side h3 {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  font-weight: 500;
  color: #fff;
  line-height: 1.1;
  margin-bottom: 0.5rem;
}

.result-horse-side .result-traits {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.8);
}

.result-champagne-side {
  border-radius: 0 16px 0 0;
  position: relative;
}

.result-champagne-side::after {
  background: linear-gradient(135deg, rgba(245, 230, 200, 0.85) 0%, rgba(245, 230, 200, 0.75) 100%);
  border-radius: 0 16px 0 0;
}

@media (max-width: 600px) {
  .result-champagne-side { border-radius: 0; }
  .result-champagne-side::after { border-radius: 0; }
}

.result-champagne-side > * { position: relative; z-index: 1; }

.result-champagne-side .result-match-label {
  font-family: var(--font-sans);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--deep-gold);
  margin-bottom: 0.5rem;
}

.result-champagne-side h3 {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 500;
  color: var(--charcoal);
  line-height: 1.15;
  margin-bottom: 0.5rem;
}

.result-champagne-side .result-style {
  font-size: 0.8rem;
  color: var(--deep-gold);
  font-weight: 500;
  letter-spacing: 0.05em;
}

/* Result body content */
.result-body {
  padding: 2.5rem 2.5rem 2rem;
}

@media (max-width: 600px) {
  .result-body { padding: 2rem 1.5rem 1.5rem; }
}

.result-quote {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-style: italic;
  color: var(--wine);
  text-align: center;
  margin-bottom: 1.5rem;
  line-height: 1.4;
  padding: 0 1rem;
}

.result-divider {
  width: 60px;
  height: 1px;
  background: var(--gold);
  margin: 0 auto 1.5rem;
}

.result-notes-label {
  font-family: var(--font-sans);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--deep-gold);
  text-align: center;
  margin-bottom: 0.75rem;
}

.result-notes {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  color: var(--charcoal);
  text-align: center;
  max-width: 520px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

/* Product recommendation card */
.result-product {
  margin-bottom: 2rem;
}

.result-product-label {
  font-family: var(--font-sans);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--deep-gold);
  text-align: center;
  margin-bottom: 0.75rem;
}

.result-product-card {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  max-width: 520px;
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  background: var(--warm-white);
  border: 1px solid rgba(200, 169, 110, 0.25);
  border-radius: 10px;
}

.result-product-img {
  width: 64px;
  height: 80px;
  min-width: 64px;
  border-radius: 8px;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  background-color: var(--warm-white);
}

.result-product-info h4 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 0.2rem;
}

.result-product-info p {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: var(--deep-gold);
  letter-spacing: 0.02em;
}

.result-product-info {
  flex: 1;
  min-width: 0;
}

.result-product-price {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--wine);
  white-space: nowrap;
}

@media (max-width: 600px) {
  .result-product-card {
    gap: 1rem;
  }
  .result-product-img {
    width: 56px;
    height: 56px;
    min-width: 56px;
  }
}

.result-ctas {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  padding-bottom: 0.5rem;
}

.result-cta {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 0.9rem 2rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.35s ease;
  text-align: center;
}

.result-cta-primary {
  background: var(--wine);
  color: var(--warm-white);
}

.result-cta-primary:hover {
  background: var(--charcoal);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(58, 53, 48, 0.2);
}

.result-cta-disabled {
  opacity: 0.45;
  cursor: default;
  pointer-events: none;
}

.result-cta-secondary {
  background: transparent;
  color: var(--charcoal);
  border: 1px solid var(--charcoal);
}

.result-cta-secondary:hover {
  background: var(--charcoal);
  color: var(--warm-white);
  transform: translateY(-2px);
}

.result-share {
  text-align: center;
  padding: 1.5rem 2rem 2rem;
  border-top: 1px solid rgba(200, 169, 110, 0.2);
  margin-top: 0.5rem;
}

.result-share p {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--deep-gold);
  margin-bottom: 0.75rem;
}

.share-buttons {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
}

.share-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(200, 169, 110, 0.3);
  background: transparent;
  color: var(--charcoal);
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  text-decoration: none;
}

.share-btn:hover {
  background: var(--gold);
  color: var(--warm-white);
  border-color: var(--gold);
}

/* ═══════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════ */

.footer {
  text-align: center;
  padding: 3rem 1.5rem;
  border-top: 1px solid rgba(200, 169, 110, 0.15);
}

.footer-logo {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--charcoal);
  margin-bottom: 0.4rem;
}

.footer p {
  font-size: 0.75rem;
  color: var(--deep-gold);
}

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

.footer a:hover {
  text-decoration: underline;
}

/* ═══════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════ */

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes shimmer {
  0%, 100% { opacity: 0.25; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.15); }
}

@keyframes gentleBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
