/* Landing Page Styles */

.hero {
    background: linear-gradient(135deg, var(--accent-teal) 0%, var(--accent-gold) 100%);
    background-size: 200% 200%;
    animation: gradientShift 15s ease infinite;
    color: white;
    padding: 80px 0 120px 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    gap: 60px;
}

.hero-content {
    text-align: center;
    width: 100%;
    z-index: 2;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.hero-content h1 {
    font-family: var(--font-family-heading);
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: var(--font-weight-extrabold);
    margin-bottom: 24px;
    animation: fadeInUp 1s ease-out;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    letter-spacing: -0.03em;
    line-height: var(--line-height-tight);
    position: relative;
    display: inline-block;
    width: 100%;
    text-align: center;
}

.title-with-suits {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5em;
    margin: 0 auto;
}

.suit-decoration {
    font-size: 0.6em;
    opacity: 0.8;
    display: inline-block;
    animation: suitBlink 3s ease-in-out infinite;
    filter: drop-shadow(0 2px 8px rgba(255, 255, 255, 0.3));
}

.suit-spade {
    animation-delay: 0s;
    color: #ffffff;
}

.suit-heart {
    animation-delay: 0.75s;
    color: #ff6b9d;
}

.suit-diamond {
    animation-delay: 1.5s;
    color: #ff6b9d;
}

.suit-club {
    animation-delay: 2.25s;
    color: #ffffff;
}

@keyframes suitBlink {
    0%, 100% {
        opacity: 0.4;
        transform: scale(0.95);
        filter: drop-shadow(0 2px 8px rgba(255, 255, 255, 0.2));
    }
    25% {
        opacity: 0.7;
        transform: scale(1.05);
        filter: drop-shadow(0 2px 12px rgba(255, 255, 255, 0.4));
    }
    50% {
        opacity: 1;
        transform: scale(1.15);
        filter: drop-shadow(0 4px 16px rgba(255, 255, 255, 0.6));
    }
    75% {
        opacity: 0.7;
        transform: scale(1.05);
        filter: drop-shadow(0 2px 12px rgba(255, 255, 255, 0.4));
    }
}

.hero-content p {
    font-size: clamp(1.125rem, 2vw, 1.375rem);
    margin-bottom: 48px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 1s ease-out 0.2s both;
    opacity: 0.95;
    font-weight: var(--font-weight-normal);
    max-width: 600px;
    line-height: var(--line-height-relaxed);
    letter-spacing: -0.01em;
    text-align: center;
}

.hero-buttons {
    animation: fadeInUp 1s ease-out 0.4s both;
}

.features {
    padding: 100px 0;
    background: var(--background-primary);
    backdrop-filter: blur(10px);
}

.features h2 {
    font-family: var(--font-family-heading);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: var(--font-weight-bold);
    text-align: center;
    margin-bottom: 60px;
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
    line-height: var(--line-height-tight);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
    margin-top: 40px;
}

.feature-list {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    gap: 24px;
    justify-content: center;
    align-items: stretch;
}

.feature-item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 20px;
    border-radius: 12px;
    background: var(--container-primary);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid var(--border-subtle);
    flex: 1;
    max-width: 280px;
    aspect-ratio: 5 / 7; /* Playing card aspect ratio (2.5" x 3.5") */
}

.feature-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border-color: rgba(0, 0, 0, 0.2);
}

.feature-suit-corner {
    position: absolute;
    font-size: 2rem;
    line-height: 1;
    font-weight: bold;
}

.feature-suit-corner.top-left {
    top: 12px;
    left: 12px;
}

.feature-suit-corner.bottom-right {
    bottom: 12px;
    right: 12px;
    transform: rotate(180deg);
}

/* Suit colors - red for hearts and diamonds, black for spades and clubs */
.feature-card-spade .feature-suit-corner {
    color: #000000;
}

.feature-card-heart .feature-suit-corner {
    color: #dc2626;
}

.feature-card-diamond .feature-suit-corner {
    color: #dc2626;
}

.feature-card-club .feature-suit-corner {
    color: #000000;
}

.feature-item p {
    margin: 0;
    color: var(--text-secondary);
    line-height: var(--line-height-relaxed);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal);
    letter-spacing: -0.01em;
    text-align: center;
    max-width: 85%;
    z-index: 1;
    padding: 0 8px;
}

.feature-card {
    padding: 40px 32px;
    border-radius: 20px;
    background: var(--container-primary);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(30, 127, 122, 0.15);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-subtle);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-gold) 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 16px 48px rgba(30, 127, 122, 0.25);
    border-color: var(--accent-secondary);
}

.feature-card h3 {
    font-family: var(--font-family-heading);
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    margin-bottom: 12px;
    color: var(--text-primary);
    letter-spacing: -0.01em;
    line-height: var(--line-height-snug);
}

.feature-card p {
    color: var(--text-secondary);
    line-height: var(--line-height-relaxed);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal);
    letter-spacing: -0.01em;
}

.feature-icon {
    font-size: 3.5rem;
    margin-bottom: 24px;
    display: inline-block;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.card-suits {
    font-size: 2.5rem;
    line-height: 1.2;
    animation: float 3s ease-in-out infinite;
}

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

.app-store-badge {
    display: inline-block;
    margin-top: 20px;
}

.app-store-badge img {
    height: 60px;
}

.testflight-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--accent-primary);
    border-radius: 12px;
    text-decoration: none;
    font-weight: var(--font-weight-semibold);
    font-size: var(--font-size-lg);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    margin-top: 20px;
}

.testflight-button:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.testflight-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.testflight-button svg {
    flex-shrink: 0;
}

/* 3D Device Carousel */
.hero-device-carousel {
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 2000px;
    perspective-origin: center center;
    height: 600px;
    width: 100%;
    margin-top: 40px;
    position: relative;
    z-index: 1;
}

.device-carousel-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: visible;
}

.device-carousel {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    overflow: visible;
}

.device-item {
    position: absolute;
    left: 50%;
    top: 50%;
    transform-style: preserve-3d;
    transform-origin: center center;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, opacity;
    opacity: 0;
    visibility: hidden;
}

/* Prevent transitions on display/visibility to avoid Safari rendering issues */
.device-item[style*="display: none"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    transition: none !important;
    pointer-events: none !important;
}

.iphone-frame {
    position: relative;
    width: 280px;
    height: 606px;
    background: #1a1a1a;
    border-radius: 40px;
    padding: 10px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4),
                0 0 0 2px rgba(255, 255, 255, 0.1) inset,
                0 0 40px rgba(0, 0, 0, 0.6);
    transform-style: preserve-3d;
}

/* Dynamic Island */
.iphone-frame::before {
    content: '';
    position: absolute;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 30px;
    background: #000;
    border-radius: 15px;
    z-index: 10;
}

/* Screen Area */
.iphone-screen {
    width: 100%;
    height: 100%;
    background: #000;
    border-radius: 32px;
    overflow: hidden;
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    pointer-events: none;
}

.iphone-screen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    pointer-events: none;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-container {
        gap: 40px;
    }
    
    .hero-content {
        text-align: center;
    }
    
    .hero-content p {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-device-carousel {
        height: 500px;
        margin-top: 20px;
    }
    
    .iphone-frame {
        width: 240px;
        height: 520px;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 60px 0 80px 0;
    }
    
    .hero-container {
        gap: 30px;
    }
    
    .hero-device-carousel {
        height: 400px;
        margin-top: 20px;
    }
    
    .iphone-frame {
        width: 200px;
        height: 433px;
        border-radius: 32px;
        padding: 8px;
    }
    
    .iphone-frame::before {
        width: 80px;
        height: 24px;
        top: 12px;
        border-radius: 12px;
    }
    
    .iphone-screen {
        border-radius: 26px;
    }
    
    .feature-list {
        flex-direction: column;
        gap: 16px;
        max-width: 400px;
    }
    
    .feature-item {
        padding: 20px 16px;
        max-width: 100%;
        aspect-ratio: 5 / 7;
    }
    
    .feature-suit-corner {
        font-size: 1.75rem;
    }
    
    .feature-suit-corner.top-left {
        top: 10px;
        left: 10px;
    }
    
    .feature-suit-corner.bottom-right {
        bottom: 10px;
        right: 10px;
    }
    
    .feature-item p {
        font-size: var(--font-size-sm);
        max-width: 80%;
    }
    
    .suit-decoration {
        font-size: 0.5em;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .features {
        background: var(--background-primary);
    }
    
    .features h2 {
        background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-gold) 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }
    
    .feature-card {
        background: var(--container-primary);
        border-color: var(--border-subtle);
        color: var(--text-primary);
    }
    
    .feature-card h3 {
        color: var(--text-primary);
    }
    
    .feature-card p {
        color: var(--text-secondary);
    }
    
    .feature-card:hover {
        box-shadow: 0 16px 48px rgba(58, 175, 169, 0.3);
        border-color: var(--accent-secondary);
        background: var(--container-primary);
    }
    
    .feature-item {
        background: var(--container-primary);
        border-color: var(--border-subtle);
    }
    
    .feature-item:hover {
        background: var(--container-primary);
        border-color: var(--accent-teal);
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    }
    
    .feature-item p {
        color: var(--text-secondary);
    }
    
    /* Keep suit colors the same in dark mode */
    .feature-card-spade .feature-suit-corner,
    .feature-card-club .feature-suit-corner {
        color: #ffffff;
    }
    
    .feature-card-heart .feature-suit-corner,
    .feature-card-diamond .feature-suit-corner {
        color: #ff6b6b;
    }
}
