/* Page-owned styles for the Etelovia home page. */

/* Hero */
.home-hero {
  background-color: var(--surface-ink);
  padding-block: var(--space-4xl);
}

.home-hero__inner {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--space-xl);
  align-items: center;
}

.home-hero__text {
  grid-column: 1 / 8;
  min-width: 0;
  max-width: 560px;
}

.home-hero__text h1 {
  font-size: var(--text-h1-size);
  line-height: var(--text-h1-line-height);
  letter-spacing: var(--text-h1-letter-spacing);
  font-weight: var(--text-h1-weight);
  margin-block-end: var(--space-md);
}

.home-hero__subtitle {
  font-size: var(--text-body-large-size);
  line-height: var(--text-body-large-line-height);
  color: var(--text-secondary);
  margin-block-end: var(--space-xl);
}

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

.home-hero__media {
  grid-column: 8 / 13;
  min-width: 0;
}

.home-hero__figure {
  width: 100%;
  aspect-ratio: 16 / 9;
}

.home-hero__figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Review section */
.home-review {
  background-color: var(--surface-ink);
  padding-block: var(--space-3xl);
}

.home-review__inner {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--space-xl);
  align-items: start;
}

.home-review__article {
  grid-column: 1 / 9;
  min-width: 0;
}

.home-review__article h2 {
  margin-block-end: var(--space-lg);
}

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

.home-review__item h3 {
  margin-block-end: var(--space-xs);
}

.home-review__item p {
  color: var(--text-primary);
}

.home-review__sidebar {
  grid-column: 9 / 13;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.home-review__score-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.home-review__score-value {
  font-size: var(--text-score-size);
  line-height: var(--text-score-line-height);
  letter-spacing: var(--text-score-letter-spacing);
  font-weight: var(--text-score-weight);
  font-variant-numeric: var(--text-score-font-variant-numeric);
  color: var(--text-accent);
}

.home-review__score-note {
  color: var(--text-secondary);
  font-size: var(--text-small-size);
  line-height: var(--text-small-line-height);
}

.home-review__download {
  width: 100%;
}

/* Features */
.home-features {
  background-color: var(--surface-ink-raised);
  padding-block: var(--space-3xl);
}

.home-features h2 {
  margin-block-end: var(--space-xl);
}

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

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

.home-features__card h3 {
  margin-block-end: 0;
}

.home-features__card p {
  color: var(--text-secondary);
  font-size: var(--text-body-size);
  line-height: var(--text-body-line-height);
}

/* Download steps */
.home-download-steps {
  background-color: var(--surface-ink);
  padding-block: var(--space-4xl);
}

.home-download-steps__inner {
  display: flex;
  justify-content: center;
}

.home-download-steps__block {
  max-width: 720px;
  width: 100%;
  background-color: var(--surface-ink-raised);
  border: var(--border-width) solid var(--border-color);
  border-radius: var(--radius-md);
  padding: var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  text-align: center;
  align-items: center;
}

.home-download-steps__block h2 {
  margin-block-end: 0;
}

.home-download-steps__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  text-align: left;
  width: 100%;
}

.home-download-steps__item h3 {
  margin-block-end: var(--space-xs);
}

.home-download-steps__item p {
  color: var(--text-secondary);
}

.home-download-steps__button {
  margin-block-start: var(--space-sm);
}

/* Tips */
.home-tips {
  background-color: var(--surface-ink);
  padding-block: var(--space-3xl);
}

.home-tips__inner {
  max-width: var(--measure-longform);
  margin-inline: auto;
}

.home-tips h2 {
  margin-block-end: var(--space-xl);
}

.home-tips__list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.home-tips__item {
  padding-block: var(--space-md);
  border-block-end: var(--border-width) solid var(--border-color);
}

.home-tips__item:first-child {
  border-block-start: var(--border-width) solid var(--border-color);
}

.home-tips__item h3 {
  margin-block-end: var(--space-xs);
  padding-inline-start: var(--space-lg);
  position: relative;
}

.home-tips__item h3::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35em;
  width: 4px;
  height: 4px;
  background-color: var(--color-jump);
}

.home-tips__item p {
  color: var(--text-secondary);
  padding-inline-start: var(--space-lg);
}

/* Controls */
.home-controls {
  background-color: var(--surface-ink-raised);
  padding-block: var(--space-3xl);
}

.home-controls__inner {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--space-xl);
  align-items: start;
}

.home-controls__text {
  grid-column: 1 / 8;
  min-width: 0;
}

.home-controls__text h2 {
  margin-block-end: var(--space-lg);
}

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

.home-controls__item h3 {
  margin-block-end: var(--space-xs);
}

.home-controls__item p {
  color: var(--text-secondary);
}

.home-controls__media {
  grid-column: 8 / 13;
  min-width: 0;
}

.home-controls__figure {
  width: 100%;
  aspect-ratio: 16 / 9;
}

.home-controls__figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Records */
.home-records {
  background-color: var(--surface-ink);
  padding-block: var(--space-3xl);
}

.home-records h2 {
  margin-block-end: var(--space-sm);
}

.home-records__note {
  color: var(--text-secondary);
  font-size: var(--text-small-size);
  line-height: var(--text-small-line-height);
  margin-block-end: var(--space-xl);
}

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

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

.home-records__card .caption {
  margin-block-end: 0;
}

.home-records__value {
  font-size: var(--text-score-size);
  line-height: var(--text-score-line-height);
  letter-spacing: var(--text-score-letter-spacing);
  font-weight: var(--text-score-weight);
  font-variant-numeric: var(--text-score-font-variant-numeric);
  color: var(--text-accent);
}

.home-records__card p:last-child {
  color: var(--text-secondary);
  font-size: var(--text-small-size);
  line-height: var(--text-small-line-height);
}

/* FAQ */
.home-faq {
  background-color: var(--surface-ink-raised);
  padding-block: var(--space-3xl);
}

.home-faq__inner {
  max-width: var(--measure-longform);
  margin-inline: auto;
}

.home-faq h2 {
  margin-block-end: var(--space-xl);
}

.home-faq__list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.home-faq__item {
  border-block-end: var(--border-width) solid var(--border-color);
}

.home-faq__item:first-child {
  border-block-start: var(--border-width) solid var(--border-color);
}

.home-faq__item h3 {
  margin-block-end: 0;
}

.home-faq__question {
  display: block;
  width: 100%;
  text-align: left;
  padding: var(--space-md) 0;
  font-family: var(--font-heading);
  font-size: var(--text-h3-size);
  line-height: var(--text-h3-line-height);
  font-weight: var(--text-h3-weight);
  color: var(--text-primary);
  background: none;
  border: none;
  cursor: pointer;
  transition: color var(--transition-fast);
}

.home-faq__question:hover {
  color: var(--text-accent);
}

.home-faq__question:focus-visible {
  outline: var(--focus-ring-width) solid var(--border-focus);
  outline-offset: var(--focus-ring-offset);
}

.home-faq__answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-toggle);
}

.home-faq__answer p {
  color: var(--text-secondary);
  padding-block-end: var(--space-md);
}

.home-faq__item.is-open .home-faq__answer {
  max-height: 500px;
}

/* Final CTA */
.home-final-cta {
  background-color: var(--surface-ink);
  padding-block: var(--space-4xl);
}

.home-final-cta__inner {
  display: flex;
  justify-content: center;
}

.home-final-cta__block {
  max-width: 560px;
  width: 100%;
  background-color: var(--surface-ink-raised);
  border: var(--border-width) solid var(--border-color);
  border-radius: var(--radius-md);
  padding: var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  text-align: center;
  align-items: center;
}

.home-final-cta__block h2 {
  margin-block-end: 0;
}

.home-final-cta__block p {
  color: var(--text-secondary);
  max-width: 480px;
}

.home-final-cta__button {
  margin-block-start: var(--space-sm);
}

/* Responsive */
@media (max-width: 1023px) {
  .home-hero__inner {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .home-hero__text {
    grid-column: 1 / -1;
    max-width: 100%;
  }

  .home-hero__media {
    grid-column: 1 / -1;
  }

  .home-review__inner {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .home-review__article {
    grid-column: 1 / -1;
  }

  .home-review__sidebar {
    grid-column: 1 / -1;
  }

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

  .home-controls__inner {
    grid-template-columns: 1fr;
    gap: var(--space-xl);
  }

  .home-controls__text {
    grid-column: 1 / -1;
  }

  .home-controls__media {
    grid-column: 1 / -1;
  }

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

@media (max-width: 767px) {
  .home-hero {
    padding-block: var(--space-2xl);
  }

  .home-hero__inner {
    gap: var(--space-lg);
  }

  .home-hero__actions {
    flex-direction: column;
    align-items: stretch;
  }

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

  .home-review {
    padding-block: var(--space-2xl);
  }

  .home-review__inner {
    gap: var(--space-lg);
  }

  .home-features {
    padding-block: var(--space-2xl);
  }

  .home-features__grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .home-download-steps {
    padding-block: var(--space-2xl);
  }

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

  .home-download-steps__button {
    width: 100%;
  }

  .home-tips {
    padding-block: var(--space-2xl);
  }

  .home-controls {
    padding-block: var(--space-2xl);
  }

  .home-controls__inner {
    gap: var(--space-lg);
  }

  .home-records {
    padding-block: var(--space-2xl);
  }

  .home-records__grid {
    gap: var(--space-md);
  }

  .home-faq {
    padding-block: var(--space-2xl);
  }

  .home-final-cta {
    padding-block: var(--space-2xl);
  }

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

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

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