/*
  hero.css — IT Realms hero slider
  Loaded after style.css. Uses .itr-hero prefix throughout
  for clean specificity. Zero !important.
*/

/* ── Keyframes ── */
@keyframes heroKenBurns  { 0%{transform:scale(1) translate(0,0)} 100%{transform:scale(1.1) translate(-1%,-.8%)} }
@keyframes heroKenAlt    { 0%{transform:scale(1.1) translate(-1%,-.8%)} 100%{transform:scale(1) translate(0,0)} }
@keyframes heroSlideUp   { from{opacity:0;transform:translateY(28px)} to{opacity:1;transform:translateY(0)} }
@keyframes heroSlideLeft { from{opacity:0;transform:translateX(-28px)} to{opacity:1;transform:translateX(0)} }
@keyframes heroFade      { from{opacity:0} to{opacity:1} }
@keyframes heroProgress  { from{transform:scaleX(0)} to{transform:scaleX(1)} }
@keyframes heroPulse     { 0%,100%{opacity:.4;transform:scaleY(.6);transform-origin:top} 50%{opacity:1;transform:scaleY(1)} }

/* ── Container ── */
.itr-hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 620px;
  overflow: hidden;
  background: #04040f;
}

/* ── Slides ── */
.itr-hero .itr-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity .9s ease, visibility .9s ease;
  z-index: 1;
}
.itr-hero .itr-slide.itr-slide--active {
  opacity: 1;
  visibility: visible;
  z-index: 2;
}

/* ── Background ── */
.itr-hero .itr-slide-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}
.itr-hero .itr-slide.itr-slide--active .itr-slide-bg {
  animation: heroKenBurns 7s ease-out forwards;
}
.itr-hero .itr-slide:nth-child(even).itr-slide--active .itr-slide-bg {
  animation-name: heroKenAlt;
}

/* ── Overlay — uniform dark vignette for all slides ── */
.itr-hero .itr-slide-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(3,3,20,.68) 0%, transparent 18%, transparent 68%, rgba(3,3,20,.88) 100%),
    radial-gradient(ellipse at center, rgba(3,3,20,.35) 0%, rgba(3,3,20,.78) 100%);
}

/* ── Content block ──
   Centred horizontally and vertically in the visible area (below fixed navbar).
   +40px shifts the midpoint down by half the navbar height (~80px).
*/
.itr-hero .itr-slide-content {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 50%;
  transform: translate(-50%, calc(-50% + 40px));
  width: 80%;
  max-width: 860px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}

/* ── Inner elements: hidden, animate in when slide is active ── */
.itr-hero .itr-slide .itr-eyebrow,
.itr-hero .itr-slide .itr-title,
.itr-hero .itr-slide .itr-desc,
.itr-hero .itr-slide .itr-tags,
.itr-hero .itr-slide .itr-stats,
.itr-hero .itr-slide .itr-actions {
  opacity: 0;
}

.itr-hero .itr-slide.itr-slide--active .itr-eyebrow {
  animation: heroSlideUp .55s .15s ease both;
}
.itr-hero .itr-slide.itr-slide--active .itr-title {
  animation: heroSlideUp .6s .32s ease both;
}
.itr-hero .itr-slide:nth-child(even).itr-slide--active .itr-title {
  animation-name: heroSlideLeft;
}
.itr-hero .itr-slide.itr-slide--active .itr-desc {
  animation: heroSlideUp .6s .5s ease both;
}
.itr-hero .itr-slide.itr-slide--active .itr-tags,
.itr-hero .itr-slide.itr-slide--active .itr-stats {
  animation: heroFade .6s .62s ease both;
}
.itr-hero .itr-slide.itr-slide--active .itr-actions {
  animation: heroFade .6s .8s ease both;
}

/* ── Eyebrow ── */
.itr-hero .itr-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: 'Orbitron', monospace;
  font-size: .56rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--teal);
  padding: 6px 14px;
  border: 1px solid rgba(38,204,202,.3);
  border-radius: 100px;
  background: rgba(38,204,202,.08);
  width: fit-content;
}
.itr-hero .itr-eyebrow svg { width: 12px; height: 12px; }

/* ── Title ── */
.itr-hero .itr-title {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(2rem, 3.8vw, 3.2rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: #fff;
  margin: 0;
  text-shadow: 0 2px 24px rgba(0,0,0,.6);
}
.itr-hero .itr-title em { font-style: italic; color: var(--teal); }

/* ── Description ── */
.itr-hero .itr-desc {
  font-size: clamp(.88rem, 1.1vw, .98rem);
  line-height: 1.75;
  color: rgba(255,255,255,.68);
  max-width: 480px;
  margin: 0;
}
.itr-hero .itr-desc { max-width: 640px; }

/* ── Tags ── */
.itr-hero .itr-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.itr-hero .itr-tags { justify-content: center; }
.itr-hero .itr-tags span {
  font-family: 'Orbitron', monospace;
  font-size: .47rem;
  letter-spacing: .12em;
  padding: 5px 12px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 3px;
  color: rgba(255,255,255,.65);
  background: rgba(255,255,255,.05);
  text-transform: uppercase;
}

/* ── Stats ── */
.itr-hero .itr-stats {
  display: flex;
  align-items: center;
  gap: 22px;
}
.itr-hero .itr-stat {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.itr-hero .itr-stat strong {
  font-family: 'Oswald', sans-serif;
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--yellow);
  line-height: 1;
}
.itr-hero .itr-stat span {
  font-family: 'Orbitron', monospace;
  font-size: .44rem;
  letter-spacing: .14em;
  color: rgba(255,255,255,.32);
  text-transform: uppercase;
}
.itr-hero .itr-stat-div {
  width: 1px;
  height: 34px;
  background: rgba(255,255,255,.15);
  flex-shrink: 0;
}

/* ── Buttons ── */
.itr-hero .itr-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.itr-hero .itr-actions { justify-content: center; }

.itr-hero .itr-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  font-family: 'Orbitron', monospace;
  font-size: .56rem;
  font-weight: 600;
  letter-spacing: .13em;
  text-transform: uppercase;
  text-decoration: none;
  border-radius: 9999px;
  transition: all .25s ease;
  white-space: nowrap;
  cursor: pointer;
}
.itr-hero .itr-btn svg { width: 14px; height: 14px; flex-shrink: 0; }
.itr-hero .itr-btn--primary {
  background: var(--teal);
  color: #04040f;
  border: 2px solid var(--teal);
  font-weight: 700;
}
.itr-hero .itr-btn--primary:hover {
  background: #20b8b6;
  border-color: #20b8b6;
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(38,204,202,.38);
}
.itr-hero .itr-btn--ghost {
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.85);
  border: 1.5px solid rgba(255,255,255,.25);
}
.itr-hero .itr-btn--ghost:hover {
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.55);
  color: #fff;
  transform: translateY(-2px);
}

/* ── Arrows ── */
.itr-hero .itr-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.18);
  background: rgba(3,3,20,.55);
  color: #fff;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: border-color .25s, background .25s;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.itr-hero .itr-arrow svg { width: 20px; height: 20px; }
.itr-hero .itr-arrow:hover { border-color: var(--teal); background: rgba(38,204,202,.18); }
.itr-hero .itr-arrow--prev { left: 1.8rem; }
.itr-hero .itr-arrow--next { right: 1.8rem; }

/* ── Dots ── */
.itr-hero .itr-dots {
  position: absolute;
  bottom: 2rem; left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex; gap: 10px;
}
.itr-hero .itr-dot {
  width: 28px; height: 3px;
  border-radius: 2px; border: none;
  background: rgba(255,255,255,.22);
  cursor: pointer;
  transition: background .3s, width .3s;
  padding: 0;
}
.itr-hero .itr-dot.itr-dot--active { background: var(--teal); width: 50px; }

/* ── Counter ── */
.itr-hero .itr-counter {
  position: absolute;
  bottom: 1.8rem; right: 2.5rem;
  z-index: 10;
  font-family: 'Orbitron', monospace;
  color: rgba(255,255,255,.3);
  font-size: .62rem;
  letter-spacing: .1em;
  display: flex; align-items: baseline; gap: 4px;
}
.itr-hero .itr-counter-cur { color: #fff; font-size: 1.15rem; font-weight: 700; }

/* ── Progress bar ── */
.itr-hero .itr-progress {
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 2px;
  background: rgba(255,255,255,.07);
  z-index: 10;
}
.itr-hero .itr-progress-bar { height: 100%; background: var(--teal); width: 100%; transform: scaleX(0); transform-origin: left; }
.itr-hero .itr-progress-bar.itr-progress-bar--run {
  animation: heroProgress 6.5s linear forwards;
}

/* ── Scroll cue ── */
.itr-hero .itr-scroll-cue {
  position: absolute;
  bottom: 1.8rem; left: 2.5rem;
  z-index: 10;
}
.itr-hero .itr-scroll-cue span {
  display: block;
  width: 1.5px; height: 44px;
  background: linear-gradient(180deg, var(--teal), transparent);
  animation: heroPulse 2s ease-in-out infinite;
}

/* ── Responsive ── */
@media (max-width: 1100px) {
  .itr-hero .itr-slide-content { width: 56%; }
}
@media (max-width: 900px) {
  .itr-hero .itr-slide-content,
  .itr-hero .itr-slide-content.itr-slide-content--right,
  .itr-hero .itr-slide-content.itr-slide-content--center {
    left: 6%;
    right: 6%;
    width: auto;
    max-width: none;
    transform: translateY(calc(-50% + 40px));
    text-align: left;
    align-items: flex-start;
  }
  .itr-hero .itr-slide-content .itr-tags,
  .itr-hero .itr-slide-content .itr-actions { justify-content: flex-start; }
  .itr-hero .itr-arrow--prev { left: .8rem; }
  .itr-hero .itr-arrow--next { right: .8rem; }
  .itr-hero .itr-scroll-cue,
  .itr-hero .itr-counter { display: none; }
}
@media (max-width: 560px) {
  .itr-hero .itr-title { font-size: clamp(1.7rem, 7vw, 2.2rem); }
  .itr-hero .itr-stats { gap: 14px; }
  .itr-hero .itr-stat strong { font-size: 1.4rem; }
  .itr-hero .itr-actions { flex-direction: column; }
  .itr-hero .itr-btn { justify-content: center; width: 100%; max-width: 280px; }
}
@media (max-width: 480px) {
  .itr-hero { min-height: 560px; }
  .itr-hero .itr-arrow--prev,
  .itr-hero .itr-arrow--next { display: none; }
  .itr-hero .itr-title { font-size: clamp(1.5rem, 8vw, 1.9rem); }
  .itr-hero .itr-desc  { font-size: 0.88rem; }
  .itr-hero .itr-stats { flex-wrap: wrap; gap: 10px; }
  .itr-hero .itr-stat  { min-width: 80px; }
  .itr-hero .itr-btn   { max-width: 100%; }
  .itr-hero .itr-slide-content { left: 5%; right: 5%; }
}

/* ── Layout corrections (replaces !important overrides from external file) ── */
.itr-hero .itr-slide-content {
  padding-top: 90px;
  padding-bottom: 110px;
  gap: 16px;
}
.itr-hero .itr-slide-content.itr-slide-content--center {
  padding-bottom: 120px;
}
.itr-hero .itr-title {
  font-size: clamp(1.9rem, 4vw, 3.4rem);
}
.itr-hero .itr-desc {
  font-size: clamp(0.88rem, 1.2vw, 1rem);
  line-height: 1.7;
}
.itr-hero .itr-stats { gap: 16px; }
.itr-hero .itr-slide-content.itr-slide-content--right .itr-desc { max-width: 480px; }
.itr-hero .itr-actions { flex-wrap: wrap; }
.itr-hero .itr-stat strong { font-size: 1.6rem; }

@media (max-width: 768px) {
  .itr-hero .itr-slide-content,
  .itr-hero .itr-slide-content.itr-slide-content--center,
  .itr-hero .itr-slide-content.itr-slide-content--right {
    padding-top: 100px;
    padding-bottom: 120px;
    gap: 14px;
  }
  .itr-hero .itr-title { font-size: clamp(1.7rem, 6.5vw, 2.4rem); }
}

/* ── Hero canvas starfield ── */
.itr-hero-stars {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
  opacity: 0.35;
}

/* ── Slide 1 teal-stats override (replace yellow with cyan) ── */
.itr-slide--teal-stats .itr-stat strong {
  color: var(--teal);
}
.itr-slide--teal-stats .itr-stat-div {
  background: rgba(38,204,202,0.25);
}
