
/* =========================================
   CHESS MEMORY PALACE — HOMEPAGE
   ========================================= */

/*
  Page-specific styles only.

  Shared colours, fonts, buttons, containers,
  and section spacing are defined in style.css.
*/


/* =========================================
   HERO
   ========================================= */

.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
  gap: clamp(40px, 6vw, 90px);

  padding-block: var(--section-spacing);
}

.home-kicker {
  margin-bottom: 18px;
  color: var(--color-accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  line-height: 1.5;
  text-transform: uppercase;
}

.home-hero h1 {
  margin: 0 0 26px;
  font-size: clamp(2.5rem, 4.5vw, 4.5rem);
  line-height: 1.12;
}

.home-lead {
  font-size: clamp(1.15rem, 1.8vw, 1.4rem);
  font-weight: 500;
  line-height: 1.55;
}

.home-hero-copy > p:not(.home-kicker) {
  max-width: 590px;
}

.home-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 30px;
}

.home-hero-art {
  display: flex;
  align-items: center;
  justify-content: center;
}

.home-hero-art img {
  width: 100%;
  max-width: 370px;
  height: auto;
  filter: drop-shadow(12px 18px 18px rgba(0, 0, 0, 0.14));
}


/* =========================================
   THE PROBLEM
   ========================================= */

.home-problem {
  background: var(--color-surface);
}

.home-problem h2 {
  margin: 0 0 28px;
}

.home-problem .lead {
  color: var(--color-text);
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  font-weight: 400;
}


/* =========================================
   FIVE-STEP METHOD
   ========================================= */

.home-section-heading {
  max-width: 720px;
  margin-bottom: 40px;
}

.home-section-heading h2 {
  margin: 0 0 16px;
}

/*
  Six-column grid allows:
  - Three cards on the first row
  - Two centred cards on the second row

  Each card occupies two columns.
*/

.home-method-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 22px;
}

.home-method-card {
  grid-column: span 2;

  padding: 30px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
}

/* Centre the final two cards */

.home-method-card:nth-last-child(2) {
  grid-column: 2 / span 2;
}

.home-method-number {
  display: block;
  margin-bottom: 22px;
  color: var(--color-accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.home-method-card h3 {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 400;
}

.home-method-card p {
  margin-bottom: 0;
  color: var(--color-muted);
  font-size: 0.95rem;
}


/* =========================================
   FREE BOOK SAMPLE
   ========================================= */

.home-sample {
  background: var(--color-accent);
  color: #ffffff;
  text-align: center;
}

.home-sample .home-kicker {
  color: #d3e9da;
}

.home-sample h2 {
  margin: 0 0 24px;
}

.home-sample p:not(.home-kicker) {
  max-width: 650px;
  margin: 0 auto 30px;
}

.home-sample .button--primary {
  background: #ffffff;
  color: var(--color-accent);
}

.home-sample .button--primary:hover {
  background: #e9eee8;
  color: var(--color-accent-hover);
}


/* =========================================
   WORKED EXAMPLES
   ========================================= */

.home-examples {
  text-align: center;
}

.home-examples h2 {
  margin: 0 0 24px;
}

.home-examples .button {
  margin-top: 12px;
}


/* =========================================
   FREE TOOL
   ========================================= */

.home-tool {
  border-top: 1px solid var(--color-border);
  text-align: center;
}

.home-tool h2 {
  margin: 0 0 24px;
}

.home-tool p:not(.home-kicker) {
  max-width: 620px;
  margin-inline: auto;
}


/* =========================================
   TABLET
   ========================================= */

@media (max-width: 900px) {

  .home-hero {
    gap: 35px;
  }

  .home-method-grid {
    gap: 15px;
  }

  .home-method-card {
    padding: 22px;
  }

}


/* =========================================
   MOBILE
   ========================================= */

@media (max-width: 700px) {

  /* Hero: cover above the text */

  .home-hero {
    grid-template-columns: 1fr;
    gap: 35px;
    padding-block: var(--section-spacing);
  }

  .home-hero h1 {
    font-size: clamp(2.3rem, 9vw, 3.2rem);
  }

  .home-hero-art {
    grid-row: 1;
  }

  .home-hero-art img {
    max-width: 245px;
  }

  .home-actions {
    gap: 12px;
  }

  /* Method: one card per row */

  .home-method-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .home-method-card,
  .home-method-card:nth-last-child(2) {
    grid-column: auto;
  }

  .home-method-card {
    padding: 24px;
  }

  .home-section-heading {
    margin-bottom: 28px;
  }

  /* Content alignment */

  .home-sample,
  .home-examples,
  .home-tool {
    text-align: left;
  }

  .home-sample p:not(.home-kicker),
  .home-tool p:not(.home-kicker) {
    margin-inline: 0;
  }

}
