/* reset.css via https://www.joshwcomeau.com/css/custom-css-reset/ */
/* 1. Use a more-intuitive box-sizing model */
*,
*::before,
*::after {
    box-sizing: border-box;
}

/* 2. Remove default margin */
* {
    margin: 0;
}

/* 3. Enable keyword animations */
@media (prefers-reduced-motion: no-preference) {
    html {
        interpolate-size: allow-keywords;
    }
}

body {
    /* 4. Add accessible line-height */
    line-height: 1.5;
    /* 5. Improve text rendering */
    -webkit-font-smoothing: antialiased;
}

/* 6. Improve media defaults */
img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
}

/* 7. Inherit fonts for form controls */
input,
button,
textarea,
select {
    font: inherit;
}

/* 8. Avoid text overflows */
p,
h1,
h2,
h3,
h4,
h5,
h6 {
    overflow-wrap: break-word;
}

/* 9. Improve line wrapping */
p {
    text-wrap: pretty;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    text-wrap: balance;
}

/* 10. Create a root stacking context */
#root,
#__next {
    isolation: isolate;
}

/* CSS Variables */
:root {
    --hero-right-from-center: 5%;
    --bg-position-x: 50%;
    --bg-position-y: 35%;
}

@media (min-aspect-ratio: 16/9) {
    :root {
        --hero-right-from-center: 10%;
        --bg-position-x: 55%;
        --bg-position-y: 30%;
    }
}

@media (min-aspect-ratio: 21/9) {
    :root {
        --hero-right-from-center: 15%;
        --bg-position-x: 60%;
        --bg-position-y: 30%;
    }
}

/* Base Layout */
html,
body {
    height: 100%;
    min-height: 100vh;
    min-height: -webkit-fill-available;
    overflow: hidden;
    overscroll-behavior: none;
}

body {
    background-image: url("/img/nec-gt4-p1-p2-lockout.png");
    background-position: var(--bg-position-x) var(--bg-position-y);
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.main-container {
    position: relative;
    height: 100vh;
    height: -webkit-fill-available;
    min-height: 100%;
    padding: 20px;
    width: 100%;
    overflow: hidden;
}

/* Hero Component */
.hero {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.92) 50%, rgba(248, 250, 252, 0.95) 100%),
        linear-gradient(45deg, rgba(59, 130, 246, 0.03) 0%, rgba(147, 51, 234, 0.02) 100%);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.12),
        0 8px 16px rgba(0, 0, 0, 0.08),
        0 2px 4px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.6),
        inset 0 0 20px rgba(255, 255, 255, 0.1);
    padding: 35px 25px;
    border-radius: 20px;
    font-weight: 600;
    text-align: center;
    position: absolute;
    right: calc(50% + var(--hero-right-from-center));
    bottom: 20%;
    width: auto;
    transform: translateZ(0) perspective(1000px);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(255, 255, 255, 0.1) 50%, transparent 100%);
    border-radius: 20px;
    pointer-events: none;
}

.hero h1,
.hero h2 {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.hero h1 {
    margin-bottom: 0;
}

.hero h2 {
    font-weight: 500;
}

/* Utility Classes */
.pt-20 {
    padding-top: 20px;
}

.pt-40 {
    padding-top: 40px;
}

.signup {
    font-weight: 600;
    text-decoration: underline;
}

/* Footer */
#footer {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 12px 16px;
    border-radius: 12px;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    width: max-content;
    max-width: calc(100% - 32px);
    white-space: nowrap;
}

#footer a {
    color: #ffffff;
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.7);
    transition: all 0.2s ease;
}

#footer a:hover {
    color: #f0f0f0;
    text-decoration-color: #ffffff;
}

.lemons-icon {
    height: 16px;
    width: 16px;
    display: inline-block;
    margin-right: 6px;
    vertical-align: middle;
    filter: brightness(1.1) contrast(1.1);
    transition: transform 0.2s ease;
}

#footer a:hover .lemons-icon {
    transform: scale(1.1);
}

/* Responsive Design */

/* Tablet and smaller desktop */
@media (max-width: 1024px) {
    :root {
        --hero-right-from-center: 5%;
        --bg-position-x: 50%;
        --bg-position-y: 30%;
    }
    
    body {
        background-image: url("/img/nec-gt4-cropped-1024-lossless.webp");
    }
    
    .hero {
        right: auto;
        left: 50%;
        transform: translateX(-50%);
        bottom: auto;
        top: 10vh;
        max-width: 500px;
    }
}

/* Narrow desktop windows */
@media (max-width: 900px) and (min-height: 900px) and (pointer: fine) {
    .hero {
        top: 5vh;
        width: 90%;
    }
}

/* Mobile devices */
@media (max-width: 768px) and (pointer: coarse) {
    :root {
        --hero-right-from-center: 0;
        --bg-position-x: 50%;
        --bg-position-y: 50%;
    }
    
    body {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100vh;
        height: -webkit-fill-available;
        -webkit-overflow-scrolling: touch;
    }
    
    .main-container {
        padding: 10px;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
    }
    
    .hero {
        right: auto;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        bottom: auto;
        width: 92%;
        max-width: 400px;
        padding: 25px 20px;
        border-radius: 16px;
    }
    
    .hero h1 {
        font-size: 1.75rem;
        line-height: 1.2;
    }
    
    .hero h2 {
        font-size: 1.25rem;
        line-height: 1.3;
    }
    
    #footer {
        position: fixed;
        bottom: 10px;
    }
}

/* Small mobile screens */
@media (max-width: 480px) {
    :root {
        --bg-position-y: 45%;
    }
    
    body {
        position: fixed;
        width: 100%;
    }
    
    .hero {
        padding: 22px 18px;
        border-radius: 14px;
    }
    
    .hero h1 {
        font-size: 1.6rem;
        margin-bottom: 8px;
    }
    
    .hero h2 {
        font-size: 1.15rem;
        line-height: 1.35;
    }
    
    .pt-20 {
        padding-top: 15px;
    }
    
    .pt-40 {
        padding-top: 30px;
    }
    
    #footer {
        padding: 8px 10px;
        max-width: calc(100% - 20px);
        white-space: normal;
        line-height: 1.3;
        bottom: 8px;
        border-radius: 10px;
    }
    
    #footer p {
        font-size: 0.85rem;
    }
    
    .lemons-icon {
        height: 14px;
        width: 14px;
        margin-right: 4px;
    }
}