@font-face {
    font-family: 'EurostileExtended';
    src: url('EurostileExtendedBlack.ttf') format('truetype');
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

:root {
    --bg-color: #000000;
    --text-main: #ffffff;
    --primary-orange: #ff6200;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    overflow-x: hidden;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
}

.logo {
    opacity: 0;
}
body.loaded .logo {
    animation: logoReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) 1.7s both;
}

.logo img {
    height: 50px;
    object-fit: contain;
}

nav ul li {
    opacity: 0;
}

body.loaded nav ul li:nth-child(1) { animation: navReveal 0.6s cubic-bezier(0.16, 1, 0.3, 1) 1.85s both; }
body.loaded nav ul li:nth-child(2) { animation: navReveal 0.6s cubic-bezier(0.16, 1, 0.3, 1) 2.00s both; }
body.loaded nav ul li:nth-child(3) { animation: navReveal 0.6s cubic-bezier(0.16, 1, 0.3, 1) 2.15s both; }
body.loaded nav ul li:nth-child(4) { animation: navReveal 0.6s cubic-bezier(0.16, 1, 0.3, 1) 2.30s both; }
body.loaded nav ul li:nth-child(5) { animation: navReveal 0.6s cubic-bezier(0.16, 1, 0.3, 1) 2.45s both; }

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

nav a {
    font-family: 'EurostileExtended', 'Impact', sans-serif;
    color: var(--text-main);
    text-decoration: none;
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: color 0.25s ease, letter-spacing 0.25s ease;
    position: relative;
    padding-bottom: 4px;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-orange);
    transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

nav a:hover {
    color: var(--primary-orange);
    letter-spacing: 0.14em;
}

nav a:hover::after {
    width: 100%;
}

/* Scroll Sequence Container */
#scroll-sequence {
    width: 100vw;
    height: 100vh;
    position: relative;
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    width: 100vw;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #000000;
}

/* Background Text Stack */
.hero-background-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100vw;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 0;
    pointer-events: none;
}

.text-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

/* Each row clips its text from the top, showing only the bottom slice */
.text-row {
    position: relative;
    overflow: hidden;
    width: 110vw;
    flex-shrink: 0;
}

/* Main row: h1 in normal flow, descender gap removed */
.text-main {
    display: flex;
    justify-content: center;
    overflow: visible;
    margin-bottom: -2.6vw;
}

/* Main h1: reveal animation */
.text-main h1 {
    opacity: 0;
}
body.loaded .text-main h1 {
    animation: bgTextReveal 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.5s forwards, waveMain 3s ease-in-out 2.5s infinite;
}

/* Shared text style */
.text-row h1,
.text-row span {
    font-family: 'EurostileExtended', 'Impact', sans-serif;
    font-size: 13vw;
    font-weight: 900;
    color: #ff6200;
    white-space: nowrap;
    letter-spacing: -22px;
    text-transform: uppercase;
    margin: 0;
    line-height: 1;
    flex-shrink: 0;
    display: block;
}

/* Echo spans: pinned so visual letter-bottom = container bottom */
/* bottom: -(font-size × 0.20) compensates for descender space */
.text-row span {
    position: absolute;
    bottom: -2.6vw;
    left: 50%;
    transform: translateX(-50%);
}

/* Echo row heights + staggered reveal animations */
.echo-1 { height: 3.2vw;  --fo: 0.72; opacity: 0; }
.echo-2 { height: 2.0vw;  --fo: 0.52; opacity: 0; }
.echo-3 { height: 1.2vw;  --fo: 0.33; opacity: 0; }
.echo-4 { height: 0.7vw;  --fo: 0.18; opacity: 0; }
.echo-5 { height: 0.35vw; --fo: 0.08; opacity: 0; }

body.loaded .hero-background-text .echo-1 { animation: echoReveal 0.35s ease 1.10s both; }
body.loaded .hero-background-text .echo-2 { animation: echoReveal 0.35s ease 1.25s both; }
body.loaded .hero-background-text .echo-3 { animation: echoReveal 0.35s ease 1.40s both; }
body.loaded .hero-background-text .echo-4 { animation: echoReveal 0.35s ease 1.55s both; }
body.loaded .hero-background-text .echo-5 { animation: echoReveal 0.35s ease 1.70s both; }

/* Sequential flash wave for the text elements (starts after reveal) */
body.loaded .hero-background-text .echo-1 span { animation: waveEcho 3s ease-in-out 2.75s infinite; }
body.loaded .hero-background-text .echo-2 span { animation: waveEcho 3s ease-in-out 3.00s infinite; }
body.loaded .hero-background-text .echo-3 span { animation: waveEcho 3s ease-in-out 3.25s infinite; }
body.loaded .hero-background-text .echo-4 span { animation: waveEcho 3s ease-in-out 3.50s infinite; }
body.loaded .hero-background-text .echo-5 span { animation: waveEcho 3s ease-in-out 3.75s infinite; }

/* Hero Descriptions */
.hero-desc {
    position: absolute;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    color: #888;
    line-height: 1.6;
    z-index: 5;
    opacity: 0;
}

.left-desc {
    top: 68%;
    left: 8%;
    text-align: left;
}

.right-desc {
    top: 68%;
    right: 8%;
    text-align: right;
}

.hero-image {
    position: absolute;
    top: 30vh;
    left: 0;
    right: 0;
    margin: 0 auto;
    width: fit-content;
    z-index: 3;
    height: 160vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    transform: translateY(90vh);
    opacity: 0;
}
body.loaded #hero-iphone {
    animation: phoneSlideUp 1.1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.iphone-2 {
    /* Positioned off-screen to the left initially */
    transform: translate(-100vw, 0); 
    opacity: 1; /* It will be handled by GSAP, but doesn't need the initial fade-in animation of the first phone */
    animation: none;
}

.iphone-3 {
    transform: translate(0, 0); 
    opacity: 1;
    animation: none;
}

.iphone-4 {
    transform: translate(25vw, 0); /* Firmly pushed to the right */
    opacity: 1;
    animation: none;
}

.hero-image img {
    height: 100%;
    width: auto;
    object-fit: contain;
}

.hero-image .iphone-new {
    position: relative;
    z-index: 1;
}

.hero-image .iphone-used {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    z-index: 2;
}

/* About Main Title (Watermark/Background) */
.about-main-title {
    position: absolute;
    top: 15%;
    left: 5%;
    font-family: 'EurostileExtended', 'Impact', sans-serif;
    font-size: 12vw;
    line-height: 1.2;
    padding: 0.1em 0; /* Expands bounding box so accents aren't clipped during GPU animation */
    color: rgba(255, 255, 255, 0.15); /* Made significantly more visible */
    text-transform: uppercase;
    letter-spacing: -3px;
    white-space: nowrap;
    z-index: 1;
    opacity: 0; /* Hidden initially */
    pointer-events: none;
}

/* About Content */
.about-content {
    position: absolute;
    top: 55%;
    right: 10%;
    transform: translateY(-50%) translateX(50px);
    width: 35vw;
    z-index: 10;
    opacity: 0; /* Hidden initially */
    visibility: hidden;
}

.about-content-left {
    position: absolute;
    top: 55%;
    left: 8%;
    transform: translateY(-50%) translateX(-50px);
    width: 25vw;
    z-index: 10;
    opacity: 0; /* Hidden initially */
    visibility: hidden;
    text-align: right;
}

.about-content-right {
    position: absolute;
    top: 55%;
    right: 8%;
    transform: translateY(-50%) translateX(50px);
    width: 25vw;
    z-index: 10;
    opacity: 0; /* Hidden initially */
    visibility: hidden;
    text-align: left;
}

.about-content-3 {
    position: absolute;
    top: 55%;
    left: 10%;
    transform: translateY(-50%) translateX(-50px);
    width: 35vw;
    z-index: 10;
    opacity: 0; /* Hidden initially */
    visibility: hidden;
}

.about-subtitle {
    font-family: 'EurostileExtended', 'Impact', sans-serif;
    font-size: 2rem;
    line-height: 1.2;
    padding: 0.1em 0; /* Prevents accent clipping during GSAP animation */
    color: var(--primary-orange);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1.5rem;
}

.about-content p {
    font-size: 1.2rem;
    line-height: 1.6;
    color: #e0e0e0;
}

/* Sell Section */
.sell-main-title {
    position: absolute;
    bottom: 5%;
    right: 5%;
    text-align: right;
    font-family: 'EurostileExtended', 'Impact', sans-serif;
    font-size: 10vw;
    line-height: 1.2;
    padding: 0.1em 0;
    color: rgba(255, 255, 255, 0.15);
    text-transform: uppercase;
    letter-spacing: -3px;
    white-space: nowrap;
    z-index: 1;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.sell-form-container {
    position: absolute;
    top: 50%;
    right: 10%;
    transform: translateY(-50%);
    width: 35vw;
    z-index: 10;
    opacity: 0;
    visibility: hidden;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 2.5rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.sell-subtitle {
    font-family: 'EurostileExtended', 'Impact', sans-serif;
    font-size: 2rem;
    line-height: 1.2;
    color: var(--primary-orange);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1.5rem;
}

.sell-form-container form {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.sell-form-container input,
.sell-form-container textarea {
    width: 100%;
    padding: 1rem 1.2rem;
    background-color: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.3s, background-color 0.3s;
}

.sell-form-container input::placeholder,
.sell-form-container textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.sell-form-container input:focus,
.sell-form-container textarea:focus {
    border-color: var(--primary-orange);
    background-color: rgba(255, 255, 255, 0.12);
}

.sell-form-container .btn-primary {
    background-color: var(--primary-orange);
    color: #fff;
    padding: 1rem;
    border: none;
    font-family: 'EurostileExtended', 'Impact', sans-serif;
    font-size: 1.2rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.2s;
    margin-top: 0.5rem;
}

.sell-form-container .btn-primary:hover {
    background-color: #ff8c33;
    transform: scale(1.02);
}

/* Keyframes */
@keyframes phoneSlideUp {
    from {
        transform: translateY(90vh);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes bgTextReveal {
    from {
        opacity: 0;
        transform: translateY(12px);
        filter: blur(14px);
    }
    to {
        opacity: 0.95;
        transform: translateY(0);
        filter: none;
    }
}

@keyframes echoReveal {
    from { opacity: 0; }
    to   { opacity: var(--fo); }
}

@keyframes logoReveal {
    from {
        opacity: 0;
        transform: translateX(-20px);
        filter: blur(8px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
        filter: none;
    }
}

@keyframes navReveal {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes waveMain {
    0%, 45%, 100% {
        color: #ff6200;
        transform: scale(1);
        text-shadow: none;
    }
    15% {
        color: #ffb366; /* Világos felvillanás */
        transform: scale(1.03); /* Enyhe nagyítás */
        text-shadow: 0 0 15px rgba(255, 179, 102, 0.5); /* Finom ragyogás */
    }
}

@keyframes waveEcho {
    0%, 45%, 100% {
        color: #ff6200;
        transform: translateX(-50%) scale(1);
        text-shadow: none;
    }
    15% {
        color: #ffb366;
        transform: translateX(-50%) scale(1.03);
        text-shadow: 0 0 15px rgba(255, 179, 102, 0.5);
    }
}

/* --- Contact Section Styles --- */
.contact-background-text {
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100vw;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 0;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
}

.contact-text-row {
    position: relative;
    overflow: hidden;
    width: 110vw;
    flex-shrink: 0;
}

.contact-text-row.text-main {
    overflow: visible;
    margin-bottom: -2.1vw;
}

.contact-text-row h1,
.contact-text-row span {
    font-family: 'EurostileExtended', 'Impact', sans-serif;
    font-size: 10.5vw;
    font-weight: 900;
    color: #444444; /* Darker grey base */
    white-space: nowrap;
    letter-spacing: -1vw;
    text-transform: uppercase;
    margin: 0;
    line-height: 1;
    flex-shrink: 0;
    display: block;
}

.contact-text-row span {
    position: absolute;
    bottom: -2.1vw;
    left: 50%;
    transform: translateX(-50%);
}

/* Contact Echo row heights and fixed opacities (no initial reveal animation needed since parent fades in) */
.contact-text-row.echo-1 { height: 2.6vw; opacity: 0.72; animation: none; }
.contact-text-row.echo-2 { height: 1.6vw; opacity: 0.52; animation: none; }
.contact-text-row.echo-3 { height: 1.0vw; opacity: 0.33; animation: none; }
.contact-text-row.echo-4 { height: 0.6vw; opacity: 0.18; animation: none; }
.contact-text-row.echo-5 { height: 0.3vw; opacity: 0.08; animation: none; }

/* Contact Echo wave animation */
.contact-text-row.text-main h1,
body.loaded .contact-text-row.text-main h1 { 
    opacity: 1; /* Override inherited opacity: 0 */
    animation: waveContactMain 3s ease-in-out infinite; 
}
.contact-text-row.echo-1 span { animation: waveContactEcho 3s ease-in-out 0.25s infinite; }
.contact-text-row.echo-2 span { animation: waveContactEcho 3s ease-in-out 0.50s infinite; }
.contact-text-row.echo-3 span { animation: waveContactEcho 3s ease-in-out 0.75s infinite; }
.contact-text-row.echo-4 span { animation: waveContactEcho 3s ease-in-out 1.00s infinite; }
.contact-text-row.echo-5 span { animation: waveContactEcho 3s ease-in-out 1.25s infinite; }

@keyframes waveContactMain {
    0%, 45%, 100% {
        color: #444444;
        transform: scale(1);
        text-shadow: none;
    }
    15% {
        color: #aaaaaa; /* Silver flash */
        transform: scale(1.03);
        text-shadow: 0 0 15px rgba(170, 170, 170, 0.4);
    }
}

@keyframes waveContactEcho {
    0%, 45%, 100% {
        color: #444444;
        transform: translateX(-50%) scale(1);
        text-shadow: none;
    }
    15% {
        color: #aaaaaa;
        transform: translateX(-50%) scale(1.03);
        text-shadow: 0 0 15px rgba(170, 170, 170, 0.4);
    }
}

/* Contact Info Blocks */
.contact-info {
    position: absolute;
    top: 72%; /* Positioned below the title and echo lines */
    z-index: 10;
    opacity: 0;
    visibility: hidden;
    color: #e0e0e0;
}

.contact-info-left {
    left: 8%;
    text-align: left;
}

.contact-info-right {
    right: 8%;
    text-align: right;
}

.contact-info h3 {
    font-family: 'EurostileExtended', 'Impact', sans-serif;
    font-size: 1.5rem;
    color: var(--primary-orange);
    letter-spacing: 2px;
    margin-bottom: 1rem;
    text-transform: uppercase;
}

.contact-info ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.contact-info a, .contact-info li {
    color: #aaaaaa;
    text-decoration: none;
    font-size: 1.1rem;
    letter-spacing: 0.05em;
    transition: color 0.3s;
}

.contact-info a:hover {
    color: var(--primary-orange);
}

/* --- Loading Screen --- */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--primary-orange);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.8s cubic-bezier(0.77, 0, 0.175, 1);
}

#loader.exit {
    transform: translateY(-100%);
}

.loader-content {
    font-family: 'EurostileExtended', 'Impact', sans-serif;
    font-size: 4rem;
    color: #000000;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.loader-content .dot {
    opacity: 0;
    animation: dotPulse 1.5s infinite;
}

.loader-content .dot:nth-child(1) { animation-delay: 0.0s; }
.loader-content .dot:nth-child(2) { animation-delay: 0.3s; }
.loader-content .dot:nth-child(3) { animation-delay: 0.6s; }

@keyframes dotPulse {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}
