/* ==========================================================================
   FULL LIFE CARD - CRITICAL CSS
   Above-the-fold styles for optimal performance
   ========================================================================== */

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    line-height: var(--line-height-normal);
    -webkit-text-size-adjust: 100%;
    -moz-tab-size: 4;
    tab-size: 4;
    scroll-behavior: smooth;
    font-feature-settings: 'kern' 1, 'liga' 1, 'calt' 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Respect user preferences */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

body {
    margin: 0;
    font-family: var(--font-family-primary);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-normal);
    color: var(--color-gray-800);
    background: var(--color-primary-dark);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Typography reset */
h1, h2, h3, h4, h5, h6 {
    margin: 0;
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    color: inherit;
}

p, ul, ol, dl {
    margin: 0;
}

img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
    border-style: none;
}

/* Form elements */
button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    margin: 0;
}

button, [type="button"], [type="reset"], [type="submit"] {
    -webkit-appearance: button;
    cursor: pointer;
}

button:disabled, [disabled] {
    cursor: not-allowed;
    opacity: 0.6;
}

/* Focus styles */
:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

:focus:not(:focus-visible) {
    outline: none;
}

/* ==========================================================================
   UTILITY CLASSES
   ========================================================================== */

/* Screen reader only */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.sr-only-focusable:focus {
    position: static !important;
    width: auto !important;
    height: auto !important;
    padding: inherit !important;
    margin: inherit !important;
    overflow: visible !important;
    clip: auto !important;
    white-space: normal !important;
}

/* Container */
.container {
    width: 100%;
    max-width: var(--max-width-7xl);
    margin: 0 auto;
    padding-left: var(--space-4);
    padding-right: var(--space-4);
}

@media (min-width: 640px) {
    .container {
        padding-left: var(--space-6);
        padding-right: var(--space-6);
    }
}

@media (min-width: 1024px) {
    .container {
        padding-left: var(--space-8);
        padding-right: var(--space-8);
    }
}

/* Loading animation */
.loading {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s var(--ease-out) forwards;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Skip link */
.skip-link {
    position: absolute;
    top: -60px;
    left: var(--space-4);
    background: var(--color-primary);
    color: var(--color-white);
    padding: var(--space-3) var(--space-6);
    text-decoration: none;
    font-weight: var(--font-weight-semibold);
    border-radius: var(--radius-md);
    z-index: var(--z-tooltip);
    transition: top var(--transition-fast);
    font-size: var(--font-size-sm);
}

.skip-link:focus {
    top: var(--space-4);
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero {
    min-height: 100vh;
    min-height: 100svh; /* Support for newer viewport units */
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
    display: flex;
    align-items: center;
    padding: var(--space-20) 0;
    position: relative;
    overflow: hidden;
}

/* Subtle background pattern */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(255, 215, 0, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-16);
    align-items: center;
    position: relative;
    z-index: 1;
}

@media (min-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1.2fr 1fr;
        gap: var(--space-20);
    }
}

/* Hero Text */
.hero-text {
    text-align: center;
}

@media (min-width: 1024px) {
    .hero-text {
        text-align: left;
    }
}

.hero-title {
    font-size: var(--font-size-4xl);
    color: var(--color-white);
    margin-bottom: var(--space-6);
    font-weight: var(--font-weight-extrabold);
    line-height: var(--line-height-tight);
    letter-spacing: var(--letter-spacing-tight);
}

@media (min-width: 640px) {
    .hero-title {
        font-size: var(--font-size-5xl);
    }
}

@media (min-width: 1024px) {
    .hero-title {
        font-size: var(--font-size-6xl);
    }
}

.hero-title .gold {
    color: var(--color-secondary);
    position: relative;
}

.hero-title .gold::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-secondary), var(--color-secondary-light));
    border-radius: var(--radius-full);
    opacity: 0.7;
}

.hero-subtitle {
    font-size: var(--font-size-lg);
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--space-8);
    line-height: var(--line-height-relaxed);
    max-width: 42rem;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 640px) {
    .hero-subtitle {
        font-size: var(--font-size-xl);
    }
}

@media (min-width: 1024px) {
    .hero-subtitle {
        margin-left: 0;
    }
}

/* Price Box */
.price-box {
    display: inline-flex;
    align-items: center;
    gap: var(--space-5);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: var(--space-4) var(--space-8);
    border-radius: var(--radius-full);
    margin-bottom: var(--space-8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.price-box::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, 
        rgba(255, 255, 255, 0.1) 0%, 
        transparent 25%, 
        transparent 75%, 
        rgba(255, 215, 0, 0.1) 100%);
    pointer-events: none;
}

.old-price {
    font-size: var(--font-size-xl);
    color: #ff6b6b;
    text-decoration: line-through;
    font-weight: var(--font-weight-medium);
    position: relative;
}

.new-price {
    font-size: var(--font-size-4xl);
    color: var(--color-secondary);
    font-weight: var(--font-weight-extrabold);
    text-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

@media (min-width: 640px) {
    .old-price {
        font-size: var(--font-size-2xl);
    }
    
    .new-price {
        font-size: var(--font-size-5xl);
    }
}

/* CTA Button */
.cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-secondary-light) 100%);
    color: var(--color-primary);
    padding: var(--space-5) var(--space-10);
    border-radius: var(--radius-full);
    text-decoration: none;
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-bold);
    transition: all var(--transition-base);
    box-shadow: var(--shadow-gold);
    position: relative;
    overflow: hidden;
    border: none;
    cursor: pointer;
    min-height: var(--button-height-base);
    white-space: nowrap;
}

.cta-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.2) 0%, 
        transparent 50%, 
        rgba(255, 255, 255, 0.1) 100%);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.cta-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(255, 255, 255, 0.4), 
        transparent);
    transition: left var(--transition-slow);
}

.cta-btn:hover::before {
    opacity: 1;
}

.cta-btn:hover::after {
    left: 100%;
}

.cta-btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 12px 32px rgba(255, 215, 0, 0.4);
}

.cta-btn:active {
    transform: translateY(0) scale(1);
}

.cta-btn:focus {
    outline: 3px solid rgba(255, 215, 0, 0.5);
    outline-offset: 2px;
}

@media (min-width: 640px) {
    .cta-btn {
        font-size: var(--font-size-xl);
        padding: var(--space-6) var(--space-12);
        min-height: var(--button-height-lg);
    }
}

/* Arrow animation */
.cta-btn .arrow {
    transition: transform var(--transition-base);
}

.cta-btn:hover .arrow {
    transform: translateX(4px);
}

/* ==========================================================================
   CARD 3D CONTAINER
   ========================================================================== */
.card-container {
    perspective: 1200px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    user-select: none;
}

.card-3d {
    width: 100%;
    max-width: 400px;
    aspect-ratio: var(--aspect-card);
    position: relative;
    transform-style: preserve-3d;
    transition: transform var(--transition-slow);
    cursor: pointer;
    filter: drop-shadow(var(--shadow-card));
}

.card-3d:hover {
    transform: rotateY(8deg) rotateX(4deg) scale(1.05);
    filter: drop-shadow(var(--shadow-card-hover));
}

@media (max-width: 767px) {
    .card-3d {
        max-width: 320px;
    }
}

/* Touch interactions for mobile */
@media (hover: none) and (pointer: coarse) {
    .card-3d:active {
        transform: rotateY(4deg) rotateX(2deg) scale(1.02);
    }
}

/* Full Life Card */
.full-life-card {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        var(--color-primary) 0%, 
        var(--color-primary-light) 50%,
        var(--color-primary) 100%);
    border-radius: var(--radius-2xl);
    padding: var(--space-8);
    position: relative;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Card shine effect */
.full-life-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        from 0deg,
        transparent 0deg,
        rgba(255, 215, 0, 0.1) 90deg,
        rgba(255, 255, 255, 0.1) 180deg,
        rgba(255, 215, 0, 0.05) 270deg,
        transparent 360deg
    );
    animation: cardShine 4s linear infinite;
    pointer-events: none;
}

@keyframes cardShine {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Card logo */
.card-logo {
    width: 48px;
    height: 48px;
    background: radial-gradient(circle, 
        var(--color-secondary) 0%, 
        #52c7ea 35%, 
        var(--color-success) 70%);
    border-radius: 50%;
    position: absolute;
    right: var(--space-8);
    top: var(--space-8);
    z-index: 2;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

@media (max-width: 767px) {
    .card-logo {
        width: 36px;
        height: 36px;
        right: var(--space-6);
        top: var(--space-6);
    }
}

/* Card title */
.card-title {
    font-size: var(--font-size-2xl);
    color: var(--color-secondary);
    font-weight: var(--font-weight-extrabold);
    margin-bottom: var(--space-12);
    z-index: 2;
    position: relative;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: var(--letter-spacing-wide);
}

.card-title .white {
    color: var(--color-white);
}

@media (max-width: 767px) {
    .card-title {
        font-size: var(--font-size-xl);
        margin-bottom: var(--space-8);
    }
}

/* Card details */
.card-details {
    position: absolute;
    bottom: var(--space-8);
    left: var(--space-8);
    z-index: 2;
}

@media (max-width: 767px) {
    .card-details {
        bottom: var(--space-6);
        left: var(--space-6);
    }
}

.card-name {
    color: var(--color-white);
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--space-1);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.card-code {
    color: rgba(255, 255, 255, 0.8);
    font-size: var(--font-size-sm);
    letter-spacing: var(--letter-spacing-wider);
    font-family: var(--font-family-mono);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

@media (max-width: 767px) {
    .card-name {
        font-size: var(--font-size-base);
    }
    
    .card-code {
        font-size: var(--font-size-xs);
    }
}

/* ==========================================================================
   FLOATING FEATURES
   ========================================================================== */
.features-float {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.feature-bubble {
    position: absolute;
    background: var(--color-white);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    animation: float 3s ease-in-out infinite;
    border: 1px solid rgba(0, 61, 122, 0.1);
    backdrop-filter: blur(8px);
}

@keyframes float {
    0%, 100% { 
        transform: translateY(0) rotate(0deg); 
    }
    33% { 
        transform: translateY(-8px) rotate(1deg); 
    }
    66% { 
        transform: translateY(-4px) rotate(-1deg); 
    }
}

.feature-bubble.b1 {
    top: 15%;
    left: -12px;
    animation-delay: 0s;
}

.feature-bubble.b2 {
    top: 45%;
    right: -12px;
    animation-delay: 1s;
}

.feature-bubble.b3 {
    bottom: 20%;
    left: -8px;
    animation-delay: 2s;
}

@media (max-width: 1023px) {
    .feature-bubble {
        display: none;
    }
}

.feature-bubble .icon {
    font-size: var(--font-size-xl);
    margin-bottom: var(--space-1);
    display: block;
    text-align: center;
}

.feature-bubble .text {
    font-weight: var(--font-weight-semibold);
    color: var(--color-primary);
    font-size: var(--font-size-sm);
    text-align: center;
    white-space: nowrap;
}

/* ==========================================================================
   PERFORMANCE OPTIMIZATIONS
   ========================================================================== */

/* GPU acceleration for animations */
.card-3d,
.cta-btn,
.feature-bubble {
    will-change: transform;
}

/* Contain layout changes */
.hero {
    contain: layout style paint;
}

.card-container {
    contain: layout style;
}

/* Optimize repaints */
.full-life-card::before {
    contain: strict;
}

/* ==========================================================================
   ACCESSIBILITY ENHANCEMENTS
   ========================================================================== */

/* Focus indicators */
.card-3d:focus {
    outline: 3px solid var(--color-secondary);
    outline-offset: 4px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .hero {
        background: #000066;
    }
    
    .full-life-card {
        background: #000066;
        border: 3px solid #ffffff;
    }
    
    .hero-title .gold {
        color: #ffff00;
    }
    
    .cta-btn {
        background: #ffff00;
        color: #000000;
        border: 2px solid #000000;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .full-life-card::before {
        animation: none;
    }
    
    .feature-bubble {
        animation: none;
    }
    
    .card-3d:hover {
        transform: scale(1.02);
    }
    
    .cta-btn:hover {
        transform: none;
    }
}
