/* ==========================================================================
   Palladium SEA — Clean CSS (Mobile readability overlays enabled)
   ========================================================================== */

/* ==========================================================================
   Global variables
   ========================================================================== */

:root{
  --bg-main: #000000;
  --bg-section: #111111;

  --text-main: #d0d0d0;
  --text-strong: #f0f0f0;
  --accent: #c0c0c0;
  --accent-strong: #e0e0e0;
  --line: #333333;

  /* Background images (relative to /css/) */
  --bg-stone-image: url("../images/stone-50.png");
  --bg-people-image: url("../images/people-bg-75.jpg");
  --bg-portfolio-image: url("../images/portfolio-bg-75.jpg");
  --bg-metal-image: url("../images/close-up-metal-10.jpg");

  /* Updated by JS to match sticky header height */
  --header-h: 74px;
}

*{ box-sizing: border-box; }

body{
  margin: 0;
  font-family: 'Montserrat', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
}

/* Global stone background */
body::before{
  content:"";
  position: fixed;
  inset: 0;
  background: var(--bg-stone-image) center/cover no-repeat;
  z-index: -2;
  pointer-events: none;
  filter: brightness(0.90) contrast(1.10) saturate(1.03);
  transform: scale(1.01);
}

a{
  color: var(--accent-strong);
  text-decoration: none;
}
a:hover{ text-decoration: underline; }

/* ==========================================================================
   Layout helpers
   ========================================================================== */

.container{
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ==========================================================================
   Header / Navigation
   ========================================================================== */

header{
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(6px);
}

.nav-bar{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
}

.logo{
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-strong);
}

.logo-img{
  height: 48px;
  display: block;
}

nav{
  display: flex;
  align-items: center;
  gap: 24px;
}

nav a{
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-main);
}

nav a:hover,
nav a.active{
  color: var(--accent-strong);
}

.nav-contact{
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
}

.icon-link{
  font-size: 18px;
  display: inline-flex;
  align-items: center;
  color: var(--accent-strong);
}

.icon-link:hover{
  color: var(--text-strong);
  text-decoration: none;
}

.nav-toggle{
  display: none;
  font-size: 20px;
  cursor: pointer;
}

/* ==========================================================================
   Full-screen sections + overlays
   ========================================================================== */

main > section{
  position: relative;
  min-height: calc(100vh - var(--header-h, 74px));
  display: flex;
  padding: 0;
  border-top: 1px solid var(--line);
  background: transparent;
}

/* Default overlay layer (enabled for mobile later) */
main > section:not(.hero)::after{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  z-index:0;
  background: transparent;
}

main > section > .container{
  margin: auto;
  padding: 60px 0;
  position: relative;
  z-index: 1;
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero{
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-overlay{
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(to bottom,
      rgba(0,0,0,0.00) 0%,
      rgba(0,0,0,0.12) 35%,
      rgba(0,0,0,0.42) 100%
    ),
    radial-gradient(circle at center,
      rgba(0,0,0,0.00) 0%,
      rgba(0,0,0,0.22) 100%
    );
}

.hero-inner{
  position: relative;
  z-index: 2;
  width: 100%;
  padding: clamp(70px, 8vh, 120px) 0;
}

.hero-banner{
  margin-bottom: 36px;
}

.hero-banner img{
  width: 100%;
  display: block;
  border: 2px solid #000;
  border-radius: 12px;
  box-sizing: border-box;
}

.hero-grid{
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 40px;
}

.hero-subtitle{
  font-size: 18px;
  max-width: 520px;
}

.hero-meta{
  margin-top: 24px;
  font-size: 14px;
}

.hero-meta strong{ color: var(--text-strong); }

.hero-cta{
  margin-top: 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-side{
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 13px;
  border-left: 1px solid var(--line);
  padding-left: 24px;
}

.hero-side-label{
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
}

/* ==========================================================================
   Section headers
   ========================================================================== */

.section-header{ margin-bottom: 30px; }

.section-title{
  font-size: 30px;
  margin: 6px 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 700;
}

.section-title-metal{
  background: var(--bg-metal-image) center/250% 250% no-repeat;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: var(--accent-strong);
  filter: brightness(1.15) contrast(1.2);
}

.section-intro{
  max-width: 1200px;
  font-size: 16px;
  line-height:26px;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: rgba(255,255,255,0.03);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.btn-metal{
  padding: 10px 26px;
  border-radius: 6px;
  font-weight: 700;
  letter-spacing: 0.14em;
  background-image:
    linear-gradient(rgba(255,255,255,0.10), rgba(255,255,255,0.10)),
    var(--bg-metal-image);
  background-repeat: no-repeat;
  background-size: 120% auto;
  background-position: 50% 12%;
  color: rgba(15,15,15,0.95);
  border: 1px solid rgba(255,255,255,0.18);
  text-shadow:
    0 1px 0 rgba(255,255,255,0.30),
    0 -1px 0 rgba(0,0,0,0.35);
  box-shadow:
    0 0 10px rgba(0,0,0,0.40),
    inset 0 0 12px rgba(255,255,255,0.26),
    inset 0 0 20px rgba(0,0,0,0.45);
  transition: all 0.25s ease;
}

/* ==========================================================================
   Profile + Portfolio backgrounds
   ========================================================================== */

#profile,
#portfolio{
  position: relative;
  isolation: isolate;
  background: transparent !important;
}

#profile::before{
  content:"";
  position:absolute;
  inset:0;
  background: var(--bg-people-image) center/cover no-repeat;
  z-index:-1;
}

#portfolio::before{
  content:"";
  position:absolute;
  inset:0;
  background: var(--bg-portfolio-image) center/cover no-repeat;
  z-index:-1;
}

#profile::after,
#portfolio::after{
  content:none !important;
}

/* ==========================================================================
   Players
   ========================================================================== */

.player-name-row{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.players-grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 30px;
}

.player-card{
  border-radius: 12px;
  overflow: hidden;
  background: #0a0a0a;
  border: 1px solid #1a1a1a;
}

.player-art img{
  width: 100%;
  display: block;
}

.player-info{
  padding: 18px 20px;
}

.player-name{
  margin: 0 0 2px;
  font-size: 17px;
  font-weight: 600;
  color: var(--accent-strong);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.player-country{
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--accent);
}

.player-bio{
  font-size: 14px;
  margin-bottom: 12px;
}

.player-links{
  display: flex;
  align-items: center;
  gap: 12px;
}

.player-links a{
  font-size: 22px;
  color: var(--accent-strong);
  line-height: 1;
}

.player-links a:hover{
  color: var(--accent);
}

.player-links .tour-bio-link{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1;
}

.player-links .tour-bio-link i{
  font-size: 13px;
}

.player-links .tour-bio-link:hover{
  border-color: rgba(255,255,255,0.55);
  text-decoration: none;
}

/* ==========================================================================
   Grids / cards
   ========================================================================== */

.grid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 24px;
}

.card{
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px 20px;
  background: rgba(255,255,255,0.02);
}

.card-title{
  font-size: 15px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 4px;
}

.card-meta{
  font-size: 12px;
  color: var(--accent);
}

/* ==========================================================================
   Press
   ========================================================================== */

.press-list{
  display: grid;
  gap: 12px;
}

.press-item{
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,0.10);
}

.press-item-meta{
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.press-separator{
  color: var(--accent);
}

.press-item-title{
  flex: 1 1 340px;
  color: var(--text-main);
}

.press-item-link{
  margin-left: auto;
  color: #9cc7f0;
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
}

.press-item-link:hover{
  color: #c4e0fa;
}

.card-title.with-flag,
.card-title.with-flags{
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 12px;
}

.flag-stack{
  display: flex;
  gap: 6px;
}

.flag{
  width: 32px;
  height: 20px;
  object-fit: cover;
  border-radius: 3px;
}

/* ==========================================================================
   People cards as collapsible details/summary
   ========================================================================== */

details.card.person{
  padding: 0;                 /* summary/body handle spacing */
}

/* Remove default marker (triangle) */
details.card.person > summary{
  list-style: none;
}
details.card.person > summary::-webkit-details-marker{
  display: none;
}

.person-summary{
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: start;
  cursor: pointer;
  padding: 18px 20px;
}

.person-summary:focus{
  outline: none;
}
details.card.person[open] .person-summary{
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

/* Keep title/meta stacked neatly */
.person-head{
  min-width: 0;
}
.person-head .card-title{
  margin: 0 0 4px;
}

/* Body spacing */
.person-body{
  padding: 14px 20px 18px;
}

/* Caret icon */
.person-caret{
  width: 18px;
  height: 18px;
  margin-top: 2px;
  border-right: 2px solid rgba(255,255,255,0.55);
  border-bottom: 2px solid rgba(255,255,255,0.55);
  transform: rotate(45deg);
  transition: transform 0.2s ease, margin-top 0.2s ease;
  opacity: 0.85;
}

/* Rotate caret when open */
details.card.person[open] .person-caret{
  transform: rotate(-135deg);
  margin-top: 6px;
}

/* Optional: hover feedback */
.person-summary:hover{
  background: rgba(255,255,255,0.02);
}

/* ==========================================================================
   Portfolio scroll panel
   ========================================================================== */

#portfolio .portfolio-scroll{
  /* Take remaining vertical space inside section */
  max-height: calc(100vh - var(--header-h, 74px) - 220px);
  overflow-y: auto;

  padding-right: 6px; /* room for scrollbar */
}

/* Smooth scrolling on modern browsers */
#portfolio .portfolio-scroll{
  scroll-behavior: smooth;
}

/* Optional: subtle fade at top/bottom to hint scroll */
#portfolio .portfolio-scroll{
  mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    black 6%,
    black 94%,
    transparent 100%
  );
}


/* Portfolio Cards with Logos */
.card-with-logo {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

/* Logo Container */
.card-logo {
    flex-shrink: 0;
    width: 120px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    padding: 8px;
}

/* Stacked Logo Container */
.card-logo-stack {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.card-logo-stack .card-logo {
    width: 120px;
    height: 80px;
}

.card-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: grayscale(30%) brightness(0.9);
    transition: filter 0.3s ease;
    border-radius: 4px;
}

.card-with-logo:hover .card-logo img {
    filter: grayscale(0%) brightness(1);
}

/* Card Content (text area) */
.card-content {
    flex: 1;
    min-width: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .card-with-logo {
        flex-direction: column;
        gap: 12px;
    }
    
    .card-logo {
        width: 100%;
        height: 60px;
    }
}

/* ==========================================================================
   Partners
   ========================================================================== */

/* Partners Categories Container - Scrollable */
.partners-categories-container {
    max-height: 800px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 8px;
}

/* Scrollbar styling */
.partners-categories-container::-webkit-scrollbar {
    width: 6px;
}

.partners-categories-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.partners-categories-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.partners-categories-container::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Individual Partner Category */
.partner-category {
    margin-bottom: 40px;
}

.partner-category:last-child {
    margin-bottom: 0;
}

/* Category Title */
.category-title {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--accent);
    margin-bottom: 16px;
    text-align: left;
}

/* Logo Scrolling Container */
.logo-scroll-wrapper {
    width: 100%;
    overflow: hidden;
    position: relative;
    padding: 24px 0;
}

/* Fade edges for smooth appearance */
.logo-scroll-wrapper::before,
.logo-scroll-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    width: 100px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.logo-scroll-wrapper::before {
    left: 0;
    background: linear-gradient(to right, rgba(26, 26, 26, 1), transparent);
}

.logo-scroll-wrapper::after {
    right: 0;
    background: linear-gradient(to left, rgba(26, 26, 26, 1), transparent);
}

/* Logo Track - contains all logos */
.logo-scroll-track {
    display: flex;
    gap: 48px;
    animation: scroll 60s linear infinite;
    width: fit-content;
}

/* Pause animation on hover */
.logo-scroll-wrapper:hover .logo-scroll-track {
    animation-play-state: paused;
}

/* Individual Logo Item */
.logo-scroll-item {
    flex-shrink: 0;
    width: 120px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.logo-scroll-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: grayscale(100%) brightness(0.7);
    transition: filter 0.3s ease;
}

.logo-scroll-item:hover img {
    filter: grayscale(0%) brightness(1);
    transform: scale(1.05);
}

/* Static Logo Grid (for categories with few logos) */
.logo-static-grid {
    width: 100%;
    overflow: hidden;
    position: relative;
    padding: 24px 0;
}

.logo-static-grid .logo-static-track {
    display: flex;
    gap: 48px;
    justify-content: flex-start;
}

/* Scroll Animation */
@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .partners-categories-container {
        max-height: 500px;
    }
    
    .logo-scroll-track {
        gap: 32px;
        animation-duration: 45s;
    }
    
    .logo-static-grid {
        gap: 32px;
    }
    
    .logo-scroll-item {
        width: 100px;
        height: 66px;
    }
    
    .logo-scroll-wrapper::before,
    .logo-scroll-wrapper::after {
        width: 50px;
    }
}

/* ==========================================================================
   Video
   ========================================================================== */

.subsection-header {
    margin-top: 48px;
    text-align: left;
}

.subsection-title {
    font-size: 24px;
    font-weight: 400;
    color: #fff;
    margin-bottom: 12px;
}

.subsection-intro {
    font-size: 16px;
    color: #ccc;
    max-width: 700px;
    text-align: left;
}

/* Video Gallery Grid */
.video-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 48px;
}

/* Video Card */
.video-card {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.video-card:hover {
    transform: translateY(-4px);
}

/* Video Thumbnail */
.video-thumbnail {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background: #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
}

.video-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Play Overlay */
.play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 64px;
    height: 64px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.video-card:hover .play-overlay {
    background: rgba(0, 0, 0, 0.9);
}

/* Video Title */
.video-title {
    margin-top: 12px;
    font-size: 14px;
    color: #ccc;
    text-align: center;
}

/* Video Modal */
.video-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    animation: fadeIn 0.3s;
}

.video-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.video-modal-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    aspect-ratio: 16/9;
}

.video-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
}

.video-modal-close:hover {
    color: #ccc;
}

.video-modal-body {
    width: 100%;
    height: 100%;
    background: #000;
}

.video-modal-body iframe {
    border-radius: 4px;
}


/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 960px){
  .hero-grid{ grid-template-columns: 1fr; }
  .grid{ grid-template-columns: 1fr; }
  .hero-side{
    border-left: none;
    border-top: 1px solid var(--line);
    padding-left: 0;
    padding-top: 16px;
  }
  .players-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px){
  nav{ display:none; flex-direction: column; }
  nav.open{ display:flex; }
  .nav-toggle{ display:block; }

  main > section:not(.hero)::after{
    background: linear-gradient(
      to bottom,
      rgba(0,0,0,0.22),
      rgba(0,0,0,0.48)
    );
  }
 
  .players-grid{
    grid-template-columns: 1fr;
  }

  .hero-overlay{
    background:
      linear-gradient(to bottom,
        rgba(0,0,0,0.00),
        rgba(0,0,0,0.32)
      );
  }

  body::before{
    filter: brightness(0.95) contrast(1.15) saturate(1.08);
  }

  .container{
    padding-left: 24px;
    padding-right: 24px;
  }

  .video-gallery {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
  }
  
  .video-modal-content {
    width: 95%;
  }
  
  .video-modal-close {
    top: -35px;
    font-size: 32px;
  }

  .press-item{
    gap: 6px;
    padding: 12px 0;
  }

  .press-item-title{
    flex-basis: 100%;
  }

  .press-item-link{
    margin-left: 0;
  }

}
