/* Same theme tokens as the ScholaVerse app (frontend/src/index.css) */
:root {
  --background: 232 236 232;
  --border: 194 203 197;
  --border-strong: 122 135 127;
  --foreground: 15 24 19;
  --muted-foreground: 75 87 81;
  --primary: 18 89 74;
  --primary-foreground: 255 255 255;
  --primary-soft: 208 230 220;
  --surface: 255 255 255;
  --surface-2: 227 233 228;
  --radius: 0.5rem;
}
@media (prefers-color-scheme: dark) {
  :root {
    --background: 9 12 11;
    --border: 54 67 61;
    --border-strong: 102 117 109;
    --foreground: 238 244 240;
    --muted-foreground: 169 183 175;
    --primary: 98 211 173;
    --primary-foreground: 4 17 12;
    --primary-soft: 22 58 46;
    --surface: 21 28 25;
    --surface-2: 31 41 37;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: rgb(var(--background));
  color: rgb(var(--foreground));
  font-family: "Instrument Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2 { font-family: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif; }
svg { flex-shrink: 0; }

header {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 20px 16px;
}
.mark {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 9px;
  background: rgb(var(--primary));
  color: rgb(var(--primary-foreground));
  font-family: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  font-size: 0.875rem;
  font-weight: 650;
}
.wordmark {
  font-family: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  font-weight: 650;
  font-size: 1.05rem;
}

/* Language menu: same look as the app's login page switch (outline button + popover with radio items) */
.lang { position: relative; margin-left: auto; }
.lang summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  border: 1px solid rgb(var(--border-strong));
  border-radius: var(--radius);
  background: rgb(var(--surface));
  color: rgb(var(--foreground));
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  transition: background-color 0.15s;
}
.lang summary::-webkit-details-marker { display: none; }
.lang summary:hover { background: rgb(var(--surface-2)); }
.lang summary:focus-visible,
.lang-item:focus-visible {
  outline: 2px solid rgb(var(--primary));
  outline-offset: 2px;
}
.lang summary .chevron { color: rgb(var(--muted-foreground)); transition: transform 0.15s; }
.lang[open] summary .chevron { transform: rotate(180deg); }
.lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 10;
  width: 224px;
  padding: 6px;
  border: 1px solid rgb(var(--border));
  border-radius: 12px;
  background: rgb(var(--surface));
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}
.lang-menu p {
  margin: 0;
  padding: 6px 10px 4px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgb(var(--muted-foreground));
}
.lang-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius);
  color: rgb(var(--foreground));
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 0.15s;
}
.lang-item:hover { background: rgb(var(--surface-2)); }
.lang-item span { flex: 1; }
.lang-item[aria-current="page"] { color: rgb(var(--primary)); font-weight: 600; }

main {
  flex: 1;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 10vh 16px 48px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgb(var(--primary-soft));
  color: rgb(var(--primary));
}
.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
h1 {
  font-size: clamp(2.4rem, 7vw, 4rem);
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 20px 0 16px;
  max-width: 14ch;
}
h1 em {
  font-style: normal;
  color: rgb(var(--primary));
}
.lead {
  font-size: 1.15rem;
  color: rgb(var(--muted-foreground));
  max-width: 52ch;
  margin: 0 0 40px;
}

.products {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 40px;
}
.card {
  background: rgb(var(--surface));
  border: 1px solid rgb(var(--border));
  border-radius: var(--radius);
  padding: 20px;
}
.card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.card .mark {
  width: 30px;
  height: 30px;
  font-size: 0.75rem;
  border-radius: 8px;
}
.card h2 {
  font-size: 1.05rem;
  font-weight: 650;
  margin: 0;
}
.card p {
  margin: 0;
  color: rgb(var(--muted-foreground));
  font-size: 0.95rem;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
}
.button {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 18px;
  border-radius: var(--radius);
  background: rgb(var(--primary));
  color: rgb(var(--primary-foreground));
  font-weight: 600;
  text-decoration: none;
}
.button:hover { opacity: 0.9; }
.button:focus-visible {
  outline: 2px solid rgb(var(--primary));
  outline-offset: 2px;
}
.cta span { color: rgb(var(--muted-foreground)); font-size: 0.95rem; }

footer {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 16px;
  border-top: 1px solid rgb(var(--border));
  font-size: 0.85rem;
  color: rgb(var(--muted-foreground));
}
