@import url("tokens.css");

@font-face {
  font-family: "Libre Baskerville";
  src: url("../fonts/libre-baskerville/LibreBaskerville-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Libre Baskerville";
  src: url("../fonts/libre-baskerville/LibreBaskerville-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Libre Baskerville";
  src: url("../fonts/libre-baskerville/LibreBaskerville-Italic.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--color-page-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  line-height: 1.5;
}

a { color: var(--color-link); }
a:hover { text-decoration: none; }

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--color-badge-border);
  line-height: 1.25;
}
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin-top: var(--space-lg); }
h3 { font-size: 1.2rem; font-family: var(--font-serif); font-style: italic; color: var(--color-text); }

/* Teaching Resources: a touch more professional — serif headings instead of
   the marker-style font used everywhere else, same palette otherwise. */
body.teaching-resources h1,
body.teaching-resources h2 {
  font-family: var(--font-serif);
  font-style: normal;
  font-weight: 700;
}

main {
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: var(--space-md) var(--space-sm);
}

/* --- Header / nav --- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-sm);
  background: var(--color-nav-brown);
  padding: var(--space-xs) var(--space-md);
}
.site-brand {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  text-decoration: none;
  color: #fff;
}
.site-brand-icon { width: 40px; height: 40px; border-radius: 8px; }
.site-brand-name { font-family: var(--font-display); font-size: 1.3rem; }
.site-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin: 0;
  padding: 0;
}
.site-nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}
.site-nav a:hover { text-decoration: underline; }

/* --- Hero --- */
.hero { text-align: center; }
.hero-image { width: 120px; height: 120px; border-radius: 24px; margin-bottom: var(--space-sm); }
.icon-evolution {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  flex-wrap: wrap;
}
.icon-evolution-item {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.icon-evolution-item span {
  font-weight: 600;
  color: var(--color-text-muted);
  margin-top: calc(-1 * var(--space-sm) + 4px);
}
.icon-evolution-arrow {
  font-size: 2rem;
  color: var(--color-text-muted);
}
.map-category {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  font-weight: 700;
}
.map-hero-image {
  width: 220px;
  height: 220px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: var(--space-sm);
}
.resource-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.resource-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  text-decoration: none;
  color: var(--color-text);
}
.resource-card img {
  width: 100%;
  max-width: 200px;
  border-radius: 8px;
  border: 1px solid var(--color-badge-border);
}
.resource-card span { font-weight: 600; text-align: center; }

.state-grid { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); padding: 0; }
.state-grid li { list-style: none; }
.state-grid a {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  text-decoration: none;
  color: var(--color-text);
  font-weight: 600;
}
.state-flag { width: 40px; height: auto; border: 1px solid var(--color-badge-border); }
.state-flag-hero { width: 160px; height: auto; margin-bottom: var(--space-sm); border: 2px solid var(--color-badge-border); }

.gallery-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); padding: 0; }
.gallery-grid li { list-style: none; background: none; padding: 0; }
.gallery-grid a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  text-decoration: none;
  color: var(--color-text);
  background: var(--color-parchment);
  border-radius: var(--radius);
  padding: var(--space-sm);
}
.gallery-grid img { width: 100%; max-width: 100px; border-radius: 8px; }
.gallery-grid span { font-weight: 600; text-align: center; font-size: 0.9rem; }

.press-screenshot-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  padding: 0;
  justify-content: center;
}
.press-screenshot-grid li { list-style: none; }
.press-screenshot-grid img {
  height: 360px;
  width: auto;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.overview-grid { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.overview-grid li { list-style: none; text-align: center; }
.overview-grid img {
  width: 100%;
  max-width: 160px;
  border-radius: 8px;
  border: 1px solid var(--color-badge-border);
  margin-bottom: var(--space-xs);
}
.overview-caption { font-size: 0.9rem; color: var(--color-text-muted); margin: 0; }
.overview-note { font-size: 0.9rem; color: var(--color-text-muted); }
.coming-soon-banner {
  display: inline-block;
  background: var(--color-badge-bg);
  color: var(--color-badge-text);
  border: 2px solid var(--color-badge-border);
  border-radius: 999px;
  padding: var(--space-xs) var(--space-md);
  font-weight: 700;
  margin-bottom: var(--space-sm);
}
.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  margin-top: var(--space-md);
  flex-wrap: wrap;
}
.app-store-badge { height: 48px; width: auto; }
.qr-code { width: 100px; height: 100px; }

/* --- Badge / callout --- */
.badge-section { display: flex; justify-content: center; }
.badge {
  background: var(--color-badge-bg);
  color: var(--color-badge-text);
  border: 3px solid var(--color-badge-border);
  border-radius: var(--radius);
  padding: var(--space-md);
  max-width: 640px;
  text-align: center;
}
.badge-headline { font-family: var(--font-display); font-size: 1.2rem; margin: 0 0 var(--space-xs); }

/* --- Feature sections --- */
.feature-section, .whats-new-section { margin-bottom: var(--space-lg); }
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-sm);
  list-style: none;
  padding: 0;
}
.card-grid li {
  background: var(--color-parchment);
  border-radius: var(--radius);
  padding: var(--space-sm);
}
.level-list { padding-left: 1.25rem; }
.level-list li { margin-bottom: var(--space-xs); }

/* --- Footer --- */
.site-footer {
  text-align: center;
  padding: var(--space-md);
  background: var(--color-parchment);
  margin-top: var(--space-lg);
}
.site-footer-social { display: flex; justify-content: center; gap: var(--space-sm); margin-bottom: var(--space-sm); }
.site-footer-links { display: flex; justify-content: center; flex-wrap: wrap; gap: var(--space-sm); margin-bottom: var(--space-xs); }
.site-footer-copyright { color: var(--color-text-muted); font-size: 0.9rem; margin: 0; }

/* --- Legal pages --- */
.legal { text-align: left; }
.legal h1 { text-align: center; }
.lang-switcher { display: flex; justify-content: center; gap: var(--space-sm); margin-bottom: var(--space-sm); }
