/* ============================================================
   YUNI — Dark Cinema Design System
   ============================================================ */

:root {
  --bg-primary: #000000;
  --bg-elevated: #0a0a0f;
  --bg-card: #111118;
  --text-primary: #f5f5f7;
  --text-secondary: #86868b;
  --text-tertiary: #6e6e73;
  --accent-blue: #4685FF;
  --gradient-start: #667eea;
  --gradient-end: #e85d9b;
  --phase-menstruation: #C46B6B;
  --phase-follicular: #5AA882;
  --phase-ovulation: #FFD700;
  --phase-luteal: #8B6FB8;
  --phase-pms: #FFA500;
  --section-padding: clamp(80px, 12vh, 160px);
  --content-max: 1080px;
  --content-narrow: 720px;
}

/* ============================================================
   Reset
   ============================================================ */

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

/* ============================================================
   Base
   ============================================================ */

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
}

a {
  text-decoration: none;
}

button {
  cursor: pointer;
  font-family: inherit;
}

/* ============================================================
   Nav
   ============================================================ */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition: background 0.3s ease, border-color 0.3s ease, backdrop-filter 0.3s ease;
}

.nav--scrolled {
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 4vw, 48px);
  height: 48px;
}

.nav-logo img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.lang-toggle {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 2px;
}

.lang-btn {
  padding: 4px 12px;
  border-radius: 18px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  transition: background 0.2s ease, color 0.2s ease;
}

.lang-btn.active {
  background: rgba(255, 255, 255, 0.15);
  color: var(--text-primary);
}

/* ============================================================
   Hero
   ============================================================ */

.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  position: relative;
  overflow: hidden;
}

.hero h1 {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(36px, 7vw, 72px);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
  max-width: 600px;
  margin-bottom: 16px;
}

.hero-sub {
  font-size: clamp(16px, 2.2vw, 20px);
  color: var(--text-secondary);
  max-width: 440px;
  margin-bottom: 48px;
  line-height: 1.5;
}

.hero-device {
  position: relative;
  margin-bottom: 48px;
}

.device-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 400px;
  height: 400px;
  background: radial-gradient(ellipse, var(--gradient-start) 0%, var(--gradient-end) 50%, transparent 70%);
  opacity: 0.3;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

.hero-device img,
.hero-device video {
  position: relative;
  z-index: 1;
  max-height: 480px;
  width: auto;
  border-radius: 24px;
  filter: drop-shadow(0 20px 60px rgba(0, 0, 0, 0.5));
}

.app-store-badge {
  display: inline-block;
  transition: opacity 0.2s;
}

.app-store-badge:hover {
  opacity: 0.8;
}

.app-store-badge img {
  height: 48px;
}

/* Hero entrance animations */

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

.hero h1,
.hero-sub,
.hero-device,
.hero .app-store-badge {
  opacity: 0;
}

.hero--visible h1 {
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.1s forwards;
}

.hero--visible .hero-sub {
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
}

.hero--visible .hero-device {
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.5s forwards;
}

.hero--visible .app-store-badge {
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.7s forwards;
}

/* ============================================================
   Content Sections — General
   ============================================================ */

.how-it-works,
.modes,
.showcase,
.everywhere,
.cta {
  padding: var(--section-padding) 24px;
  max-width: var(--content-max);
  margin: 0 auto;
}

/* ============================================================
   How It Works
   ============================================================ */

.section-label {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-tertiary);
  text-align: center;
  margin-bottom: 48px;
}

.steps {
  max-width: var(--content-narrow);
  margin: 0 auto;
}

.step {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.step:last-child {
  border-bottom: none;
}

.step-number {
  font-size: 48px;
  font-weight: 600;
  color: var(--text-tertiary);
  opacity: 0.5;
  font-family: "Instrument Serif", Georgia, serif;
  line-height: 1;
  min-width: 48px;
  text-align: center;
}

.step-text {
  font-size: 20px;
  color: var(--text-primary);
  flex: 1;
}

/* ============================================================
   5 Modes
   ============================================================ */

.section-heading {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 400;
  text-align: center;
  margin-bottom: 12px;
  line-height: 1.15;
}

.section-sub {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 48px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.5;
}

.modes-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.mode-card {
  background: var(--bg-card);
  border-radius: 20px;
  padding: 28px 20px;
  text-align: center;
  transition: box-shadow 0.4s ease, transform 0.4s ease;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.mode-emoji {
  font-size: 36px;
  margin-bottom: 12px;
  display: block;
}

.mode-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.mode-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.mode-card[data-phase="menstruation"]:hover {
  box-shadow: 0 0 40px rgba(196, 107, 107, 0.3);
  transform: translateY(-4px);
}

.mode-card[data-phase="follicular"]:hover {
  box-shadow: 0 0 40px rgba(90, 168, 130, 0.3);
  transform: translateY(-4px);
}

.mode-card[data-phase="ovulation"]:hover {
  box-shadow: 0 0 40px rgba(255, 215, 0, 0.3);
  transform: translateY(-4px);
}

.mode-card[data-phase="luteal"]:hover {
  box-shadow: 0 0 40px rgba(139, 111, 184, 0.3);
  transform: translateY(-4px);
}

.mode-card[data-phase="pms"]:hover {
  box-shadow: 0 0 40px rgba(255, 165, 0, 0.3);
  transform: translateY(-4px);
}

/* ============================================================
   Product Showcase
   ============================================================ */

.showcase-caption {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 400;
  text-align: center;
  margin-bottom: 48px;
  line-height: 1.15;
}

.showcase-devices {
  display: flex;
  justify-content: center;
  gap: 32px;
  align-items: center;
}

.showcase-devices img {
  max-height: 420px;
  width: auto;
  border-radius: 24px;
  filter: drop-shadow(0 16px 48px rgba(0, 0, 0, 0.4));
}

.showcase-devices img:first-child {
  transform: perspective(1200px) rotateY(3deg);
}

.showcase-devices img:last-child {
  transform: perspective(1200px) rotateY(-3deg);
}

/* ============================================================
   Everywhere
   ============================================================ */

.everywhere-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  max-width: 800px;
  margin: 0 auto;
}

.everywhere-grid img {
  width: 100%;
  border-radius: 20px;
  filter: drop-shadow(0 8px 32px rgba(0, 0, 0, 0.3));
}

/* ============================================================
   Privacy
   ============================================================ */

.privacy-wrapper {
  background: var(--bg-elevated);
  width: 100%;
}

.privacy {
  text-align: center;
  padding: var(--section-padding) 24px;
  max-width: var(--content-max);
  margin: 0 auto;
}

.privacy-icon-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.privacy-glow {
  position: absolute;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, var(--accent-blue) 0%, transparent 70%);
  opacity: 0.2;
  filter: blur(40px);
  animation: pulse 3s ease-in-out infinite;
  pointer-events: none;
}

@keyframes pulse {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 0.35; }
}

.privacy-icon {
  font-size: 48px;
  position: relative;
  z-index: 1;
}

.privacy-text {
  font-size: clamp(18px, 3vw, 24px);
  color: var(--text-primary);
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ============================================================
   CTA
   ============================================================ */

.cta {
  text-align: center;
}

.cta-icon-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0;
}

.cta-glow {
  position: absolute;
  width: 200px;
  height: 200px;
  background: radial-gradient(ellipse, var(--gradient-start) 0%, var(--gradient-end) 50%, transparent 70%);
  opacity: 0.25;
  filter: blur(60px);
  pointer-events: none;
}

.cta-icon-wrap img {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  position: relative;
  z-index: 1;
}

.cta-tagline {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 400;
  margin: 24px 0 32px;
  line-height: 1.2;
}

/* ============================================================
   Footer
   ============================================================ */

.footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 32px 24px;
  text-align: center;
}

.footer-links {
  margin-bottom: 12px;
}

.footer-links a {
  color: var(--text-tertiary);
  font-size: 13px;
  text-decoration: none;
  margin: 0 16px;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--text-secondary);
}

.footer-copy {
  color: var(--text-tertiary);
  font-size: 13px;
}

/* ============================================================
   Scroll reveal
   ============================================================ */

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal--visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   Reduced motion
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
  .hero h1,
  .hero-sub,
  .hero-device,
  .hero .app-store-badge {
    opacity: 1;
  }
}

/* ============================================================
   Responsive — Tablet (max-width: 768px)
   ============================================================ */

@media (max-width: 768px) {
  .modes-grid {
    grid-template-columns: repeat(5, 240px);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .modes-grid::-webkit-scrollbar {
    display: none;
  }

  .mode-card {
    scroll-snap-align: start;
  }

  .showcase-devices {
    flex-direction: column;
    gap: 24px;
  }

  .showcase-devices img {
    transform: none !important;
    max-height: 360px;
  }

  .everywhere-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
  }

  .hero-device img,
  .hero-device video {
    max-height: 400px;
  }
}

/* ============================================================
   Responsive — Small mobile (max-width: 480px)
   ============================================================ */

@media (max-width: 480px) {
  :root {
    --section-padding: clamp(60px, 10vh, 120px);
  }

  .modes-grid {
    grid-template-columns: repeat(5, 200px);
  }

  .hero {
    padding: 100px 20px 60px;
  }

  .hero-device img,
  .hero-device video {
    max-height: 340px;
  }

  .step-number {
    font-size: 36px;
  }

  .step-text {
    font-size: 18px;
  }
}

/* ============================================================
   Setup fallback
   ============================================================ */

.setup-fallback {
  text-align: center;
  padding: 120px 24px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.setup-fallback h1 {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 12px;
}

.setup-fallback p {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 32px;
}
