/* MarvelGrid Landing Page Styles
 * Dark theme hero selection page with responsive grid layout
 * Replace assets and adjust colors as needed
 */

/* Refrigerator Deluxe Font */
@font-face {
    font-family: 'Refrigerator Deluxe';
    src: url('../fonts/Refrigerator Deluxe.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Refrigerator Deluxe';
    src: url('../fonts/Refrigerator Deluxe Bold.otf') format('opentype');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Refrigerator Deluxe';
    src: url('../fonts/Refrigerator Deluxe Heavy.otf') format('opentype');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Refrigerator Deluxe';
    src: url('../fonts/Refrigerator Deluxe Extrabold.otf') format('opentype');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

:root {
    /* Colors */
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --accent-gold: #FFC52E;
    --accent-gold-hover: #FFB800;
    --border-light: rgba(255, 255, 255, 0.1);
    --border-gold: var(--accent-gold);
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    
    /* Layout */
    --max-width: 1342px;
    --grid-gap: 12px;
    --border-radius: 8px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Remove default margins from text elements */
p, h1, h2, h3, h4, h5, h6 {
    margin: 0;
}

body {
    font-family: 'Refrigerator Deluxe', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow: hidden;
    height: 100vh;
    /* Use viewport units for responsive scaling */
    font-size: clamp(12px, 2.5vh, 16px);
}

/* Content wrapper for scaling */
.content-wrapper {
    width: 100%;
    transform-origin: top center;
    will-change: transform;
    position: relative;
    z-index: 10;
}

/* Disable scaling on mobile */
@media (max-width: 768px) {
    .content-wrapper {
        transform: none !important;
        will-change: auto;
    }
}

/* Enable scrolling on mobile */
@media (max-width: 768px) {
    body {
        overflow: auto;
        height: auto;
        min-height: 100vh;
    }
}

/* Base background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../images/bkg.png') center/cover no-repeat;
    pointer-events: none;
    z-index: -1;
    will-change: transform;
}

/* Dynamic hero background overlay */
.hero-background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: right center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    z-index: -1;
    will-change: opacity, background-image;
}

/* Hero key image overlay */
.hero-key-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: 80% center;
    background-repeat: no-repeat;
    opacity: 0;
    transform: translateX(-100%);
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    z-index: -1;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.hero-key-overlay.show {
    opacity: 1;
    transform: translateX(0) perspective(1000px) rotateX(0deg) rotateY(0deg);
}

.hero-key-overlay.fade-out {
    opacity: 0 !important;
}

/* Hero back image overlay */
.hero-back-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: right center;
    background-repeat: no-repeat;
    opacity: 0;
    transform: translateX(100%);
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1), transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    z-index: -1;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.hero-back-overlay.show {
    opacity: 1;
    transform: translateX(0) perspective(1000px) rotateX(0deg) rotateY(0deg);
}

.hero-back-overlay.fade-out {
    opacity: 0 !important;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 16px;
}

/* Utility classes */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Header */
.hero-header {
    text-align: center;
    padding: var(--spacing-xl) 0 0 0;
    position: relative;
    z-index: 10;
    filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.3));
}

.logo {
    width: clamp(200px, 25vw, 272px);
    height: auto;
    margin-bottom: var(--spacing-sm);
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
}

.eyebrow {
    font-size: clamp(20px, 3vh, 27px);
    font-weight: 900; /* HEAVY */
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 -16px 0;
    font-family: 'Refrigerator Deluxe', sans-serif;
}

/* Reset eyebrow margin on mobile */
@media (max-width: 768px) {
    .eyebrow {
        margin: 0 0 0 0;
    }
}

h1 {
    font-size: clamp(32px, 5vh, 49px);
    font-weight: 900; /* HEAVY */
    margin: 0 0 var(--spacing-md) 0;
    background: linear-gradient(221deg, #FC9F2D 12.57%, #FCD92D 48.82%, #FC9F2D 85.78%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-family: 'Refrigerator Deluxe', sans-serif;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
}

.subhead {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-lg);
    font-style: italic;
}

/* Trust chips removed */

/* CTA Button */
.btn-play-now{
  position:relative; display:inline-flex; align-items:center; justify-content:center;
  padding:14px 28px; border-radius:0; text-decoration:none;
  font:800 30px/1 'Refrigerator Deluxe',system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  letter-spacing:.02em; color:#0b0b0f;
  background:url('../images/btn.jpg') center/cover no-repeat;
  box-shadow:0 10px 24px rgba(0,0,0,.35); overflow:hidden;
  transition:transform .18s cubic-bezier(0.4, 0, 0.2, 1), box-shadow .18s cubic-bezier(0.4, 0, 0.2, 1);
  text-transform: uppercase;
  will-change: transform, box-shadow;
}
.btn-play-now:hover{ 
  transform:translateY(-1px); 
  box-shadow:0 14px 30px rgba(0,0,0,.4), 0 0 30px rgba(255, 197, 46, 0.4); 
}

/* sheen */
.btn-play-now::before{
  content:""; position:absolute; inset:-120% -40%;
  background:linear-gradient(100deg,transparent 30%,rgba(255,255,255,.75) 50%,transparent 70%);
  transform:translateX(-60%) rotate(8deg); opacity:0; pointer-events:none;
}
.btn-play-now:hover::before{ animation:sheen .75s ease-out forwards; }
@keyframes sheen{
  0%{transform:translateX(-60%) rotate(8deg); opacity:0}
  12%{opacity:.35}
  100%{transform:translateX(60%) rotate(8deg); opacity:0}
}

/* Heartbeat pulse animation for buttons */
.btn-play-now {
  animation: heartbeat 2s ease-in-out infinite;
}

@keyframes heartbeat {
  0%, 100% { 
    transform: scale(1);
  }
  14% { 
    transform: scale(1.05);
  }
  28% { 
    transform: scale(1);
  }
  42% { 
    transform: scale(1.05);
  }
  70% { 
    transform: scale(1);
  }
}


@media (prefers-reduced-motion: reduce){
  .btn-play-now:hover::before{ animation:none }
}

.cta-button:focus {
    outline: 3px solid var(--accent-gold);
    outline-offset: 2px;
}

.primary-cta {
    margin-bottom: var(--spacing-xl);
}

/* Main content */
.main-content {
    padding: 0 0 var(--spacing-xl) 0;
    position: relative;
    z-index: 10;
    filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.3));
}

/* Hero Grid */
.hero-grid {
    margin-bottom: var(--spacing-md);
}

.grid-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    max-width: 1366px;
    margin: 0 auto;
}

.hero-tile {
    margin: 6px;
}

/* Mobile responsive breakpoint */
@media (max-width: 768px) {
    /* Disable hover effects on mobile */
    .hero-background-overlay {
        display: none;
    }
    
    /* Adjust grid for mobile */
    .grid-container {
        max-width: 100%;
        padding: 0;
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
        justify-content: center;
        align-items: center;
        box-sizing: border-box;
        overflow: hidden;
    }
    
    /* Adjust hero tiles for mobile */
    .hero-tile {
        width: 100%;
        height: auto;
        aspect-ratio: 99/83;
        flex-shrink: 0;
        margin: 0;
        box-sizing: border-box;
        max-width: 100%;
        overflow: hidden;
    }
    
    /* Ensure images fit within tiles without cropping */
    .hero-tile .hero-image {
        width: 100%;
        height: 100%;
        object-fit: contain;
        object-position: center;
    }
    
    /* Fix hover images on mobile to match desktop scaling */
    .hero-tile .hero-hover-image {
        width: 120%;
        height: 120%;
        object-fit: contain;
        object-position: center;
        position: absolute;
        top: -10%;
        left: -10%;
    }
    
    /* Adjust typography for mobile */
    .logo {
        width: 200px;
    }
    
    .eyebrow {
        font-size: 20px;
    }
    
    h1 {
        font-size: 32px;
        line-height: 1.2;
    }
    
    .strapline {
        font-size: 32px;
        line-height: 1.2;
    }
    
    .btn-play-now {
        font-size: 24px;
        padding: 14px 28px;
    }
    
    /* Adjust container padding */
    .container {
        padding: 0 16px;
    }
    
    /* Adjust header spacing */
    .hero-header {
        padding: var(--spacing-lg) 0 var(--spacing-md) 0;
    }
    
    /* Add bottom spacing for mobile to account for popup footer */
    .main-content {
        padding-bottom: 120px;
    }
}

/* Tablet responsive breakpoint */
@media (min-width: 769px) and (max-width: 1024px) {
    .grid-container {
        max-width: 100%;
    }
    
    .hero-tile {
        margin: 5px;
    }
    
    .hero-tile {
        width: 90px;
        height: 90px;
    }
    
    .logo {
        width: 240px;
    }
    
    .eyebrow {
        font-size: 24px;
    }
    
    h1 {
        font-size: 40px;
    }
    
    .strapline {
        font-size: 40px;
    }
}

/* Larger grid on bigger screens */
@media (min-width: 1440px) {
    .grid-container {
        max-width: 1400px;
    }
    
    .hero-tile {
        width: 105px;
        height: 105px;
        margin: 6px;
    }
    
    .logo {
        width: 280px;
    }
    
    .eyebrow {
        font-size: 28px;
    }
    
    h1 {
        font-size: 52px;
    }
    
    .strapline {
        font-size: 52px;
    }
    
    .btn-play-now {
        font-size: 32px;
        padding: 16px 32px;
    }
    
    /* Standardized spacing for larger screens */
    .hero-header {
        padding: calc(var(--spacing-xl) * 1.5) 0 0 0;
    }
    
    .main-content {
        padding: 0 0 calc(var(--spacing-xl) * 1.5) 0;
    }
    
    .hero-grid {
        margin-bottom: var(--spacing-md);
    }
}

@media (min-width: 1920px) {
    .grid-container {
        max-width: 1600px;
    }
    
    .hero-tile {
        width: 100px;
        height: 100px;
        margin: 5px;
    }
    
    .logo {
        width: 300px;
    }
    
    .eyebrow {
        font-size: 30px;
    }
    
    h1 {
        font-size: 58px;
    }
    
    .strapline {
        font-size: 58px;
    }
    
    .btn-play-now {
        font-size: 36px;
        padding: 18px 36px;
    }
    
    /* Standardized spacing for larger screens */
    .hero-header {
        padding: calc(var(--spacing-xl) * 2) 0 0 0;
    }
    
    .main-content {
        padding: 0 0 calc(var(--spacing-xl) * 2) 0;
    }
    
    .hero-grid {
        margin-bottom: var(--spacing-md);
    }
}

@media (min-width: 2560px) {
    :root {
        --max-width: 1800px;
    }
    
    .grid-container {
        max-width: 1800px;
    }
    
    .hero-tile {
        width: 120px;
        height: 120px;
        margin: 8px;
    }
    
    .logo {
        width: 400px;
    }
    
    .eyebrow {
        font-size: 40px;
    }
    
    h1 {
        font-size: 80px;
    }
    
    .strapline {
        font-size: 100px;
        margin: calc(var(--spacing-xl) * 1) 0;
        line-height: 1.1;
    }
    
    .btn-play-now {
        font-size: 50px;
        padding: 25px 50px;
    }
    
    /* Standardized spacing for larger screens */
    .hero-header {
        padding: calc(var(--spacing-xl) * 2.5) 0 0 0;
    }
    
    .main-content {
        padding: 0 0 calc(var(--spacing-xl) * 2.5) 0;
    }
    
    .hero-grid {
        margin-bottom: var(--spacing-md);
    }
    
    .hero-key-overlay {
        left: -160px;
        background-position: center;
    }
}

@media (min-width: 3840px) {
    :root {
        --max-width: 2000px;
    }
    
    .grid-container {
        max-width: 2000px;
    }
    
    .hero-tile {
        width: 180px;
        height: 180px;
        margin: 15px;
    }
    
    .logo {
        width: 600px;
    }
    
    .eyebrow {
        font-size: 60px;
    }
    
    h1 {
        font-size: 120px;
    }
    
    .strapline {
        font-size: 200px;
        margin: calc(var(--spacing-xl) * 1) 0;
        line-height: 1.1;
    }
    
    .btn-play-now {
        font-size: 70px;
        padding: 35px 70px;
    }
    
    /* Standardized spacing for larger screens */
    .hero-header {
        padding: calc(var(--spacing-xl) * 3) 0 0 0;
    }
    
    .main-content {
        padding: 0 0 calc(var(--spacing-xl) * 3) 0;
    }
    
    .hero-grid {
        margin-bottom: var(--spacing-md);
    }
}

.hero-tile {
    background: transparent;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: visible;
    transition: transform 0.1s ease-out, filter 0.1s ease-out;
    padding: 0;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    will-change: transform;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.3));
    transform-style: preserve-3d;
    perspective: 1000px;
    /* Subtle heartbeat animation like CTA button */
    animation: heroHeartbeat 3s ease-in-out infinite;
}

@keyframes heroHeartbeat {
    0%, 100% { 
        transform: scale(1);
    }
    15% { 
        transform: scale(1.02);
    }
    30% { 
        transform: scale(1);
    }
    45% { 
        transform: scale(1.02);
    }
    75% { 
        transform: scale(1);
    }
}

.hero-tile:hover,
.hero-tile:focus {
    /* Enhanced hover effect with glow like CTA button */
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.5)), drop-shadow(0 0 20px rgba(255, 197, 46, 0.3));
}

/* Selection styles removed since hero tiles are no longer clickable */

/* Hero tile hover background effect - removed since we handle it dynamically */

.hero-tile.pulse {
    animation: pulse 0.6s ease-in-out;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity;
    z-index: 0;
}

.hero-hover-image {
    width: 120%;
    height: 120%;
    object-fit: contain;
    object-position: center;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: absolute;
    top: -10%;
    left: -10%;
    opacity: 0;
    will-change: opacity;
    pointer-events: none;
    z-index: 1;
    display: block;
}

.hero-tile:hover .hero-image {
    opacity: 0;
}

.hero-tile:hover .hero-hover-image {
    opacity: 1 !important;
}



.hero-fallback {
    width: auto;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}



/* Strapline */
.strapline {
    text-align: center;
    font-weight: 900; /* HEAVY */
    font-size: clamp(32px, 5vh, 49px);
    color: var(--accent-gold);
    margin: 0;
    font-family: 'Refrigerator Deluxe', sans-serif;
    background: linear-gradient(221deg, #FC9F2D 12.57%, #FCD92D 48.82%, #FC9F2D 85.78%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    position: relative;
    z-index: 10;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
}



/* Responsive Design */
@media (max-width: 767px) {
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    .hero-header {
        padding: var(--spacing-lg) 0 0 0;
    }
    
    .grid-container {
        gap: 12px;
    }
    
    .strapline {
        font-size: 2rem;
        display: none;
    }
    
    .sticky-footer .container {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .sticky-footer .strapline {
        display: none;
    }
    
    .btn-play-now {
        width: 100%;
        padding: var(--spacing-sm) var(--spacing-md);
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2rem;
    }
}

/* Mobile popup footer */
.mobile-popup-footer {
    position: fixed;
    bottom: -100%;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.3), 0 4px 20px rgba(0, 0, 0, 0.2);
    padding: var(--spacing-md) 0;
    transition: bottom 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
    display: none;
}

.mobile-popup-footer.show {
    bottom: 0;
}

.popup-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 16px;
    text-align: center;
}

.popup-strapline {
    font-weight: 900;
    font-size: 24px;
    color: var(--accent-gold);
    margin-bottom: var(--spacing-sm);
    font-family: 'Refrigerator Deluxe', sans-serif;
    background: linear-gradient(221deg, #FC9F2D 12.57%, #FCD92D 48.82%, #FC9F2D 85.78%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.popup-cta {
    font-size: 20px;
    padding: 12px 24px;
}

/* Show popup footer only on mobile */
@media (max-width: 768px) {
    .mobile-popup-footer {
        display: block;
    }
}

@media (min-width: 769px) {
    .mobile-popup-footer {
        display: none;
    }
}

/* Cookie Notice */
#cookie-notice {
  bottom: 0;
  right: 0;
  left: 0;
  display: flex;
  background-color: rgba(0,0,0,0.7);
  height: 30px;
  z-index: 1000;
  position: fixed;
  transform: translateY(50px);
  transition: transform 0.3s ease-in-out;
}

#cookie-notice #exit {
  position: absolute;
  right: .5em;
  top: -3px;
  cursor: pointer;
  max-width: 30px;
  background: none;
  border: none;
}

#cookie-notice #exit span {
  color: white;
  font-size: 30px;
}

#cookie-notice .notice-wrapper {
  width: 100%;
  text-align: center;
  margin: 0 10px;
  align-items: center;
  justify-content: center;
  display: flex;
}

#cookie-notice .notice-wrapper p,
#cookie-notice .notice-wrapper a {
  text-align: center;
  font-family: Arial, sans-serif !important;
  font-size: 14px;
  color: white;
}

#cookie-notice.opened-item {
  transform: translateY(0);
}
