/* KOVENTRA — structural cohesion update, 12 Nov 2026.
   Layered after the approved theme. Original style.css, typography, palettes,
   artwork and all existing functionality remain unchanged. */
:root {
  --koventra-outer-gutter: clamp(18px, 4vw, 80px);
  --koventra-frame-gold: rgba(232,182,101,.86);
}

/* Share one horizontal rhythm. Preserve the existing zoom-responsive
   desktop width rather than freezing it at a small fixed pixel value. */
.container,
header .container,
footer .container,
#about .container,
#updates-contact .container {
  width: min(calc(100% - 2 * var(--koventra-outer-gutter)), max(1320px, 84vw)) !important;
  max-width: none !important;
  margin-left: auto !important;
  margin-right: auto !important;
}
main, main > section, .games-layout, .games-grid,
#about .about-grid, #about .about-copy,
#updates-contact .updates-contact-grid, #news,
.game-detail .detail-columns {min-width: 0;}

/* Section spacing: less empty space, no negative margins or image cutoffs. */
#games {padding-top: clamp(26px, 2.3vw, 40px) !important;
        padding-bottom: clamp(26px, 2.3vw, 40px) !important;}
#games .games-layout {
  display: grid;
  grid-template-columns: minmax(0,.82fr) minmax(0,2.18fr);
  gap: clamp(22px,3.4vw,58px);
  align-items: center;
}
#games .games-grid {
  display: grid !important;
  grid-template-columns: repeat(3,minmax(0,1fr)) !important;
  gap: clamp(12px,1.2vw,20px);
  align-items: stretch;
}
#games .games-grid > .game-card {
  box-sizing: border-box;
  border: 1px solid rgba(232,182,101,.4);
  box-shadow: 0 0 0 1px rgba(0,0,0,.25);
}
#games .games-grid > .game-card:focus-visible,
#news #news-track > a.news-feature:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

/* About: remove the edge-to-edge image/text mismatch, and show the complete
   panoramic studio artwork without stretching or cropping it. */
#about {padding: clamp(16px,1.6vw,28px) 0 !important;}
#about .about-grid {
  grid-template-columns: minmax(0,1.12fr) minmax(0,.88fr) !important;
  gap: clamp(24px,3.6vw,58px) !important;
  align-items: center !important;
}
#about .about-img {
  display: block;
  width: 100%;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  aspect-ratio: 8 / 3 !important;
  object-fit: contain !important;
  object-position: center !important;
  border: 1px solid rgba(232,182,101,.28);
  border-radius: 12px !important;
}
#about .about-grid > div.about-copy {
  min-width:0;
  padding: 4px 0 !important;
  align-items: center;
  gap: clamp(16px,2vw,30px);
}
#about .about-description p {max-width: 61ch;}
#about .about-features {gap: clamp(10px,1.5vw,18px);}

/* News / contact: equal outer alignment, a little less vertical padding.
   All news slides have identical dimensions; gold frame is painted on top
   so the 75 MINUTES left edge cannot disappear beneath its inline art layer. */
#updates-contact {padding: clamp(46px,4.5vw,74px) 0 !important;}
#updates-contact .updates-contact-grid {
  display: grid;
  grid-template-columns: minmax(0,1.06fr) minmax(0,.94fr) !important;
  gap: clamp(30px,4vw,78px) !important;
  align-items: start !important;
}
#updates-contact .updates-contact-column,
#updates-contact #news-track {min-width: 0;}
#updates-contact .updates-contact-column h2 {min-height: 0 !important;}
#updates-contact .contact-panel {
  padding: 0 0 0 clamp(24px,2.6vw,50px) !important;
  justify-content: flex-start;
  align-self: stretch;
}
#news #news-track {
  display:flex !important;
  align-items:stretch !important;
  gap:0 !important;
  margin-top:18px;
  overflow-x:auto !important;
  overflow-y:hidden !important;
}
#news #news-track > a.news-feature,
#news #news-track > a.news-feature.second-news,
#news #news-track > a.news-feature.stolen-sun-news {
  position:relative;
  display:flex !important;
  flex: 0 0 100% !important;
  width:100% !important;
  max-width:100% !important;
  min-width:100% !important;
  min-height: clamp(350px,25vw,430px) !important;
  height: auto !important;
  margin:0 !important;
  border:1px solid var(--koventra-frame-gold) !important;
  border-radius:18px !important;
  box-shadow: 0 18px 50px rgba(0,0,0,.5);
  scroll-snap-align:start;
}
#news #news-track > a.news-feature::after {
  content:"";
  position:absolute;
  inset:0;
  z-index:5;
  border:1px solid var(--koventra-frame-gold);
  border-radius:inherit;
  pointer-events:none;
}
#news #news-track > a.news-feature .pill,
#news #news-track > a.news-feature .news-feature-copy {
  position:relative;
  z-index:2;
}
#news #news-track > a.news-feature.second-news {
  /* This image intentionally remains fully visible; it is never cropped. */
  background-size: 100% 100%, contain !important;
  background-position:center, center !important;
  background-repeat:no-repeat,no-repeat !important;
}
#updates-contact .news-carousel-controls {margin-top: 15px !important;}
#updates-contact .contact-panel > p {margin: 14px 0 20px;}

/* Game detail and legal pages keep their established typography and widths.
   Make image height predictable without stretching it. */
.game-detail .detail-columns {align-items: start;}
.game-detail .detail-cover,
.game-detail .stolen-sun-official-poster {
  display:block;
  height:auto !important;
  object-fit:contain !important;
}
.game-detail .detail-aside {min-width:0;}
.legal {max-width:900px;}

/* Footer has a stable wrap order on narrower screens. */
footer .foot {row-gap:20px;}
footer .foot .foot-links {min-width:0;}

@media (max-width:1100px) {
  #games .games-layout {grid-template-columns:1fr !important;gap:22px;}
  #about .about-grid {grid-template-columns:1fr !important;gap:26px !important;}
  #about .about-img {max-width:100%;}
  #about .about-copy {grid-template-columns:minmax(0,1.4fr) minmax(0,1fr) !important;}
}
@media (max-width:900px) {
  #updates-contact .updates-contact-grid {grid-template-columns:1fr !important;gap:35px !important;}
  #updates-contact .contact-panel {
    border-left:0 !important;
    border-top:1px solid rgba(201,148,78,.42);
    padding:30px 0 0 !important;
  }
  #news #news-track > a.news-feature,
  #news #news-track > a.news-feature.second-news,
  #news #news-track > a.news-feature.stolen-sun-news {min-height:350px !important;}
}
@media (max-width:600px) {
  .container, header .container,footer .container,
  #about .container,#updates-contact .container {
    width:calc(100% - 36px) !important;
  }
  #games .games-grid {grid-template-columns:1fr !important;}
  #about .about-copy {grid-template-columns:1fr !important;gap:20px;}
  #about .about-features {grid-template-columns:repeat(2,minmax(0,1fr));}
  #news #news-track > a.news-feature,
  #news #news-track > a.news-feature.second-news,
  #news #news-track > a.news-feature.stolen-sun-news {
    min-height:380px !important;
    padding:20px !important;
  }
  #updates-contact .contact-panel .actions {flex-wrap:wrap;}
}
@media (prefers-reduced-motion:reduce) {
  #news #news-track {scroll-behavior:auto !important;}
}
