/* =============================================================
   KM HOME STYLES — page-specific only
   Shared components (buttons, header, nav, footer, animations)
   now live in km-core/km-global.css.
   ============================================================= */

/* ── Override Twenty Twenty-Five on our template ───────────── */

.km-page body,
body.km-page {
  background-color: var(--km-bg-base);
  margin: 0;
  padding: 0;
}

.km-page .wp-site-blocks,
.km-page .site,
.km-page main,
.km-page .entry {
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
}


/* ════════════════════════════════════════════════════════════
   FEATURE IMAGE FRAME
   ════════════════════════════════════════════════════════════ */

.km-hero__feature-frame {
  position: relative;
  z-index: 2;
  width: 70%;
  max-width: 700px;
  margin: var(--km-space-xs) auto var(--km-space-sm);
  aspect-ratio: 1 / 1;
  border: 4px solid #9a9ea3;
  border-radius: var(--km-radius-md);
  box-shadow:
    0 0 0 1px rgba(154, 158, 163, 0.15),
    inset 0 0 0 1px rgba(154, 158, 163, 0.08),
    var(--km-shadow-lg);
  background: rgba(20, 24, 24, 0.6);
  backdrop-filter: blur(4px);
  overflow: hidden;
  outline: 1px solid rgba(154, 158, 163, 0.12);
  outline-offset: 6px;
}

.km-hero__feature-frame:not(:has(img))::after {
  content: 'Feature Image';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--km-font-body);
  font-size: var(--km-size-sm);
  font-weight: 300;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(154, 158, 163, 0.25);
}

.km-hero__feature-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 1024px) {
  .km-hero__feature-frame { width: 82%; }
}

@media (max-width: 768px) {
  .km-hero__feature-frame {
    width: 92%;
    max-width: none;
    margin: var(--km-space-lg) auto var(--km-space-md);
    aspect-ratio: 1 / 1;
    outline: none;
  }
}

@media (max-width: 768px) and (orientation: portrait) {
  .km-hero__feature-frame {
    width: 98%;
    aspect-ratio: 4 / 3;
  }
}


/* ════════════════════════════════════════════════════════════
   HERO
   ════════════════════════════════════════════════════════════ */

.km-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  padding-top: 152px; /* 120px header + 32px permanent top padding */
}

.km-hero__bg-smoke {
  position: absolute;
  inset: 0;
  background-image: var(--km-img-smoke);
  background-size: cover;
  background-position: center center;
  opacity: 0.65;
  z-index: 0;
}

.km-hero__bg-overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 80% at 20% 50%, rgba(14,17,17,0) 0%, rgba(14,17,17,0.85) 70%),
    linear-gradient(to bottom, rgba(14,17,17,0.3) 0%, rgba(14,17,17,0) 40%, rgba(14,17,17,0.9) 100%);
  z-index: 1;
}

.km-hero__content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: var(--km-space-xl);
  padding-top: var(--km-space-lg);
  padding-bottom: var(--km-space-xl);
  padding-left: var(--km-space-md);
  padding-right: var(--km-space-sm);
}

.km-hero__text {
  max-width: 600px;
}

.km-hero__title-img {
  height: 80px;
  width: auto;
  filter: drop-shadow(0 2px 20px rgba(138, 91, 24, 0.4));
  animation: km-fade-up 0.8s ease both;
}

.km-hero__title-fallback {
  font-family: var(--km-font-display);
  font-size: var(--km-size-4xl);
  font-weight: 300;
  color: var(--km-gold-mid);
  letter-spacing: 0.04em;
  text-shadow: 0 2px 20px rgba(138, 91, 24, 0.4), 0 0 1px var(--km-burgundy);
  animation: km-fade-up 0.8s ease both;
}

.km-hero__tagline {
  font-family: var(--km-font-display);
  font-size: var(--km-size-lg);
  font-style: italic;
  font-weight: 300;
  color: var(--km-text-muted);
  margin: var(--km-space-md) 0 var(--km-space-lg);
  animation: km-fade-up 0.8s 0.15s ease both;
}

.km-hero__ctas {
  display: flex;
  gap: var(--km-space-md);
  flex-wrap: nowrap;
  animation: km-fade-up 0.8s 0.3s ease both;
}

.km-hero__mascot {
  flex-shrink: 0;
  margin-left: auto;
  animation: km-fade-up 0.8s 0.2s ease both;
}

.km-hero__mascot-img {
  height: 280px;
  width: auto;
  filter: drop-shadow(0 0 30px rgba(0,0,0,0.8));
  animation: km-float 6s ease-in-out infinite;
}

.km-hero__linda {
  position: absolute;
  bottom: 0;
  right: var(--km-space-xl);
  z-index: 3;
  pointer-events: none;
}

.km-hero__linda img {
  height: 64px;
  width: auto;
  filter: drop-shadow(0 0 12px rgba(0,0,0,0.7));
  transform-origin: bottom center;
  animation: km-linda-peek 1s 1.5s ease both, km-float-slow 8s 2.5s ease-in-out infinite;
}


/* ════════════════════════════════════════════════════════════
   HUB GRID
   ════════════════════════════════════════════════════════════ */

.km-hub {
  background: var(--km-bg-base);
  border-top: 1px solid var(--km-border-subtle);
  border-bottom: 1px solid var(--km-border-subtle);
}

.km-hub__grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--km-space-md);
}

.km-hub__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--km-space-lg) var(--km-space-md);
  background: var(--km-bg-surface);
  border: 1px solid var(--km-border-subtle);
  border-radius: var(--km-radius-lg);
  text-decoration: none;
  transition: all var(--km-transition);
  gap: var(--km-space-xs);
}

.km-hub__card:hover {
  background: var(--km-bg-elevated);
  border-color: var(--km-border-mid);
  transform: translateY(-3px);
  box-shadow: var(--km-shadow-md);
}

.km-hub__card-icon {
  font-size: 2rem;
  line-height: 1;
  color: var(--km-gold-mid);
  margin-bottom: var(--km-space-xs);
}

.km-hub__card-icon svg {
  width: 2rem;
  height: 2rem;
  fill: var(--km-gold-mid);
}

.km-hub__card-label {
  font-family: var(--km-font-display);
  font-size: var(--km-size-lg);
  font-weight: 600;
  color: var(--km-gold-mid);
  line-height: 1.1;
}

.km-hub__card-sub {
  font-size: var(--km-size-xs);
  color: var(--km-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.km-hub__card--stream:hover { border-color: rgba(145, 70, 255, 0.4); }
.km-hub__card--kasino:hover { border-color: rgba(176, 125, 48, 0.5); box-shadow: var(--km-shadow-md), var(--km-glow-gold); }

/* Kasino card toggle */
.km-hub__card--kasino {
  cursor: pointer;
  user-select: none;
}

.km-hub__card--kasino.is-open {
  border-color: var(--km-border-mid);
  background: var(--km-bg-elevated);
}

.km-hub__card-arrow {
  font-size: var(--km-size-xs);
  color: var(--km-text-dim);
  transition: transform var(--km-transition);
  margin-top: var(--km-space-xs);
  line-height: 1;
}

.km-hub__card--kasino.is-open .km-hub__card-arrow {
  transform: rotate(180deg);
}

/* Kasino expand panel — spans full grid width, sits between row 1 and row 2 */
.km-hub__kasino-expand {
  display: none;
  grid-column: 1 / -1;
}

.km-hub__kasino-expand.is-open {
  display: block;
  animation: km-fade-up 0.2s ease both;
}

.km-hub__kasino-expand__inner {
  display: flex;
  flex-wrap: wrap;
  gap: var(--km-space-sm);
  justify-content: center;
  padding: var(--km-space-sm) var(--km-space-md);
  background: var(--km-bg-surface);
  border: 1px solid var(--km-border-mid);
  border-radius: var(--km-radius-md);
}

.km-hub__kasino-expand__link {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  font-size: var(--km-size-xs);
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--km-text-muted);
  text-decoration: none;
  border: 1px solid var(--km-border-subtle);
  border-radius: var(--km-radius-sm);
  background: var(--km-bg-base);
  transition: all var(--km-transition);
  white-space: nowrap;
}

.km-hub__kasino-expand__link:hover {
  color: var(--km-gold-bright);
  border-color: var(--km-border-mid);
  background: rgba(138, 91, 24, 0.08);
}


/* ════════════════════════════════════════════════════════════
   ABOUT
   ════════════════════════════════════════════════════════════ */

.km-about {
  position: relative;
  overflow: hidden;
}

.km-about::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--km-img-smoke);
  background-size: cover;
  background-position: center 60%;
  opacity: 0.06;
  pointer-events: none;
}

.km-about__inner {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--km-space-2xl);
  align-items: start;
  position: relative;
  z-index: 1;
}

.km-about__portrait {
  position: relative;
}

.km-about__portrait-placeholder {
  width: 100%;
  aspect-ratio: 1;
  background: var(--km-bg-surface);
  border: 1px solid var(--km-border-subtle);
  border-radius: var(--km-radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.km-about__portrait-linda {
  width: 85%;
  height: auto;
  object-fit: contain;
  filter: grayscale(85%) drop-shadow(0 0 20px rgba(0,0,0,0.7));
}

.km-about__portrait-rjm {
  position: absolute;
  bottom: -20px;
  right: -20px;
  width: 90px;
  height: auto;
  filter: drop-shadow(0 0 10px rgba(0,0,0,0.8));
  animation: km-float 7s ease-in-out infinite;
}

.km-about__heading {
  font-size: var(--km-size-4xl);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--km-gold-mid);
  text-shadow: 0 0 1px var(--km-burgundy);
  margin-bottom: var(--km-space-xs);
  line-height: 1;
}

.km-about__body p {
  font-size: var(--km-size-md);
  line-height: 1.8;
  color: var(--km-text-body);
  margin-bottom: 1.1rem;
}

.km-about__body p:first-child {
  font-family: var(--km-font-display);
  font-size: var(--km-size-xl);
  font-style: italic;
  color: var(--km-text-muted);
}

.km-about__body a {
  color: var(--km-gold-bright);
  text-decoration: underline;
  text-decoration-color: var(--km-border-mid);
  text-underline-offset: 3px;
  transition: all var(--km-transition);
}
.km-about__body a:hover {
  color: var(--km-gold-highlight);
  text-decoration-color: var(--km-gold-mid);
}

.km-about__body strong {
  color: var(--km-gold-mid);
  font-weight: 700;
}


/* ════════════════════════════════════════════════════════════
   BLOG POSTS
   ════════════════════════════════════════════════════════════ */

.km-posts {
  background: var(--km-bg-surface);
  border-top: 1px solid var(--km-border-subtle);
  border-bottom: 1px solid var(--km-border-subtle);
}

.km-posts__heading {
  font-size: var(--km-size-2xl);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--km-gold-mid);
  text-shadow: 0 0 1px var(--km-burgundy);
  margin-bottom: var(--km-space-lg);
}

.km-posts__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--km-space-md);
}

.km-post-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: var(--km-space-md);
  background: var(--km-bg-base);
  border: 1px solid var(--km-border-subtle);
  border-radius: var(--km-radius-lg);
  transition: all var(--km-transition);
}

.km-post-card:hover {
  border-color: var(--km-border-mid);
  transform: translateY(-2px);
  box-shadow: var(--km-shadow-sm);
}

.km-post-card__date {
  font-size: var(--km-size-xs);
  color: var(--km-text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.km-post-card__title {
  font-family: var(--km-font-display);
  font-size: var(--km-size-lg);
  font-weight: 600;
  line-height: 1.3;
  flex: 1;
}

.km-post-card__title a {
  color: var(--km-gold-mid);
  text-decoration: none;
  transition: color var(--km-transition);
}
.km-post-card__title a:hover {
  color: var(--km-gold-highlight);
}

.km-post-card__excerpt {
  font-size: var(--km-size-sm);
  color: var(--km-text-muted);
  line-height: 1.6;
  margin: 0;
}

.km-post-card__link {
  font-size: var(--km-size-xs);
  color: var(--km-gold-bright);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: color var(--km-transition);
  margin-top: auto;
}
.km-post-card__link:hover {
  color: var(--km-gold-highlight);
}

.km-posts__footer {
  text-align: center;
  margin-top: var(--km-space-lg);
}


/* ════════════════════════════════════════════════════════════
   RESPONSIVE — homepage specific
   ════════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
  .km-hub__grid       { grid-template-columns: repeat(3, 1fr); }
  .km-posts__grid     { grid-template-columns: repeat(2, 1fr); }
  .km-about__inner    { grid-template-columns: 220px 1fr; gap: var(--km-space-xl); }
  .km-hero__mascot-img { height: 200px; }
}

@media (max-width: 768px) {
  .km-hero__content {
    flex-direction: column;
    text-align: center;
    justify-content: center;
  }
  .km-hero__ctas    { justify-content: center; flex-wrap: wrap; }
  .km-hero__mascot  { display: none; }
  .km-hero__linda   { display: none; }
  .km-hub__grid     { grid-template-columns: repeat(2, 1fr); }
  .km-about__inner  { grid-template-columns: 1fr; }
  .km-about__portrait { max-width: 200px; margin: 0 auto; }
  .km-posts__grid   { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .km-hub__grid         { grid-template-columns: 1fr; }
  .km-hero__title-img   { height: 52px; }
}





/* Discord button */
.km-btn--discord {
  background: #5865f2;
  color: #fff;
  border-color: #4752c4;
}
.km-btn--discord:hover {
  background: #6875f5;
  color: #fff;
  transform: translateY(-1px);
}

/* Discord and new card hover accents */
.km-hub__card--discord:hover { border-color: rgba(88, 101, 242, 0.5); }
.km-hub__card--youtube:hover { border-color: rgba(255, 0, 0, 0.35); }
.km-hub__card--lottery:hover { border-color: rgba(176, 125, 48, 0.4); }
