/* ============================================
   WHYKI LANDING PAGE
   Minimalist B&W — Inspired by sf portfolio
   ============================================ */

/* --- Variables --- */
:root {
  --black: #000000;
  --white: #ffffff;
  --bg: #edeced;
  --gray: #666666;
  --card-bg: #ffffff;
  --radius: 16px;
  --transition: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

body.dark {
  --black: #ffffff;
  --white: #000000;
  --bg: #0a0a0a;
  --gray: #999999;
  --card-bg: #141414;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Montserrat', sans-serif;
  font-weight: 300;
  background: var(--bg);
  color: var(--black);
  overflow-x: hidden;
  transition: background var(--transition), color var(--transition);
  line-height: 1.6;
}

a {
  color: var(--black);
  text-decoration: none;
  transition: opacity 0.3s;
}

a:hover {
  opacity: 0.7;
}

img {
  max-width: 100%;
  height: auto;
}

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

/* --- Preloader --- */
#preloader {
  position: fixed;
  inset: 0;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.6s, visibility 0.6s;
}

#preloader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-spiral svg {
  animation: preloaderSpin 2s linear infinite;
}

.spiral-path {
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
  animation: spiralDraw 2s ease-in-out infinite;
}

@keyframes preloaderSpin {
  to { transform: rotate(360deg); }
}

@keyframes spiralDraw {
  0% { stroke-dashoffset: 600; }
  50% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -600; }
}

.preloader-text {
  margin-top: 16px;
  font-size: 1.2rem;
  font-weight: 400;
  letter-spacing: 4px;
  text-transform: lowercase;
  opacity: 0;
  animation: fadeIn 0.8s ease 0.5s forwards;
}

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

/* --- Navbar --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 24px;
  transition: transform 0.4s ease, background 0.3s;
}

.navbar.scrolled {
  background: rgba(237, 236, 237, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

body.dark .navbar.scrolled {
  background: rgba(10, 10, 10, 0.85);
}

.navbar.hidden {
  transform: translateY(-100%);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  font-size: 1.1rem;
  letter-spacing: 1px;
}

.logo-img {
  width: 36px;
  height: 36px;
  transition: transform 0.3s;
}

.nav-logo:hover .logo-img {
  transform: rotate(-10deg);
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 400;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--black);
  transition: width 0.3s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-links a:hover {
  opacity: 1;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-toggle,
.lang-toggle {
  background: none;
  border: 1.5px solid var(--black);
  color: var(--black);
  cursor: pointer;
  border-radius: 50px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  transition: background var(--transition), color var(--transition);
}

.theme-toggle {
  width: 40px;
  height: 40px;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lang-toggle {
  padding: 6px 14px;
  font-size: 0.8rem;
  letter-spacing: 1px;
}

.theme-toggle:hover,
.lang-toggle:hover {
  background: var(--black);
  color: var(--bg);
}

/* Burger */
.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--black);
  transition: transform 0.3s, opacity 0.3s;
}

.burger.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.burger.active span:nth-child(2) {
  opacity: 0;
}
.burger.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 99;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s, visibility 0.4s;
}

.mobile-menu.active {
  opacity: 1;
  visibility: visible;
}

.mobile-menu a {
  font-size: 2rem;
  font-weight: 400;
  opacity: 0;
  transform: translateY(20px);
}

.mobile-menu.active a {
  animation: menuItemIn 0.4s ease forwards;
}

.mobile-menu.active a:nth-child(1) { animation-delay: 0.1s; }
.mobile-menu.active a:nth-child(2) { animation-delay: 0.2s; }
.mobile-menu.active a:nth-child(3) { animation-delay: 0.3s; }
.mobile-menu.active a:nth-child(4) { animation-delay: 0.4s; }

@keyframes menuItemIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Hero --- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 80px;
  padding: 120px 24px 80px;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

.hero-content {
  flex: 1;
  max-width: 560px;
}

.hero-badge {
  display: inline-block;
  padding: 8px 20px;
  border: 1.5px solid var(--black);
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.5px;
  margin-bottom: 32px;
}

.hero-title {
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  font-weight: 400;
  line-height: 1.1;
  margin-bottom: 24px;
  min-height: 1.2em;
}

.typewriter {
  display: inline;
  border-right: 2px solid var(--black);
  animation: blink 0.7s step-end infinite;
}

@keyframes blink {
  50% { border-color: transparent; }
}

.hero-subtitle {
  font-size: 1.15rem;
  font-weight: 300;
  color: var(--gray);
  line-height: 1.7;
  margin-bottom: 40px;
}

.fade-in {
  opacity: 0;
  animation: fadeInUp 1s ease forwards;
  animation-delay: 3s;
}

.fade-in-right {
  opacity: 0;
  animation: fadeInRight 1s ease forwards;
  animation-delay: 3.2s;
}

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

@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.primary-button {
  display: inline-block;
  padding: 16px 36px;
  background: var(--black);
  color: var(--bg);
  font-family: 'Montserrat', sans-serif;
  font-weight: 500;
  font-size: 0.95rem;
  border-radius: 50px;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s;
}

.primary-button:hover {
  opacity: 1;
  transform: scale(1.03);
}

.secondary-button {
  display: inline-flex;
  align-items: center;
  padding: 16px 36px;
  border: 1.5px solid var(--black);
  border-radius: 50px;
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  overflow: hidden;
  transition: background 0.3s, color 0.3s;
}

.secondary-button:hover {
  background: var(--black);
  color: var(--bg);
  opacity: 1;
}

/* Phone Mockup */
.hero-phone {
  flex-shrink: 0;
}

.phone-frame {
  width: 280px;
  height: 560px;
  background: var(--card-bg);
  border: 2px solid var(--black);
  border-radius: 40px;
  padding: 12px;
  position: relative;
  box-shadow: 8px 8px 0 var(--black);
  transition: box-shadow var(--transition), background var(--transition);
}

.phone-frame:hover {
  box-shadow: 12px 12px 0 var(--black);
}

.phone-notch {
  width: 120px;
  height: 28px;
  background: var(--black);
  border-radius: 0 0 20px 20px;
  margin: 0 auto 16px;
}

.phone-screen {
  padding: 8px 16px;
}

.mock-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  font-size: 0.75rem;
  font-weight: 500;
}

.mock-card {
  border: 2px solid var(--black);
  border-radius: 16px;
  padding: 24px 16px;
  text-align: center;
  margin-bottom: 20px;
  position: relative;
}

.mock-card-border {
  position: absolute;
  inset: -6px;
  border: 1px dashed var(--gray);
  border-radius: 20px;
  opacity: 0.4;
}

.mock-quote {
  font-size: 0.85rem;
  font-weight: 400;
  line-height: 1.5;
  margin-bottom: 12px;
  font-style: italic;
}

.mock-author {
  font-size: 0.7rem;
  color: var(--gray);
  font-weight: 500;
}

.mock-actions {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 20px;
}

.mock-btn {
  width: 40px;
  height: 40px;
  border: 1.5px solid var(--black);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

.mock-star {
  background: var(--black);
  color: var(--bg);
}

.mock-topics {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.mock-chip {
  padding: 4px 12px;
  border: 1px solid var(--black);
  border-radius: 20px;
  font-size: 0.65rem;
  font-weight: 500;
}

.mock-chip.active {
  background: var(--black);
  color: var(--bg);
}

/* Scroll indicator */
.hero-scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
}

.scroll-line {
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, var(--black), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
  50% { opacity: 1; transform: scaleY(1); }
}

/* --- Marquee --- */
.marquee-section {
  padding: 40px 0;
  border-top: 1px solid var(--black);
  border-bottom: 1px solid var(--black);
  overflow: hidden;
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 30s linear infinite;
}

.marquee-content {
  display: flex;
  gap: 32px;
  align-items: center;
  padding-right: 32px;
  font-size: 1.3rem;
  font-weight: 300;
  letter-spacing: 2px;
  text-transform: uppercase;
  white-space: nowrap;
}

@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* --- Section Titles --- */
.section-title {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 400;
  text-align: center;
  margin-bottom: 16px;
}

.section-subtitle {
  text-align: center;
  color: var(--gray);
  font-size: 1.1rem;
  font-weight: 300;
  margin-bottom: 60px;
}

/* --- Features --- */
.features {
  padding: 120px 0;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  padding: 40px 32px;
  border: 1.5px solid var(--black);
  border-radius: var(--radius);
  background: var(--card-bg);
  transition: transform 0.3s, box-shadow 0.3s, background 0.3s, color 0.3s;
  cursor: default;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 6px 6px 0 var(--black);
  background: var(--black);
  color: var(--bg);
}

.feature-card:hover .feature-icon {
  color: var(--bg);
}

.feature-card:hover p {
  color: var(--bg);
  opacity: 0.8;
}

.feature-icon {
  margin-bottom: 20px;
  color: var(--black);
  transition: color 0.3s;
}

.feature-card h3 {
  font-size: 1.2rem;
  font-weight: 500;
  margin-bottom: 12px;
}

.feature-card p {
  color: var(--gray);
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 1.6;
  transition: color 0.3s, opacity 0.3s;
}

/* --- Scatter Text (horizontal reveal) --- */
.scatter-section {
  height: 300vh;
  position: relative;
}

.scatter-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.scatter-container {
  max-width: 800px;
  text-align: left;
  padding: 0 24px;
}

.scatter-word {
  display: inline;
  font-size: clamp(1.6rem, 3.5vw, 2.6rem);
  font-weight: 300;
  line-height: 1.7;
  color: var(--black);
  opacity: 0;
  transition: opacity 0.2s ease;
}

/* --- Topics --- */
.topics {
  padding: 120px 0;
}

.topics-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  max-width: 900px;
  margin: 0 auto;
}

.topic-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border: 1.5px solid var(--black);
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 400;
  cursor: default;
  transition: transform 0.3s, box-shadow 0.3s, background 0.3s, color 0.3s;
}

.topic-pill:hover {
  background: var(--black);
  color: var(--bg);
  transform: translateY(-2px);
  box-shadow: 4px 4px 0 var(--gray);
}

.topic-emoji {
  font-size: 1.3rem;
}

/* --- Games --- */
.games {
  padding: 120px 0;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.game-card {
  padding: 40px 32px;
  border: 1.5px solid var(--black);
  border-radius: var(--radius);
  background: var(--card-bg);
  transition: transform 0.3s, box-shadow 0.3s;
  cursor: default;
  position: relative;
  overflow: hidden;
}

.game-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--black);
  transition: left 0.4s ease;
  z-index: 0;
}

.game-card:hover::before {
  left: 0;
}

.game-card:hover {
  transform: translateY(-4px);
  box-shadow: 6px 6px 0 var(--black);
  color: var(--bg);
}

.game-card > * {
  position: relative;
  z-index: 1;
}

.game-number {
  font-size: 3rem;
  font-weight: 100;
  opacity: 0.15;
  margin-bottom: 8px;
  line-height: 1;
  transition: opacity 0.3s;
}

.game-card:hover .game-number {
  opacity: 0.3;
}

.game-card h3 {
  font-size: 1.15rem;
  font-weight: 500;
  margin-bottom: 10px;
}

.game-card p {
  color: var(--gray);
  font-size: 0.9rem;
  font-weight: 300;
  line-height: 1.5;
  transition: color 0.3s;
}

.game-card:hover p {
  color: var(--bg);
  opacity: 0.8;
}

/* --- How It Works --- */
.how-it-works {
  padding: 120px 0;
}

.steps {
  max-width: 600px;
  margin: 60px auto 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.step {
  display: flex;
  align-items: center;
  gap: 24px;
  width: 100%;
}

.step-number {
  width: 64px;
  height: 64px;
  border: 2px solid var(--black);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 400;
  flex-shrink: 0;
  transition: background 0.3s, color 0.3s;
}

.step:hover .step-number {
  background: var(--black);
  color: var(--bg);
}

.step-content h3 {
  font-size: 1.2rem;
  font-weight: 500;
  margin-bottom: 4px;
}

.step-content p {
  color: var(--gray);
  font-size: 0.9rem;
  font-weight: 300;
}

.step-line {
  width: 2px;
  height: 48px;
  background: var(--black);
  margin: 0 0 0 31px;
  opacity: 0.2;
}

/* --- Stats --- */
.stats-section {
  padding: 80px 0;
  border-top: 1px solid var(--black);
  border-bottom: 1px solid var(--black);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}

.stat-number {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 400;
  display: inline;
}

.stat-plus {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 300;
}

.stat-label {
  display: block;
  color: var(--gray);
  font-size: 0.9rem;
  font-weight: 400;
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* --- Download --- */
.download {
  padding: 140px 0;
}

.download-content {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.download-logo {
  width: 80px;
  height: 80px;
  margin-bottom: 32px;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.download h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  margin-bottom: 16px;
}

.download p {
  color: var(--gray);
  font-size: 1.05rem;
  font-weight: 300;
  margin-bottom: 40px;
  line-height: 1.7;
}

.download-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.store-button {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 28px;
  border: 1.5px solid var(--black);
  border-radius: 14px;
  transition: background 0.3s, color 0.3s, transform 0.3s;
}

.store-button:hover {
  background: var(--black);
  color: var(--bg);
  opacity: 1;
  transform: translateY(-2px);
}

.store-button small {
  display: block;
  font-size: 0.65rem;
  font-weight: 400;
  opacity: 0.7;
}

.store-button strong {
  font-size: 1rem;
  font-weight: 600;
}

/* --- Footer --- */
.footer {
  padding: 48px 0;
  border-top: 1px solid var(--black);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  font-size: 1.1rem;
}

.footer-links {
  display: flex;
  gap: 32px;
}

.footer-links a {
  font-size: 0.85rem;
  font-weight: 400;
  position: relative;
}

.footer-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--black);
  transition: width 0.3s;
}

.footer-links a:hover::after {
  width: 100%;
}

.footer-links a:hover {
  opacity: 1;
}

.footer-copy {
  font-size: 0.8rem;
  color: var(--gray);
  font-weight: 300;
}

.footer-credit {
  font-size: 0.75rem;
  color: var(--gray);
  font-weight: 300;
  margin-top: 8px;
}

.footer-credit a {
  color: var(--white);
  text-decoration: none;
  font-weight: 500;
  transition: opacity 0.3s;
}

.footer-credit a:hover {
  opacity: 0.7;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .hero {
    flex-direction: column;
    gap: 48px;
    text-align: center;
    padding-top: 140px;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero-buttons {
    justify-content: center;
  }

  .hero-scroll-indicator {
    display: none;
  }

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

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .burger {
    display: flex;
  }

  .hero-title {
    font-size: clamp(2.2rem, 8vw, 3rem);
  }

  .phone-frame {
    width: 240px;
    height: 480px;
  }

  .features-grid,
  .games-grid {
    grid-template-columns: 1fr;
  }

  .feature-card,
  .game-card {
    padding: 32px 24px;
  }

  .download-buttons {
    flex-direction: column;
    align-items: center;
  }

  .footer-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
  }

  .marquee-content {
    font-size: 1rem;
  }

  .scatter-word {
    font-size: 1.3rem !important;
  }
}

@media (max-width: 480px) {
  .hero {
    padding-top: 120px;
    padding-bottom: 60px;
  }

  .hero-badge {
    font-size: 0.7rem;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }

  .step {
    gap: 16px;
  }

  .step-number {
    width: 48px;
    height: 48px;
    font-size: 1.2rem;
  }
}

/* --- Selection color --- */
::selection {
  background: var(--black);
  color: var(--bg);
}

/* --- Smooth transitions for theme --- */
.feature-card,
.game-card,
.topic-pill,
.phone-frame,
.store-button,
.step-number,
.hero-badge,
.primary-button,
.secondary-button {
  transition: transform 0.3s, box-shadow 0.3s, background 0.3s, color 0.3s, border-color 0.3s;
}
