/* ==========================================================================
   Under Construction – Artist Landing
   ========================================================================== */

/* --- Peruslayout --- */
.ucal-wrap {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;              /* video pysyy kehyksissä */
  color: #fff;
  font-family: inherit;
  width: 100%;
  box-sizing: border-box;
  overflow-x: clip;              /* estää vaakarullan “pikseliylivuodon” */
  border-radius: 0;              /* EI pyöristystä taustalle */
}
.ucal-wrap * { box-sizing: border-box; }          /* ei leikkauksia oikeasta reunasta */

.ucal-video { position: absolute; inset: 0; z-index: 0; }
.ucal-vid  { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.ucal-overlay {
  position: absolute; inset: 0; border-radius: 0;
  background:
    radial-gradient(1200px 600px at 50% 10%, rgba(0,0,0,0.15), transparent 60%),
    linear-gradient(180deg, rgba(0,0,0,0.55), rgba(0,0,0,0.35) 35%, rgba(0,0,0,0.65));
}

/* --- SISÄLTÖ KESKELLE VARMASTI --- */
.ucal-content {
  position: relative;
  z-index: 1;
  width: min(100%, 1100px);
  margin-inline: auto;
  padding: clamp(18px, 5vw, 56px);
  display: grid;                 /* varma keskitys: ei riipu teeman typosta */
  justify-items: center;
  row-gap: clamp(8px, 2.4vw, 18px);
  text-align: center;
}

/* pakota otsikko ja alaotsikko keskelle (ylikirjoittaa teeman säännöt) */
.ucal-headline,
.ucal-subcopy {
  margin-left: auto !important;
  margin-right: auto !important;
  text-align: center !important;
  max-width: 62ch;
  display: block;
}

.ucal-wrap, .ucal-wrap * { color: #fff; }
.ucal-wrap ::placeholder { color: rgba(255,255,255,.85); }

/* --- Typografia --- */
.ucal-headline {
  font-weight: 800;
  letter-spacing: 0.2px;
  line-height: 1.1;
  font-size: clamp(22px, 4.5vw, 46px);
  margin: 0 0 clamp(10px, 2vw, 18px);
  text-shadow: 0 2px 10px rgba(0,0,0,.55);
}
.ucal-subcopy {
  margin: 0 auto clamp(12px, 2.6vw, 20px);
  font-size: clamp(14px, 2.6vw, 22px);
  line-height: 1.35;
  opacity: .95;
  text-shadow: 0 2px 8px rgba(0,0,0,.55);
}

/* pientä yleisväliä elementtien väliin etenkin mobiilissa */
.ucal-content > * + * { margin-top: clamp(8px, 2.4vw, 18px); }

/* ==========================================================================
   Countdown – yhtenäinen lasitausta + responsiivinen skaalaus
   ========================================================================== */
.ucal-countdown {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(70px, 1fr));
  gap: clamp(8px, 2.2vw, 18px);
  justify-items: center;
  align-items: stretch;
  width: 100%;
  margin: 0 auto 12px auto;
  padding: clamp(8px, 2vw, 12px);
}
.ucal-countdown::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: 16px;
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  box-shadow: inset 0 4px 14px rgba(0,0,0,.22);
  z-index: 0;
}
.ucal-countdown > div {
  position: relative; z-index: 1;
  inline-size: 100%;
  display: grid; place-items: center;
  border-radius: 12px;
  padding: clamp(6px, 1.6vw, 12px) clamp(8px, 2.4vw, 16px);
  background: transparent; box-shadow: none;
}
/* numerot skaalautuvat paremmin (mobiilissa pienemmät) */
.ucal-countdown span {
  display: block; font-weight: 900; line-height: .95;
  font-size: clamp(18px, 7.2vw, 38px);
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 3px 12px rgba(0,0,0,.6);
}
.ucal-countdown label {
  display: block; margin-top: 4px;
  font-size: clamp(10px, 3.4vw, 12px);
  opacity: .9; text-shadow: 0 2px 8px rgba(0,0,0,.5);
}

/* Pino 2 sarakkeeseen aiemmin (640px →) */
@media (max-width: 640px) {
  .ucal-countdown {
    grid-template-columns: repeat(2, minmax(120px, 1fr));
    gap: 10px;
  }
  .ucal-countdown span {
    font-size: clamp(20px, 10vw, 34px);
  }
}

/* Hyvin pienet näytöt */
@media (max-width: 360px) {
  .ucal-countdown {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .ucal-countdown label { font-size: 10px; }
}

/* --- Kapasiteettirivi --- */
.ucal-content > p,
.ucal-capacity {
  margin: 8px 0 16px !important;
  font-weight: 800; opacity: .97;
  text-shadow: 0 2px 8px rgba(0,0,0,.55);
  font-size: clamp(13px, 2.6vw, 18px);
}

/* ==========================================================================
   Lomake (glassmorphism)
   ========================================================================== */
.ucal-form {
  width: min(100%, 800px);
  margin: 0 auto;
  text-align: center;
  border-radius: 18px;
  padding: clamp(16px, 3.2vw, 22px);
  background: rgba(255,255,255, calc(var(--uc-panel-alpha, .12)));
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: 0 10px 40px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.25);
  backdrop-filter: blur(8px);
}

/* Kirjautumislinkki */
.ucal-login{
  margin-top: 14px;
  text-align: center;
  font-size: 14px;
  opacity: .95;
}
.ucal-login a{
  color: #fff;
  text-decoration: underline;
}
.ucal-login a:hover{ opacity: 1; }

.ucal-form h2 {
  margin: 0 0 clamp(12px, 2.2vw, 16px);
  font-size: clamp(18px, 6vw, 26px);
  font-weight: 800; letter-spacing: .2px;
  line-height: 1.25;
  text-wrap: balance;
  word-break: keep-all;
  text-shadow: 0 2px 8px rgba(0,0,0,.5);
}
.ucal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(10px, 2.6vw, 16px);
  margin-bottom: clamp(10px, 2.4vw, 16px);
  text-align: left;
}
@media (max-width: 640px) { .ucal-grid { grid-template-columns: 1fr; } }

.ucal-form label {
  display: block; margin: 0 0 6px;
  font-size: clamp(11px, 2.4vw, 13px);
  opacity: .95; text-shadow: 0 1px 6px rgba(0,0,0,.5);
}

.ucal-form input[type="text"],
.ucal-form input[type="email"],
.ucal-form textarea,
.ucal-form select {
  width: 100%; outline: none;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.45);
  background: rgba(255,255,255,.12);
  color: #fff;
  padding: 12px 14px;
  font-size: clamp(14px, 2.6vw, 16px);
  line-height: 1.1;
  box-shadow: inset 0 2px 10px rgba(0,0,0,.25);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.ucal-form input::placeholder,
.ucal-form textarea::placeholder { color: rgba(255,255,255,.85); }

.ucal-form input:focus,
.ucal-form textarea:focus {
  border-color: #fff;
  background: rgba(255,255,255,.18);
  box-shadow: 0 0 0 3px rgba(255,255,255,.22), inset 0 2px 10px rgba(0,0,0,.25);
  outline: none;
}

/* Nappi */
.ucal-btn {
  appearance: none; border: 0; border-radius: 999px;
  padding: 12px 20px; font-weight: 800;
  font-size: clamp(14px, 2.8vw, 16px);
  cursor: pointer; color: #0c1b33;
  background: linear-gradient(135deg, var(--uc-btn-from, #a7f3d0), var(--uc-btn-to, #60a5fa));
  box-shadow: 0 8px 20px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.5);
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
  display: inline-block; margin-top: 6px;
}
.ucal-btn:hover { transform: translateY(-1px); box-shadow: 0 12px 24px rgba(0,0,0,.45); }
.ucal-btn:active { transform: translateY(0); filter: brightness(.95); }
.ucal-btn:disabled { opacity: .6; cursor: not-allowed; filter: grayscale(.2) brightness(.9); }

/* Statusviesti */
.ucal-status { margin-top: 8px; min-height: 1.2em; font-size: clamp(12px, 2.4vw, 14px); opacity: .95; }

/* --- Yhteystiedot (allekkain) --- */
.ucal-contact { margin-top: 14px; font-size: clamp(12px, 2.6vw, 15px); line-height: 1.4; opacity: .95; text-align: center; text-shadow: 0 2px 8px rgba(0,0,0,.5); }
.ucal-contact div { margin-bottom: 4px; }

/* --- Some-ikonit --- */
.ucal-social { display: flex; gap: 12px; justify-content: center; margin-top: 10px; }
.ucal-social a {
  display: inline-grid; place-items: center;
  width: 36px; height: 36px; border-radius: 999px;
  background: rgba(255,255,255,.14); backdrop-filter: blur(4px);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 4px 12px rgba(0,0,0,.25);
  transition: transform .12s ease, background .12s ease, box-shadow .12s ease;
}
.ucal-social a:hover { transform: translateY(-1px) scale(1.02); background: rgba(255,255,255,.2); }
.ucal-social svg { width: 18px; height: 18px; fill: #fff; }

/* --- Esikatselulaatikko ei leikkaa reunoja, eikä pyöristä --- */
#ucal-preview { overflow: visible !important; border-radius: 0 !important; }

/* --- Mobiilissa tummenta taustaa hieman lisää luettavuuteen + lisäväliä --- */
@media (max-width: 560px) {
  .ucal-overlay {
    background:
      radial-gradient(900px 450px at 50% 10%, rgba(0,0,0,0.25), transparent 55%),
      linear-gradient(180deg, rgba(0,0,0,0.68), rgba(0,0,0,0.5) 35%, rgba(0,0,0,0.75));
  }
  .ucal-headline { margin-bottom: 10px; }
  .ucal-subcopy  { margin-bottom: 14px; }
  .ucal-form     { padding: 14px; }
}
