/* Page-scoped styles for funkciok page */

#funkciok-page {
  --funkciok-section-gap: var(--space-3xl);
  --funkciok-section-gap-mobile: var(--space-2xl);
  --funkciok-feature-copy-max: 37.5rem;
  --funkciok-intro-max: 45rem;
  --funkciok-summary-max: 45rem;
  --funkciok-multiplayer-max: 45rem;
}

#funkciok-page section {
  margin-block-end: var(--funkciok-section-gap);
}

#funkciok-page section:last-child {
  margin-block-end: 0;
}

/* Hero section */
.hero-section {
  background-color: var(--surface-page);
  padding-block: var(--space-2xl) var(--space-3xl);
}

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

.hero-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-md);
  min-width: 0;
}

.hero-text h1 {
  margin-block-end: 0;
  max-width: 100%;
}

.hero-lead {
  max-width: var(--funkciok-intro-max);
  margin-inline: auto;
  margin-block-end: 0;
  font-size: var(--text-body-large-size);
  line-height: var(--text-body-large-line-height);
}

.hero-store-button {
  margin-block-start: var(--space-sm);
}

.hero-image-wrap {
  min-width: 0;
  display: flex;
  justify-content: center;
}

.hero-image-wrap .screenshot-frame {
  width: 100%;
  max-width: 100%;
}

.hero-image-wrap .screenshot-frame img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* Intro section */
.intro-section {
  background-color: var(--surface-page-deep);
  border-radius: var(--radius-xl);
  padding-block: var(--space-2xl);
}

.intro-copy {
  max-width: var(--funkciok-intro-max);
  margin-inline: 0;
  text-align: left;
}

.intro-copy h2 {
  margin-block-end: var(--space-md);
}

.intro-copy p {
  margin-block-end: 0;
}

/* Feature sections */
.feature-section {
  padding-block: var(--space-xl);
}

.feature-section--farming {
  background-color: var(--surface-page);
}

.feature-section--mining {
  background-color: var(--surface-soft-turquoise);
  border-radius: var(--radius-xl);
}

.feature-section--fishing {
  background-color: var(--surface-page);
}

.feature-section--combat {
  background-color: var(--surface-soft-coral);
  border-radius: var(--radius-xl);
}

.feature-section--social {
  background-color: var(--surface-page);
}

.feature-section--customization {
  background-color: var(--surface-soft-turquoise);
  border-radius: var(--radius-xl);
}

.feature-section--festival {
  background-color: var(--surface-page);
}

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

.feature-text {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  min-width: 0;
}

.feature-text h2 {
  margin-block-end: 0;
}

.feature-copy {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  max-width: var(--funkciok-feature-copy-max);
}

.feature-copy h3 {
  margin-block-end: var(--space-xs);
}

.feature-copy p {
  margin-block-end: 0;
}

.feature-image-wrap {
  min-width: 0;
  display: flex;
  justify-content: center;
}

.feature-image-wrap .screenshot-frame {
  width: 100%;
  max-width: 100%;
}

.feature-image-wrap .screenshot-frame img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* Multiplayer section */
.multiplayer-section {
  background-color: var(--surface-soft-coral);
  border-radius: var(--radius-xl);
  padding-block: var(--space-2xl);
}

.multiplayer-copy {
  max-width: var(--funkciok-multiplayer-max);
  margin-inline: auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.multiplayer-copy h2 {
  margin-block-end: 0;
}

.multiplayer-copy p {
  margin-block-end: 0;
}

/* Summary section */
.summary-section {
  background-color: var(--surface-soft-turquoise);
  border-radius: var(--radius-xl);
  padding-block: var(--space-2xl);
}

.summary-copy {
  max-width: var(--funkciok-summary-max);
  margin-inline: auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
}

.summary-copy h2 {
  margin-block-end: 0;
}

.summary-copy p {
  margin-block-end: 0;
}

.summary-store-button {
  margin-block-start: var(--space-sm);
}

/* Tablet breakpoint */
@media (min-width: 48rem) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--space-2xl);
  }

  .hero-text {
    align-items: flex-start;
    text-align: left;
  }

  .hero-lead {
    margin-inline: 0;
  }

  .feature-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--space-2xl);
  }

  .feature-grid--text-left {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  }

  .feature-grid--text-right {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
  }

  .feature-grid--text-right .feature-image-wrap {
    order: 1;
  }

  .feature-grid--text-right .feature-text {
    order: 2;
  }

  .feature-text {
    align-items: flex-start;
  }

  .feature-copy {
    max-width: 100%;
  }
}

/* Desktop breakpoint */
@media (min-width: 64rem) {
  #funkciok-page {
    --funkciok-section-gap: var(--space-4xl);
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--space-3xl);
  }

  .feature-grid--text-left {
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  }

  .feature-grid--text-right {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  }
}

/* Mobile adjustments */
@media (max-width: 47.9375rem) {
  #funkciok-page {
    --funkciok-section-gap: var(--funkciok-section-gap-mobile);
  }

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

  .hero-text h1 {
    font-size: var(--text-h1-size);
  }

  .hero-lead {
    font-size: var(--text-body-size);
  }

  .intro-section,
  .multiplayer-section,
  .summary-section {
    padding-block: var(--space-xl);
  }

  .feature-grid {
    gap: var(--space-lg);
  }

  .feature-copy {
    max-width: 100%;
  }
}

@media (max-width: 30rem) {
  .hero-text h1 {
    font-size: clamp(1.75rem, 1.4rem + 1.6vw, 2rem);
  }

  .feature-section {
    padding-block: var(--space-lg);
  }
}
