/* Header countdown: true mid-gap between logo and nav (desktop) */
.bar{
  display:flex;
  align-items:center;
  gap:12px;
  position:relative;
}
.bar .logo{flex:0 0 auto}
.bar-mid{
  flex:1 1 auto;
  min-width:0;
  display:flex;
  justify-content:center;
  align-items:center;
}
.bar-end{
  flex:0 0 auto;
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
}
.bar-end nav{margin-left:0}

.hero-cd{
  display:inline-grid;
  grid-template-columns:auto 1fr;
  grid-template-rows:auto auto;
  align-items:center;
  column-gap:12px;
  row-gap:0;
  padding:5px 16px 5px 6px;
  text-decoration:none;color:#fff;
  border-radius:12px;
  background:linear-gradient(105deg,#c53a3a 0%,#b3202a 48%,#9a1b24 100%);
  border:1.5px solid #e7c276;
  box-shadow:0 4px 14px rgba(110,20,25,.28), inset 0 1px 0 rgba(255,255,255,.18);
  transition:transform .22s ease, box-shadow .22s ease, filter .22s ease;
  animation:heroCdIn .65s ease both;
  max-width:100%;
}
.hero-cd:hover,.hero-cd:focus-visible{
  transform:translateY(-1px);
  filter:brightness(1.05);
  box-shadow:0 6px 16px rgba(110,20,25,.34), 0 0 0 3px rgba(231,194,118,.28);
}
.hero-cd__cal{
  grid-row:1 / span 2;
  position:relative;width:38px;height:42px;flex:0 0 auto;
  border-radius:7px;background:#fffaf0;color:#2b1d16;
  box-shadow:0 2px 0 #7a1218, 0 4px 8px rgba(0,0,0,.2);
  overflow:hidden;
}
.hero-cd__rings{position:absolute;top:3px;left:0;right:0;display:flex;justify-content:center;gap:6px;z-index:3}
.hero-cd__rings i{
  width:5px;height:9px;border-radius:3px;background:linear-gradient(180deg,#ffd36b,#b98a24);
  box-shadow:0 1px 0 rgba(0,0,0,.25);
}
.hero-cd__top{
  display:block;margin-top:10px;font:800 7px/1 Nunito,sans-serif;letter-spacing:.14em;
  color:#b3202a;text-align:center;
}
.hero-cd__flip{
  position:relative;display:block;height:22px;margin:1px 3px 0;perspective:160px;
}
.hero-cd__face{
  position:absolute;inset:0;display:grid;place-items:center;
  font:800 16px/1 Fraunces,Georgia,serif;color:#2b1d16;
  background:linear-gradient(180deg,#fff 0 49%,#f3e6d0 51% 100%);
  border-radius:3px;backface-visibility:hidden;
  box-shadow:inset 0 -1px 0 rgba(0,0,0,.08);
}
.hero-cd__face--front{transform-origin:center top}
.hero-cd__face--back{transform:rotateX(90deg);transform-origin:center top;opacity:0}
.hero-cd.is-flipping .hero-cd__face--front{animation:heroFlipFront .55s ease forwards}
.hero-cd.is-flipping .hero-cd__face--back{animation:heroFlipBack .55s ease forwards}

.hero-cd__body{display:contents}
.hero-cd__row{
  grid-column:2;
  grid-row:1;
  display:flex;align-items:baseline;gap:6px;line-height:1;min-width:0;
}
.hero-cd__num{
  font:800 26px/.9 Fraunces,Georgia,serif;color:#f9e196;
  text-shadow:0 2px 0 rgba(74,26,16,.35);
  animation:heroPulse 2.8s ease-in-out infinite;
}
.hero-cd__unit{
  font:800 15px/1 Nunito,sans-serif;letter-spacing:.02em;
  color:#f9e196;text-transform:lowercase;
  text-shadow:0 1px 0 rgba(74,26,16,.3);
}
.hero-cd__label{
  grid-column:2;
  grid-row:2;
  font:700 10px/1.1 Nunito,sans-serif;
  letter-spacing:.04em;
  color:rgba(255,248,238,.92);white-space:nowrap;
  margin-top:-1px;
}
.hero-cd__mdate{display:none}

@keyframes heroCdIn{
  from{opacity:0;transform:translateY(6px) scale(.97)}
  to{opacity:1;transform:none}
}
@keyframes heroFlipFront{
  0%{transform:rotateX(0)}
  45%{transform:rotateX(-90deg);opacity:1}
  46%{opacity:0}
  100%{transform:rotateX(-90deg);opacity:0}
}
@keyframes heroFlipBack{
  0%{transform:rotateX(90deg);opacity:0}
  45%{transform:rotateX(90deg);opacity:0}
  46%{opacity:1}
  100%{transform:rotateX(0);opacity:1}
}
@keyframes heroPulse{
  0%,100%{transform:scale(1)}
  50%{transform:scale(1.04)}
}

@media (max-width:1100px){
  .hero-cd{padding:4px 14px 4px 5px;column-gap:10px}
  .hero-cd__num{font-size:22px}
  .hero-cd__unit{font-size:13px}
}

/* Mobile: row1 logo+burger, row2 full-width countdown strip */
@media (max-width:900px){
  .bar{
    display:grid;
    grid-template-columns:1fr auto;
    grid-template-rows:auto auto;
    align-items:center;
    gap:8px 10px;
    padding-top:8px;
    padding-bottom:10px;
    min-height:0;
  }
  .bar .logo{
    grid-column:1;
    grid-row:1;
    justify-self:start;
  }
  .bar-end{
    grid-column:2;
    grid-row:1;
    justify-self:end;
  }
  .bar-mid{
    grid-column:1 / -1;
    grid-row:2;
    width:100%;
    justify-content:stretch;
  }
  .hero-cd{
    display:flex;
    align-items:center;
    width:100%;
    max-width:none;
    padding:7px 10px;
    border-radius:12px;
  }
  .hero-cd__cal{display:none}
  /* Must override desktop display:contents or children wrap as inline */
  .hero-cd__body{
    display:flex !important;
    flex:1 1 auto;
    align-items:center;
    justify-content:space-between;
    width:100%;
    gap:8px;
    min-width:0;
    white-space:nowrap;
  }
  .hero-cd__mdate,
  .hero-cd__row,
  .hero-cd__label{
    flex:1 1 0;
    min-width:0;
    white-space:nowrap;
    line-height:1;
  }
  .hero-cd__mdate{
    display:inline-flex;
    align-items:baseline;
    justify-content:flex-start;
    gap:4px;
    font:800 14px/1 Fraunces,Georgia,serif;
    color:#f9e196;
    letter-spacing:.02em;
    text-shadow:0 1px 0 rgba(74,26,16,.3);
  }
  .hero-cd__mdate b{
    font:800 16px/1 Fraunces,Georgia,serif;
  }
  .hero-cd__mdate span{
    font:800 11px/1 Nunito,sans-serif;
    letter-spacing:.08em;
    text-transform:uppercase;
    color:#fff;
  }
  .hero-cd__row{
    display:inline-flex;
    align-items:baseline;
    justify-content:center;
    gap:4px;
    margin:0;
  }
  .hero-cd__num{font-size:16px}
  .hero-cd__unit{font-size:12px}
  .hero-cd__label{
    display:block;
    margin:0;
    text-align:right;
    font:800 11px/1 Nunito,sans-serif;
    letter-spacing:.02em;
    text-transform:none;
    color:#fff;
  }
}

@media (max-width:380px){
  .hero-cd{padding:6px 8px}
  .hero-cd__body{gap:6px}
  .hero-cd__mdate{font-size:12px}
  .hero-cd__mdate b{font-size:14px}
  .hero-cd__mdate span{font-size:10px;letter-spacing:.06em}
  .hero-cd__num{font-size:14px}
  .hero-cd__unit{font-size:11px}
  .hero-cd__label{font-size:10px}
}

@media (prefers-reduced-motion:reduce){
  .hero-cd,.hero-cd__num{animation:none}
  .hero-cd.is-flipping .hero-cd__face--front,
  .hero-cd.is-flipping .hero-cd__face--back{animation:none}
}
