/* Homepage layouts use the public marketing palette and components. */
.ea-marketing--home {
  background: var(--ea-neutral-50);
}

.ea-marketing--home .ea-section {
  padding-block: clamp(1.65rem, 3.4vw, 3.25rem);
}

.ea-home-hero {
  padding-block: clamp(1.9rem, 4.2vw, 4rem);
  border-bottom: 0;
  background:
    radial-gradient(ellipse at 85% 90%, var(--ea-primary), transparent 60%),
    linear-gradient(135deg, #171638 15%, var(--ea-primary-dark) 65%, var(--ea-primary-hover));
}

.ea-home-hero .ea-kicker {
  background: #ffffff18;
  color: var(--ea-primary-light);
}

.ea-home-hero .ea-title-xl {
  color: white;
  max-width: 17ch;
  font-size: clamp(2.1rem, 4.2vw, 4.1rem);
  line-height: 1.08;
  margin-block: .65rem .9rem;
  text-wrap: balance;
}

.ea-home-hero .ea-lead,
.ea-home-hero .ea-login-link {
  color: var(--ea-primary-light);
}

.ea-home-hero .ea-lead {
  max-width: 50ch;
}

.ea-home-hero .ea-login-link {
  display: inline-block;
  margin-top: .75rem;
  text-decoration: underline;
  text-underline-offset: .2em;
}

.ea-home-hero .ea-home-hero__action {
  background: var(--ea-primary-light);
  color: var(--ea-primary-dark);
}

.ea-home-hero .ea-home-hero__action:hover {
  background: white;
}

.ea-home-hero__preview {
  border: 5px solid #ffffff44;
  border-radius: var(--radius-lg);
  box-shadow: 0 22px 50px #10102880;
}

.ea-home-hero__preview .ea-preview-image {
  max-height: 26rem;
  object-fit: cover;
  object-position: top;
}

.ea-home-roles .ea-grid-3 {
  gap: 1rem;
}

.ea-home-role {
  background: var(--ea-primary-surface-soft);
  border-color: var(--ea-primary-light);
}

.ea-home-role--parent {
  background: #eaf8f4;
  border-color: var(--ea-emerald-light);
}

.ea-home-role--teacher {
  background: #fff7e9;
  border-color: var(--ea-amber-light);
}

.ea-home-role__icon {
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  margin-bottom: .85rem;
  border-radius: var(--radius-sm);
  background: white;
  color: var(--ea-primary-hover);
}

.ea-home-role--parent .ea-home-role__icon {
  color: #065f46;
}

.ea-home-role--teacher .ea-home-role__icon {
  color: #92400e;
}

.ea-home-role h3,
.ea-home-topic h3 {
  font-size: clamp(1.08rem, 2vw, 1.4rem);
}

.ea-home-role .ea-btn,
.ea-home-topic .ea-btn {
  margin-top: auto;
  align-self: flex-start;
  text-align: left;
}

.ea-home-school {
  margin-top: .9rem;
}

.ea-home-text-link {
  color: var(--ea-primary-hover);
  font-weight: 650;
}

.ea-home-text-link:hover {
  text-decoration: underline;
}

.ea-marketing--home .ea-home-author {
  padding-top: .3rem;
}

.ea-home-author__panel {
  display: grid;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(120deg, #fff8ee, var(--ea-amber-light));
  box-shadow: var(--shadow-md);
}

.ea-home-author__panel .ea-home-author__portrait {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: center 37%;
}

.ea-home-author__copy {
  align-self: center;
  padding: clamp(1.3rem, 4vw, 3.5rem);
}

.ea-home-author__copy h2 {
  max-width: 23ch;
  text-wrap: balance;
}

.ea-home-walk {
  background: var(--ea-primary-surface-soft);
}

.ea-home-walk__heading {
  margin-bottom: 1rem;
}

.ea-home-walk .ea-tabs {
  margin-bottom: .95rem;
}

.ea-home-walk__panel {
  display: grid;
  gap: 1rem;
  align-items: center;
  border-radius: var(--radius-lg);
  padding: clamp(1rem, 2.5vw, 2rem);
  background: white;
  border: 1px solid var(--ea-primary-light);
}

.ea-home-walk__panel h3 {
  font-size: clamp(1.2rem, 2.3vw, 1.65rem);
}

.ea-home-walk__image {
  display: block;
  width: 100%;
}

.ea-home-walk__panel .ea-caption {
  margin-bottom: 0;
}

.ea-home-topic {
  padding: 0;
  overflow: hidden;
}

.ea-home-topic img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 7;
  object-fit: cover;
  background: var(--ea-primary-light);
}

.ea-home-topic__copy {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 1.15rem;
}

.ea-marketing--home .ea-home-access {
  padding-top: 0;
}

.ea-home-access__panel {
  display: grid;
  align-items: center;
  gap: 1rem 2.5rem;
  padding: clamp(1.3rem, 3.6vw, 3rem);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--ea-primary-dark), var(--ea-primary-hover));
}

.ea-home-access__panel h2 {
  color: white;
  max-width: 28ch;
}

.ea-home-access__panel .ea-copy {
  color: var(--ea-primary-light);
}

.ea-home-access__panel .ea-copy:last-child,
.ea-home-access__panel .ea-btn-group {
  margin: 0;
}

.ea-home-access__panel .ea-btn-group {
  flex-direction: column;
  align-items: flex-start;
}

@media (min-width: 700px) {
  .ea-home-author__panel {
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  }

  .ea-home-author__panel .ea-home-author__portrait {
    height: 100%;
    max-height: 27rem;
    aspect-ratio: 1;
  }

  .ea-home-walk__panel {
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  }
}

@media (min-width: 900px) {
  .ea-home-topic {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  }

  .ea-home-topic img {
    height: 100%;
    aspect-ratio: auto;
  }

  .ea-home-access__panel {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

@media (max-width: 640px) {
  .ea-home-hero__preview .ea-preview-image {
    max-height: 17rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ea-marketing--home .ea-card {
    transition: none;
  }
}
