/* ============================================
   REKON.LIVING - Coming Soon Landing Page
   Font: Fredoka | Colors: Trust Blue #1A73E8
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    font-family: 'Fredoka', sans-serif;
    background: url('backdrop.jpg') no-repeat center center fixed;
    background-size: cover;
    color: #333;
}

/* ============================================
   LANDING PAGE
   ============================================ */
#landing {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    text-align: center;
    padding: 40px 20px;
    max-width: 500px;
    margin: 0 auto;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.75) 0%, rgba(255, 255, 255, 0.55) 50%, rgba(255, 255, 255, 0.65) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2), inset 0 0 80px rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.logo {
    font-size: 3.5rem;
    font-weight: 700;
    color: #1A73E8;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(26, 115, 232, 0.2);
    animation: fadeInDown 0.8s ease-out;
}

#landing h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #444;
    margin-bottom: 10px;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.tagline {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 30px;
    max-width: 400px;
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   WAITLIST BENEFITS
   ============================================ */
.waitlist-benefits {
    background: linear-gradient(135deg, rgba(240, 247, 255, 0.85) 0%, rgba(232, 244, 253, 0.75) 100%);
    border-radius: 20px;
    padding: 25px 30px;
    margin-bottom: 25px;
    max-width: 380px;
    animation: fadeInUp 0.8s ease-out 0.5s both;
    border: 1px solid rgba(26, 115, 232, 0.25);
    box-shadow: 0 4px 20px rgba(26, 115, 232, 0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.cta-text {
    font-size: 1.15rem;
    color: #333;
    margin-bottom: 15px;
}

.cta-text strong {
    color: #1A73E8;
}

.benefits-list {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: left;
}

.benefits-list li {
    font-size: 0.95rem;
    color: #555;
    padding: 8px 0;
    padding-left: 28px;
    position: relative;
}

.benefits-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #138808;
    font-weight: bold;
    font-size: 1.1rem;
}

/* ============================================
   EMAIL FORM
   ============================================ */
#shortlist-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-bottom: 40px;
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

/* Honeypot field - hidden from humans, visible to bots */
#honeypot {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    width: 0;
    pointer-events: none;
}

#email {
    width: 300px;
    padding: 15px 20px;
    font-size: 1rem;
    font-family: 'Fredoka', sans-serif;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    outline: none;
    transition: all 0.3s ease;
}

#email:focus {
    border-color: #1A73E8;
    box-shadow: 0 0 0 4px rgba(26, 115, 232, 0.15);
}

#submit-btn {
    padding: 15px 40px;
    font-size: 1.1rem;
    font-family: 'Fredoka', sans-serif;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #1A73E8 0%, #0d5bba 100%);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(26, 115, 232, 0.3);
}

#submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 115, 232, 0.4);
}

#submit-btn:active {
    transform: translateY(0);
}

#submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

#form-message {
    font-size: 0.95rem;
    font-weight: 500;
    min-height: 24px;
}

#form-message.success {
    color: #138808;
}

#form-message.error {
    color: #d93025;
}

/* ============================================
   THE EGG - Indian Flag Colors
   ============================================ */
.egg-section {
    animation: fadeInUp 0.8s ease-out 0.8s both;
}

.egg-hint {
    font-size: 0.95rem;
    color: #888;
    margin-bottom: 15px;
}

#egg {
    width: 100px;
    height: 130px;
    margin: 0 auto;
    cursor: pointer;
    /* Abstract swirling design - NOT a flag representation */
    background:
        radial-gradient(ellipse at 30% 20%, #FF9933 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, #138808 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, #FFFFFF 0%, transparent 60%),
        radial-gradient(ellipse at 20% 70%, #FF9933 0%, transparent 40%),
        radial-gradient(ellipse at 80% 30%, #138808 0%, transparent 40%),
        linear-gradient(135deg, #FFF5E6 0%, #E8F5E9 100%);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    position: relative;
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.15),
        inset 0 -5px 15px rgba(0, 0, 0, 0.1),
        inset 0 5px 15px rgba(255, 255, 255, 0.5);
    transition: transform 0.1s;
    user-select: none;
    /* Subtle animated shimmer */
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {

    0%,
    100% {
        filter: brightness(1);
    }

    50% {
        filter: brightness(1.05);
    }
}

#egg:hover {
    transform: scale(1.02);
}

#egg:active {
    transform: scale(0.98);
}

/* Crack lines container */
#cracks {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none;
    border-radius: inherit;
    overflow: hidden;
}

/* Jagged crack line styles */
.crack-line {
    position: absolute;
    background: #222;
    transform-origin: center;
}

/* THE WOBBLE: Egg tilts on every click */
.wobble {
    animation: wobble 0.25s ease-in-out;
}

@keyframes wobble {
    0% {
        transform: rotate(0deg) scale(1);
    }

    25% {
        transform: rotate(-8deg) scale(1.05);
    }

    50% {
        transform: rotate(8deg) scale(1.08);
    }

    75% {
        transform: rotate(-5deg) scale(1.03);
    }

    100% {
        transform: rotate(0deg) scale(1);
    }
}

#click-counter {
    margin-top: 15px;
    font-size: 0.85rem;
    color: #999;
}

/* ============================================
   GAME VIEW - Full Screen Ruffle Player
   ============================================ */
#game-view {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: #000 !important;
    z-index: 9999 !important;
    display: flex;
    flex-direction: column;
}

#ruffle-player {
    flex: 1;
    width: 100vw !important;
    height: calc(100vh - 50px) !important;
    display: block;
    overflow: hidden;
}

/* Force Ruffle to fill container completely */
#ruffle-player ruffle-player,
#ruffle-player ruffle-embed,
#ruffle-player canvas,
#ruffle-player object,
#ruffle-player embed {
    width: 100vw !important;
    height: calc(100vh - 50px) !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: fill !important;
    display: block !important;
}

.game-controls {
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    background: #111;
    padding: 8px;
}

.game-controls button {
    padding: 12px 25px;
    font-size: 1rem;
    font-family: 'Fredoka', sans-serif;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #1A73E8 0%, #0d5bba 100%);
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.game-controls button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(26, 115, 232, 0.5);
}

/* ============================================
   RESPONSIVE - TABLET (768px and below)
   ============================================ */
@media (max-width: 768px) {
    #landing {
        padding: 30px 20px;
        max-width: 450px;
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0.6) 50%, rgba(255, 255, 255, 0.7) 100%);
        border-radius: 30px;
        margin: 20px auto;
        min-height: calc(100vh - 40px);
    }

    .logo {
        font-size: 2.8rem;
    }

    #landing h2 {
        font-size: 1.5rem;
    }

    .tagline {
        font-size: 1rem;
        padding: 0 20px;
    }

    .waitlist-benefits {
        padding: 20px 25px;
        margin: 0 15px 25px;
        max-width: 340px;
    }

    .cta-text {
        font-size: 1.05rem;
    }

    .benefits-list li {
        font-size: 0.9rem;
    }

    #email {
        width: 280px;
        padding: 12px 18px;
    }

    #submit-btn {
        padding: 12px 35px;
        font-size: 1rem;
    }

    #egg {
        width: 85px;
        height: 110px;
    }

    .game-controls {
        height: 55px;
        gap: 15px;
    }

    .game-controls button {
        padding: 10px 20px;
        font-size: 0.95rem;
    }
}

/* ============================================
   RESPONSIVE - MOBILE (480px and below)
   ============================================ */
@media (max-width: 480px) {
    #landing {
        padding: 25px 15px;
        min-height: calc(100vh - 30px);
        justify-content: flex-start;
        padding-top: 40px;
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.82) 0%, rgba(255, 255, 255, 0.65) 50%, rgba(255, 255, 255, 0.75) 100%);
        border-radius: 25px;
        margin: 15px;
        max-width: calc(100% - 30px);
    }

    .logo {
        font-size: 2.2rem;
        margin-bottom: 5px;
    }

    #landing h2 {
        font-size: 1.25rem;
        margin-bottom: 8px;
    }

    .tagline {
        font-size: 0.9rem;
        margin-bottom: 20px;
        padding: 0 10px;
    }

    .waitlist-benefits {
        padding: 18px 20px;
        margin: 0 10px 20px;
        max-width: 100%;
        border-radius: 15px;
    }

    .cta-text {
        font-size: 0.95rem;
        margin-bottom: 12px;
    }

    .benefits-list li {
        font-size: 0.85rem;
        padding: 6px 0;
        padding-left: 25px;
    }

    .benefits-list li::before {
        font-size: 1rem;
    }

    #shortlist-form {
        margin-bottom: 25px;
        width: 100%;
        padding: 0 10px;
    }

    #email {
        width: 100%;
        max-width: 280px;
        padding: 12px 16px;
        font-size: 0.95rem;
    }

    #submit-btn {
        padding: 12px 30px;
        font-size: 0.95rem;
    }

    .egg-section {
        margin-top: 10px;
    }

    .egg-hint {
        font-size: 0.85rem;
    }

    #egg {
        width: 75px;
        height: 100px;
    }

    #click-counter {
        font-size: 0.8rem;
    }

    /* Game View Mobile */
    #ruffle-player {
        height: calc(100vh - 55px) !important;
    }

    .game-controls {
        height: 55px;
        gap: 10px;
        padding: 5px 10px;
    }

    .game-controls button {
        padding: 8px 15px;
        font-size: 0.85rem;
        border-radius: 20px;
    }
}

/* ============================================
   RESPONSIVE - SMALL MOBILE (360px and below)
   ============================================ */
@media (max-width: 360px) {
    #landing {
        margin: 10px;
        max-width: calc(100% - 20px);
        border-radius: 20px;
        min-height: calc(100vh - 20px);
    }

    .logo {
        font-size: 1.9rem;
    }

    #landing h2 {
        font-size: 1.1rem;
    }

    .waitlist-benefits {
        padding: 15px 15px;
    }

    .cta-text {
        font-size: 0.9rem;
    }

    .benefits-list li {
        font-size: 0.8rem;
    }

    #email {
        font-size: 0.9rem;
    }

    #submit-btn {
        padding: 10px 25px;
        font-size: 0.9rem;
    }

    #egg {
        width: 65px;
        height: 85px;
    }

    .game-controls button {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
}

/* ============================================
   TOUCH DEVICE OPTIMIZATIONS
   ============================================ */
@media (hover: none) and (pointer: coarse) {

    /* Remove hover effects on touch devices */
    #submit-btn:hover,
    .game-controls button:hover {
        transform: none;
    }

    /* Make touch targets larger */
    #egg {
        min-width: 80px;
        min-height: 105px;
    }

    .game-controls button {
        min-height: 44px;
    }
}