/* ===== Hero base ===== */
.hero {
  /* Visual rhythm scale drives spacing across the hero */
  --rhythm: min(3vmin, 24px);
  --r2: calc(var(--rhythm) * 2);
  --r3: calc(var(--rhythm) * 3);
  --r4: calc(var(--rhythm) * 4);
  --btn-h: 56px; /* fixed button height to prevent hover jump */

  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: clamp(720px, 85vh, 980px); /* vertical responsiveness */
  padding: 0; /* we'll control block padding responsively below */
  padding-block: max(var(--r3), 80px) max(calc(var(--r4) + 80px), 160px); /* rhythm-driven top | bottom with hard mins */
  background: linear-gradient(1deg, #5343A9 -7.93%, #000 82.22%);
  overflow: hidden;
}

/* Scoped horizontal padding so content doesn't hug the edges on small screens */
.hero .container { padding-inline: clamp(16px, 4vw, 40px); }

.hero * { color: #fff; }

/* Stack with consistent, fluid gaps tied to rhythm */
.hero__header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--r2);
  text-align: center;
  max-width: 1060px;
  margin: 0 auto;
}

.hero__logo {
  display: block;
  width: clamp(220px, calc(13.5 * var(--rhythm)), 360px); /* larger base logo */
  height: auto;
  padding-bottom: 105px;
  margin-top: -50px; /* avoid negative horizontal margins */
}

.hero__hero {
  display: block;
  width: min(1100px, 92vw); /* fluid width */
  max-height: clamp(360px, 55vh, 760px); /* fluid height guardrails */
  height: auto;
  object-fit: contain;
}

.hero__sub {
  font-size: clamp(42px, 2.0vw, 46px); /* width‑based scaling per design */
  line-height: 1.25;
  padding-top: 35px;
  color: #66E0C5;
}

/* Meta row layout — grid centered horizontally */
.hero__meta {
  width: 100%;
  max-width: 1100px;
  padding-inline: clamp(16px, 4vw, 80px);
  padding-top: 35px;
  margin-top: var(--r2);
  display: grid;
  grid-template-columns: 1fr auto 1fr; /* left = date, center = button, right = time */
  grid-template-areas: "date btn time";
  align-items: center; /* center (not baseline) for better vertical alignment */
  column-gap: var(--r2);
  row-gap: var(--rhythm);
  text-align: center;
}
/* place items into named areas for desktop */
.hero__meta .btn123 { grid-area: btn; justify-self: center; }
.hero__date { grid-area: date; justify-self: start; text-align: left; }
.hero__time { grid-area: time; justify-self: end; text-align: right; }

.hero__date,
.hero__time {
  font-size: clamp(14px, 1.8vw, 24px);
  font-weight: 500;
}

.btn123 {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--btn-h);           /* lock height */
  padding: 0 var(--r2);           /* horizontal only; no vertical padding */
  border-radius: 999px;
  background: #fff;
  color: #000;
  font-weight: 500;
  font-size: clamp(16px, 1.9vw, 21px);
  line-height: 1;                 /* fixed for consistent height */
  transition: background-color .12s ease, transform .12s ease;
  text-decoration: none;
}
.btn123:hover { 
  background: linear-gradient(90deg, #FF492C 0%, #000 49.74%, #FF492C 100%);
  transition: transform .12s ease;
  height: var(--btn-h); /* lock height */
  color: #fff;
  border: 0;
  text-decoration: none;
  transform: translateY(-2px);
}

/* :click is not a valid CSS pseudo-class — use :active for presses */
.btn123:active {
  background: linear-gradient(90deg, #2AD2BB 0%, #000 49.74%, #2AD2BB 100%);
  height: var(--btn-h);
  color: #fff;
  text-decoration: none;
  transform: translateY(0);
}

/* Prefer modern viewport units when available to avoid mobile browser UI shrinking issues */
@supports (height: 1svh) {
  .hero {
    min-height: clamp(720px, 85svh, 980px);
    /* keep rhythm-driven padding on modern mobile too */
    padding-block: max(var(--r3), 70px) max(calc(var(--r4) + 70px), 160px);
  }
}

/* ===== Mobile tweaks ===== */
@media (max-width: 639px) {
  .hero {
    /* keep >= 80px and breathe a bit; still responsive to height */
    padding-block: max(var(--r3), 80px) max(calc(var(--r4) + 40px), 120px);
    min-height: 680px;
    background: linear-gradient(180deg, #5343A9 0%, #000 100%);
  }
  .hero__hero { 
    max-height: 54svh; 
    padding-top: 50px;
  }
  .hero__logo { 
    padding: 50px;
    width: clamp(300px, calc(13 * var(--rhythm)), 300px); 
  }
  .hero__sub {
    font-size: clamp(21px, 2.0vw, 28px);
    line-height: 1.25;
    padding-top: 50px;
  }
  /* Stack meta vertically in order: button -> date -> time */
  .hero__meta {
    grid-template-columns: 1fr;
    grid-template-areas:
      "btn"
      "date"
      "time";
    row-gap: var(--rhythm);
    padding-top: 25px;
    font-weight: 500;
  }
  .hero__meta .btn123 { 
    justify-self: center; 
    font-size: 18px;
    font-weight: 500;
  }
  .hero__date, .hero__time {
    justify-self: center;
    text-align: center;
    font-size: 16px;
    font-weight: 500;
  }
}

/* Height <= 900px desktop breakpoint: fit content comfortably */
@media (max-height: 900px) and (min-width: 1025px) {
  .hero {
    min-height: clamp(660px, 78vh, 900px);
    padding-block: max(var(--r3), 64px) max(calc(var(--r4) + 40px), 140px);
  }
  .hero__header { gap: calc(var(--rhythm) * 1.25); }
  .hero__logo { 
    width: clamp(300px, calc(13 * var(--rhythm)), 320px); 
    padding-bottom: 80px;
  }
  .hero__sub { padding-top: 25px; }
  .hero__hero {
    width: min(980px, 88vw);
    max-height: clamp(300px, 34vh, 560px);
  }
  .hero__meta {
    margin-top: var(--rhythm);
    max-width: 980px;
    column-gap: calc(var(--rhythm) * 0.75);
    padding-top: 15px;
    font-weight: 500;
  }
  .btn123 { 
    font-size: 26px; /* add missing unit */
    padding: 0 var(--r2);
  }
  .hero__date, .hero__time { 
    font-size: clamp(13px, 1.4vw, 18px); 
    font-weight: 500;
  }
}

/* Optional: fine‑tune rhythm for very large or mid viewports */
@media (min-width: 1440px) {
  .hero { --rhythm: min(2.6vmin, 28px); }
}
@media (max-width: 1024px) {
  .hero { --rhythm: min(3.6vmin, 22px); }
}
