:root {
  --bg: #070b14;
  --surface: rgba(17, 24, 39, 0.72);
  --surface-hover: rgba(24, 34, 56, 0.88);
  --border: rgba(148, 163, 184, 0.16);
  --border-strong: rgba(148, 163, 184, 0.3);
  --text: #f1f5f9;
  --muted: #94a3b8;
  --accent: #38bdf8;
  --radius: 18px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

.bg-glow {
  position: fixed;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  filter: blur(130px);
  opacity: 0.16;
  pointer-events: none;
  z-index: -1;
}
.bg-glow-1 { top: -180px; left: -120px; background: #38bdf8; }
.bg-glow-2 { bottom: -200px; right: -120px; background: #a78bfa; }

/* Felső lebegő menüsor */
.navbar-wrap {
  position: sticky;
  top: 0;
  z-index: 40;
  padding: 0.9rem 1.25rem;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(7, 11, 20, 0.72);
  border-bottom: 1px solid var(--border);
}

.navbar {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 0.98rem;
  letter-spacing: -0.01em;
}

.brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, #38bdf8, #34d399);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.8);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.nav-link {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.42rem 0.8rem;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.nav-link:hover,
.nav-link.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--border);
}

.nav-link.disabled {
  opacity: 0.5;
  cursor: default;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 3rem 1.25rem 4rem;
}

/* Welcome 1/3 kép + 2/3 szabad szöveg elrendezés */
.welcome-split {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 1.75rem;
  align-items: stretch;
  margin-bottom: 3rem;
}

.welcome-media {
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  padding: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 20px 50px -24px rgba(0, 0, 0, 0.85);
}

.welcome-media img {
  width: 100%;
  height: auto;
  max-height: 460px;
  object-fit: contain;
  border-radius: 10px;
  display: block;
}

.welcome-text {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 2.15rem;
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.eyebrow {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

h1 {
  margin: 0 0 0.9rem;
  font-size: clamp(1.7rem, 3.2vw, 2.55rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
  font-weight: 800;
  background: linear-gradient(180deg, #ffffff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.lead {
  margin: 0 0 1.4rem;
  font-size: 1.02rem;
  color: var(--muted);
}

.story-block {
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.story-block h2 {
  margin: 0 0 0.75rem;
  font-size: 1.12rem;
  letter-spacing: -0.01em;
}

.story-body p {
  margin: 0 0 0.75rem;
  color: #cbd5e1;
  font-size: 0.96rem;
}
.story-body p:last-child { margin-bottom: 0; }

/* Projektek szekció */
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1.15rem;
}

.section-head h2 {
  margin: 0;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
}

.section-count {
  font-size: 0.85rem;
  color: var(--muted);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.15rem;
}

.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  transition: transform 0.22s ease, border-color 0.22s ease, background 0.22s ease, box-shadow 0.22s ease;
  overflow: hidden;
}

.project-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--card-accent, var(--accent));
  opacity: 0.85;
}

.project-card.clickable:hover {
  transform: translateY(-4px);
  background: var(--surface-hover);
  border-color: var(--border-strong);
  box-shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.75);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.icon-box {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--card-accent, var(--accent));
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--muted);
}

.status-pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--card-accent, var(--accent));
}

.status-pill.live { color: #86efac; border-color: rgba(52, 211, 153, 0.35); background: rgba(52, 211, 153, 0.1); }
.status-pill.beta { color: #fcd34d; border-color: rgba(245, 158, 11, 0.35); background: rgba(245, 158, 11, 0.1); }

.card-title {
  margin: 0.85rem 0 0.25rem;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.card-tagline {
  margin: 0 0 0.75rem;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--card-accent, var(--accent));
}

.card-desc {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1rem;
}

.tag {
  font-size: 0.73rem;
  font-weight: 500;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  background: rgba(148, 163, 184, 0.1);
  color: #cbd5e1;
}

.card-cta {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.9rem;
  border-top: 1px solid var(--border);
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text);
}

.card-cta.muted-cta {
  color: var(--muted);
  font-weight: 500;
}

.footer {
  max-width: 1120px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 2.5rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.84rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.hidden { display: none !important; }

/* Projekt részletes nézet: bal 2/3 (1-2-3 sorban lefelé) + jobb 1/3 lebegő (sticky) infó doboz */
.detail-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.back-btn,
.launch-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.6rem 1rem;
  border-radius: 10px;
  transition: all 0.2s ease;
}

.back-btn {
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
}
.back-btn:hover { color: var(--text); border-color: var(--border-strong); }

.launch-btn {
  color: #06101c;
  background: var(--detail-accent, var(--accent));
  width: 100%;
  margin-top: 1.25rem;
}
.launch-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }

.detail-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
  align-items: start;
}

.pillars-stack {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.detail-sidebar {
  position: sticky;
  top: 5.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--detail-accent, var(--accent));
  border-radius: var(--radius);
  padding: 1.6rem;
  backdrop-filter: blur(12px);
  box-shadow: 0 20px 45px -24px rgba(0, 0, 0, 0.8);
}

.detail-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.detail-sidebar h1 {
  margin: 0 0 0.25rem;
  font-size: 1.65rem;
}

.detail-sidebar .sidebar-desc {
  margin: 0.85rem 0 0;
  font-size: 0.92rem;
  color: var(--muted);
}

.pillar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.65rem 1.85rem;
  backdrop-filter: blur(12px);
}

.pillar-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.pillar-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border-radius: 9px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--detail-accent, var(--accent));
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
}

.pillar-card h2 {
  margin: 0;
  font-size: 1.16rem;
  letter-spacing: -0.01em;
}

.pillar-card p {
  margin: 0 0 0.75rem;
  color: #cbd5e1;
  font-size: 0.96rem;
}
.pillar-card p:last-child { margin-bottom: 0; }

.video-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.video-card h2 {
  margin: 0 0 1rem;
  font-size: 1.1rem;
}

.video-embed {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #000;
}

.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

@media (max-width: 900px) {
  .detail-layout { grid-template-columns: 1fr; }
  .detail-sidebar { position: static; order: -1; }
}

.footer-admin-link {
  color: var(--muted);
  text-decoration: none;
  opacity: 0.65;
}
.footer-admin-link:hover { color: var(--text); opacity: 1; }

/* Online Admin szerkesztő (#admin) */
.admin-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 2rem;
  margin-bottom: 1.25rem;
  backdrop-filter: blur(12px);
}

.admin-card h2, .admin-card h3 { margin: 0 0 1rem; }

.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.admin-grid {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.admin-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.85rem;
}

.admin-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  font-size: 0.84rem;
  color: var(--muted);
}

.admin-field input,
.admin-field select,
.admin-field textarea {
  background: rgba(7, 11, 20, 0.85);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.58rem 0.78rem;
  font: inherit;
  font-size: 0.92rem;
}

.admin-field textarea {
  resize: vertical;
  min-height: 92px;
  line-height: 1.5;
}

.admin-field input[type="color"] {
  height: 40px;
  padding: 0.25rem;
  cursor: pointer;
}

.admin-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.btn-save {
  background: linear-gradient(135deg, #38bdf8, #34d399);
  color: #04131f;
  border: none;
  border-radius: 10px;
  padding: 0.65rem 1.35rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.btn-save:disabled { opacity: 0.6; cursor: wait; }

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.52rem 0.95rem;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
}
.btn-secondary:hover { border-color: var(--border-strong); }

.btn-danger {
  background: rgba(239, 68, 68, 0.14);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.45);
  border-radius: 10px;
  padding: 0.45rem 0.85rem;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.admin-toast {
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 1rem;
  border: 1px solid rgba(52, 211, 153, 0.45);
  background: rgba(52, 211, 153, 0.14);
  color: #86efac;
}
.admin-toast.error {
  border-color: rgba(239, 68, 68, 0.5);
  background: rgba(239, 68, 68, 0.15);
  color: #fecaca;
}

.admin-proj-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.25rem;
  background: rgba(255, 255, 255, 0.025);
  margin-bottom: 1rem;
}

.admin-proj-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.signin-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 2rem 1rem;
  text-align: center;
}

@media (max-width: 820px) {
  .welcome-split { grid-template-columns: 1fr; }
  .welcome-media img { max-height: 360px; }
}

@media (max-width: 640px) {
  .container { padding-top: 2rem; }
  .welcome-text { padding: 1.35rem 1.4rem; }
}
