/* ==========================================================================
   HostingBuY — "Vidimo se" promo page
   Palette pulled straight from the SVG artwork:
   background #37465d · orange accent #ff6600 · blue accent #0099ff

   Layout strategy:
   - Mobile / small screens (default, < 992px): natural document flow.
     Elements get comfortable, legible spacing and the page scrolls if the
     content is taller than the viewport (normal, expected behaviour).
   - Desktop (>= 992px, covers 1920x1080, 1366x768, etc.): the whole page
     is locked to exactly one viewport with no scrollbar, and every section
     shares that fixed height via flexbox.
   ========================================================================== */

:root {
  --bg: #37465d;
  --tile-bg: #2b3749;
  --tile-bg-2: #24303f;
  --orange: #ff6600;
  --blue: #0099ff;
  --ink: #ffffff;
  --ink-muted: rgba(255, 255, 255, 0.55);
  --ink-faint: rgba(255, 255, 255, 0.38);
}

* {
  -webkit-tap-highlight-color: transparent;
}

html, body {
  min-height: 100%;
}

/* Flat, uninterrupted background — identical to the SVG's own canvas fill,
   so the artwork reads as part of the page rather than a card sitting on it. */
body {
  background-color: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.page {
  min-height: 100dvh;
}

/* ---------- Hero ---------- */

.hero {
  flex-grow: 0; /* on mobile, don't stretch to fill leftover space — just wrap the image */
  padding: clamp(1rem, 4vw, 2rem) 1rem clamp(0.5rem, 2vw, 1rem);
}

.hero-svg {
  width: 100%;
  max-width: min(90vw, 720px);
  height: auto;
  opacity: 0;
  transition: opacity 0.7s ease;
  /* Intentionally no filter/shadow/background — the image IS the surface. */
}

body.is-ready .hero-svg {
  opacity: 1;
}

/* ---------- Countdown ---------- */

.countdown-wrap {
  display: flex;
  justify-content: center;
  padding: 0.5rem 1rem clamp(1.5rem, 5vw, 2.5rem);
}

.countdown {
  display: flex;
  align-items: flex-start;
  gap: clamp(0.6rem, 3vw, 1.25rem);
}

.cd-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.cd-digits {
  display: flex;
  gap: 0.3rem;
}

.cd-digit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: clamp(1.8rem, 7vw, 2.4rem);
  padding-block: clamp(0.35rem, 1.8vw, 0.5rem);
  border-radius: 0.5rem;
  background: linear-gradient(180deg, var(--tile-bg), var(--tile-bg-2));
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  font-size: clamp(1.1rem, 4.5vw, 1.6rem);
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: transform 0.15s ease;
}

.cd-digit.is-tick {
  transform: translateY(-2px);
}

.cd-label {
  font-size: clamp(0.62rem, 2vw, 0.72rem);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.cd-sep {
  align-self: center;
  margin-top: -1.1rem;
  color: var(--orange);
  font-weight: 700;
  font-size: clamp(1.1rem, 4.5vw, 1.6rem);
  line-height: 1;
  width: 0.6rem;
  text-align: center;
}

/* ---------- Footer ---------- */

.site-footer {
  padding: 0.5rem 0 clamp(1.5rem, 5vw, 2rem);
  padding-bottom: calc(clamp(1.5rem, 5vw, 2rem) + env(safe-area-inset-bottom, 0px));
}

.socials {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.9rem, 3.5vw, 1.1rem);
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.socials a {
  display: inline-flex;
  color: var(--ink-muted);
  font-size: clamp(1.4rem, 5vw, 1.7rem);
  line-height: 1;
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
}

.socials a:hover,
.socials a:focus-visible {
  color: var(--orange);
  transform: translateY(-2px);
  outline: none;
}

.foot-line {
  gap: 0.25rem;
}

.copyright,
.signature {
  margin: 0;
  font-size: 0.78rem;
  color: var(--ink-faint);
  letter-spacing: 0.01em;
  text-align: center;
}

.copyright b {
  color: var(--ink-muted);
  font-weight: 600;
}

.signature .fa-heart {
  color: var(--orange);
}

@media (min-width: 576px) {
  .copyright,
  .signature {
    text-align: left;
  }
  .signature {
    text-align: right;
  }
}

/* ---------- Preloader ---------- */

#preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

body.is-ready #preloader {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-ring {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.12);
  border-top-color: var(--orange);
  border-right-color: var(--blue);
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   Desktop lock: from here up (>= 992px wide AND enough height to fit
   everything comfortably) the whole page fills exactly one viewport and
   never scrolls — this is what 1920x1080 and similar resolutions get.
   ========================================================================== */

@media (min-width: 992px) and (min-height: 640px) {
  html, body {
    height: 100%;
    overflow: hidden;
  }

  .page {
    height: 100dvh;
    overflow: hidden;
  }

  .hero {
    flex-grow: 1; /* desktop only: stretch to fill exactly one viewport */
    flex-shrink: 1;
    min-height: 0;
    padding-block: clamp(0.5rem, 2vh, 1.5rem);
    overflow: hidden;
  }

  .hero-svg {
    max-width: min(88vw, 980px);
    max-height: 100%;
    width: auto;
  }

  .countdown-wrap {
    flex-shrink: 0;
    padding: 0.25rem 1rem clamp(1rem, 3.5vh, 2rem);
  }

  .site-footer {
    flex-shrink: 0;
    padding: 0.25rem 0 clamp(0.75rem, 2vh, 1.25rem);
    padding-bottom: clamp(0.75rem, 2vh, 1.25rem);
  }

  .socials {
    margin-bottom: clamp(0.5rem, 1.5vh, 0.9rem);
  }
}

@media (min-width: 1400px) {
  .hero-svg { max-width: 1080px; }
}

/* ---------- Small-phone tuning ---------- */

@media (max-width: 400px) {
  .countdown { gap: 0.45rem; }
  .cd-digit { min-width: 1.7rem; font-size: 1.05rem; }
}

/* ---------- Accessibility ---------- */

@media (prefers-reduced-motion: reduce) {
  .hero-svg {
    transition: opacity 0.3s ease;
  }
  .preloader-ring {
    animation-duration: 1.6s;
  }
  .socials a,
  .cd-digit {
    transition: none;
  }
}
