/* Home page styles */
.home-hero {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  overflow: hidden;
  background-color: var(--color-ink);
}

.home-hero__background {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.15) 2px, transparent 3px),
    radial-gradient(circle at 70% 60%, rgba(255, 255, 255, 0.1) 1px, transparent 2px),
    radial-gradient(circle at 40% 80%, rgba(255, 248, 186, 0.2) 3px, transparent 4px),
    radial-gradient(circle at 85% 20%, rgba(88, 157, 219, 0.25) 4px, transparent 5px);
  background-size: 120px 120px, 80px 80px, 160px 160px, 200px 200px;
  animation: home-hero-scroll 60s linear infinite;
  z-index: 0;
}

@keyframes home-hero-scroll {
  from { background-position: 0 0, 0 0, 0 0, 0 0; }
  to { background-position: -1200px 0, -800px 0, -1600px 0, -2000px 0; }
}

.home-hero__image-frame {
  position: relative;
  z-index: 1;
  width: 55%;
  margin: var(--space-2xl) var(--space-2xl) var(--space-2xl) 0;
  border: var(--border-ink);
  background-color: var(--color-white);
  box-shadow: var(--shadow-offset);
}

.home-hero__image-frame img {
  width: 100%;
  height: auto;
  display: block;
}

.home-hero__panel {
  position: absolute;
  z-index: 2;
  left: var(--space-2xl);
  bottom: var(--space-2xl);
  width: 40%;
  background-color: rgba(255, 248, 186, 0.95);
  border: var(--border-ink);
  box-shadow: var(--shadow-offset);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  align-items: flex-start;
}

.home-hero__panel h1 {
  font-size: clamp(20px, 3vw, var(--text-h1));
  line-height: var(--leading-h1);
  letter-spacing: var(--tracking-h1);
  margin: 0;
  max-width: 60ch;
}

.home-hero__lead {
  font-size: var(--text-body-large);
  line-height: var(--leading-body-large);
  margin: 0;
  max-width: 55ch;
}

.home-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  margin: 0;
}

.home-hero__actions .btn {
  flex-shrink: 0;
}

.home-hero__platform {
  position: absolute;
  z-index: 1;
  left: var(--space-2xl);
  bottom: calc(var(--space-2xl) - 12px);
  width: 40%;
  height: 24px;
  background-color: var(--color-grass);
  background-image:
    linear-gradient(135deg, transparent 50%, var(--color-cloud) 50%),
    linear-gradient(225deg, transparent 50%, var(--color-cloud) 50%);
  background-size: 16px 16px;
  background-position: 0 0, 8px 0;
  background-repeat: repeat-x;
  border-block: var(--border-ink);
}

.home-premise__grid {
  display: grid;
  grid-template-columns: 60% 40%;
  gap: var(--space-lg);
  align-items: start;
}

.home-premise__content {
  min-width: 0;
}

.home-premise__content p {
  max-width: 75ch;
}

.home-premise__opinion {
  max-width: 75ch;
}

.home-premise__figure {
  min-width: 0;
  margin: 0;
}

.home-premise__figure .screenshot-frame {
  width: 100%;
}

.home-premise__figure img {
  width: 100%;
  height: auto;
  display: block;
}

.home-indirect__container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
}

.home-indirect__container h2 {
  text-align: center;
  margin-bottom: 0;
}

.home-indirect__content {
  width: 80%;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.home-indirect__content p,
.home-indirect__content blockquote {
  max-width: 80ch;
  margin-inline: auto;
}

.home-indirect__figure {
  width: 80%;
  margin: 0;
}

.home-indirect__figure .screenshot-frame {
  width: 100%;
}

.home-indirect__figure img {
  width: 100%;
  height: auto;
  display: block;
}

.home-puzzles__grid {
  display: grid;
  grid-template-columns: 50% 50%;
  gap: var(--space-lg);
  align-items: start;
}

.home-puzzles__content {
  min-width: 0;
}

.home-puzzles__content p,
.home-puzzles__content blockquote {
  max-width: 80ch;
}

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

.home-puzzles__figure {
  margin: 0;
}

.home-puzzles__figure .screenshot-frame {
  width: 100%;
}

.home-puzzles__figure img {
  width: 100%;
  height: auto;
  display: block;
}

.home-worlds__grid {
  display: grid;
  grid-template-columns: 60% 40%;
  gap: var(--space-lg);
  align-items: start;
}

.home-worlds__content {
  min-width: 0;
}

.home-worlds__content p {
  max-width: 80ch;
}

.home-worlds__list {
  list-style: none;
  padding: 0;
  margin: var(--space-md) 0 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.home-worlds__list li {
  padding-left: var(--space-xl);
  position: relative;
  line-height: var(--leading-body);
}

.home-worlds__list li::before {
  content: counter(item);
  counter-increment: item;
  position: absolute;
  left: 0;
  top: 0.2em;
  font-family: var(--font-heading);
  font-size: var(--text-body-small);
  color: var(--color-grass);
}

.home-worlds__list {
  counter-reset: item;
}

.home-worlds__figure {
  min-width: 0;
  margin: 0;
}

.home-worlds__figure .screenshot-frame {
  width: 100%;
}

.home-worlds__figure img {
  width: 100%;
  height: auto;
  display: block;
}

.home-visual__container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
}

.home-visual__container h2 {
  text-align: center;
  margin-bottom: 0;
}

.home-visual__content {
  width: 80%;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.home-visual__content p,
.home-visual__content blockquote {
  max-width: 80ch;
  margin-inline: auto;
}

.home-visual__figure {
  width: 80%;
  margin: 0;
}

.home-visual__figure .screenshot-frame {
  width: 100%;
}

.home-visual__figure img {
  width: 100%;
  height: auto;
  display: block;
}

.home-android__container {
  width: 70%;
  margin-inline: 0;
}

.home-android__container h2 {
  margin-bottom: var(--space-md);
}

.home-android__content {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.home-android__content p {
  max-width: 80ch;
}

.home-android__notice {
  max-width: 80ch;
}

.home-tips__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-lg);
}

.home-tips__card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.home-tips__card h3 {
  margin: 0;
}

.home-tips__card p {
  margin: 0;
}

.home-faq__container {
  width: 80%;
  margin-inline: auto;
}

.home-faq__container h2 {
  text-align: center;
}

.home-faq__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.home-faq__item {
  margin: 0;
}

.home-faq__icon {
  width: 12px;
  height: 12px;
  border-right: var(--border-ink);
  border-bottom: var(--border-ink);
  transform: rotate(45deg);
  transition: transform var(--transition-accordion);
  flex-shrink: 0;
}

.home-faq__item.accordion--open .home-faq__icon {
  transform: rotate(225deg);
}

.home-cta {
  background-color: rgba(255, 248, 186, 0.2);
}

.home-cta__container {
  width: 60%;
  margin-inline: auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
}

.home-cta__container h2 {
  margin: 0;
}

.home-cta__container p {
  margin: 0;
  max-width: 70ch;
}

.home-cta__button {
  flex-shrink: 0;
}

@media (max-width: 1024px) {
  .home-hero {
    min-height: auto;
    flex-direction: column;
    align-items: stretch;
    padding: var(--space-lg);
  }

  .home-hero__image-frame {
    width: 100%;
    margin: 0 0 var(--space-lg) 0;
  }

  .home-hero__panel {
    position: static;
    width: 100%;
    margin: 0;
    order: 2;
  }

  .home-hero__platform {
    position: static;
    width: 100%;
    margin: -12px 0 0 0;
    order: 3;
  }

  .home-premise__grid,
  .home-puzzles__grid,
  .home-worlds__grid {
    grid-template-columns: 1fr;
  }

  .home-premise__figure,
  .home-puzzles__gallery,
  .home-worlds__figure {
    order: 2;
  }

  .home-premise__content,
  .home-puzzles__content,
  .home-worlds__content {
    order: 1;
  }

  .home-tips__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .home-hero {
    padding: var(--space-md);
  }

  .home-hero__panel {
    padding: var(--space-md);
  }

  .home-hero__actions {
    flex-direction: column;
    width: 100%;
  }

  .home-hero__actions .btn {
    width: 100%;
  }

  .home-indirect__content,
  .home-indirect__figure,
  .home-visual__content,
  .home-visual__figure,
  .home-faq__container {
    width: 100%;
  }

  .home-android__container {
    width: 100%;
  }

  .home-tips__grid {
    grid-template-columns: 1fr;
  }

  .home-cta__container {
    width: 100%;
  }

  .home-cta__button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-hero__background {
    animation: none;
  }
}
