/* =====================================================
   Spark – plánovanie eventov
   ===================================================== */

/* ----- Farby a základné nastavenia ----- */
:root {
  --night: #2a1a47;      /* tmavofialová – večer, keď sa event začína */
  --ink: #241638;        /* farba textu */
  --spark: #ffb703;      /* zlatá – iskra prskavky */
  --flame: #e23e7a;      /* ružová – akcent */
  --paper: #f5f2fa;      /* svetlé pozadie */
  --white: #ffffff;
  --muted: #675c7c;

  --font: "Bricolage Grotesque", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --wrap: 1120px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}

h1, h2, h3 {
  line-height: 1.1;
  margin: 0 0 0.5em;
}

h2 {
  font-size: clamp(1.9rem, 4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
}

p {
  margin: 0 0 1em;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--spark);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 10;
  background: var(--white);
  padding: 0.5rem 1rem;
}

code {
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.92em;
}

/* ----- Tlačidlá ----- */
.btn {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid transparent;
  transition: transform 0.15s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn--spark {
  background: var(--spark);
  color: var(--ink);
}

.btn--ghost {
  border-color: rgba(255, 255, 255, 0.5);
  color: var(--white);
}

.btn--ink {
  background: var(--ink);
  color: var(--white);
}

/* ----- Hlavička ----- */
.topbar {
  background: var(--night);
  color: var(--white);
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.1rem;
  padding-bottom: 1.1rem;
  flex-wrap: wrap;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.logo__icon {
  width: 1.4rem;
  height: 1.4rem;
  fill: var(--spark);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav a {
  text-decoration: none;
  opacity: 0.85;
}

.nav a:hover {
  opacity: 1;
  text-decoration: underline;
  text-decoration-color: var(--spark);
  text-underline-offset: 6px;
}

/* ----- Úvod (hero) ----- */
.hero {
  background: var(--night);
  color: var(--white);
  overflow: hidden;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  align-items: center;
  gap: 2rem;
  padding-top: 4rem;
  padding-bottom: 5rem;
}

.hero h1 {
  font-size: clamp(2.6rem, 6.5vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  max-width: 13ch;
}

.hero__lead {
  font-size: 1.2rem;
  max-width: 46ch;
  opacity: 0.85;
  margin-bottom: 2rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Prskavka */
.sparkler {
  width: 100%;
  max-width: 340px;
  justify-self: center;
  overflow: visible;
}

.sparkler__stick {
  stroke: #8d83a3;
  stroke-width: 5;
  stroke-linecap: round;
}

.sparkler__burst line {
  stroke: var(--spark);
  stroke-width: 4;
  stroke-linecap: round;
  transform-origin: 0 0;
  animation: burst 0.9s cubic-bezier(0.2, 0.9, 0.3, 1.3) 0.3s both;
}

.sparkler__burst line.short {
  stroke: var(--flame);
  stroke-width: 3;
  animation-delay: 0.5s;
}

.sparkler__burst circle {
  fill: var(--white);
}

@keyframes burst {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

/* ----- Sekcie ----- */
.section {
  padding: 5rem 0;
}

.section--tint {
  background: #ece6f5;
}

.section--dark {
  background: var(--night);
  color: var(--white);
}

.section__lead {
  color: var(--muted);
  max-width: 56ch;
  font-size: 1.1rem;
}

/* ----- Služby ----- */
.services {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0 3rem;
  margin: 2rem 0 0;
}

.services > div {
  padding: 1.25rem 0;
  border-top: 2px solid var(--ink);
}

.services dt {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.services dd {
  margin: 0;
  color: var(--muted);
  max-width: 44ch;
}

/* ----- Postup (číslované kroky) ----- */
.steps {
  list-style: none;
  counter-reset: krok;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin: 2rem 0 0;
  padding: 0;
}

.steps li {
  counter-increment: krok;
}

.steps li::before {
  content: counter(krok);
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: 1rem;
  border-radius: 50%;
  background: var(--flame);
  color: var(--white);
  font-weight: 800;
  font-size: 1.2rem;
}

.steps p {
  color: var(--muted);
}

/* ----- Eventy ako vstupenky ----- */
.tickets {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin: 2rem 0 0;
  padding: 0;
}

.ticket {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  background: var(--white);
  border-radius: 12px;
  position: relative;
}

/* Ústrižok s dátumom */
.ticket__stub {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--spark);
  border-radius: 12px 0 0 12px;
  border-right: 2px dashed var(--ink);
  padding: 1rem 0.5rem;
}

.ticket__stub .day {
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1;
}

.ticket__stub .month {
  font-weight: 600;
}

/* Výrezy perforácie */
.ticket::before,
.ticket::after {
  content: "";
  position: absolute;
  left: calc(6.5rem - 10px);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--paper);
}

.ticket::before { top: -9px; }
.ticket::after  { bottom: -9px; }

.ticket__body {
  padding: 1.1rem 1.4rem;
  display: flex;
  flex-direction: column;
}

.ticket__type {
  font-size: 0.9rem;
  color: var(--flame);
  font-weight: 600;
}

.ticket__body h3 {
  margin: 0.15rem 0 0.25rem;
}

.ticket__body p {
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.ticket__price {
  margin-top: auto;
  align-self: flex-start;
  font-weight: 800;
  font-size: 1.15rem;
}

.ticket__price--private {
  font-weight: 600;
  font-size: 1rem;
  color: var(--muted);
}

/* ----- Databáza ----- */
.db {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem 3rem;
  align-items: start;
}

.db__intro p {
  opacity: 0.85;
  max-width: 48ch;
  margin-bottom: 1.75rem;
}

.db__intro code,
.task code {
  color: var(--spark);
}

.code,
.task pre {
  background: #1b1030;
  border-radius: 12px;
  overflow-x: auto;
}

.code pre,
.task pre {
  margin: 0;
  padding: 1.25rem 1.5rem;
  line-height: 1.5;
}

.code code,
.task pre code {
  color: #e9e3f5;
}

.task {
  grid-column: 1 / -1;
  border: 2px solid var(--spark);
  border-radius: 12px;
  padding: 1.75rem;
}

.task p {
  max-width: 75ch;
}

.task summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--spark);
  margin-bottom: 1rem;
}

/* ----- Kontakt ----- */
.contact {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 3rem;
  align-items: start;
}

.contact .section__lead {
  margin-bottom: 1.75rem;
}

.contact__details {
  font-style: normal;
}

.contact__details p {
  display: flex;
  flex-direction: column;
  padding: 1rem 0;
  border-top: 2px solid var(--ink);
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
}

.contact__details span {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--muted);
}

/* ----- Päta ----- */
.footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

.footer p {
  margin: 0;
}

/* ----- Mobil a tablet ----- */
@media (max-width: 900px) {
  .steps {
    grid-template-columns: repeat(2, 1fr);
  }

  .db,
  .contact {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .hero__inner {
    grid-template-columns: 1fr;
    padding-top: 2.5rem;
  }

  .sparkler {
    display: none;
  }

  .services,
  .tickets {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 3.5rem 0;
  }
}

@media (max-width: 480px) {
  .steps {
    grid-template-columns: 1fr;
  }

  .nav {
    gap: 0.25rem 1rem;
    font-size: 0.95rem;
  }
}

/* Rešpektovanie používateľov, ktorí nechcú animácie */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .sparkler__burst line {
    animation: none;
  }

  .btn {
    transition: none;
  }
}

/* ----- Zoznam úloh v cviku 2 ----- */
.task__list {
  margin: 0 0 1.5rem;
  padding-left: 1.4rem;
}

.task__list li {
  margin-bottom: 1rem;
}

.task__list li::marker {
  color: var(--spark);
  font-weight: 800;
}

.task__list p {
  margin-bottom: 0.4rem;
}

.task__list summary {
  margin-bottom: 0.6rem;
}

/* ----- Súbory na stiahnutie ----- */
.files {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.6rem;
  max-width: 26rem;
}

.files a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.8rem 1.1rem;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-radius: 10px;
  text-decoration: none;
  transition: border-color 0.15s ease;
}

.files a:hover {
  border-color: var(--spark);
}

.files strong {
  color: var(--spark);
  font-family: Consolas, "Courier New", monospace;
}

.files span {
  font-size: 0.95rem;
  opacity: 0.8;
  text-align: right;
}

.task__note {
  opacity: 0.85;
}

.badge {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.1rem 0.6rem;
  border-radius: 999px;
  background: var(--flame);
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 600;
  vertical-align: 0.1em;
}

.ticket__type--draft {
  color: var(--muted);
}
