/* ------------------------------------------------------------------
   Bastlířský kroužek – styl vychází z wallpaper.png:
   tmavá dílna, svítivá oranžová, jemná rýsovací mřížka.
   ------------------------------------------------------------------ */

:root {
  --bg: #0b0c0e;
  --bg-2: #101215;
  --surface: #15181c;
  --surface-2: #1b1f24;
  --line: rgba(255, 138, 46, 0.16);
  --line-strong: rgba(255, 138, 46, 0.38);
  --grid: rgba(255, 138, 46, 0.07);

  --orange: #ff7a1a;
  --orange-2: #ffa052;
  --orange-deep: #c9560a;
  --glow: rgba(255, 122, 26, 0.45);

  --text: #f3efe8;
  --muted: #a8a197;
  --muted-2: #6f6a62;

  --font-head: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius: 18px;
  --radius-sm: 10px;
  --container: 1140px;
  --gutter: clamp(1.1rem, 4vw, 2.5rem);
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  position: relative;
  isolation: isolate;   /* vlastní stacking context, aby body::before leželo nad pozadím body, ale pod obsahem */
}
html { background: var(--bg); }

/* Mřížka a záře jako fixní vrstva: při scrollu se nepřekresluje, jen se posouvá obsah nad ní. */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(var(--grid) 1px, transparent 1px) 0 0 / 56px 56px,
    linear-gradient(90deg, var(--grid) 1px, transparent 1px) 0 0 / 56px 56px,
    radial-gradient(900px 500px at 15% -10%, rgba(255, 122, 26, 0.16), transparent 60%),
    radial-gradient(700px 500px at 100% 20%, rgba(255, 122, 26, 0.08), transparent 60%);
}

img, svg { display: block; max-width: 100%; }
a { color: var(--orange-2); text-decoration: none; }
a:hover { color: var(--orange); }

h1, h2, h3 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 0.6em;
}
h1 { font-size: clamp(2.8rem, 8vw, 5.4rem); }
h2 { font-size: clamp(1.9rem, 4.5vw, 2.9rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}

/* Inline SVG ikony */
svg .s { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
svg .f { fill: currentColor; }

/* Přístupnost */
.skip {
  position: absolute; left: 1rem; top: -4rem;
  padding: .6rem 1rem; background: var(--orange); color: #000;
  border-radius: var(--radius-sm); z-index: 100; font-weight: 600;
}
.skip:focus { top: 1rem; }
:focus-visible { outline: 2px solid var(--orange-2); outline-offset: 3px; }

/* ------------------------------------------------------------------ */
/* Tlačítka                                                            */
/* ------------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .85rem 1.5rem;
  border-radius: 999px;
  font-weight: 600; font-size: .97rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
  font-family: var(--font-body);
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(180deg, var(--orange-2), var(--orange));
  color: #120a03;
  box-shadow: 0 0 0 1px rgba(255, 160, 82, .25) inset, 0 8px 28px -8px var(--glow);
}
.btn-primary:hover { color: #000; box-shadow: 0 0 0 1px rgba(255, 200, 150, .4) inset, 0 12px 36px -8px var(--glow); transform: translateY(-1px); }
.btn-ghost {
  background: rgba(255, 255, 255, .03);
  color: var(--text);
  border-color: var(--line-strong);
}
.btn-ghost:hover { border-color: var(--orange); color: var(--text); background: rgba(255, 122, 26, .08); }
.btn-sm { padding: .55rem 1.1rem; font-size: .9rem; }
.btn-block { width: 100%; }

/* ------------------------------------------------------------------ */
/* Hlavička                                                            */
/* ------------------------------------------------------------------ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: rgba(11, 12, 14, .94);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
  transform: translateZ(0);   /* vlastní kompozitní vrstva, obsah pod ní se nepřekresluje */
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.nav-wrap { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }

.brand { display: flex; align-items: center; gap: .7rem; color: var(--text); }
.brand-mark { display: block; }
.brand-mark img { width: 46px; height: 46px; }
.brand-text {
  font-family: var(--font-head); font-weight: 700; font-size: 1.05rem; line-height: 1.05;
  display: flex; flex-direction: column;
}
.brand-text small { font-family: var(--font-body); font-weight: 500; font-size: .72rem; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }

.nav { display: flex; align-items: center; gap: 1.6rem; }
.nav a:not(.btn) { color: var(--muted); font-weight: 500; font-size: .95rem; position: relative; }
.nav a:not(.btn)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px;
  background: var(--orange); transform: scaleX(0); transform-origin: left; transition: transform .2s ease;
}
.nav a:not(.btn):hover, .nav a:not(.btn).is-active { color: var(--text); }
.nav a:not(.btn):hover::after, .nav a:not(.btn).is-active::after { transform: scaleX(1); }

.nav-toggle {
  display: none; width: 44px; height: 44px; padding: 10px;
  background: none; border: 1px solid var(--line-strong); border-radius: 10px; cursor: pointer;
  flex-direction: column; justify-content: center; gap: 5px;
}
.nav-toggle span { display: block; height: 2px; background: var(--text); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ------------------------------------------------------------------ */
/* Hero                                                                */
/* ------------------------------------------------------------------ */
.hero { padding: clamp(3rem, 8vw, 6.5rem) 0 clamp(3rem, 7vw, 5.5rem); position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: clamp(2rem, 6vw, 5rem); }

.eyebrow {
  display: inline-flex; align-items: center; gap: .55rem;
  font-size: .8rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--orange-2); margin-bottom: 1.1rem;
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 12px var(--orange); }

.glow {
  color: var(--orange);
  text-shadow: 0 0 24px var(--glow), 0 0 60px rgba(255, 122, 26, .25);
}
.lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--muted); max-width: 34rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1.8rem 0 2.4rem; }

.hero-stats {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-wrap: wrap; gap: 1.4rem 2.4rem;
}
.hero-stats li { display: flex; flex-direction: column; line-height: 1.2; }
.hero-stats strong { font-family: var(--font-head); font-size: 1.7rem; color: var(--text); }
.hero-stats span { font-size: .85rem; color: var(--muted); margin-top: .2rem; }

/* Odznak */
.hero-badge { display: grid; place-items: center; position: relative; }
.hero-badge::before {
  content: ""; position: absolute; inset: 10%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 122, 26, .32), rgba(255, 122, 26, .08) 55%, transparent 72%);
  pointer-events: none;
}
.badge { width: min(100%, 420px); height: auto; position: relative; animation: float 7s ease-in-out infinite; will-change: transform; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* ------------------------------------------------------------------ */
/* Sekce                                                               */
/* ------------------------------------------------------------------ */
.section { padding: clamp(3.5rem, 8vw, 6.5rem) 0; }
.section-alt {
  background: linear-gradient(180deg, rgba(255, 122, 26, .04), rgba(255, 122, 26, 0));
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.section-head { max-width: 42rem; margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.section-lead { color: var(--muted); font-size: 1.08rem; }

/* Karty */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.card {
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem;
  position: relative; overflow: hidden;
  transition: transform .25s ease, border-color .25s ease, box-shadow .25s ease;
}
.card::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(300px 160px at 20% 0%, rgba(255, 122, 26, .14), transparent 70%);
  opacity: 0; transition: opacity .25s ease;
}
.card:hover { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: 0 24px 50px -30px var(--glow); }
.card:hover::before { opacity: 1; }
.card > * { position: relative; }
.card h3 { margin: 1.1rem 0 .4rem; }
.card p { color: var(--muted); margin: 0; font-size: .97rem; }
.card-icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: grid; place-items: center; color: var(--orange);
  background: rgba(255, 122, 26, .1); border: 1px solid var(--line-strong);
  box-shadow: 0 0 24px -6px var(--glow);
}
.card-icon svg { width: 30px; height: 30px; }

/* Rozdělené sekce (text vlevo, blok vpravo) */
.split { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }

.place {
  font-style: normal; display: flex; gap: .9rem; align-items: flex-start;
  padding: 1.1rem 1.2rem; margin: 1.6rem 0 1rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  color: var(--muted); line-height: 1.5;
}
.place svg { width: 26px; height: 26px; flex: none; color: var(--orange); margin-top: .1rem; }
.place strong { display: block; color: var(--text); margin-bottom: .15rem; }
.note { font-size: .88rem; color: var(--muted-2); }

/* Rozvrh */
.schedule {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden;
}
.schedule-row {
  display: grid; grid-template-columns: 1.6fr .7fr 1fr; gap: 1rem; align-items: center;
  padding: 1.1rem 1.4rem; border-top: 1px solid var(--line);
}
.schedule-row:first-child { border-top: 0; }
.schedule-head {
  background: rgba(255, 122, 26, .08);
  font-size: .75rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--orange-2);
  padding-block: .8rem;
}
.schedule-row strong { display: block; color: var(--text); }
.schedule-row small { display: block; color: var(--muted); font-size: .85rem; margin-top: .15rem; }
.schedule-row > span:nth-child(2) { color: var(--muted); }
.schedule-row > span:nth-child(3) { font-family: var(--font-head); font-weight: 500; color: var(--text); line-height: 1.25; }
.schedule-row:not(.schedule-head):hover { background: rgba(255, 122, 26, .04); }

/* Lektoři */
.people { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.person {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem; transition: border-color .25s ease, transform .25s ease;
}
.person:hover { border-color: var(--line-strong); transform: translateY(-3px); }
.person h3 { margin: 1rem 0 .15rem; }
.person .role { color: var(--orange-2); font-size: .85rem; font-weight: 600; letter-spacing: .02em; margin-bottom: .7rem; }
.person p:last-child { color: var(--muted); font-size: .95rem; margin: 0; }
.avatar {
  width: 68px; height: 68px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--font-head); font-weight: 700; font-size: 1.4rem; color: #120a03;
  background: linear-gradient(145deg, var(--orange-2), var(--orange-deep));
  box-shadow: 0 0 0 4px rgba(255, 122, 26, .15), 0 10px 30px -10px var(--glow);
  position: relative; overflow: hidden; flex-shrink: 0;
}
.avatar img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
  display: block;
}

/* Sponzoři */
.sponsors {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem;
  margin-bottom: 2rem;
}
.sponsor {
  flex: 0 1 calc((100% - 2rem) / 3);
  display: flex; align-items: center; justify-content: center;
  padding: 1.1rem;
  background: var(--surface); border: 1px dashed var(--line-strong); border-radius: var(--radius);
  transition: border-color .25s ease, background .25s ease, transform .25s ease;
}
.sponsor:hover { border-style: solid; border-color: var(--orange); background: rgba(255, 122, 26, .06); transform: translateY(-3px); }
.sponsor-logo {
  width: 100%; height: 110px;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem 1.4rem;
}
.sponsor-logo img {
  width: auto; height: auto;
  max-width: 100%; max-height: 100%;
  object-fit: contain;
  /* všechna loga jednotně v bílém provedení (vyžaduje průhledné pozadí) */
  filter: brightness(0) invert(1);
  opacity: .85; transition: opacity .25s ease;
}
.sponsor:hover .sponsor-logo img { opacity: 1; }
.sponsor-tier { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--orange-2); }

.cta-box {
  display: flex; align-items: center; justify-content: space-between; gap: 2rem;
  padding: 2rem 2.2rem;
  border-radius: var(--radius);
  background:
    radial-gradient(600px 200px at 0% 0%, rgba(255, 122, 26, .22), transparent 70%),
    var(--surface-2);
  border: 1px solid var(--line-strong);
}
.cta-box h3 { margin-bottom: .3rem; font-size: 1.4rem; }
.cta-box p { margin: 0; color: var(--muted); }


/* Galerie */
.gallery {
  display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 200px; grid-auto-flow: dense;
  gap: .8rem;
}
.tile {
  position: relative; display: block; overflow: hidden;
  border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: var(--surface);
}
.tile-wide { grid-column: span 2; }
.tile-tall { grid-row: span 2; }
.tile img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .4s ease; will-change: transform;
}
.tile:hover img, .tile:focus-visible img { transform: scale(1.04); }
.tile::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, .75));
  opacity: .9; transition: opacity .3s ease;
}
.tile:hover::after { opacity: 1; }
.tile-caption {
  position: absolute; left: .9rem; right: .9rem; bottom: .75rem; z-index: 1;
  font-size: .85rem; font-weight: 500; color: var(--text);
  text-shadow: 0 1px 4px rgba(0, 0, 0, .8);
}

/* Lightbox */
.lightbox {
  border: 0; padding: 0; margin: 0; width: 100vw; height: 100vh; max-width: none; max-height: none;
  background: rgba(8, 8, 10, .97); color: var(--text);
  display: none; align-items: center; justify-content: center;
}
.lightbox[open] { display: flex; }
.lightbox::backdrop { background: rgba(8, 8, 10, .6); }
.lb-figure { margin: 0; max-width: min(92vw, 1400px); max-height: 100vh; display: flex; flex-direction: column; align-items: center; gap: .8rem; padding: 3.5rem 0 1.5rem; }
.lb-img { max-width: 100%; max-height: calc(100vh - 7rem); object-fit: contain; border-radius: var(--radius-sm); box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .9); }
.lb-caption { font-size: .95rem; color: var(--muted); text-align: center; }
.lightbox button {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 52px; height: 52px; border-radius: 50%;
  background: rgba(255, 255, 255, .06); border: 1px solid var(--line-strong); color: var(--text);
  font-size: 2rem; line-height: 1; cursor: pointer; display: grid; place-items: center;
  transition: background .18s ease, border-color .18s ease;
}
.lightbox button:hover { background: rgba(255, 122, 26, .18); border-color: var(--orange); }
.lightbox .lb-prev { left: 1rem; }
.lightbox .lb-next { right: 1rem; }
.lightbox .lb-close { top: 1rem; right: 1rem; transform: none; font-size: 1.8rem; }
body.lb-open { overflow: hidden; }

/* Kontakt */
.contact-list { list-style: none; padding: 0; margin: 1.6rem 0 0; display: grid; gap: .9rem; }
.contact-list li { display: flex; align-items: center; gap: .9rem; color: var(--muted); font-size: 1.02rem; }
.contact-list svg { width: 24px; height: 24px; flex: none; color: var(--orange); }
.contact-list a { color: var(--text); }
.contact-list a:hover { color: var(--orange-2); }

.form {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(1.4rem, 3vw, 2rem); display: grid; gap: 1rem;
}
.field { display: grid; gap: .4rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
label { font-size: .85rem; font-weight: 600; color: var(--muted); letter-spacing: .02em; }
input, textarea {
  width: 100%; padding: .8rem .95rem;
  background: var(--bg-2); color: var(--text);
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  font: inherit; transition: border-color .18s ease, box-shadow .18s ease;
}
input::placeholder, textarea::placeholder { color: var(--muted-2); }
input:focus, textarea:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255, 122, 26, .2); }
textarea { resize: vertical; min-height: 110px; }
.form-note { margin: 0; font-size: .8rem; color: var(--muted-2); text-align: center; }

/* Patička */
.site-footer { border-top: 1px solid var(--line); padding: 1.6rem 0; color: var(--muted-2); font-size: .9rem; }
.footer-wrap { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.footer-wrap p { margin: 0; }
.to-top { color: var(--muted); }

/* Animace při scrollu */
.js .reveal { opacity: 0; transition: opacity .45s ease; }
.js .reveal.is-visible { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .badge { animation: none; }
  .js .reveal { opacity: 1; transition: none; }
  .btn, .card, .person, .sponsor, .tile img { transition: none; }
}

/* ------------------------------------------------------------------ */
/* Responsivita                                                        */
/* ------------------------------------------------------------------ */
@media (max-width: 960px) {
  .cards, .people { grid-template-columns: repeat(2, 1fr); }
  .sponsor { flex-basis: calc((100% - 1rem) / 2); }
  .gallery { grid-template-columns: repeat(3, 1fr); grid-auto-rows: 170px; }
  .hero-grid { grid-template-columns: 1fr; text-align: left; }
  .hero-badge { order: -1; }
  .badge { width: min(70vw, 300px); }
  .split { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  :root { --header-h: 64px; }
  .brand-text { font-size: .95rem; }
  .nav-toggle { display: flex; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: rgba(11, 12, 14, .97);
    border-bottom: 1px solid var(--line);
    padding: .6rem var(--gutter) 1.2rem;
    transform: translateY(-8px); opacity: 0; pointer-events: none;
    transition: transform .2s ease, opacity .2s ease;
  }
  .nav.is-open { transform: none; opacity: 1; pointer-events: auto; }
  .nav a:not(.btn) { padding: .9rem 0; border-bottom: 1px solid var(--line); font-size: 1.05rem; }
  .nav a:not(.btn)::after { display: none; }
  .nav .btn { margin-top: 1rem; }
  body.nav-open { overflow: hidden; }

  .cards, .people { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 140px; gap: .5rem; }
  .tile-wide { grid-column: span 2; }
  .tile-tall { grid-row: span 1; }
  .tile-caption { font-size: .78rem; left: .6rem; right: .6rem; bottom: .5rem; }
  .lightbox button { width: 44px; height: 44px; }
  .lightbox .lb-prev { left: .4rem; } .lightbox .lb-next { right: .4rem; }
  .lightbox .lb-close { top: .6rem; right: .6rem; }
  .hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem .8rem; }
  .hero-stats strong { font-size: 1.45rem; }
  .hero-stats span { font-size: .78rem; }
  .schedule-row { grid-template-columns: 1fr; gap: .3rem; padding: 1rem 1.1rem; }
  .schedule-head { display: none; }
  .schedule-row > span:nth-child(2)::before { content: "Věk: "; color: var(--muted-2); }
  .schedule-row > span:nth-child(3) br { display: none; }
  .schedule-row > span:nth-child(3)::before { content: "⏱ "; }
  .cta-box { flex-direction: column; align-items: flex-start; padding: 1.6rem; }
  .cta-box .btn { width: 100%; }
  .field-row { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .sponsor { flex-basis: 100%; }
}

@media (max-width: 420px) {
  .hero-actions .btn { width: 100%; }
}
