/* Homepage styles. Scoped under .home so the global rules in bibaldi.css
   (p, a, h1, h2) don't leak in. */

.home {
  color: var(--color-black);
  font-family: var(--font-funnel);
  -webkit-font-smoothing: antialiased;
}

.home a {
  color: inherit;
  text-decoration: none;
}

.home-wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Buttons */
.home-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-plain);
  font-weight: 700;
  font-size: 1.05rem;
  padding: 14px 22px;
  border-radius: 2px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.home-btn:hover {
  transform: translateY(-2px);
}

.home-btn img {
  width: 24px;
  height: 24px;
}

.home-btn-yellow {
  background: var(--color-yellow);
  box-shadow: 0 4px 10px rgba(102, 126, 234, 0.3);
}

.home-btn-ghost {
  border: 1.5px solid var(--color-black);
}

/* Hero */
.home-hero {
  padding: 72px 0 40px;
}

.home-hero .home-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 56px;
  align-items: center;
}

.home h1.home-title {
  font-family: var(--font-accent);
  font-weight: 800;
  font-size: clamp(2.6rem, 5.6vw, 4.6rem);
  overflow-wrap: break-word;
  line-height: 0.9;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  text-align: left;
  color: var(--color-purple);
  margin: 0;
}

.home .home-lead {
  font-size: 1.2rem;
  line-height: 1.45;
  color: var(--color-lighterblack);
  max-width: 480px;
  margin: 22px 0 28px;
}

.home-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* Try-it box */
.home-try {
  background: #fff;
  border: 1.5px solid var(--color-black);
  box-shadow: 8px 8px 0 var(--color-black);
  padding: 28px;
  transform: rotate(1deg);
}

.home-try-tag {
  display: inline-block;
  font-family: var(--font-accent);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--color-lightestpurple);
  color: var(--color-purple);
  padding: 5px 9px;
}

.home .home-try-sentence {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.3;
  color: var(--color-black);
  margin: 22px 0 6px;
}

.home .home-try-hint {
  font-size: 0.9rem;
  color: var(--color-lighterblack);
  margin: 0 0 18px;
}

.home-try-form {
  display: flex;
  gap: 8px;
}

.home-try-form input {
  flex: 1;
  min-width: 0;
  font-family: var(--font-funnel);
  font-weight: 500;
  font-size: 1.1rem;
  padding: 12px 14px;
  border: 1.5px solid var(--color-black);
  border-radius: 2px;
  background: var(--color-beige);
  color: var(--color-black);
}

.home-try-form input:focus {
  outline: 3px solid var(--color-lightpurple);
  outline-offset: 1px;
}

.home-try-form button {
  font-family: var(--font-plain);
  font-weight: 700;
  font-size: 1rem;
  padding: 0 18px;
  border: 0;
  border-radius: 2px;
  background: var(--color-purple);
  color: #fff;
  cursor: pointer;
}

.home-try-feedback {
  min-height: 34px;
  margin-top: 14px;
  font-family: var(--font-bibaldi);
  font-weight: 700;
  font-size: 1.35rem;
}

.home-try-feedback.ok {
  color: var(--color-green);
}

.home-try-feedback.no {
  color: var(--color-orange);
}

.home-try-next {
  background: none;
  border: 0;
  padding: 0;
  font-family: var(--font-funnel);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-purple);
  text-decoration: underline;
  cursor: pointer;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Tenses */
.home-section {
  padding: 56px 0 0;
}

.home h2.home-h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 1;
  letter-spacing: -0.025em;
  color: var(--color-black);
  margin: 0 0 8px;
}

.home .home-sub {
  font-size: 1.05rem;
  color: var(--color-lighterblack);
  margin: 0 0 28px;
}

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

.home-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 210px;
  padding: 22px;
  border: 1.5px solid var(--color-black);
  border-radius: 2px;
  transition: transform 0.15s ease;
}

.home-card:hover {
  transform: translateY(-4px) rotate(-0.5deg);
}

.home .home-card h3 {
  font-family: var(--font-accent);
  font-weight: 700;
  font-size: 1.45rem;
  line-height: 1;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
}

.home .home-card p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.45;
  color: var(--color-black);
}

.home .home-card .home-ex {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin-top: 18px;
}

.home-ex b {
  font-weight: 400;
  background: rgba(255, 255, 255, 0.6);
  padding: 0 4px;
}

.home-card-1 { background: var(--color-lightestpurple); }
.home-card-2 { background: var(--color-pink); }
.home-card-3 { background: var(--color-lightgreen); }

/* Stories banner */
.home-stories {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  background: var(--color-lightblue);
  border: 1.5px solid var(--color-black);
  padding: 28px;
}

.home .home-stories h2 {
  font-family: var(--font-accent);
  font-weight: 700;
  font-size: 1.6rem;
  line-height: 1;
  margin: 0 0 8px;
}

.home .home-stories p {
  margin: 0;
  max-width: 560px;
  font-size: 1rem;
  line-height: 1.45;
  color: var(--color-black);
}

/* Points */
.home-points {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 28px;
  list-style: none;
  padding: 0;
  margin: 40px 0 0;
  font-family: var(--font-bibaldi);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--color-green);
}

@media (max-width: 900px) {
  .home-hero {
    padding: 40px 0 16px;
  }

  .home h1.home-title {
    font-size: clamp(2rem, 9.5vw, 4rem);
  }

  .home-hero .home-wrap {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
  }

  .home-try {
    transform: none;
    box-shadow: 6px 6px 0 var(--color-black);
  }
}

@media (max-width: 640px) {
  .home-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {

  .home-card {
    min-height: 0;
  }

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

  .home-actions .home-btn {
    flex: 1;
    justify-content: center;
  }
}
