/* =============================================
   HAVLOIDS MEMORIAL CLUB – style.css
   Brand: #f7931d | Pozadí: #000 | Text: #fff
   ============================================= */

/* Umísti soubory fontu do složky /fonts/
   a přejmenuj dle skutečného názvu souboru. */
@font-face {
  font-family: 'Urania Czech';
  src: local('Urania Czech'),
       url('../fonts/urania-czech.woff2') format('woff2'),
       url('../fonts/urania-czech.woff') format('woff'),
       url('../fonts/urania-czech.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* === Custom properties === */
:root {
  --color-bg:      #000000;
  --color-text:    #ffffff;
  --color-primary: #f7931d;
  --color-muted:   rgba(255, 255, 255, 0.6);

  --font-brand: 'Urania Czech', 'Courier Prime', 'Courier New', Courier, monospace;

  --space-xs:  0.5rem;
  --space-sm:  1rem;
  --space-md:  2rem;
  --space-lg:  3rem;
  --space-xl:  5rem;

  --radius:     4px;
  --transition: 0.25s ease;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-brand);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

/* === Skip link === */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  padding: 0.5rem 1rem;
  background: var(--color-primary);
  color: #000;
  font-weight: bold;
  border-radius: var(--radius);
  z-index: 9999;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 1rem;
}

/* === Hero === */
.hero {
  height: 100dvh;
  display: flex;
  align-items: stretch;
  justify-content: center;
  overflow: hidden;
}

.hero__inner {
  width: 85%;
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-bottom: calc(var(--space-sm) + 2.5rem + var(--space-md) + var(--space-xs));
}

/* --- Logo --- */
.hero__logo {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: var(--space-md);
  animation: fadeInDown 0.7s ease both;
}

.hero__logo img {
  width: min(66vw, 380px);
  height: auto;
  margin: 0 auto;
  filter: drop-shadow(0 0 48px rgba(247, 147, 29, 0.18));
  transition: filter 0.4s ease;
}

.hero__logo img:hover {
  filter: drop-shadow(0 0 72px rgba(247, 147, 29, 0.38));
}

/* --- Navigace --- */
.hero__nav {
  animation: fadeIn 0.8s ease 0.35s both;
}

.nav-row {
  font-size: clamp(1rem, 3.8vw, 1.55rem);
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.9;
  white-space: nowrap;
}

.nav-row a {
  display: inline;
  transition: color var(--transition);
}

.nav-row a:hover,
.nav-row a:focus-visible {
  color: var(--color-primary);
}

.sep {
  color: var(--color-primary);
  font-weight: 400;
  user-select: none;
}

/* Na velmi malých displejích povolíme zalomení */
@media (max-width: 767px) {
  .nav-row {
    white-space: normal;
    line-height: 2.2;
  }
}

/* --- Tagline --- */
.hero__tagline {
  font-size: clamp(0.875rem, 2vw, 1rem);
  color: var(--color-muted);
  letter-spacing: 0.04em;
  line-height: 1.75;
  max-width: 70%;
  margin-top: var(--space-xs);
  margin-bottom: var(--space-md);
  animation: fadeIn 0.8s ease 0.6s both;
}

/* === Tlačítka === */
.btn {
  display: inline-block;
  font-family: var(--font-brand);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.55rem 1.3rem;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}

.btn--primary {
  background: var(--color-primary);
  color: #000;
  border-color: var(--color-primary);
}
.btn--primary:hover,
.btn--primary:focus-visible {
  background: transparent;
  color: var(--color-primary);
}

.btn--secondary {
  background: transparent;
  color: var(--color-text);
  border-color: rgba(255, 255, 255, 0.25);
}
.btn--secondary:hover,
.btn--secondary:focus-visible {
  border-color: var(--color-primary);
  color: var(--color-primary);
}


/* === Přístupnost – focus === */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
  border-radius: var(--radius);
}

/* === Animace === */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* === Vnitřní stránky === */

.page {
  height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 0 7.5% 0;
  overflow: hidden;
}

.page__content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-md) 0 var(--space-sm);
  text-align: center;
  animation: fadeIn 0.7s ease both;
}

.page__heading {
  font-size: clamp(2rem, 7vw, 3.8rem);
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  line-height: 1.25;
  margin-bottom: var(--space-lg);
}

.page__body {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  line-height: 1.8;
  color: var(--color-text);
  max-width: 60ch;
}

.page__bottom {
  padding-bottom: var(--space-md);
  text-align: center;
}

.page__bottom .hero__tagline {
  margin-top: var(--space-xs);
  margin-inline: auto;
}

.hero__inner .hero__tagline {
  margin-top: 0;
}

.page__bottom-logo {
  display: block;
  width: 1.25rem;
  height: 1.25rem;
  margin: var(--space-sm) auto 0;
  background: var(--color-primary);
  border-radius: 50%;
  opacity: 0.7;
  transition: opacity var(--transition);
}

.page__bottom-logo:hover {
  opacity: 1;
}

/* 404 */
.error-img {
  max-height: 55vh;
  width: auto;
  height: auto;
  margin: 0 auto;
}

/* Přístupnostně skrytý text */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Merch stránka */
.page--merch {
  padding-bottom: 0;
}

.merch-grid {
  display: grid;
  grid-template-columns: repeat(2, 28vh);
  grid-template-rows: repeat(2, 28vh);
  gap: 3px;
  justify-content: center;
  margin: auto 0;
}

.merch-grid img {
  width: 28vh;
  height: 28vh;
  object-fit: contain;
  display: block;
}

.merch-item {
  width: 28vh;
  height: 28vh;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
}

.merch-item__inner {
  display: inline-flex;
  flex-direction: column;
  max-width: 100%;
  max-height: 100%;
}

.merch-item__inner img {
  max-width: 28vh;
  max-height: calc(28vh - 1.4rem);
  width: auto;
  height: auto;
  display: block;
  object-fit: contain;
}

.merch-caption {
  font-family: var(--font-brand);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: none;
  color: var(--color-muted);
  text-align: right;
  padding: 0.25rem 0 0;
}

.merch-caption--left {
  text-align: left;
}

.page--kalendar .merch-grid {
  column-gap: 1rem;
  row-gap: 1rem;
  grid-template-rows: auto auto;
}

.page--kalendar .merch-item {
  height: auto;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  overflow: hidden;
}

.page--kalendar .merch-item > a {
  display: block;
  flex-shrink: 0;
}

.page--kalendar .merch-item > img,
.page--kalendar .merch-item > a > img {
  width: 28vh;
  height: auto;
  max-height: calc((100dvh - 21rem) / 2);
  object-fit: contain;
  flex-shrink: 0;
}

.page--merch .page__bottom {
  padding: var(--space-sm) 7.5% var(--space-md);
}

.page--merch .merch-grid {
  column-gap: 1rem;
  row-gap: 1rem;
}

.page--merch .merch-caption {
  text-align: left;
}

.page--merch .merch-item {
  height: auto;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  overflow: hidden;
}

.page--merch .merch-item > img {
  width: 28vh;
  height: auto;
  max-height: calc(28vh - 1.4rem);
  object-fit: contain;
  flex-shrink: 0;
}

/* Aktivní odkaz v navigaci */
.nav-row a.is-active {
  background: var(--color-primary);
  color: #000;
  padding: 0.05em 0.4em;
}

/* === Modal mapa === */
.merch-item--clickable {
  cursor: pointer;
}

.mapa-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mapa-modal[hidden] {
  display: none;
}

.mapa-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
}

.mapa-modal__box {
  position: relative;
  max-width: 90vw;
  max-height: 90dvh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mapa-modal__img {
  width: min(70vw, 70dvh);
  height: min(70vw, 70dvh);
  object-fit: cover;
  display: block;
  border: 2px solid var(--color-primary);
}

.mapa-modal__close {
  position: absolute;
  top: -2rem;
  right: 0;
  background: none;
  border: none;
  color: var(--color-primary);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
}

.mapa-modal__close:hover {
  color: #fff;
}

/* === Responzivní úpravy === */

/* Mobil */
@media (max-width: 767px) {
  .hero,
  .page {
    height: 100dvh;
    overflow: hidden;
    padding-left: 5vw;
    padding-right: 5vw;
  }

  .nav-row {
    white-space: normal;
    line-height: 2.2;
  }

  .merch-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto auto;
    width: 100%;
    column-gap: 1rem;
    row-gap: 1rem;
  }

  .merch-grid img,
  .merch-item {
    width: 100%;
    height: auto;
  }

  .page--merch .page__bottom {
    padding-left: 0;
    padding-right: 0;
  }

  .nav-row a.is-active {
    padding-left: 0;
    padding-right: 0;
  }

  .hero__tagline {
    margin-top: 0.25rem;
    margin-bottom: 0.75rem;
    max-width: 100%;
  }

  .page__bottom .hero__tagline {
    margin-top: 0.1rem;
    margin-bottom: 0.25rem;
    max-width: 100%;
  }

  .page--kalendar .merch-item > img,
  .page--kalendar .merch-item > a > img {
    width: 100%;
  }

  .page--merch .merch-item > img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    object-position: center;
  }
}

/* Tablet */
@media (min-width: 768px) {
  .hero__logo img {
    width: min(50vw, 420px);
  }

  .page--kalendar .merch-grid {
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: auto;
    width: 100%;
    row-gap: 0;
  }

  .page--kalendar .merch-item {
    width: 100%;
    min-width: 0;
  }

  .page--kalendar .merch-item > a {
    width: 100%;
  }

  .page--kalendar .merch-item > img,
  .page--kalendar .merch-item > a > img {
    width: 100%;
    max-height: 45vh;
  }

  .page--merch .merch-grid {
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: auto;
    width: 100%;
    row-gap: 0;
  }

  .page--merch .merch-item {
    width: 100%;
    min-width: 0;
  }

  .page--merch .merch-item > img {
    width: 100%;
    max-height: 45vh;
  }
}

/* Desktop */
@media (min-width: 1200px) {
  .hero__logo img {
    width: 400px;
  }
}

/* 4K monitory */
@media (min-width: 2560px) {
  html {
    font-size: 20px;
  }

  .hero__logo img {
    width: 520px;
  }
}
