* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  color: var(--color-text, #201f1a);
  background: var(--color-bg, #e7e3d7);
}

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem clamp(1rem, 4vw, 2.5rem);
  flex-wrap: wrap;
}

nav a {
  color: var(--color-text, #201f1a);
  text-decoration: none;
  margin-right: 1rem;
  font-weight: 600;
}

nav a:hover {
  color: var(--color-link, #b04b13);
}

nav img {
  height: 40px;
  display: block;
}

main {
  padding: 0;
}

/* ── Hero ─────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  background-color: #12241a;
  background-image:
    linear-gradient(180deg, rgba(10, 15, 10, 0.15) 0%, rgba(8, 12, 8, 0.65) 85%),
    url("/static/desktop.webp");
  background-size: cover, cover;
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
  color: #fdfbf6;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1.5rem 5.5rem;
}

@media (max-width: 639px) {
  .hero {
    background-image:
      linear-gradient(180deg, rgba(10, 15, 10, 0.15) 0%, rgba(8, 12, 8, 0.65) 85%),
      url("/static/mobile.webp");
  }
}

.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.9rem, 5vw, 2.75rem);
  font-weight: 800;
  line-height: 1.2;
  white-space: pre-line;
  color: #fdfbf6;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
  max-width: 700px;
}

.hero p {
  margin: 0 auto;
  max-width: 520px;
  font-size: 1.05rem;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.55);
  color: #f3f0e8;
}

#hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  margin: -3.25rem auto 3rem;
  padding: 0 1.5rem;
  position: relative;
  z-index: 2;
}

#hero-cta .button {
  display: inline-block;
  border-radius: 999px;
  padding: 0.9rem 1.75rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s ease;
}

#hero-cta .button:hover {
  transform: translateY(-1px);
}

#hero-cta .button:first-child {
  background: var(--color-surface, #f4f1e9);
  color: var(--color-text, #201f1a);
}

#hero-cta .button:last-child {
  background: var(--color-link, #b04b13);
  color: #fff;
}

/* ── Cards ────────────────────────────────────────────────────────────── */

.cards-section {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem 1rem;
}

/* ── Main content (Markdown) ─────────────────────────────────────────── */

.main-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 1rem 1.5rem 2rem;
}

.cards-section .row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .cards-section .row {
    grid-template-columns: 1fr 1fr;
  }
}

.cards-section .card {
  background: transparent;
  border: none;
  border-radius: 0;
}

.cards-section .card-img-top {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 16px;
  display: block;
}

.cards-section .card-body {
  padding: 0.9rem 0 0;
}

.cards-section .card-title {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
  font-weight: 700;
}

.cards-section .card-text {
  margin: 0;
  color: var(--color-text, #201f1a);
  opacity: 0.8;
  font-size: 0.95rem;
}

.cards-section .card-footer {
  display: none;
}

/* ── Markdown content ─────────────────────────────────────────────────── */

h1, h2, h3, h4, h5, h6 {
  line-height: 1.25;
  margin: 1.5rem 0 0.75rem;
  color: var(--color-primary, #163f2c);
}

p, ul, ol {
  margin: 0.75rem 0;
}

a {
  color: var(--color-link, #b04b13);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
}

hr {
  border: none;
  border-top: 1px solid var(--color-border, #d8d2c0);
  margin: 2rem 0;
}

/* ── Language switcher ────────────────────────────────────────────────── */

.lang-switcher {
  display: inline-block;
}

.lang-switcher form {
  display: flex;
  gap: 0.25rem;
}

.lang-switcher button {
  background: none;
  border: 1px solid transparent;
  border-radius: 4px;
  color: var(--color-link, #b04b13);
  cursor: pointer;
  font-size: 0.85rem;
  padding: 0.1rem 0.4rem;
}

.lang-switcher button:hover,
.lang-switcher button.lang-active {
  border-color: var(--color-link, #b04b13);
  font-weight: 600;
}

@media (max-width: 639px) {
  .lang-switcher .lang-label {
    display: none;
  }
}

/* ── Footer ───────────────────────────────────────────────────────────── */

body > footer {
  border-top: 1px solid var(--color-border, #d8d2c0);
  color: var(--color-text, #201f1a);
  padding: 2rem 0 2.5rem;
  text-align: left;
}

body > footer > * {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 1.5rem;
}

body > footer p:first-child {
  opacity: 0.75;
  font-size: 0.9rem;
  margin-top: 0;
  margin-bottom: 1rem;
}

body > footer p a {
  display: inline-block;
  margin: 0 1rem;
  font-weight: 600;
  color: var(--color-text, #201f1a);
}

body > footer p a:hover {
  color: var(--color-link, #b04b13);
}

body > footer small {
  display: block;
  margin-top: 1.5rem;
  opacity: 0.5;
  font-size: 0.75rem;
}
