/* Landing Page Styles - ChainWhich SEO Landing Page */
/* Editorial magazine aesthetic per ux-steve design spec */

/* ========================================
   LANDING PAGE CUSTOM PROPERTIES
   ======================================== */

:root {
  /* Editorial Colors */
  --landing-bg: #FDFBF7;           /* Off-white, paper-like warmth */
  --landing-text: #1A1A1A;         /* Near-black, high contrast */
  --landing-secondary: #6B6B6B;    /* Warm gray for supporting text */
  --landing-accent: #0F766E;       /* Brand teal for CTAs */
  --landing-accent-hover: #0D6560; /* Darker teal on hover */

  /* Editorial Typography */
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Instrument Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ========================================
   BASE STYLES
   ======================================== */

body {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
  color: var(--landing-text);
  background-color: var(--landing-bg);
}

/* ========================================
   HERO SECTION
   ======================================== */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 15vh var(--container-padding) 10vh;
  text-align: center;
}

.hero__container {
  max-width: 800px;
  margin: 0 auto;
}

.hero__eyebrow {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--landing-secondary);
  margin-bottom: var(--space-lg);
}

.hero__title {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--landing-text);
  margin-bottom: var(--space-lg);
}

.hero__subtitle {
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.5;
  color: var(--landing-secondary);
  margin-bottom: var(--space-xl);
  max-width: 540px;
  margin-left: auto;
  margin-right: auto;
}

.hero__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: var(--space-sm) var(--space-xl);
  background-color: var(--landing-accent);
  color: white;
  font-family: var(--font-body);
  font-size: 1.125rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.3);
  transition: all var(--duration-fast) var(--ease-out);
}

.hero__cta:hover {
  background-color: var(--landing-accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(15, 118, 110, 0.4);
}

.hero__cta:focus-visible {
  outline: 2px solid var(--landing-accent);
  outline-offset: 4px;
}

.hero__cta:active {
  transform: scale(0.98);
}

/* ========================================
   SECTION BASE STYLES
   ======================================== */

.section {
  padding: var(--space-2xl) var(--container-padding);
}

.section__container {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.section__title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--landing-text);
  margin-bottom: var(--space-md);
}

.section__description {
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--landing-secondary);
  max-width: 540px;
  margin: 0 auto var(--space-lg);
}

.section__description--emphasis {
  color: var(--landing-text);
  font-weight: 500;
}

/* ========================================
   HOW IT WORKS - CHAIN EXAMPLE
   ======================================== */

.chain-example {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  margin: var(--space-lg) 0;
  padding: var(--space-md);
  flex-wrap: wrap;
}

.chain-example__slot {
  padding: var(--space-sm) var(--space-md);
  background-color: white;
  border: 2px solid var(--landing-accent);
  border-radius: var(--border-radius-sm);
  min-width: 80px;
}

.chain-example__word {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--landing-text);
}

.chain-example__arrow {
  font-size: 1.25rem;
  color: var(--landing-accent);
  font-weight: 600;
}

.chain-example__caption {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--landing-secondary);
  font-style: italic;
}

/* ========================================
   WHY PLAYERS LOVE IT - PILLARS
   ======================================== */

.pillars {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-xl);
  margin-top: var(--space-lg);
}

.pillar {
  text-align: center;
}

.pillar__icon {
  font-size: 2rem;
  margin-bottom: var(--space-sm);
  display: block;
}

.pillar__title {
  font-family: var(--font-body);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--landing-text);
  margin-bottom: var(--space-xs);
}

.pillar__description {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--landing-secondary);
  line-height: 1.5;
}

/* ========================================
   SEE IT IN ACTION - GAME DEMO
   ======================================== */

.game-demo {
  max-width: 360px;
  margin: var(--space-lg) auto 0;
  padding: var(--space-md);
  background: white;
  border-radius: var(--border-radius-lg);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.demo-chain {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  margin-bottom: var(--space-md);
}

.demo-slot {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--border-radius-sm);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  transition: all var(--duration-normal) var(--ease-out);
}

.demo-slot--prefilled {
  background-color: var(--color-gray-100);
  border: 2px solid var(--color-gray-400);
  color: var(--color-gray-600);
}

.demo-slot--fillable {
  background-color: white;
  border: 2px dashed var(--color-gray-300);
  color: var(--landing-text);
}

.demo-slot--filled {
  border: 2px solid var(--landing-accent);
  border-style: solid;
}

.demo-slot--success {
  background-color: var(--color-success-bg);
  border: 2px solid var(--color-success);
}

.demo-bank {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xs);
}

.demo-word {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: var(--space-xs);
  background-color: white;
  border: 2px solid var(--color-gray-200);
  border-radius: var(--border-radius-sm);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--landing-text);
  transition: all var(--duration-normal) var(--ease-out);
}

.demo-word--used {
  opacity: 0.4;
  background-color: var(--color-gray-50);
}

.demo-word--decoy-revealed {
  opacity: 0.3;
  text-decoration: line-through;
  background-color: var(--color-error-bg);
  border-color: var(--color-error-border);
}

/* ========================================
   GAME DEMO ANIMATION
   ======================================== */

/* Animation sequence: 6s total loop */
/* 0-1s: Static initial state */
/* 1-1.5s: FLOWER moves to slot 2 */
/* 2-2.5s: POT moves to slot 3 */
/* 3-3.5s: LUCK moves to slot 4 */
/* 4-5s: Success state */
/* 5-6s: Reset to initial */

.demo-slot--fillable[data-word="FLOWER"] .demo-slot__word {
  animation: fillSlot1 6s ease-in-out infinite;
}

.demo-slot--fillable[data-word="POT"] .demo-slot__word {
  animation: fillSlot2 6s ease-in-out infinite;
}

.demo-slot--fillable[data-word="HOLE"] .demo-slot__word {
  animation: fillSlot3 6s ease-in-out infinite;
}

.demo-slot--fillable[data-word="FLOWER"] {
  animation: slotBorder1 6s ease-in-out infinite;
}

.demo-slot--fillable[data-word="POT"] {
  animation: slotBorder2 6s ease-in-out infinite;
}

.demo-slot--fillable[data-word="HOLE"] {
  animation: slotBorder3 6s ease-in-out infinite;
}

.demo-word[data-word="FLOWER"] {
  animation: wordFade1 6s ease-in-out infinite;
}

.demo-word[data-word="POT"] {
  animation: wordFade2 6s ease-in-out infinite;
}

.demo-word[data-word="HOLE"] {
  animation: wordFade3 6s ease-in-out infinite;
}

.demo-word--decoy {
  animation: decoyFade 6s ease-in-out infinite;
}

/* Slot content animations */
@keyframes fillSlot1 {
  0%, 16% { content: ''; }
  17%, 83% { content: 'FLOWER'; }
  84%, 100% { content: ''; }
}

@keyframes fillSlot2 {
  0%, 33% { content: ''; }
  34%, 83% { content: 'POT'; }
  84%, 100% { content: ''; }
}

@keyframes fillSlot3 {
  0%, 50% { content: ''; }
  51%, 83% { content: 'HOLE'; }
  84%, 100% { content: ''; }
}

/* Slot border animations */
@keyframes slotBorder1 {
  0%, 16% {
    border-style: dashed;
    border-color: var(--color-gray-300);
    background-color: white;
  }
  17%, 66% {
    border-style: solid;
    border-color: var(--landing-accent);
    background-color: white;
  }
  67%, 83% {
    border-style: solid;
    border-color: var(--color-success);
    background-color: var(--color-success-bg);
  }
  84%, 100% {
    border-style: dashed;
    border-color: var(--color-gray-300);
    background-color: white;
  }
}

@keyframes slotBorder2 {
  0%, 33% {
    border-style: dashed;
    border-color: var(--color-gray-300);
    background-color: white;
  }
  34%, 66% {
    border-style: solid;
    border-color: var(--landing-accent);
    background-color: white;
  }
  67%, 83% {
    border-style: solid;
    border-color: var(--color-success);
    background-color: var(--color-success-bg);
  }
  84%, 100% {
    border-style: dashed;
    border-color: var(--color-gray-300);
    background-color: white;
  }
}

@keyframes slotBorder3 {
  0%, 50% {
    border-style: dashed;
    border-color: var(--color-gray-300);
    background-color: white;
  }
  51%, 66% {
    border-style: solid;
    border-color: var(--landing-accent);
    background-color: white;
  }
  67%, 83% {
    border-style: solid;
    border-color: var(--color-success);
    background-color: var(--color-success-bg);
  }
  84%, 100% {
    border-style: dashed;
    border-color: var(--color-gray-300);
    background-color: white;
  }
}

/* Word bank fade animations */
@keyframes wordFade1 {
  0%, 16% { opacity: 1; }
  17%, 83% { opacity: 0.4; background-color: var(--color-gray-50); }
  84%, 100% { opacity: 1; background-color: white; }
}

@keyframes wordFade2 {
  0%, 33% { opacity: 1; }
  34%, 83% { opacity: 0.4; background-color: var(--color-gray-50); }
  84%, 100% { opacity: 1; background-color: white; }
}

@keyframes wordFade3 {
  0%, 50% { opacity: 1; }
  51%, 83% { opacity: 0.4; background-color: var(--color-gray-50); }
  84%, 100% { opacity: 1; background-color: white; }
}

@keyframes decoyFade {
  0%, 66% { opacity: 1; }
  67%, 83% {
    opacity: 0.3;
    text-decoration: line-through;
    background-color: var(--color-error-bg);
    border-color: var(--color-error-border);
  }
  84%, 100% { opacity: 1; text-decoration: none; background-color: white; border-color: var(--color-gray-200); }
}

/* Pseudo-element for slot text content */
.demo-slot--fillable[data-word="FLOWER"]::after {
  content: '';
  animation: slotText1 6s ease-in-out infinite;
}

.demo-slot--fillable[data-word="POT"]::after {
  content: '';
  animation: slotText2 6s ease-in-out infinite;
}

.demo-slot--fillable[data-word="HOLE"]::after {
  content: '';
  animation: slotText3 6s ease-in-out infinite;
}

@keyframes slotText1 {
  0%, 16% { content: ''; }
  17%, 83% { content: 'FLOWER'; }
  84%, 100% { content: ''; }
}

@keyframes slotText2 {
  0%, 33% { content: ''; }
  34%, 83% { content: 'POT'; }
  84%, 100% { content: ''; }
}

@keyframes slotText3 {
  0%, 50% { content: ''; }
  51%, 83% { content: 'HOLE'; }
  84%, 100% { content: ''; }
}

/* ========================================
   COMPARISON SECTION
   ======================================== */

.section--comparison {
  background-color: white;
}

.section--comparison .section__title {
  font-size: 1.75rem;
}

.section--comparison .section__description {
  max-width: 480px;
}

/* ========================================
   FAQ SECTION
   ======================================== */

.section--faq {
  background-color: var(--landing-bg);
}

.section--faq .section__container {
  max-width: 640px;
  text-align: left;
}

.section--faq .section__title {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.faq-item {
  border-bottom: 1px solid var(--color-gray-200);
  padding: var(--space-md) 0;
}

.faq-item:first-child {
  border-top: 1px solid var(--color-gray-200);
}

.faq-item__question {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.faq-item__question::-webkit-details-marker {
  display: none;
}

.faq-item__question::after {
  content: '+';
  font-family: var(--font-body);
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--landing-secondary);
  flex-shrink: 0;
  margin-left: var(--space-md);
  transition: transform var(--duration-fast) var(--ease-out);
}

.faq-item[open] .faq-item__question::after {
  content: '\2212';
}

.faq-item__question h3 {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--landing-text);
  line-height: 1.4;
  margin: 0;
}

.faq-item__answer {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--landing-secondary);
  line-height: 1.6;
  margin-top: var(--space-sm);
  padding-right: var(--space-xl);
}

.faq-item__question:focus-visible {
  outline: 2px solid var(--landing-accent);
  outline-offset: 4px;
  border-radius: 4px;
}

/* ========================================
   ABOUT SECTION
   ======================================== */

.section--about {
  padding-top: var(--space-xl);
  padding-bottom: var(--space-xl);
}

.section--about .section__container {
  max-width: 520px;
  text-align: center;
}

.about__label {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--landing-secondary);
  margin-bottom: var(--space-md);
}

.about__text {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--landing-text);
}

.about__link {
  color: var(--landing-accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color var(--duration-fast) var(--ease-out);
}

.about__link:hover {
  border-bottom-color: var(--landing-accent);
}

.about__link:focus-visible {
  outline: 2px solid var(--landing-accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* ========================================
   FOOTER CTA SECTION
   ======================================== */

.footer-cta {
  background-color: var(--landing-accent);
  padding: var(--space-2xl) var(--container-padding);
  text-align: center;
}

.footer-cta__container {
  max-width: 600px;
  margin: 0 auto;
}

.footer-cta__title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.2;
  color: white;
  margin-bottom: var(--space-md);
}

.footer-cta__description {
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: var(--space-lg);
}

.footer-cta__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: var(--space-sm) var(--space-xl);
  background-color: white;
  color: var(--landing-accent);
  font-family: var(--font-body);
  font-size: 1.125rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 12px;
  transition: all var(--duration-fast) var(--ease-out);
}

.footer-cta__button:hover {
  background-color: var(--landing-bg);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.footer-cta__button:focus-visible {
  outline: 2px solid white;
  outline-offset: 4px;
}

.footer-cta__button:active {
  transform: scale(0.98);
}

/* ========================================
   RESPONSIVE - TABLET (768px+)
   ======================================== */

@media (min-width: 768px) {
  .hero {
    padding: 15vh var(--space-lg) 10vh;
  }

  .hero__title {
    font-size: 4rem;
  }

  .hero__subtitle {
    font-size: 1.25rem;
  }

  .section {
    padding: 4rem var(--space-lg);
  }

  .section__title {
    font-size: 2.5rem;
  }

  .pillars {
    grid-template-columns: repeat(2, 1fr);
  }

  .chain-example {
    flex-wrap: nowrap;
  }

  .chain-example__slot {
    min-width: 100px;
  }

  .chain-example__word {
    font-size: 1.125rem;
  }

  .game-demo {
    max-width: 400px;
  }

  .footer-cta__title {
    font-size: 2.5rem;
  }
}

/* ========================================
   RESPONSIVE - DESKTOP (1024px+)
   ======================================== */

@media (min-width: 1024px) {
  .hero__title {
    font-size: 6rem;
  }

  .pillars {
    grid-template-columns: repeat(3, 1fr);
  }

  .section__container {
    max-width: 1000px;
  }

  .section--pillars .section__container {
    max-width: 900px;
  }
}

/* ========================================
   ACCESSIBILITY - REDUCED MOTION
   ======================================== */

@media (prefers-reduced-motion: reduce) {
  .demo-slot--fillable[data-word="FLOWER"]::after,
  .demo-slot--fillable[data-word="POT"]::after,
  .demo-slot--fillable[data-word="LUCK"]::after {
    animation: none;
  }

  .demo-slot--fillable[data-word="FLOWER"],
  .demo-slot--fillable[data-word="POT"],
  .demo-slot--fillable[data-word="LUCK"] {
    animation: none;
    border-style: solid;
    border-color: var(--color-success);
    background-color: var(--color-success-bg);
  }

  .demo-slot--fillable[data-word="FLOWER"]::after {
    content: 'FLOWER';
  }

  .demo-slot--fillable[data-word="POT"]::after {
    content: 'POT';
  }

  .demo-slot--fillable[data-word="HOLE"]::after {
    content: 'HOLE';
  }

  .demo-word[data-word="FLOWER"],
  .demo-word[data-word="POT"],
  .demo-word[data-word="HOLE"] {
    animation: none;
    opacity: 0.4;
    background-color: var(--color-gray-50);
  }

  .demo-word--decoy {
    animation: none;
    opacity: 0.3;
    text-decoration: line-through;
    background-color: var(--color-error-bg);
    border-color: var(--color-error-border);
  }

  .hero__cta:hover,
  .footer-cta__button:hover {
    transform: none;
  }
}
