/* ===== Custom Properties ===== */
:root {
  --bg-primary: #0A0A0C;
  --bg-card: #1C1C1E;
  --bg-card-hover: #2A2A2E;
  --bg-header: rgba(10, 10, 12, 0.8);
  --text-primary: #FFFFFF;
  --text-secondary: #8E8E93;
  --text-tertiary: #48484A;
  --accent-blue: #0A84FF;
  --phase-prepare: #FFD60A;
  --phase-workout: #32D74B;
  --phase-rest: #0A84FF;
  --phase-cooldown: #BF5AF2;
  --teal: #48D1A0;
  --heart-red: #FF453A;
  --calories-orange: #FF9F0A;
  --radius-card: 16px;
  --radius-button: 12px;
  --max-width: 1100px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

a {
  color: inherit;
  text-decoration: none;
}

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

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 24px;
  height: 60px;
  transition: background 0.3s, backdrop-filter 0.3s;
}

.header.scrolled {
  background: var(--bg-header);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-icon {
  border-radius: 22.37%;
}

.header-name {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.lang-toggle {
  background: none;
  border: 1px solid var(--text-tertiary);
  border-radius: 8px;
  padding: 4px 10px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: border-color 0.2s;
  font-family: inherit;
}

.lang-toggle:hover {
  border-color: var(--text-secondary);
}

.lang-option {
  transition: color 0.2s;
}

.lang-option.active {
  color: var(--text-primary);
  font-weight: 600;
}

.lang-divider {
  opacity: 0.3;
}

.header-cta {
  background: var(--accent-blue);
  color: #fff;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  transition: opacity 0.2s;
}

.header-cta:hover {
  opacity: 0.85;
}

/* ===== Hero ===== */
.hero {
  padding: 140px 24px 80px;
}

.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hero-icon {
  border-radius: 22.37%;
  box-shadow: 0 0 60px rgba(10, 132, 255, 0.15), 0 0 120px rgba(10, 132, 255, 0.05);
}

.hero-title {
  font-size: 48px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.hero-title-set {
  color: var(--accent-blue);
}

.hero-title-go {
  color: var(--phase-workout);
}

.hero-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 1.6;
  max-width: 480px;
}

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

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


/* Apple Watch Screenshot */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.watch-device {
  position: relative;
  width: 300px;
  filter: drop-shadow(0 20px 60px rgba(0, 0, 0, 0.5)) drop-shadow(0 0 80px rgba(72, 209, 160, 0.08));
}

.watch-frame {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
}

.watch-screen-img {
  position: absolute;
  z-index: 1;
  top: 24%;
  left: 16%;
  width: 68%;
  height: auto;
}

/* ===== Phase Bar ===== */
.phase-bar {
  display: flex;
  height: 4px;
}

.phase-bar-segment {
  flex: 1;
}

/* ===== iPhone Showcase ===== */
.showcase {
  padding: 80px 24px;
  overflow: hidden;
}

.showcase-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.showcase-phones {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
  position: relative;
}

.phone {
  position: relative;
  width: 260px;
  flex-shrink: 0;
  filter: drop-shadow(0 8px 40px rgba(255, 255, 255, 0.06)) drop-shadow(0 2px 10px rgba(0, 0, 0, 0.8));
}

.phone-frame {
  position: relative;
  z-index: 2;
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
}

.phone-screen {
  position: absolute;
  z-index: 1;
  top: 2.2%;
  left: 5.5%;
  width: 89%;
  height: auto;
  border-radius: 12%;
}

.phone-center {
  z-index: 3;
  transform: scale(1.08);
}

.phone-left {
  z-index: 1;
  margin-right: -30px;
  transform: rotate(-4deg);
}

.phone-right {
  z-index: 1;
  margin-left: -30px;
  transform: rotate(4deg);
}

/* ===== Section Divider ===== */
.section-divider {
  max-width: var(--max-width);
  margin: 0 auto;
  height: 1px;
  background: rgba(255, 255, 255, 0.06);
}

/* ===== Features ===== */
.features {
  padding: 100px 24px;
}

.features-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.section-title {
  font-size: 36px;
  font-weight: 700;
  text-align: center;
  letter-spacing: -0.02em;
  margin-bottom: 60px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.feature-card {
  background: var(--bg-card);
  border-radius: var(--radius-card);
  padding: 28px 24px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

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

.feature-icon {
  margin-bottom: 16px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
}

.feature-title {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

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

/* ===== CTA Section ===== */
.cta-section {
  padding: 80px 24px 100px;
}

.cta-inner {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.cta-title {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.cta-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
}

/* ===== Footer ===== */
.footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 40px 24px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-tagline {
  font-size: 14px;
  color: var(--text-secondary);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
}

.footer-links a {
  font-size: 13px;
  color: var(--text-secondary);
  transition: color 0.2s;
}

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

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

/* ===== Fade-in Animation ===== */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease, background 0.3s ease;
}

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

/* Stagger feature cards */
.feature-card:nth-child(2) { transition-delay: 0.08s; }
.feature-card:nth-child(3) { transition-delay: 0.16s; }
.feature-card:nth-child(4) { transition-delay: 0.24s; }
.feature-card:nth-child(5) { transition-delay: 0.32s; }
.feature-card:nth-child(6) { transition-delay: 0.40s; }
.feature-card:nth-child(7) { transition-delay: 0.48s; }
.feature-card:nth-child(8) { transition-delay: 0.56s; }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .hero {
    padding: 100px 24px 60px;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 40px;
  }

  .hero-content {
    align-items: center;
  }

  .hero-icon {
    width: 80px;
    height: 80px;
  }

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

  .hero-title {
    font-size: 38px;
  }

  .section-title {
    font-size: 30px;
  }

  .phone {
    width: 200px;
  }

  .phone-left {
    margin-right: -24px;
  }

  .phone-right {
    margin-left: -24px;
  }
}

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

  .hero-title {
    font-size: 30px;
  }

  .hero-subtitle {
    font-size: 16px;
  }

  .watch-device {
    width: 220px;
  }

  .phone {
    width: 150px;
  }

  .phone-left {
    margin-right: -18px;
  }

  .phone-right {
    margin-left: -18px;
  }

  .showcase {
    padding: 60px 16px;
  }

  .features {
    padding: 60px 16px;
  }

  .section-title {
    font-size: 26px;
    margin-bottom: 40px;
  }

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

  .cta-title {
    font-size: 28px;
  }

  .header-name {
    display: none;
  }
}

/* ===== Prefers Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
  .fade-in {
    opacity: 1;
    transform: none;
    transition: none;
  }


  html {
    scroll-behavior: auto;
  }
}
