/* Guest landing page (index) specific styles */

.hero-card {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  overflow: hidden;
}

.hero-card__body h1 {
  color: var(--pri);
  margin-bottom: 0.75rem;
}

.hero-card__body p {
  max-width: 60ch;
}

.hero-card__illustration {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--bd-2);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.18);
}

.hero-card__illustration img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-cta {
  margin-top: 1.5rem;
  padding: 1rem;
  background: var(--bg-2);
  border-radius: 12px;
  border: 1px solid var(--bd-2);
}

.hero-cta .link {
  color: var(--pri);
  text-decoration: none;
  font-weight: 500;
}

.hero-cta .link:hover {
  text-decoration: underline;
}

.lang-picker {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: var(--bg-2);
  border: 1px solid var(--bd-2);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
  gap: 0.25rem;
}

.lang-picker select {
  background: transparent;
  border: none;
  color: var(--tx-0);
  font-size: 0.95rem;
  padding: 0.25rem 0.5rem;
  appearance: none;
  cursor: pointer;
}

.lang-picker select:focus {
  outline: none;
}

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

.topics {
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.topics-head h2 {
  margin: 0;
  color: var(--pri);
}

.topics-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}


.topic-card {
  padding: 1.5rem;
  border-radius: 12px;
  background: var(--bg-2);
  border: 1px solid var(--bd-2);
  display: grid;
  gap: 1rem;
  grid-template-columns: minmax(160px, 200px) minmax(0, 1fr);
  align-items: center;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.topic-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  order: 2;
}

.topic-card__illustration {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 18px;
  background: var(--bg-1);
  border: 1px dashed var(--bd-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--tx-2);
  font-size: 0.8rem;
  text-align: center;
  padding: 1rem;
  position: relative;
  overflow: hidden;
  order: 1;
}

.topic-card__illustration::after {
  content: "Add illustration";
  pointer-events: none;
}

.topic-card--culture .topic-card__illustration {
  background: url("/src/frontend/assets/topics/lang.jpg") center/cover no-repeat;
  border-style: solid;
}

.topic-card--culture .topic-card__illustration::after {
  content: "";
}

.topic-card--engine .topic-card__illustration {
  background: url("/src/frontend/assets/topics/Self-hosted_translation_engine.jpg") center/cover no-repeat;
  border-style: solid;
}

.topic-card--engine .topic-card__illustration::after {
  content: "";
}

.topic-card--uilocal .topic-card__illustration {
  background: url("/src/frontend/assets/topics/UI_localization.jpg") center/contain no-repeat;
  border-style: solid;
}

.topic-card--uilocal .topic-card__illustration::after {
  content: "";
}

.topic-card--devflow .topic-card__illustration {
  background: url("/src/frontend/assets/topics/Developer-first_workflow.jpg") center/contain no-repeat;
  border-style: solid;
}

.topic-card--devflow .topic-card__illustration::after {
  content: "";
}

.topic-card--governance .topic-card__illustration {
  background: url("/src/frontend/assets/topics/Governance-compliance_controls.jpg") center/cover no-repeat;
  border-style: solid;
}

.topic-card--governance .topic-card__illustration::after {
  content: "";
}

.topic-card--tech .topic-card__illustration {
  background: url("/src/frontend/assets/topics/tec.jpg") center/cover no-repeat;
  border-style: solid;
}

.topic-card--tech .topic-card__illustration::after {
  content: "";
}

.topic-card--policy .topic-card__illustration {
  background: url("/src/frontend/assets/topics/PolicySociety.jpg") center/cover no-repeat;
  border-style: solid;
}

.topic-card--policy .topic-card__illustration::after {
  content: "";
}

.topic-card--learning .topic-card__illustration {
  background: url("/src/frontend/assets/topics/LocalizationOps.jpg") center/cover no-repeat;
  border-style: solid;
}

.topic-card--learning .topic-card__illustration::after {
  content: "";
}

.topic-card:nth-child(even) {
  grid-template-columns: minmax(0, 1fr) minmax(160px, 200px);
}

.topic-card:nth-child(even) .topic-card__illustration {
  order: 2;
}

.topic-card:nth-child(even) .topic-card__body {
  order: 1;
}

.topic-card h3 {
  margin: 0;
  font-size: 1.15rem;
}

.topic-card p {
  margin: 0;
  color: var(--tx-1);
}

.topic-card .topic-meta {
  font-size: 0.85rem;
  color: var(--tx-2);
  font-family: var(--mono, monospace);
}

.topic-card .link {
  font-weight: 600;
  text-decoration: none;
}

.topic-card .link:hover {
  text-decoration: underline;
}

.topic-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 28px rgba(0, 0, 0, 0.2);
}

.features {
  margin-top: 3rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.features-head h2 {
  margin: 0;
  color: var(--pri);
}

.features-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.feature-card {
  padding: 1.5rem;
  border-radius: 16px;
  border: 1px solid var(--bd-2);
  background: var(--bg-2);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.feature-card h3 {
  margin: 0;
  font-size: 1.1rem;
  color: var(--tx-0);
}

.feature-card p {
  margin: 0;
  color: var(--tx-1);
  line-height: 1.6;
}

@media (max-width: 768px) {
  .hero-card {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .hero-card__illustration {
    max-width: 420px;
    margin: 0 auto;
  }

  .lang-picker {
    padding: 0.25rem 0.5rem;
    width: 100%;
    justify-content: space-between;
  }

  .lang-picker select {
    width: 100%;
  }

  .topic-card {
    grid-template-columns: 1fr;
  }

  .topic-card__illustration {
    aspect-ratio: 3 / 2;
    margin-top: 0.5rem;
    order: 2;
  }

  .topic-card__body {
    order: 1;
  }

  .topic-card:nth-child(even) {
    grid-template-columns: 1fr;
  }

  .topic-card:nth-child(even) .topic-card__illustration,
  .topic-card:nth-child(even) .topic-card__body {
    order: initial;
  }
}
