/* ==========================================================================
   ChargedSMP - home page
   ========================================================================== */

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: calc(var(--nav-h) + 40px) 0 140px;
  overflow: hidden;
  isolation: isolate;
}

.hero-bg {
  position: absolute;
  inset: -4%;
  z-index: -3;
  transform: translate3d(0, var(--parallax, 0px), 0);
}
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
  animation: kenburns 32s ease-in-out infinite alternate;
}
@keyframes kenburns {
  from {
    transform: scale(1.04);
  }
  to {
    transform: scale(1.14) translate(-1.5%, -2%);
  }
}

.hero-fade {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(ellipse 55% 45% at 50% 55%, rgba(5, 9, 18, 0.55), rgba(5, 9, 18, 0) 100%),
    linear-gradient(180deg, rgba(5, 9, 18, 0.55) 0%, rgba(5, 9, 18, 0) 28%, rgba(5, 9, 18, 0.35) 70%, var(--bg) 100%);
}

/* lightning flash */
.hero-flash {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(ellipse at var(--fx, 50%) 0%, rgba(170, 225, 255, 0.35), transparent 60%);
  opacity: 0;
}
.hero-flash.is-striking {
  animation: flash 0.9s ease-out;
}
.bolt-strike {
  position: absolute;
  top: 0;
  left: var(--fx, 50%);
  width: 60px;
  height: 55%;
  transform: translateX(-50%);
  overflow: visible;
}
.bolt-strike path {
  fill: none;
  stroke: #e6f8ff;
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 6px #8fe9ff) drop-shadow(0 0 18px #38bdf3);
}
@keyframes flash {
  0% { opacity: 0; }
  6% { opacity: 1; }
  14% { opacity: 0.15; }
  22% { opacity: 0.9; }
  100% { opacity: 0; }
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px;
  border-radius: var(--radius);
  background: rgba(8, 13, 25, 0.8);
  border: 2px solid var(--line-2);
  font-size: 15px;
  color: var(--muted);
}
.hero-badge strong {
  color: var(--text);
  font-family: var(--font-display);
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}

.hero-logo {
  width: clamp(100px, 13vw, 150px);
  height: auto;
  animation: float 6s ease-in-out infinite;
  filter: drop-shadow(0 16px 24px rgba(0, 0, 0, 0.55));
}
@keyframes float {
  0%,
  100% {
    transform: translateY(0) rotate(-2deg);
  }
  50% {
    transform: translateY(-10px) rotate(2deg);
  }
}

/* blocky, extruded title */
.hero-title {
  font-size: clamp(50px, 11vw, 132px);
  font-weight: 500;
  line-height: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  padding-bottom: 0.08em;
}
.t-charged {
  position: relative;
  color: #f1fbff;
  text-shadow:
    0 0.035em 0 #9cc4e2,
    0 0.07em 0 #5f8fb8,
    0 0.105em 0 #3d6890,
    0 0.2em 0.25em rgba(0, 0, 0, 0.55);
}
.t-smp {
  color: #4fd0ff;
  text-shadow:
    0 0.035em 0 #2a9ad8,
    0 0.07em 0 #1b6fa8,
    0 0.105em 0 #10507d,
    0 0.2em 0.25em rgba(0, 0, 0, 0.55);
}
.t-charged::before,
.t-charged::after {
  /* glitch layers used by the lightning strike */
  content: attr(data-text);
  position: absolute;
  inset: 0;
  text-shadow: none;
  opacity: 0;
  pointer-events: none;
}
.t-charged::before {
  color: rgba(56, 189, 243, 0.85);
}
.t-charged::after {
  color: rgba(155, 107, 255, 0.85);
}
.is-zapped .t-charged::before {
  animation: glitch-a 0.5s steps(2) both;
}
.is-zapped .t-charged::after {
  animation: glitch-b 0.5s steps(2) both;
}
@keyframes glitch-a {
  0% { opacity: 1; transform: translate(-4px, 1px); clip-path: inset(10% 0 55% 0); }
  25% { transform: translate(3px, -2px); clip-path: inset(60% 0 8% 0); }
  50% { transform: translate(-2px, 2px); clip-path: inset(30% 0 40% 0); }
  75% { transform: translate(4px, 0); clip-path: inset(75% 0 2% 0); }
  100% { opacity: 0; transform: none; }
}
@keyframes glitch-b {
  0% { opacity: 1; transform: translate(4px, -1px); clip-path: inset(50% 0 20% 0); }
  25% { transform: translate(-3px, 2px); clip-path: inset(5% 0 70% 0); }
  50% { transform: translate(2px, -2px); clip-path: inset(70% 0 10% 0); }
  75% { transform: translate(-4px, 1px); clip-path: inset(20% 0 50% 0); }
  100% { opacity: 0; transform: none; }
}

.hero-sub {
  max-width: 560px;
  font-size: clamp(17px, 2vw, 19px);
  color: #d0dcee;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 8px;
  max-width: 100%;
}

/* ---------- status strip ---------- */

.status-wrap {
  position: relative;
  z-index: 3;
  margin-top: -80px;
}
.status-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  overflow: hidden;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.8);
}
.stat {
  padding: 20px 24px;
  display: grid;
  gap: 4px;
  align-content: start;
}
.stat + .stat {
  border-left: 2px solid var(--line);
}
.stat-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
}
.stat-label .live-dot {
  width: 7px;
  height: 7px;
}
.stat-value {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 34px;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.stat-value small {
  font-size: 17px;
  font-weight: 500;
  color: var(--muted);
}
.status-text {
  color: var(--online);
}
.is-offline .status-text {
  color: var(--muted);
}
.stat-note {
  font-size: 14px;
  color: var(--muted);
}
.bar {
  height: 8px;
  background: #070c18;
  border: 2px solid var(--line);
  margin-top: 6px;
}
.bar span {
  display: block;
  height: 100%;
  width: calc(var(--fill, 0) * 100%);
  min-width: 4px;
  background: var(--online);
  transition: width 1s var(--ease-out);
}
.stat-link {
  transition: background-color 0.2s;
}
.stat-link:hover {
  background: rgba(88, 101, 242, 0.12);
}
.discord-val {
  align-items: center;
}
.dico {
  display: inline-grid;
  width: 28px;
  height: 28px;
  color: #8b95ff;
}
.btn .dico {
  width: 22px;
  height: 22px;
  color: inherit;
}
.dico svg {
  width: 100%;
  height: 100%;
}

@media (max-width: 900px) {
  .status-strip {
    grid-template-columns: 1fr 1fr;
  }
  .stat:nth-child(3) {
    border-left: 0;
  }
  .stat:nth-child(n + 3) {
    border-top: 2px solid var(--line);
  }
}
@media (max-width: 420px) {
  .stat {
    padding: 16px;
  }
  .stat-value {
    font-size: 28px;
  }
}

/* ---------- features ---------- */

.bento {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: minmax(220px, auto);
  gap: 16px;
}
.tile {
  position: relative;
  isolation: isolate;
  padding: 26px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  overflow: hidden;
  transition:
    transform 0.25s var(--ease-out),
    border-color 0.2s;
}
.tile:hover {
  transform: translateY(-3px);
  border-color: var(--line-2);
}
.tile h3 {
  font-size: 26px;
}
.tile p {
  color: var(--muted);
  font-size: 15px;
}
.tile-ico {
  width: 48px;
  height: 48px;
  margin-bottom: auto;
}
.tile:hover .tile-ico {
  animation: hop 0.5s var(--ease-out);
}
@keyframes hop {
  40% {
    transform: translateY(-6px) rotate(-6deg);
  }
}

.tile-kingdom {
  grid-column: span 2;
  grid-row: span 2;
  min-height: 460px;
}
.tile-keys,
.tile-survival,
.tile-sparks {
  grid-column: span 2;
}

.tile-media {
  position: absolute;
  inset: 0;
  z-index: -1;
}
.tile-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1s var(--ease-out);
}
.tile:hover .tile-media img {
  transform: scale(1.04);
}
.tile-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(5, 9, 18, 0.05) 0%, rgba(5, 9, 18, 0.5) 45%, rgba(5, 9, 18, 0.95) 100%);
}
.tile-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
}
.tile-kingdom h3 {
  font-size: clamp(30px, 3.4vw, 42px);
}
.tile-kingdom p {
  font-size: 16px;
  max-width: 440px;
  color: #c9d6ea;
}
.tile-kingdom .tile-ico,
.tile-survival .tile-ico {
  margin-bottom: 6px;
}

/* daily streak as inventory slots */
.streak {
  display: flex;
  gap: 4px;
  margin-bottom: auto;
}
.streak .slot {
  width: 26px;
  height: 26px;
  animation: streak 4.2s steps(1) infinite;
  animation-delay: calc(var(--i) * 0.3s);
}
.streak span:nth-child(1) { --i: 0; }
.streak span:nth-child(2) { --i: 1; }
.streak span:nth-child(3) { --i: 2; }
.streak span:nth-child(4) { --i: 3; }
.streak span:nth-child(5) { --i: 4; }
.streak span:nth-child(6) { --i: 5; }
.streak span:nth-child(7) { --i: 6; }
@keyframes streak {
  0% {
    background: #080d19;
  }
  10%,
  85% {
    background: var(--online);
    border-color: #8ef0b0 #1d7a43 #1d7a43 #8ef0b0;
  }
}

/* daily keys tile */
.tile-keys {
  justify-content: space-between;
}
.tile-keys .btn {
  align-self: flex-start;
}
.key-row {
  display: flex;
  gap: 2px;
  flex-wrap: wrap;
}
.key-row i {
  width: 38px;
  height: 38px;
  animation: key-bob 2.6s ease-in-out infinite;
}
.key-row i:nth-child(2n) { animation-delay: -0.4s; }
.key-row i:nth-child(3n) { animation-delay: -0.9s; }
.key-row i:nth-child(5n) { animation-delay: -1.5s; }
@keyframes key-bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

/* sparks tile */
.tile-sparks {
  flex-direction: row;
  align-items: center;
  gap: 24px;
}
.sparks-ico {
  width: 92px;
  height: 92px;
  flex: none;
}
.sparks-ico i {
  width: 60px;
  height: 60px;
  animation: twinkle 3s ease-in-out infinite;
}
@keyframes twinkle {
  0%, 80%, 100% { transform: scale(1) rotate(0); }
  86% { transform: scale(1.15) rotate(12deg); }
  92% { transform: scale(0.95) rotate(-4deg); }
}

@media (max-width: 980px) {
  .bento {
    grid-template-columns: 1fr 1fr;
  }
  .tile-kingdom {
    grid-row: span 1;
    min-height: 400px;
  }
}
@media (max-width: 600px) {
  .bento {
    grid-template-columns: 1fr;
  }
  .tile-kingdom,
  .tile-keys,
  .tile-survival,
  .tile-sparks {
    grid-column: auto;
  }
  .tile-sparks {
    flex-direction: column;
    align-items: flex-start;
  }
  .tile {
    padding: 22px;
  }
}

/* ---------- store teaser ---------- */

.teaser-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}
.teaser-copy {
  display: grid;
  gap: 18px;
  justify-items: start;
}
.teaser-copy h2 {
  font-size: clamp(36px, 5.4vw, 58px);
}
.teaser-copy > p {
  color: var(--muted);
  font-size: 17px;
  max-width: 500px;
}
.mini-head {
  font-size: 20px;
  margin-top: 18px;
  color: var(--muted);
  font-weight: 500;
}
.mini-crates {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
  width: 100%;
  max-width: 500px;
}
.mini-crates a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px 10px 10px;
  border-radius: var(--radius-lg);
  background: var(--panel);
  border: 2px solid var(--line);
  transition:
    transform 0.2s var(--ease-out),
    border-color 0.2s;
}
.mini-crates a:hover {
  transform: translateX(4px);
  border-color: var(--c1);
}
.mini-crates .slot {
  width: 52px;
  height: 52px;
  flex: none;
}
.mini-crates i {
  width: 36px;
  height: 36px;
}
.mini-crates span:last-child {
  display: grid;
  font-size: 14px;
  color: var(--muted);
}
.mini-crates b {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 500;
  color: var(--text);
}

/* item + tooltip, like hovering an item in your inventory */
.tip-demo {
  position: relative;
  justify-self: center;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.tip-slot {
  width: 96px;
  height: 96px;
  flex: none;
  margin-top: 26px;
}
.tip-slot i {
  width: 60px;
  height: 60px;
  animation: float 4s ease-in-out infinite;
}
.tip-demo .mc-tip {
  min-width: 300px;
  font-size: 19px;
  animation: tip-in 0.6s var(--ease-out) both;
}
.tip-demo .mc-title {
  font-size: 23px;
}
.tip-gap {
  height: 10px;
}
@keyframes tip-in {
  from {
    opacity: 0;
    transform: translate(-8px, 8px);
  }
}

@media (max-width: 900px) {
  .teaser-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 480px) {
  .tip-demo {
    flex-direction: column;
    align-items: center;
  }
  .tip-slot {
    margin-top: 0;
  }
  .tip-demo .mc-tip {
    min-width: 0;
    width: 100%;
  }
}

/* ---------- steps ---------- */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.step {
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
}
.step-n {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 24px;
  color: #04131f;
  background: var(--ice-2);
  border: 2px solid #1c86c8;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.3);
  border-radius: var(--radius);
  margin-bottom: 6px;
}
.step h3 {
  font-size: 24px;
}
.step p {
  color: var(--muted);
  font-size: 15px;
}
.step p b {
  color: var(--text);
  font-weight: 500;
}
.ip-chip-sm {
  height: 50px;
  padding-left: 14px;
  max-width: 100%;
}
.ip-chip-sm .ip {
  font-size: 17px;
}
.ip-chip-sm .copy {
  height: 36px;
}
@media (max-width: 860px) {
  .steps {
    grid-template-columns: 1fr;
  }
}

/* ---------- discord cta ---------- */

.cta-section {
  padding-top: 0;
}
.cta-card {
  border-radius: var(--radius-lg);
  padding: clamp(28px, 5vw, 52px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: #1b2063;
  border: 2px solid #3a43b8;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.06);
}
.cta-copy {
  display: grid;
  gap: 10px;
  max-width: 560px;
}
.cta-copy h2 {
  font-size: clamp(30px, 4.4vw, 46px);
}
.cta-copy p {
  color: #c7ccf5;
  font-size: 17px;
}
