/* ==========================================================================
   PRAGUE QUANT CLUB — STYLESHEET (dark / technical redesign)
   --------------------------------------------------------------------------
   Sections in this file:
     1. Variables (colors, fonts — EDIT HERE to re-theme the whole site)
     2. Reset & base
     3. Skip link (accessibility)
     4. Navigation bar
     5. Hero (grid backdrop + glow, no photo)
     6. Shared section styles (eyebrow, headings, rules)
     7. About (stats + card grid)
     8. Partners (logo wall)
     9. Calendar (upcoming events)
     10. Contact
     11. Footer
     12. Reveal-on-scroll animation
     13. Responsive breakpoints (1024px, 768px)
   ========================================================================== */


/* ==========================================================================
   1. VARIABLES
   ========================================================================== */
:root {
  --bg: #07080c;              /* page background (near-black) */
  --bg-elev: #0d0f15;         /* elevated surfaces */
  --text: #e9ebf1;            /* main text */
  --text-muted: #878c9c;      /* secondary text, labels */
  --accent: #5b5bf0;          /* indigo accent */
  --accent-soft: rgba(91, 91, 240, 0.14);
  --rule: rgba(255, 255, 255, 0.09);   /* hairlines */

  --font-heading: "Space Grotesk", "Segoe UI", Helvetica, Arial, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", "Cascadia Code", Consolas, "Courier New", monospace;

  --container: 1200px;
  --section-pad: 130px;
}


/* ==========================================================================
   2. RESET & BASE
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--accent);
  color: #ffffff;
}

img {
  max-width: 100%;
  display: block;
}

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

a:hover,
a:focus-visible {
  text-decoration: underline;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}


/* ==========================================================================
   3. SKIP LINK
   ========================================================================== */
.skip-link {
  position: absolute;
  top: -48px;
  left: 16px;
  z-index: 200;
  background: var(--accent);
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 3px;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 12px;
}


/* ==========================================================================
   4. NAVIGATION BAR
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(7, 8, 12, 0.65);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.nav-brand {
  font-family: var(--font-mono);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--text);
}

.nav-brand:hover,
.nav-brand:focus-visible {
  text-decoration: none;
  color: var(--accent);
}

.nav-brand-cursor {
  color: var(--accent);
  animation: cursor-blink 1.2s steps(1) infinite;
}

@keyframes cursor-blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0; }
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-menu {
  display: flex;
  gap: 36px;
  list-style: none;
}

.nav-menu a {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-menu a:hover {
  text-decoration: none;
  color: var(--text);
}

/* Language toggle — small mono pill, clean but clearly visible */
.lang-toggle {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--text);
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 4px;
  padding: 7px 14px;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.lang-toggle:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* Hamburger button — hidden on desktop, shown under 768px */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: none;
  border: none;
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.site-header.menu-open .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.site-header.menu-open .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}
.site-header.menu-open .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}


/* ==========================================================================
   5. HERO — no photo: dark canvas, faint blueprint grid + indigo glow
   ========================================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

/* Faint engineering-grid backdrop */
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 90% 75% at 50% 45%, #000 35%, transparent 100%);
  mask-image: radial-gradient(ellipse 90% 75% at 50% 45%, #000 35%, transparent 100%);
}

/* Soft indigo glow behind the title */
.hero-glow {
  position: absolute;
  left: 50%;
  top: 42%;
  width: 780px;
  height: 780px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(91, 91, 240, 0.16) 0%, transparent 62%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  padding: 0 24px;
  max-width: 880px;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 88px;
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.hero-tagline {
  margin: 26px auto 0;
  max-width: 560px;
  font-size: 18px;
  line-height: 1.65;
  color: var(--text-muted);
}

.hero-actions {
  margin-top: 44px;
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 14px 32px;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.04em;
  border-radius: 4px;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn:hover,
.btn:focus-visible {
  text-decoration: none;
}

.btn-filled {
  color: #ffffff;
  background: var(--accent);
  border: 1px solid var(--accent);
}

.btn-filled:hover {
  background: #4a4ad9;
  border-color: #4a4ad9;
}

.btn-outline {
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.btn-outline:hover {
  border-color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

/* Small scroll indicator at the bottom edge of the hero */
.scroll-indicator {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
}

.scroll-indicator-line {
  display: block;
  width: 1px;
  height: 44px;
  background: rgba(255, 255, 255, 0.45);
  animation: scroll-pulse 2s ease-in-out infinite;
  transform-origin: top;
}

@keyframes scroll-pulse {
  0%, 100% { transform: scaleY(1); opacity: 0.6; }
  50%      { transform: scaleY(0.55); opacity: 1; }
}


/* ==========================================================================
   6. SHARED SECTION STYLES
   ========================================================================== */
.section {
  padding: var(--section-pad) 0;
}

/* Eyebrow: small monospace tag above each section heading */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}

.section-heading {
  font-family: var(--font-heading);
  font-size: 46px;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  max-width: 820px;
}

.section-lede {
  margin-top: 28px;
  max-width: 720px;
  font-size: 17px;
  color: var(--text-muted);
}

/* Hairline rule between sections */
.section-rule {
  display: none;
}


/* ==========================================================================
   7. ABOUT — stats row + card grid
   ========================================================================== */
.stats {
  display: flex;
  gap: 88px;
  margin-top: 72px;
}

.stat-number {
  display: block;
  font-family: var(--font-mono);
  font-size: 52px;
  font-weight: 500;
  line-height: 1.1;
  color: var(--text);
}

.stat-label {
  display: block;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Card grid: 2x2 on desktop, single column on mobile. */
.card-grid {
  margin-top: 88px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px 64px;
}

.card {
  border-top: 1px solid var(--rule);
  padding-top: 24px;
}

.card-index {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--accent);
}

.card-heading {
  font-family: var(--font-heading);
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 12px 0 12px;
}

.card p {
  color: var(--text-muted);
  font-size: 15.5px;
}


/* ==========================================================================
   8. PARTNERS — infinite scrolling logo line (marquee), à la QFC Zürich.
   The track holds the logo set TWICE; sliding it by -50% loops seamlessly.
   ========================================================================== */
/* Minimal partners section with reduced padding */
.section--partners-minimal {
  padding: 64px 0;
}

/* Small mono label above each logo line */
.marquee-label {
  margin-top: 0;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.marquee-label + .partner-marquee {
  margin-top: 16px;
}

.partner-marquee {
  margin-top: 72px;
  padding: 40px 0;
  overflow: hidden;
  /* Fade the line out at both edges */
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 12%, #000 88%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 12%, #000 88%, transparent 100%);
}

.partner-track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: partner-scroll 36s linear infinite;
}

/* Pause when the user hovers the line */
.partner-marquee:hover .partner-track {
  animation-play-state: paused;
}

@keyframes partner-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* Second line scrolls the opposite direction */
.partner-marquee--reverse .partner-track {
  animation-direction: reverse;
}

/* Static partner section (no animation) */
.partner-marquee--static .partner-track {
  animation: none;
}

.partner-mark {
  flex: 0 0 auto;
  margin-right: 88px;
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
  color: var(--text-muted);
  transition: color 0.2s ease;
  text-decoration: none;
}

.partner-mark:hover,
.partner-mark:focus-visible {
  color: var(--text);
  text-decoration: none;
}

/* Logo images */
.partner-track img {
  max-height: 42px;
  width: auto;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.partner-mark:hover img {
  opacity: 1;
}

.partner-note {
  margin-top: 32px;
  font-size: 15px;
  color: var(--text-muted);
}


/* ==========================================================================
   9. CALENDAR — upcoming event rows (rendered by script.js)
   ========================================================================== */
.event-list {
  margin-top: 56px;
  border-top: 1px solid var(--rule);
}

.event-row {
  display: flex;
  align-items: baseline;
  gap: 32px;
  padding: 22px 0;
  border-bottom: 1px solid var(--rule);
}

/* Fixed-width date column so titles align */
.event-date {
  flex: 0 0 130px;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--accent);
}

.event-title {
  font-size: 17px;
  font-weight: 600;
}

.event-location {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
  text-align: right;
}

/* Fallback line when there are no upcoming events */
.event-empty {
  padding: 26px 0;
  border-bottom: 1px solid var(--rule);
  color: var(--text-muted);
}


/* ==========================================================================
   10. CONTACT
   ========================================================================== */
.contact-block {
  margin-top: 40px;
}

.contact-email a {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 500;
  color: var(--text);
}

.contact-email a:hover {
  color: var(--accent);
  text-decoration: none;
}

.contact-socials {
  list-style: none;
  display: flex;
  gap: 32px;
  margin-top: 30px;
}

.contact-socials a {
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.04em;
}

.contact-location {
  margin-top: 40px;
}

.contact-location-label {
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.contact-location address {
  font-style: normal;
  line-height: 1.6;
}

.contact-location address a {
  color: var(--text);
  text-decoration: none;
}

.contact-location address a:hover {
  text-decoration: underline;
}


/* ==========================================================================
   11. FOOTER — brand, socials and legal only (no section links)
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--rule);
  padding: 56px 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.footer-brand {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.footer-socials {
  list-style: none;
  display: flex;
  gap: 28px;
}

.footer-socials a {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-muted);
}

.footer-socials a:hover {
  color: var(--text);
}

.footer-legal {
  font-size: 13px;
  color: var(--text-muted);
}


/* ==========================================================================
   12. REVEAL-ON-SCROLL — subtle fade-and-rise (IntersectionObserver in JS)
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .scroll-indicator-line { animation: none; }
  .nav-brand-cursor { animation: none; }
  /* Marquee stands still and wraps instead of scrolling */
  .partner-track { animation: none; flex-wrap: wrap; gap: 20px 0; width: auto; }
}


/* ==========================================================================
   13. RESPONSIVE
   ========================================================================== */

/* --- Tablet: up to 1024px --- */
@media (max-width: 1024px) {
  :root {
    --section-pad: 96px;
  }

  .hero-title {
    font-size: 64px;
  }

  .section-heading {
    font-size: 38px;
  }

  .stats {
    gap: 56px;
  }

  .card-grid {
    gap: 48px;
  }
}

/* --- Mobile: up to 768px --- */
@media (max-width: 768px) {
  :root {
    --section-pad: 80px;
  }

  body {
    font-size: 15.5px;
  }

  .container {
    padding: 0 20px;
  }

  .hero-title {
    font-size: 44px;
  }

  .hero-tagline {
    font-size: 16px;
  }

  .section-heading {
    font-size: 30px;
  }

  /* Mobile nav: hamburger + dropdown panel */
  .nav-right {
    gap: 12px;
  }

  .lang-toggle {
    padding: 6px 11px;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-menu {
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg-elev);
    border-bottom: 1px solid var(--rule);
    display: none;
  }

  .site-header.menu-open .nav-menu {
    display: flex;
  }

  .site-header.menu-open {
    background: var(--bg-elev);
    border-bottom: 1px solid var(--rule);
  }

  .nav-menu a {
    display: block;
    padding: 16px 20px;
    color: var(--text);
    border-top: 1px solid var(--rule);
  }

  /* Stats stack vertically */
  .stats {
    flex-direction: column;
    gap: 36px;
    margin-top: 56px;
  }

  /* Cards single column */
  .card-grid {
    grid-template-columns: 1fr;
    gap: 40px;
    margin-top: 56px;
  }

  /* Minimal partners section on mobile */
  .section--partners-minimal {
    padding: 48px 0;
  }

  /* Partner line: slightly smaller and tighter on mobile */
  .partner-marquee {
    padding: 28px 0;
  }

  .partner-mark {
    font-size: 17px;
    margin-right: 56px;
  }

  /* Event rows wrap: date above, location below title */
  .event-row {
    flex-wrap: wrap;
    gap: 4px 16px;
  }

  .event-date {
    flex: 0 0 100%;
  }

  .event-location {
    margin-left: 0;
    text-align: left;
    flex: 0 0 100%;
  }
}
