/* ============================================================
   HOME PAGE
   All selectors scoped to #home so styles cannot leak to other pages.
   ============================================================ */

/* --- Hero ---------------------------------------------------- */

#home .ed-hero {
  padding: 26px 0 0;
  margin-bottom: 48px;
}

/* Masthead: site name in a card matching the page's other cards, with a
   folder tab clipped to its top edge. */
#home .ed-masthead {
  position: relative;
  margin-top: 30px;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-bottom: 3px solid var(--accent);
  border-radius: 8px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
  padding: 34px 30px;
}

#home .ed-masthead__tab {
  position: absolute;
  bottom: 100%;
  left: 24px;
  margin-bottom: -1px;
  padding: 7px 16px;
  background: var(--accent);
  color: #fff;
  font-family: var(--body);
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  border-radius: 7px 7px 0 0;
}

#home .ed-masthead__name {
  font-family: var(--display);
  font-size: clamp(2rem, 6.8vw, 3rem);
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0;
}

#home .ed-sub {
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink-soft);
  margin: 16px 0 0;
  max-width: 52ch;
}

#home .ed-cta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  margin-top: 26px;
}

/* --- CTA button --------------------------------------------- */

#home .ed-btn {
  display: inline-block;
  padding: 13px 28px;
  background: var(--accent);
  color: #fff;
  font-family: var(--body);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  border-radius: 9999px;
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

#home .ed-btn:hover,
#home .ed-btn:focus {
  background: var(--accent-dark);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(var(--accent-rgb), 0.28);
}

#home .ed-signin {
  font-family: var(--body);
  font-size: 0.875rem;
  color: var(--ink-faint);
  margin: 0;
  text-align: left;
}

#home .ed-signin a {
  color: var(--ink-soft);
  text-decoration: underline;
}

#home .ed-signin a:hover {
  color: var(--accent);
}

/* --- Sections ----------------------------------------------- */

#home .ed-section {
  margin-bottom: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--rule);
}

/* The last section sits above the footer's own rule — don't double it up. */
#home .ed-section:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

#home .ed-label {
  font-family: var(--body);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--ink-faint);
  margin: 0 0 20px;
}

/* --- Cards -------------------------------------------------- */

#home .ed-card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 20px 18px;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

#home .ed-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: inset 0 -2px 0 0 var(--accent), 0 4px 14px rgba(0, 0, 0, 0.07);
}

/* --- Steps -------------------------------------------------- */

#home .ed-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

#home .ed-step {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

#home .ed-step img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  opacity: 0.85;
}

#home .ed-step__body {
  display: flex;
  flex-direction: column;
}

#home .ed-step h3 {
  font-family: var(--body);
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 4px;
  line-height: 1.25;
}

#home .ed-step p {
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink-soft);
  margin: 0;
}

/* --- About -------------------------------------------------- */

#home .ed-about__grid {
  display: grid;
  grid-template-columns: 1fr 200px;
  gap: 36px;
  align-items: center;
}

#home .ed-about__text p {
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.72;
  color: var(--ink-soft);
  margin: 0 0 0.85em;
}

#home .ed-about__text p:last-child {
  margin-bottom: 0;
}

#home .ed-about__text a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(var(--accent-rgb), 0.3);
  transition: border-color 0.12s ease;
}

#home .ed-about__text a:hover {
  border-bottom-color: var(--accent);
}

#home .ed-about__img {
  display: block;
  max-width: 220px;
  width: 100%;
  height: auto;
  border-radius: 8px;
}

/* --- Prompts ------------------------------------------------ */

#home .ed-prompts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

#home .ed-prompt-card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 18px 16px;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

#home .ed-prompt-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: inset 0 -2px 0 0 var(--accent), 0 4px 14px rgba(0, 0, 0, 0.07);
}

#home .ed-day {
  font-family: var(--body);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 4px;
  line-height: 1.2;
}

#home .ed-genre {
  font-family: var(--body);
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin: 0 0 8px;
}

#home .ed-text {
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink-soft);
  margin: 0;
  overflow-wrap: break-word;
}

/* Today highlight */
#home .ed-prompt-card.is-today {
  border-color: var(--accent);
  background: rgba(var(--accent-rgb), 0.035);
}

#home .ed-prompt-card.is-today .ed-day::after {
  content: " \00B7 Today";
  color: var(--accent);
  font-weight: 400;
}

/* --- Final CTA ---------------------------------------------- */

#home .ed-final {
  padding: 52px 0 40px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

#home .ed-final__title {
  font-family: var(--body);
  font-size: clamp(1.3rem, 4vw, 1.75rem);
  font-weight: 900;
  line-height: 1.2;
  color: var(--ink);
  letter-spacing: -0.01em;
  margin: 0;
}

/* --- Responsive --------------------------------------------- */

/* Small screens: 2-column steps and prompts */
@media (max-width: 576px) {
  #home .ed-hero {
    padding: 40px 0 0;
    margin-bottom: 36px;
  }

  #home .ed-steps {
    grid-template-columns: repeat(2, 1fr);
  }

  #home .ed-about__grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  #home .ed-about__img {
    max-width: 190px;
    justify-self: center;
  }

  #home .ed-prompts {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Narrow: single column */
@media (max-width: 400px) {
  #home .ed-hero {
    padding: 28px 0 0;
    margin-bottom: 28px;
  }

  #home .ed-masthead {
    padding: 26px 22px;
  }

  #home .ed-steps {
    grid-template-columns: 1fr;
  }

  #home .ed-step {
    flex-direction: row;
    align-items: center;
    gap: 16px;
  }

  #home .ed-step img {
    flex-shrink: 0;
  }

  #home .ed-step__body {
    flex: 1;
    min-width: 0;
  }

  #home .ed-prompts {
    grid-template-columns: 1fr;
  }

  #home .ed-section {
    margin-bottom: 32px;
    padding-bottom: 32px;
  }

  #home .ed-final {
    padding: 36px 0 28px;
  }
}

/* --- Reduced motion ----------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  #home .ed-btn,
  #home .ed-card,
  #home .ed-prompt-card {
    transition: none;
  }

  #home .ed-btn:hover,
  #home .ed-btn:focus,
  #home .ed-card:hover,
  #home .ed-prompt-card:hover {
    transform: none;
  }
}
