/* ===================================================
   Product page styles — used by /en/koda and future product pages
   =================================================== */

/* ----- Product Hero ----- */
.product-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--black);
  scroll-snap-align: start;
  padding: var(--nav-height) 0 var(--space-lg);
}

.product-hero__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  align-items: center;
}

.product-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 99px;
  background: rgba(208, 30, 30, 0.1);
  border: 1px solid rgba(208, 30, 30, 0.25);
  font-size: var(--text-label);
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--red);
  text-transform: uppercase;
  margin-bottom: var(--space-md);
  opacity: 0;
  transform: translateY(10px);
}

.product-hero__badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
  animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.75); }
}

.product-hero__headline {
  font-size: var(--text-h1);
  font-weight: 800;
  letter-spacing: -2px;
  line-height: 1.1;
  opacity: 0;
  transform: translateY(20px);
}

.product-hero__desc {
  font-size: var(--text-body);
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.7;
  margin-top: var(--space-md);
  max-width: 520px;
  opacity: 0;
  transform: translateY(20px);
}

.product-hero__cta {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-xl);
  opacity: 0;
  transform: translateY(20px);
}

/* App mockup with perspective tilt */
.product-hero__mockup-wrap {
  perspective: 1200px;
  opacity: 0;
  transform: translateY(20px);
}

.product-hero__mockup {
  background: var(--surface);
  border-radius: var(--border-radius-xl);
  border: 1px solid var(--border);
  overflow: hidden;
  transform: rotateY(-8deg) rotateX(4deg);
  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.6),
    0 0 100px var(--red-glow);
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-hero__mockup:hover {
  transform: rotateY(0deg) rotateX(0deg);
}

/* Window chrome */
.window-chrome {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid var(--border);
}

.window-chrome__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.window-chrome__dot--red   { background: #ff5f57; }
.window-chrome__dot--amber { background: #ffbd2e; }
.window-chrome__dot--green { background: #28c940; }

.window-chrome__title {
  flex: 1;
  text-align: center;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.4);
  margin-left: -36px; /* compensate for 3 dots */
}

/* ----- Feature Sections ----- */
.feature-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: var(--nav-height) 0 var(--space-lg);
  border-top: 1px solid var(--border);
  scroll-snap-align: start;
}

.feature-section__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  align-items: center;
}

/* Even children: flip layout to right-content, left-visual */
.feature-section:nth-child(even) .feature-section__inner {
  direction: rtl;
}
.feature-section:nth-child(even) .feature-section__inner > * {
  direction: ltr;
}

.feature-section__label {
  font-size: var(--text-label);
  font-weight: 600;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: var(--space-sm);
}

.feature-section__title {
  font-size: var(--text-h2);
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1.2;
}

.feature-section__desc {
  font-size: var(--text-body);
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.7;
  margin-top: var(--space-md);
}

.feature-section__visual {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--border-radius-xl);
  padding: var(--space-xl);
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.feature-section__visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 50%, var(--red-glow) 0%, transparent 70%);
  pointer-events: none;
}

/* Feature icon placeholder */
.feature-icon {
  width: 72px;
  height: 72px;
  border-radius: var(--border-radius-lg);
  background: rgba(208, 30, 30, 0.12);
  border: 1px solid rgba(208, 30, 30, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--red);
}

/* ----- Screenshot Gallery ----- */
.screenshot-gallery {
  padding: var(--space-3xl) 0;
}

.screenshot-gallery__title {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.screenshot-gallery__scroll {
  display: flex;
  gap: var(--space-md);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: var(--space-sm);
  scrollbar-width: thin;
  scrollbar-color: var(--red) var(--surface);
}

.screenshot-gallery__scroll::-webkit-scrollbar {
  height: 4px;
}
.screenshot-gallery__scroll::-webkit-scrollbar-track {
  background: var(--surface);
  border-radius: 2px;
}
.screenshot-gallery__scroll::-webkit-scrollbar-thumb {
  background: var(--red);
  border-radius: 2px;
}

.screenshot-gallery__item {
  flex-shrink: 0;
  width: 640px;
  height: 400px;
  scroll-snap-align: start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--border-radius-xl);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ----- System Requirements ----- */
.sysreq {
  padding: var(--space-3xl) 0;
  border-top: 1px solid var(--border);
  scroll-snap-align: start;
}

.sysreq__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  margin-top: var(--space-xl);
}

.sysreq__item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--border-radius-lg);
  padding: var(--space-md);
}

.sysreq__item-label {
  font-size: var(--text-label);
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.3);
  margin-bottom: var(--space-xs);
}

.sysreq__item-value {
  font-size: var(--text-small);
  font-weight: 600;
  color: var(--white);
}

/* ----- Download CTA Section ----- */
.product-cta {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  scroll-snap-align: start;
  padding: var(--nav-height) var(--space-md) var(--space-lg);
}

.product-cta__title {
  font-size: var(--text-h2);
  font-weight: 700;
  letter-spacing: -1px;
}

.product-cta__desc {
  font-size: var(--text-body);
  color: rgba(255, 255, 255, 0.5);
  margin-top: var(--space-sm);
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
}

.product-cta__buttons {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
  margin-top: var(--space-xl);
}

/* App Store badge */
.appstore-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  background: var(--white);
  color: var(--black);
  border-radius: var(--border-radius);
  font-weight: 700;
  font-size: 15px;
  transition: all var(--duration-normal) var(--ease-out);
}
.appstore-badge:hover {
  background: #e8e8e8;
  transform: translateY(-2px);
  color: var(--black);
}
.appstore-badge svg { flex-shrink: 0; }

/* ----- Responsive ----- */
@media (max-width: 1023px) {
  .product-hero__inner,
  .feature-section__inner {
    grid-template-columns: 1fr;
  }

  /* When grid stacks, hero overflows 100vh — disable snap on it */
  .product-hero {
    scroll-snap-align: none;
    min-height: auto;
    padding-top: calc(var(--nav-height) + var(--space-lg));
    padding-bottom: var(--space-2xl);
  }

  .feature-section:nth-child(even) .feature-section__inner {
    direction: ltr;
  }

  .product-hero__mockup {
    transform: none;
  }

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

  .screenshot-gallery__item {
    width: 80vw;
  }
}

@media (max-width: 639px) {
  .product-hero__cta,
  .product-cta__buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .product-hero__cta .btn,
  .product-cta__buttons .btn,
  .product-cta__buttons .appstore-badge {
    justify-content: center;
  }
}
