/* Pole Position AI Lab — shared stylesheet
   Built strictly from the approved Pole Position Pro brand source:
   /_Arculat/README.md and PolePosition.Pro weboldal HTML 20260813.html
   Navy + gold palette, Space Grotesk headings, Inter body, 2px/4px radii
   (PPP never uses large rounded corners). Single-theme by design — the
   live PPP brand is a fixed dark navy identity, not a light/dark pair. */

:root {
  --navy: #0B132B;
  --navy-2: #0e1a3d;
  --card: #1a2550;
  --gold: #C9A66B;
  --gold-light: #DDBB86;
  --cream: #F8F5EE;
  --cream-2: #fffdf8;
  --muted: #C7C2B4;
  --muted-2: #8E96AE;
  --line: rgba(248, 245, 238, 0.08);
  --line-strong: rgba(248, 245, 238, 0.18);
}

* { box-sizing: border-box; }

html { text-wrap: balance; }

body {
  margin: 0;
  background: var(--navy);
  color: var(--cream);
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  line-height: 1.65;
  font-size: 16px;
}

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

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

h1, h2, h3, h4 {
  font-family: "Space Grotesk", "Segoe UI", sans-serif;
  font-weight: 600;
  line-height: 1.25;
  text-wrap: balance;
  color: var(--cream);
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(1.8rem, 3.5vw, 2.5rem); }
h2 { font-size: clamp(1.3rem, 2.2vw, 1.6rem); margin-top: 2em; }
h3 { font-size: 1.1rem; margin-top: 1.6em; }

p { color: var(--muted); }

code, pre {
  font-family: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 0.86em;
}

pre {
  background: var(--navy-2);
  color: var(--cream);
  padding: 18px 20px;
  border-radius: 4px;
  overflow-x: auto;
  line-height: 1.55;
  border: 1px solid var(--line);
}

code {
  background: var(--card);
  color: var(--cream);
  padding: 0.15em 0.4em;
  border-radius: 2px;
}
pre code { background: none; padding: 0; }

blockquote {
  border-left: 3px solid var(--gold);
  margin: 1.8em 0;
  padding: 0.4em 0 0.4em 1.2em;
  background: var(--card);
  border-radius: 0 4px 4px 0;
}
blockquote p { margin: 0.4em 0; color: var(--cream); }
blockquote a {
  display: inline-block;
  margin-top: 10px;
  background: var(--gold);
  color: var(--navy);
  font-weight: 600;
  font-size: 0.9em;
  padding: 10px 20px;
  border-radius: 2px;
}
blockquote a:hover { background: var(--gold-light); color: var(--navy); }

hr { border: none; border-top: 1px solid var(--line); }

/* Header */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--navy);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 24px;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Space Grotesk", sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--cream);
}
.brand:hover { color: var(--cream); opacity: 0.85; }
.brand .mark { display: inline-flex; width: 22px; height: 22px; }
.brand .mark svg { width: 100%; height: 100%; }
.brand span { color: var(--gold); }
.top-nav { display: flex; gap: 24px; font-size: 0.9rem; }
.top-nav a { color: var(--muted); }
.top-nav a:hover { color: var(--gold); }
.lang-switch { display: flex; gap: 4px; font-size: 0.8rem; }
.lang-switch a {
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid var(--line-strong);
  color: var(--muted);
}
.lang-switch a.active {
  background: var(--gold);
  color: var(--navy);
  border-color: var(--gold);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 60px;
  padding: 28px 24px;
  color: var(--muted-2);
  font-size: 0.85rem;
}
.site-footer a { color: var(--muted-2); text-decoration: underline; }
.site-footer a:hover { color: var(--gold); }

/* Landing / gate page */
.hero {
  position: relative;
  padding: 72px 0 48px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url('hero-cover.jpg');
  background-size: cover;
  background-position: center 30%;
  opacity: 0.32;
  z-index: 0;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(11,19,43,0.55) 0%, var(--navy) 92%);
  z-index: 0;
}
.hero > * {
  position: relative;
  z-index: 1;
}
.hero-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.25em;
  font-size: 0.75rem;
  color: var(--gold);
  font-weight: 600;
}
.hero h1 { margin-top: 0.5em; max-width: 16ch; }
.hero-sub {
  max-width: 62ch;
  color: var(--muted);
  font-size: 1.05rem;
  margin-top: 0.8em;
}
.hero-stats {
  display: flex;
  gap: 32px;
  margin-top: 32px;
  flex-wrap: wrap;
}
.hero-stat .num {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.7rem;
  font-weight: 600;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}
.hero-stat .label {
  font-size: 0.8rem;
  color: var(--muted-2);
}

.about-section {
  padding: 20px 0 48px;
  border-bottom: 1px solid var(--line);
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}
@media (max-width: 720px) {
  .about-grid { grid-template-columns: 1fr; }
}
.about-grid h3 { margin-top: 0; color: var(--cream); }
.about-grid p { color: var(--muted); }

/* Gate form */
.gate-section {
  padding: 48px 0 64px;
}
.gate-panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 36px;
  max-width: 560px;
  margin: 0 auto;
}
.gate-panel h2 { margin-top: 0; }
.gate-panel > p { color: var(--muted); }
.form-row {
  margin-bottom: 16px;
}
.form-row label {
  display: block;
  font-size: 0.8rem;
  color: var(--muted-2);
  margin-bottom: 6px;
}
.form-row input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: var(--navy);
  color: var(--cream);
  font-size: 1rem;
  font-family: inherit;
}
.form-row input:focus {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
}
.form-error {
  color: #e08a7a;
  font-size: 0.82rem;
  margin-top: 6px;
  display: none;
}
.form-error.show { display: block; }

.submit-btn {
  width: 100%;
  padding: 14px;
  background: var(--gold);
  color: var(--navy);
  border: none;
  border-radius: 2px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  font-family: "Inter", sans-serif;
}
.submit-btn:hover { background: var(--gold-light); }
.submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.form-status {
  margin-top: 14px;
  font-size: 0.88rem;
}
.form-status.success { color: var(--gold-light); }
.form-status.error { color: #e08a7a; }

/* Gate overlay (module pages).
   IMPORTANT: the [hidden] rule must come first and win — a plain
   `display: flex` on .gate-overlay outranks the browser's built-in
   `[hidden] { display: none }` UA style, because that UA rule sits in
   the lowest-priority layer. Without this, toggling the `hidden`
   attribute from JS has no visible effect and the overlay never goes
   away even after a successful gate check. */
.gate-overlay[hidden] {
  display: none;
}
.gate-overlay {
  position: fixed;
  inset: 0;
  background: rgba(11, 19, 43, 0.94);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 24px;
}
.gate-box {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 40px;
  max-width: 440px;
  text-align: center;
}
.gate-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.25em;
  font-size: 0.72rem;
  color: var(--gold);
  font-weight: 600;
  margin: 0 0 10px;
}
.gate-box h2 { margin-top: 0; }
.gate-box p { color: var(--muted); }
.gate-cta {
  display: inline-block;
  margin-top: 18px;
  background: var(--gold);
  color: var(--navy);
  padding: 12px 24px;
  border-radius: 2px;
  font-weight: 600;
}
.gate-cta:hover { background: var(--gold-light); color: var(--navy); }

/* Module page */
.module-page { padding: 40px 0 60px; }
.breadcrumb { font-size: 0.82rem; color: var(--muted-2); margin-bottom: 18px; }
.breadcrumb a { color: var(--muted-2); }
.breadcrumb a:hover { color: var(--gold); }
.module-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.25em;
  font-size: 0.75rem;
  color: var(--gold);
  font-weight: 600;
  margin: 0 0 8px;
}
.module-body { max-width: 74ch; color: var(--cream); }
.module-body ul, .module-body ol { padding-left: 1.3em; color: var(--muted); }
.module-body li { margin-bottom: 0.4em; }
.module-body li strong { color: var(--cream); }
.module-body hr { margin: 2.4em 0; }

/* Catalog / index page */
.catalog-page { padding: 40px 0 60px; }
.catalog-intro { max-width: 70ch; color: var(--muted); font-size: 1.02rem; }
.category-section { margin-top: 56px; }
.category-section:first-of-type { margin-top: 32px; }
.category-cover {
  position: relative;
  height: 190px;
  border-radius: 4px;
  border: 1px solid var(--line);
  background-color: var(--navy-2);
  background-size: cover;
  background-position: center 38%;
  margin-bottom: 18px;
  overflow: hidden;
}
@media (max-width: 640px) {
  .category-cover { height: 130px; }
}
.category-cover-emoji {
  position: absolute;
  left: 20px;
  bottom: 16px;
  font-size: 1.6rem;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.5));
}
.category-desc { color: var(--muted); margin-top: -4px; margin-bottom: 20px; }

/* Start Here / Kezdj itt intro block (catalog pages) */
.start-here {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 24px 28px;
  margin: 24px 0 8px;
}
.start-here-title {
  margin-top: 0;
}
.start-here > p {
  color: var(--cream);
  max-width: 70ch;
}
.start-here-steps {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.start-here-steps li {
  color: var(--muted);
  max-width: 70ch;
}
.start-here-steps li strong {
  color: var(--cream);
}
.mod-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.mod-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 18px 20px;
  color: var(--cream);
}
.mod-card:hover {
  border-color: var(--gold);
  color: var(--cream);
}
.mod-num {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  color: var(--gold);
  letter-spacing: 0.04em;
}
.mod-title { font-weight: 600; }
