/* ====== základ ====== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* Barvy dle logomanuálu AMTECH v.2022:
   Amtech modrá #1491F9 (Pantone 299 C), doplňkové #66CCFF, #1A3C5D, #EDF2F8, #E2E6EF
   Typografie: Istok (primární), Open Sans (doplňková online) */
:root {
  --bg: #081120;
  --panel: rgba(14, 24, 40, 0.68);
  --border: rgba(237, 242, 248, 0.1);
  --text: #edf2f8;
  --muted: #9fb0c8;
  --brand: #1491f9;
  --brand-2: #66ccff;
  --navy: #1a3c5d;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Open Sans", "Calibri", system-ui, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: "Istok Web", "Open Sans", sans-serif; }

/* ====== 3D pozadí ====== */
#scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 10%, transparent 40%, rgba(8, 17, 32, 0.6) 100%),
    linear-gradient(to bottom, rgba(8, 17, 32, 0.6), rgba(8, 17, 32, 0.2) 30%, transparent 70%, rgba(8, 17, 32, 0.75));
}

main, .nav, .footer { position: relative; z-index: 2; }

/* ====== navigace ====== */
/* sticky místo fixed — na mobilech se při schovávání adresního řádku
   fixed lišta utrhne/schová, sticky jede plynule s obsahem */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 0.8rem clamp(1rem, 4vw, 3rem);
  padding-top: calc(0.8rem + env(safe-area-inset-top, 0px));
  background: rgba(8, 17, 32, 0.6);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  transition: padding 0.25s ease, background 0.25s ease;
}

/* kotvy sekcí nesmí zajet pod lištu */
section[id], #kontakt { scroll-margin-top: 5rem; }

/* zmenšená lišta při scrollování */
.nav--scrolled {
  padding-top: calc(0.4rem + env(safe-area-inset-top, 0px));
  padding-bottom: 0.4rem;
  background: rgba(8, 17, 32, 0.85);
}
.nav--scrolled .nav__logo img { height: 28px; }
.nav--scrolled .nav__cta { padding: 0.45rem 1.1rem; font-size: 0.88rem; }

.nav__logo { display: block; }
.nav__logo img { height: 42px; display: block; transition: height 0.25s ease; }
.nav__cta { transition: padding 0.25s ease, font-size 0.25s ease, transform 0.2s, box-shadow 0.2s; }

.nav__links {
  display: flex;
  gap: 1.6rem;
  margin-left: auto;
}
.nav__links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s;
}
.nav__links a:hover { color: var(--text); }

/* hamburger — zobrazí se jen na mobilu */
.nav__burger {
  display: none;
  width: 42px;
  height: 42px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  background: rgba(237, 242, 248, 0.06);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  padding: 0;
}
.nav__burger span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform 0.25s, opacity 0.25s;
}
.nav__burger.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav__burger.open span:nth-child(2) { opacity: 0; }
.nav__burger.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* vysouvací mobilní menu */
.drawer {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 9;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 5.2rem 1.5rem 2rem;
  background: rgba(8, 17, 32, 0.94);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
  transform: translateY(-110%);
  transition: transform 0.32s ease;
}
.drawer.open { transform: translateY(0); }
.drawer { max-height: 100dvh; overflow-y: auto; }
.drawer > a:not(.btn) {
  color: var(--text);
  text-decoration: none;
  font-size: 1.15rem;
  font-family: "Istok Web", "Open Sans", sans-serif;
  padding: 0.7rem 1rem;
  width: 100%;
  text-align: center;
  border-radius: 12px;
}
.drawer > a:not(.btn):active { background: rgba(237, 242, 248, 0.08); }
.drawer > .btn { margin-top: 0.8rem; }

/* ====== tlačítka ====== */
.btn {
  display: inline-block;
  padding: 0.65rem 1.4rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.btn--lg { padding: 0.9rem 2rem; font-size: 1.05rem; }
.btn--primary {
  color: #fff;
  background: linear-gradient(120deg, var(--brand), #3db3ff);
  box-shadow: 0 4px 24px rgba(20, 145, 249, 0.4);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(20, 145, 249, 0.55); }
.btn--ghost {
  color: var(--text);
  border: 1px solid var(--border);
  background: rgba(237, 242, 248, 0.05);
}
.btn--ghost:hover { background: rgba(237, 242, 248, 0.12); transform: translateY(-2px); }

/* ====== hero ====== */
.hero {
  min-height: calc(100svh - 5rem);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1.25rem 4rem;
  position: relative;
}

.hero__inner {
  max-width: 880px;
  position: relative;
}

/* měkký tmavý podklad, aby text nesplýval s 3D scénou */
.hero__inner::before {
  content: "";
  position: absolute;
  inset: -22% -18%;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(8, 17, 32, 0.85), rgba(8, 17, 32, 0.55) 55%, transparent 100%);
  filter: blur(6px);
}

.hero__logo {
  height: clamp(58px, 9vw, 84px);
  margin-bottom: 1.8rem;
  filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.6));
}

.hero h1 {
  filter: drop-shadow(0 3px 14px rgba(0, 0, 0, 0.9)) drop-shadow(0 1px 3px rgba(0, 0, 0, 0.8));
}
.hero__lead, .hero__badge {
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.85), 0 1px 3px rgba(0, 0, 0, 0.7);
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-2);
  border: 1px solid rgba(102, 204, 255, 0.35);
  background: rgba(20, 145, 249, 0.1);
  padding: 0.4rem 1rem;
  border-radius: 999px;
  margin-bottom: 1.5rem;
}
.hero__badge .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--brand-2);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(102, 204, 255, 0.6); }
  50% { box-shadow: 0 0 0 7px rgba(102, 204, 255, 0); }
}

.hero h1 {
  font-size: clamp(2.4rem, 7vw, 4.6rem);
  line-height: 1.06;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.grad {
  background: linear-gradient(120deg, var(--brand-2), var(--brand));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  justify-content: center;
  margin: 1.6rem 0;
}
.chip {
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  background: var(--panel);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
  font-size: 0.95rem;
}

.hero__lead {
  max-width: 620px;
  margin: 0 auto 2.2rem;
  color: #c6cfdf;
  font-size: 1.08rem;
}

.hero__actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.hero__scroll {
  position: absolute;
  bottom: 2rem; left: 50%;
  translate: -50% 0;
  width: 28px; height: 46px;
  border: 2px solid rgba(237, 242, 248, 0.3);
  border-radius: 999px;
}
.hero__scroll span {
  position: absolute;
  top: 8px; left: 50%;
  translate: -50% 0;
  width: 4px; height: 9px;
  border-radius: 4px;
  background: var(--brand-2);
  animation: scrollhint 1.8s infinite;
}
@keyframes scrollhint {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(14px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* ====== vyhlídka na 3D linku (jen mobil/tablet) ====== */
.scene-view { display: none; }
@media (max-width: 1080px) {
  .scene-view { display: block; height: 78svh; }
}

/* ====== sekce ====== */
.section { padding: clamp(5rem, 12vh, 9rem) 1.25rem; }
.section__inner { max-width: 1100px; margin: 0 auto; }

.kicker {
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand-2);
  font-weight: 600;
  margin-bottom: 0.6rem;
}

.section h2 {
  font-size: clamp(1.8rem, 4.5vw, 2.7rem);
  letter-spacing: -0.015em;
  margin-bottom: 1rem;
  text-wrap: balance;
}

.section__lead { color: var(--muted); max-width: 640px; margin-bottom: 2.5rem; }

/* karty */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.2rem;
  margin-top: 2rem;
}

.card {
  position: relative;
  padding: 1.6rem;
  border-radius: 18px;
  background: var(--panel);
  border: 1px solid var(--border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  overflow: hidden;
  transition: transform 0.25s, border-color 0.25s;
}
.card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent, var(--brand));
  opacity: 0.85;
}
.card:hover { transform: translateY(-5px); border-color: rgba(237, 242, 248, 0.22); }

.card h3 { font-size: 1.15rem; margin-bottom: 0.2rem; }
.card__topic { color: var(--accent, var(--brand-2)); font-weight: 600; font-size: 0.92rem; margin-bottom: 0.6rem; }
.card p { color: var(--muted); font-size: 0.95rem; }

.card--link { text-decoration: none; color: var(--text); --accent: var(--brand); }
.card--link p { margin-top: 0.3rem; }

.note {
  margin-top: 2.4rem;
  padding: 1.1rem 1.5rem;
  border-radius: 14px;
  border: 1px solid rgba(102, 204, 255, 0.3);
  background: rgba(20, 145, 249, 0.09);
  color: var(--text);
  max-width: 720px;
}

/* ====== program dne (časová osa) ====== */
.timeline {
  list-style: none;
  margin-top: 2rem;
  max-width: 720px;
  position: relative;
  padding-left: 1.9rem;
}
/* svislá linka procházející všemi body */
.timeline::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 0.7rem;
  bottom: 0.7rem;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(to bottom, var(--brand-2), var(--brand), rgba(20, 145, 249, 0.15));
}

.timeline__item {
  position: relative;
  padding: 1.2rem 1.5rem;
  margin-bottom: 0.9rem;
  border-radius: 16px;
  background: var(--panel);
  border: 1px solid var(--border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.timeline__item:last-child { margin-bottom: 0; }

/* bod na lince */
.timeline__item::before {
  content: "";
  position: absolute;
  left: -1.9rem;
  top: 1.55rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--brand);
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 3px rgba(20, 145, 249, 0.22);
}

.timeline__time {
  font-family: "Istok Web", "Open Sans", sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--brand-2);
  letter-spacing: 0.02em;
  margin-bottom: 0.15rem;
}
.timeline__item h3 { font-size: 1.15rem; margin-bottom: 0.25rem; }
.timeline__item p:last-child { color: var(--muted); font-size: 0.95rem; }

/* večerní akce — jemné teplé odlišení od odborné části dne */
.timeline__item--evening {
  border-color: rgba(255, 140, 66, 0.28);
  background:
    linear-gradient(135deg, rgba(255, 140, 66, 0.08), rgba(255, 140, 66, 0) 60%),
    var(--panel);
}
.timeline__item--evening::before {
  background: #ff8c42;
  box-shadow: 0 0 0 3px rgba(255, 140, 66, 0.22);
}
.timeline__item--evening .timeline__time { color: #ffb185; }

/* organizační body dne (příjezd, přestávky, oběd, diskuze) — odlišené od přednášek partnerů jen barevně */
.timeline__item--break::before {
  background: var(--muted);
  box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.18);
}
.timeline__item--break .timeline__time { color: var(--muted); }
.timeline__item--break h3 { color: var(--muted); font-weight: 600; }

/* místo konání */
.venue {
  padding: 2rem;
  border-radius: 18px;
  background: var(--panel);
  border: 1px solid var(--border);
  backdrop-filter: blur(14px);
  max-width: 640px;
}
.venue__date { font-size: 1.15rem; margin-bottom: 0.6rem; }
.venue__info p { margin-bottom: 1.2rem; color: var(--muted); }
.venue__info .venue__date { color: var(--brand-2); }

/* CTA */
.section--cta { text-align: center; }
.cta {
  padding: clamp(2.5rem, 6vw, 4.5rem) 2rem;
  border-radius: 24px;
  background: var(--panel);
  border: 1px solid var(--border);
  backdrop-filter: blur(16px);
  max-width: 780px;
  margin: 0 auto;
}
.cta h2 { margin-bottom: 0.8rem; }
.cta > p { color: var(--muted); margin-bottom: 2rem; }

.cta__contact {
  margin-top: 2.6rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.cta__contact p { margin: 0.3rem 0; }
.cta__contact a { color: var(--brand-2); text-decoration: none; }
.cta__contact a:hover { text-decoration: underline; }

/* footer */
.footer {
  padding: 2.5rem 1.25rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.88rem;
  border-top: 1px solid var(--border);
  background: rgba(8, 17, 32, 0.72);
  backdrop-filter: blur(10px);
}

/* ====== reveal animace ====== */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__badge .dot, .hero__scroll span { animation: none; }
}

/* ====== tablet ====== */
@media (max-width: 1080px) {
  .nav__links { gap: 1.1rem; }
}

/* ====== kompaktní navigace s hamburgerem ======
   úzké displeje (mobil, tablet na výšku) i nízké displeje (mobil na šířku) */
@media (max-width: 900px), (max-height: 520px) {
  .nav__links { display: none; }
  .nav__cta { margin-left: auto; }
  .nav__burger { display: flex; }
  .nav { gap: 0.8rem; }
  .nav__logo img { height: 32px; }
  .nav--scrolled .nav__logo img { height: 25px; }
}

/* mobil na šířku: nižší menu, ať zbyde místo na obsah */
@media (max-height: 520px) {
  .drawer { padding-top: 4.2rem; padding-bottom: 1.2rem; }
  .drawer > a:not(.btn) { padding: 0.45rem 1rem; font-size: 1.02rem; }
}

/* ====== mobil ====== */
@media (max-width: 720px) {
  /* obsah nahoře, spodní část obrazovky nechává vyniknout 3D linku */
  .hero {
    align-items: flex-start;
    padding-top: 2.2rem;
    padding-bottom: 34svh;
  }
  .hero__logo { height: 46px; margin-bottom: 1.1rem; }
  .hero__badge { font-size: 0.72rem; margin-bottom: 1rem; }
  .hero__meta { margin: 1.1rem 0; }
  .chip { font-size: 0.85rem; padding: 0.4rem 0.9rem; }
  .hero__lead { font-size: 0.98rem; margin-bottom: 1.6rem; }

  /* světlejší a menší podklad — scéna zůstane vidět */
  .hero__inner::before {
    inset: -8% -10%;
    background: radial-gradient(closest-side, rgba(8, 17, 32, 0.72), rgba(8, 17, 32, 0.42) 55%, transparent 100%);
  }
  .vignette {
    background:
      radial-gradient(140% 90% at 50% 8%, transparent 45%, rgba(8, 17, 32, 0.5) 100%),
      linear-gradient(to bottom, rgba(8, 17, 32, 0.55), rgba(8, 17, 32, 0.15) 26%, transparent 60%, rgba(8, 17, 32, 0.7));
  }

  .section { padding: 3.6rem 1.1rem; }
  .cards { gap: 0.9rem; }
  .card { padding: 1.3rem; }
  .venue { padding: 1.4rem; }
  .timeline { padding-left: 1.5rem; }
  .timeline__item { padding: 1rem 1.2rem; }
  .timeline__item::before { left: -1.5rem; top: 1.35rem; width: 12px; height: 12px; }
  .cta { padding: 2.2rem 1.3rem; }
}
