/* ============================================================
   Tenisové město roku — design system
   Night court: deep petrol, optic yellow, clay orange, chalk lines
   ============================================================ */

:root {
  --night: #081c26;
  --night-2: #0d2836;
  --night-3: #123443;
  --optic: #dff52d;
  --clay: #c8562c;
  --chalk: #f4f8f2;
  --muted: #9db4ba;
  --line: rgba(244, 248, 242, 0.16);
  --font-display: "Archivo", "Arial Black", sans-serif;
  --font-body: "Instrument Sans", "Helvetica Neue", sans-serif;
  --font-mono: "IBM Plex Mono", "Courier New", monospace;
  --pad-x: clamp(1.25rem, 5vw, 6rem);
  --pad-y: clamp(4.5rem, 12vh, 9rem);
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--night);
  color: var(--chalk);
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.15rem);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: var(--optic);
  color: var(--night);
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-stretch: 115%;
  line-height: 1.02;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h2 {
  font-size: clamp(2rem, 1.4rem + 3.6vw, 4.2rem);
  font-weight: 800;
}

a {
  color: inherit;
}

strong {
  color: var(--optic);
  font-weight: 600;
}

/* ---- shared: eyebrow, section frame (court lines) ---- */

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--optic);
  margin-bottom: 1.4rem;
}

.eyebrow::before {
  content: "///";
  letter-spacing: 0;
  margin-right: 0.8em;
  opacity: 0.55;
}

section {
  position: relative;
  padding: var(--pad-y) var(--pad-x);
}

/* court baseline with center "T" mark dividing sections */
main section::before {
  content: "";
  position: absolute;
  top: 0;
  left: var(--pad-x);
  right: var(--pad-x);
  height: 1px;
  background: var(--line);
}

main section::after {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 1px;
  height: 1.1rem;
  background: var(--line);
}

.section-head {
  max-width: 60rem;
  margin-bottom: clamp(2.5rem, 6vh, 4.5rem);
}

.section-lead {
  margin-top: 1.5rem;
  max-width: 44rem;
  color: var(--muted);
}

/* ============================================================
   HERO
   ============================================================ */

#hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: var(--pad-y) var(--pad-x);
  overflow: hidden;
  /* subtle court-floor gradient */
  background:
    radial-gradient(120% 90% at 75% 20%, var(--night-3) 0%, transparent 55%),
    var(--night);
}

#hero-skyline {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: clamp(120px, 24vh, 220px);
  z-index: 0;
  pointer-events: none;
}

.skyline-far {
  fill: #0e2b39;
  opacity: 0.55;
  transform: translateY(-14px);
}

.skyline-near {
  fill: #04121b;
}

#hero-canvas,
#hero-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

#hero-fallback {
  display: grid;
  place-items: center;
}

#hero-fallback[hidden] {
  display: none;
}

#hero-fallback svg {
  width: min(42vmin, 340px);
  height: auto;
  opacity: 0.9;
  transform: translateX(28vw);
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 72rem;
}

.hero-eyebrow {
  margin-bottom: 2rem;
}

.hero-title {
  font-size: clamp(3.2rem, 1.5rem + 11vw, 10.5rem);
  font-weight: 900;
  font-stretch: 120%;
}

.hero-title .line {
  display: block;
}

.hero-title .accent {
  color: var(--optic);
  -webkit-text-stroke: 0;
}

.hero-sub {
  margin-top: 2rem;
  font-size: clamp(1.1rem, 1rem + 0.8vw, 1.5rem);
  max-width: 34em;
  color: var(--chalk);
}

.hero-claim {
  margin-top: 0.8rem;
  color: var(--muted);
  max-width: 40em;
}

.hero-cta {
  display: inline-block;
  margin-top: 2.6rem;
  padding: 1rem 2.2rem;
  background: var(--optic);
  color: var(--night);
  font-family: var(--font-display);
  font-weight: 800;
  font-stretch: 110%;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-decoration: none;
  border-radius: 999px;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.hero-cta:hover,
.hero-cta:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(223, 245, 45, 0.28);
}

.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  color: var(--muted);
}

.scroll-hint-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.scroll-hint-line {
  width: 1px;
  height: 3.2rem;
  background: linear-gradient(var(--optic), transparent);
  animation: hint-drop 1.8s ease-in-out infinite;
  transform-origin: top;
}

@keyframes hint-drop {
  0% { transform: scaleY(0); }
  45% { transform: scaleY(1); }
  100% { transform: scaleY(1); opacity: 0; }
}

/* ============================================================
   MOTTO — pinned full-screen quote
   ============================================================ */

#motto {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.motto-quote {
  max-width: 62rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-stretch: 112%;
  text-transform: uppercase;
  line-height: 1.12;
}

.motto-l1 {
  font-size: clamp(1.4rem, 1rem + 2.6vw, 2.8rem);
  color: var(--muted);
  margin-bottom: 1.6rem;
}

.motto-l2 {
  font-size: clamp(1.9rem, 1.2rem + 4.4vw, 4.6rem);
}

.motto-l2 .accent {
  color: var(--optic);
}

.word {
  display: inline-block;
}

/* ============================================================
   O PROJEKTU
   ============================================================ */

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  max-width: 72rem;
}

.two-col p + p {
  margin-top: 1.2rem;
}

.col-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--optic);
  margin-bottom: 1.2rem;
  letter-spacing: 0.06em;
}

/* ============================================================
   JAK TO FUNGUJE — diagram
   ============================================================ */

#jak-to-funguje {
  background: var(--night-2);
}

.diagram {
  position: relative;
  max-width: 46rem;
  margin: 0 auto;
  aspect-ratio: 3 / 2;
}

.diagram-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.partner-link {
  stroke: var(--optic);
  stroke-width: 1.5;
  opacity: 0.55;
  vector-effect: non-scaling-stroke;
}

.diagram-nodes {
  position: absolute;
  inset: 0;
  list-style: none;
}

.partner-node {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-stretch: 110%;
  text-transform: uppercase;
  font-size: clamp(0.85rem, 0.7rem + 1vw, 1.25rem);
  width: 12em;
}

/* node circles sit exactly on the line intersections (25 % / 75 % of the box) */
.partner-node:nth-child(1) { left: 25%; top: 25%; }
.partner-node:nth-child(2) { left: 75%; top: 25%; }
.partner-node:nth-child(3) { left: 25%; top: 75%; }
.partner-node:nth-child(4) { left: 75%; top: 75%; }

/* keep the circle centered on the point, label hangs below */
.partner-node {
  transform: translate(-50%, -1.6rem);
}

.node-num {
  display: grid;
  place-items: center;
  width: 3.2rem;
  height: 3.2rem;
  border-radius: 50%;
  background: var(--night);
  border: 1px solid var(--optic);
  color: var(--optic);
  font-family: var(--font-mono);
  font-size: 1rem;
  box-shadow: 0 0 0 10px var(--night-2);
}

.diagram-note {
  max-width: 44rem;
  margin: clamp(2.5rem, 6vh, 4rem) auto 0;
  text-align: center;
  color: var(--muted);
}

/* ============================================================
   PŘÍNOSY — three cards
   ============================================================ */

.benefit-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.2rem, 2.5vw, 2.4rem);
  max-width: 76rem;
}

.benefit-card {
  position: relative;
  padding: 2.2rem 2rem 2.4rem;
  background: var(--night-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}

.benefit-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
}

.card-mesta::before { background: var(--optic); }
.card-skoly::before { background: var(--chalk); }
.card-kluby::before { background: var(--clay); }

.benefit-card h3 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 1.4rem;
}

.card-mesta h3 { color: var(--optic); }
.card-kluby h3 { color: #e8825d; }

.benefit-card ul {
  list-style: none;
}

.benefit-card li {
  padding: 0.55rem 0 0.55rem 1.6rem;
  position: relative;
  border-top: 1px solid var(--line);
  font-size: 0.98rem;
}

.benefit-card li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.85em;
  top: 0.75rem;
}

/* ============================================================
   SOUTĚŽ — criteria
   ============================================================ */

#soutez {
  background: var(--night-2);
}

.criteria {
  list-style: none;
  max-width: 60rem;
  counter-reset: crit;
}

.criterion {
  display: flex;
  align-items: baseline;
  gap: clamp(1.2rem, 4vw, 3rem);
  padding: clamp(1rem, 2.5vh, 1.6rem) 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-display);
  font-weight: 700;
  font-stretch: 112%;
  text-transform: uppercase;
  font-size: clamp(1.15rem, 0.9rem + 1.8vw, 2.1rem);
}

.criterion:first-child {
  border-top: 1px solid var(--line);
}

.criterion-num {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 0.55em;
  color: transparent;
  -webkit-text-stroke: 1px var(--optic);
  letter-spacing: 0.05em;
  min-width: 2.4em;
}

/* ============================================================
   CTA + KONTAKT — optic yellow block
   ============================================================ */

#zapojte-se {
  background: var(--optic);
  color: var(--night);
}

#zapojte-se::before,
#zapojte-se::after {
  display: none;
}

.eyebrow-dark {
  color: var(--night);
}

.cta-head h2 {
  font-size: clamp(2.4rem, 1.6rem + 5vw, 5.6rem);
  font-weight: 900;
}

.cta-lead {
  margin-top: 1.4rem;
  font-size: 1.15rem;
  max-width: 36em;
}

.cta-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: clamp(2.5rem, 6vw, 6rem);
  margin-top: clamp(2.5rem, 6vh, 4.5rem);
  max-width: 72rem;
}

.contact-item {
  padding: 1.3rem 0;
  border-top: 1px solid rgba(8, 28, 38, 0.25);
  font-size: clamp(1.15rem, 1rem + 1vw, 1.6rem);
  font-family: var(--font-display);
  font-weight: 700;
  font-stretch: 108%;
}

.contact-item a {
  text-decoration: none;
}

.contact-item a:hover,
.contact-item a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.contact-label {
  display: block;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  opacity: 0.65;
  margin-bottom: 0.4rem;
}

/* form */

.form-row {
  margin-bottom: 1.1rem;
}

.contact-form label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 0.45rem;
  opacity: 0.75;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  font: inherit;
  color: var(--night);
  background: rgba(244, 248, 242, 0.55);
  border: 1px solid rgba(8, 28, 38, 0.35);
  border-radius: 4px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.contact-form input:focus-visible,
.contact-form textarea:focus-visible {
  outline: 2px solid var(--night);
  outline-offset: 1px;
  background: var(--chalk);
}

.form-submit {
  margin-top: 0.4rem;
  padding: 1rem 2.6rem;
  background: var(--night);
  color: var(--optic);
  font-family: var(--font-display);
  font-weight: 800;
  font-stretch: 110%;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.form-submit:hover,
.form-submit:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(8, 28, 38, 0.35);
}

/* ============================================================
   FOOTER
   ============================================================ */

footer {
  padding: 3rem var(--pad-x) 3.5rem;
  border-top: 1px solid var(--line);
  text-align: center;
}

.footer-brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-stretch: 115%;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.8rem;
}

.footer-org,
.footer-copy {
  font-size: 0.88rem;
  color: var(--muted);
}

.footer-copy {
  margin-top: 0.3rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 900px) {
  .two-col,
  .cta-grid {
    grid-template-columns: 1fr;
  }

  .benefit-grid {
    grid-template-columns: 1fr;
    max-width: 34rem;
  }

  #hero-fallback svg {
    transform: translateY(-22vh);
    opacity: 0.35;
  }
}

@media (max-width: 600px) {
  .hero-title {
    font-size: clamp(2.4rem, 0.6rem + 12.5vw, 4.2rem);
    font-stretch: 98%;
  }

  .diagram {
    aspect-ratio: 2 / 3;
  }

  .node-num {
    width: 2.6rem;
    height: 2.6rem;
    box-shadow: 0 0 0 6px var(--night-2);
  }

  .partner-node {
    font-size: 0.8rem;
    padding: 0.5rem;
  }
}

/* ============================================================
   MOTION SAFETY
   ============================================================ */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
