* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

html, body {
  height: 100%;
  background: #0f172a;
  color: white;
}

/* PARTICLES */
#particles-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* TOPBAR */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: rgba(15, 23, 42, 0.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 6px;
}

.topbar-pill {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 36.5px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 100px;
  padding: 0 18px;
}

.topbar-pill--modules {
  gap: 16px;
}

.topbar-lang-btn {
  background: none;
  border: none;
  color: #666;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 1px;
  cursor: pointer;
  padding: 0;
  transition: color 0.2s;
}

.topbar-lang-btn:hover { color: #ccc; }
.topbar-lang-btn.active { color: white; }

.topbar-nav-link {
  text-decoration: none;
  color: #aaa;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 1px;
  transition: color 0.2s;
}

.topbar-nav-link:hover { color: white; }

.topbar-module-link {
  text-decoration: none;
  color: #aaa;
  letter-spacing: 2px;
  font-size: 15px;
  font-weight: 500;
  transition: color 0.2s;
}

.topbar-module-link:hover { color: white; }

.nav-letter { color: #ff0000; font-weight: 700; }

/* LANGUAGE */
body.sk .lang-en { display: none; }
body.en .lang-sk { display: none; }

/* SCROLL CONTAINER — snap */
.scroll-container {
  height: 100vh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  position: relative;
  z-index: 1;
}

/* HERO */
.hero {
  height: 100vh;
  scroll-snap-align: start;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  column-gap: 100px;
  align-items: center;
  padding: 0 80px;
}

.hero-logo {
  max-width: 32vw;
  max-height: 42vh;
  object-fit: contain;
  user-select: none;
  opacity: 0.5;
  transition: opacity 0.5s ease;
}

.hero-logo { cursor: pointer; }
.hero-logo:hover { opacity: 1; }

.hero-slogan {
  text-align: right;
  white-space: nowrap;
  justify-self: end;
}

.hero-word {
  display: inline-block;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 3px;
  color: #888;
  animation: lineReveal 0.6s ease var(--delay, 0s) both;
}

.hero-word--white {
  animation: lineReveal 0.6s ease var(--delay, 0s) both,
             wordToWhite 0.8s ease calc(var(--delay, 0s) + 0.7s) both;
}

@keyframes wordToWhite {
  from { color: #888; }
  to   { color: #fff; }
}

.hero-brand {
  text-align: left;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 3px;
  justify-self: start;
}

/* ABOUT SECTION */
.about-section {
  height: 100vh;
  scroll-snap-align: start;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px;
}

.about-content {
  max-width: 680px;
  text-align: center;
  animation: aboutFadeIn linear both;
  animation-timeline: view();
  animation-range: entry 0% entry 50%;
}

.about-text {
  font-size: 16px;
  line-height: 1.9;
  color: #94a3b8;
  margin-bottom: 32px;
}

.about-more {
  display: inline-block;
  color: #ff0000;
  text-decoration: none;
  font-size: 11px;
  letter-spacing: 2px;
  font-weight: 600;
  text-transform: uppercase;
  transition: opacity 0.3s;
}

.about-more:hover { opacity: 0.6; }

@keyframes aboutFadeIn {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* MODULES SECTION */
.modules-section {
  height: 100vh;
  scroll-snap-align: start;
  display: flex;
  align-items: stretch;
  padding: 60px 80px;
  position: relative;
}

.footer-pill {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 0;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 100px;
  padding: 6px 16px;
  white-space: nowrap;
}

.footer-pill a {
  text-decoration: none;
  color: #666;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.5px;
  padding: 0 10px;
  transition: color 0.2s;
}

.footer-pill a:hover { color: #ccc; }

.footer-pill-sep {
  color: rgba(255, 255, 255, 0.12);
  font-size: 12px;
  pointer-events: none;
}

/* VERTICAL TRACK */
.modules-track {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 16px;
}

/* CARD — flex-grow animated via GSAP CSS variable */
.module-card {
  flex-grow: var(--flex-grow, 1);
  flex-shrink: 1;
  flex-basis: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  cursor: pointer;
}

/* PLACEHOLDER — 16:9, fills card height; info is positioned relative to its right edge */
.module-placeholder {
  height: calc(100% - 32px);
  aspect-ratio: 16 / 9;
  flex-shrink: 0;
  background: #111;
  border: 1px solid #222;
  border-radius: 4px;
  position: relative;
  overflow: visible;
}

/* MODULE INFO — sits just right of placeholder, always 48px gap, no JS needed */
.module-info {
  position: absolute;
  left: 100%;
  margin-left: 48px;
  top: 50%;
  transform: translateY(-50%);
  width: 360px;
  opacity: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.module-card.active .module-info {
  opacity: 1;
  pointer-events: auto;
}

/* SplitText line stagger */
.module-info .line {
  overflow: hidden;
}

.module-card.active .module-info .line {
  animation: lineReveal 0.45s ease var(--delay, 0s) both;
}

@keyframes lineReveal {
  from { transform: translateY(110%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}


.module-name {
  font-size: 22px;
  letter-spacing: 4px;
  font-weight: 700;
  text-transform: uppercase;
}

.module-desc {
  font-size: 13px;
  color: #888;
  line-height: 1.8;
  max-width: 380px;
}

.module-btn {
  display: inline-block;
  color: #ff0000;
  text-decoration: none;
  font-size: 11px;
  letter-spacing: 2px;
  font-weight: 600;
  text-transform: uppercase;
  transition: opacity 0.3s;
  width: fit-content;
}

.module-btn:hover { opacity: 0.6; }

/* ── MOBILE ── */
.topbar-hamburger { display: none; }
.mobile-nav-overlay { display: none; }
.mobile-lang-footer { display: none; }

@media (max-width: 767px) {
  html, body { overflow-x: hidden; }

  /* Topbar */
  .topbar { padding: 0 12px; }
  .topbar-left { display: none; }
  .topbar-pill--modules { gap: 12px; }
  .topbar-module-link { font-size: 12px; letter-spacing: 1px; }

  /* Hamburger */
  .topbar-hamburger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 100px;
    padding: 8px 14px;
    cursor: pointer;
  }
  .topbar-hamburger span {
    display: block;
    width: 18px;
    height: 1.5px;
    background: #aaa;
    border-radius: 2px;
    transition: transform 0.25s, opacity 0.25s;
  }
  .topbar-hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .topbar-hamburger.open span:nth-child(2) { opacity: 0; }
  .topbar-hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

  /* Nav overlay */
  .mobile-nav-overlay {
    display: none;
    position: fixed;
    top: 62px;
    left: 12px;
    background: rgba(15, 23, 42, 0.97);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 8px;
    flex-direction: column;
    gap: 2px;
    z-index: 99;
    min-width: 160px;
  }
  .mobile-nav-overlay.open { display: flex; }
  .mobile-nav-link {
    text-decoration: none;
    color: #aaa;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 1px;
    padding: 10px 16px;
    border-radius: 10px;
    transition: background 0.15s, color 0.15s;
  }
  .mobile-nav-link:hover { background: rgba(255,255,255,0.07); color: white; }

  /* Hero — vertical stack: brand → logo → slogan */
  .hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 80px 24px 40px;
  }
  .hero-brand { order: 1; text-align: center; font-size: 22px; }
  .hero-logo { order: 2; max-width: 55vw; max-height: 28vh; }
  .hero-slogan {
    order: 3;
    text-align: center;
    white-space: normal;
    justify-self: unset;
  }
  .hero-word { font-size: 18px; letter-spacing: 2px; }

  /* About section */
  .about-section { padding: 80px 24px 40px; }
  .about-text { font-size: 14px; }
  .about-section { scroll-snap-align: none; }

  /* Modules section */
  .modules-section { padding: 70px 16px 32px; }
  .module-placeholder { width: 100%; height: calc(100% - 8px); aspect-ratio: unset; }

  /* Module info — inside image, frosted glass bar at bottom */
  .module-info {
    position: absolute;
    left: 0; right: 0; bottom: 0; top: auto;
    transform: none;
    margin-left: 0;
    width: auto;
    background: rgba(5, 12, 28, 0.75);
    backdrop-filter: blur(12px);
    padding: 12px 16px;
    border-radius: 0 0 4px 4px;
    gap: 8px;
  }
  .module-name { font-size: 16px; letter-spacing: 3px; }
  .module-desc { font-size: 12px; line-height: 1.6; }

  /* Scroll container — no snap on mobile */
  .scroll-container { scroll-snap-type: none; }
  .hero { scroll-snap-align: none; }
  .modules-section { scroll-snap-align: none; height: 100vh; }

  /* Bottom lang footer */
  .mobile-lang-footer {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0; right: 0;
    justify-content: center;
    gap: 12px;
    padding: 12px;
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(255,255,255,0.06);
    z-index: 50;
  }
  .mobile-lang-footer .topbar-lang-btn { font-size: 13px; padding: 4px 8px; }
}
