@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;600&family=Oranienbaum&display=swap');

:root {
    --bg: #0d0f11;
    --bg-soft: #16191d;
    --text: #e0e0e0;
    --text-muted: #a0a0a0;
    --accent: #c0a37e; /* Stone/Gold */
    --accent-dark: #8c765a;
    --green: #2f4a3a;
    --green-light: #4a6d58;
    
    --container: 1280px;
    --gap: clamp(1.5rem, 4vw, 3rem);
    
    /* Fluid Typography */
    --f-display: clamp(2.5rem, 8vw, 6rem);
    --f-h2: clamp(2rem, 5vw, 3.5rem);
    --f-h3: clamp(1.25rem, 3vw, 1.75rem);
    --f-body: clamp(1rem, 1.2vw, 1.125rem);
    
    --transition: 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: 'Manrope', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, .logo__text {
    font-family: 'Oranienbaum', serif;
    font-weight: 400;
    line-height: 1.1;
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--gap);
}

.container--narrow {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 var(--gap);
}

.section {
    padding: clamp(4rem, 10vw, 8rem) 0;
    position: relative;
    overflow: hidden; /* Prevent horizontal track overflow */
}

.section-label {
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    font-size: 0.75rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

.section-label--light {
    color: rgba(255,255,255,0.7);
}

.section-title {
    font-size: var(--f-h2);
    margin-bottom: 3rem;
}

.text-accent {
    color: var(--accent);
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--accent);
    color: #000;
    padding: 10px;
    z-index: 1000;
}

.skip-link:focus {
    top: 0;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem 2.5rem;
    background: var(--accent);
    color: #000;
    font-weight: 600;
    border: 1px solid var(--accent);
    cursor: pointer;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.btn:hover {
    background: transparent;
    color: var(--accent);
}

.btn--outline {
    background: transparent;
    color: var(--accent);
}

.btn--outline:hover {
    background: var(--accent);
    color: #000;
}

.btn--small {
    padding: 0.75rem 1.5rem;
    font-size: 0.8rem;
}

.btn--large {
    padding: 1.5rem 3.5rem;
    font-size: 1rem;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    padding: 1.5rem 0;
    transition: var(--transition);
}

.header.is-scrolled {
    background: rgba(13, 15, 17, 0.9);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.header__container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo__text {
    font-size: 1.75rem;
    letter-spacing: 0.1em;
}

.nav__list {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav__link {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.nav__link:hover:not(.btn) {
    color: var(--accent);
}

/* Hero */
.hero {
    height: 100vh;
    height: 100dvh; /* Dynamic viewport height for mobile browsers */
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

@media (max-width: 768px) {
    .hero {
        padding-top: 60px;
        text-align: center;
    }
    .hero__actions {
        flex-direction: column;
        gap: 1rem;
    }
    .hero__title {
        font-size: clamp(2.5rem, 12vw, 3.5rem);
    }
    .hero__info {
        font-size: 1.1rem;
    }
}

.hero__bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.6);
}

.hero__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(13,15,17,0.2) 0%, rgba(13,15,17,0.8) 100%);
}

.hero__content {
    max-width: 900px;
    z-index: 2;
}

.hero__tagline {
    display: block;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.3em;
    color: var(--accent);
    margin-bottom: 1.5rem;
}

.hero__title {
    font-size: var(--f-display);
    margin-bottom: 2rem;
    text-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.hero__info {
    font-size: 1.25rem;
    margin-bottom: 3rem;
    color: var(--text-muted);
}

.hero__actions {
    display: flex;
    gap: 1.5rem;
}

.hero__scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
}

.mouse {
    width: 26px;
    height: 42px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 13px;
    position: relative;
}

.mouse::before {
    content: '';
    width: 4px;
    height: 8px;
    background: var(--accent);
    position: absolute;
    left: 50%;
    top: 8px;
    transform: translateX(-50%);
    border-radius: 2px;
    animation: scrollMouse 2s infinite;
}

@keyframes scrollMouse {
    0% { opacity: 1; top: 8px; }
    100% { opacity: 0; top: 24px; }
}

/* Manifesto */
.manifesto__quote {
    font-size: clamp(1.8rem, 5vw, 3.5rem);
    line-height: 1.2;
    max-width: 1100px;
    font-weight: 300;
}

/* Location */
.location__grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 4rem;
    align-items: center;
}

.location__card {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
}

.location__card-img img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    transition: transform 1.2s var(--transition);
}

.location__card:hover .location__card-img img {
    transform: scale(1.05);
}

.location__card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2rem;
    background: linear-gradient(0deg, rgba(0,0,0,0.8) 0%, transparent 100%);
}

.location__stats {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 4rem;
    font-family: 'Oranienbaum', serif;
    color: var(--accent);
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

/* Architecture */
.architecture__content {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 4rem;
    flex-wrap: wrap;
    gap: 2rem;
}

.architecture__info p {
    margin-bottom: 0.5rem;
}

.architecture__materials {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.material-tag {
    padding: 0.5rem 1.25rem;
    background: var(--bg-soft);
    border: 1px solid rgba(255,255,255,0.1);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.architecture__gallery {
    height: 60vh;
    overflow: hidden;
}

.parallax-img {
    width: 100%;
    height: 120%;
    object-fit: cover;
    margin-top: -10%;
}

/* Infrastructure Horizontal */
.horizontal-scroll-container {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    background: var(--bg);
}

.infrastructure-header {
    width: 100%;
    margin-bottom: clamp(2rem, 5vw, 4rem);
}

.horizontal-scroll-track {
    display: flex;
    gap: 2rem;
    padding: 0 var(--gap);
    will-change: transform;
    transition: transform 0.1s linear; /* Fast following */
}

.horizontal-item {
    flex: 0 0 clamp(320px, 40vw, 550px);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(15px);
    aspect-ratio: 16/10;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: clamp(1.5rem, 3vw, 3rem);
    border-radius: 4px;
    transition: background 0.4s, transform 0.4s;
    user-select: none;
}

.horizontal-item:hover {
    background: var(--green);
    transform: translateY(-10px);
}

.h-num {
    display: block;
    font-size: clamp(3rem, 6vw, 5rem);
    font-family: 'Oranienbaum', serif;
    line-height: 1;
    color: var(--accent);
    margin-bottom: 0.5rem;
}

.h-unit {
    font-size: 1.5rem;
    vertical-align: super;
}

/* Roof */
.roof {
    height: 80vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.roof__bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.roof__bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.roof__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
}

.roof__content {
    position: relative;
    max-width: 600px;
}

.roof__title {
    font-size: var(--f-h2);
    margin-bottom: 2rem;
}

.roof__list {
    margin-bottom: 2.5rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.roof__list li {
    position: relative;
    padding-left: 1.5rem;
}

.roof__list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.7em;
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
}

.roof__note {
    font-size: 0.9rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* Investment */
.invest__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
}

.invest__item h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--accent);
}

/* Finishes */
.finishes__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.finish-card {
    padding: 3rem;
    background: var(--bg-soft);
    border: 1px solid rgba(255,255,255,0.05);
    transition: var(--transition);
}

.finish-card:hover {
    border-color: var(--accent);
}

.finish-card--featured {
    background: var(--green);
}

.finish-card__header {
    margin-bottom: 2rem;
}

.finish-card__header h3 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.finish-tag {
    font-size: 0.8rem;
    color: var(--accent);
    text-transform: uppercase;
}

.finish-card--featured .finish-tag {
    color: #fff;
}

/* Terms */
.terms__content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.term-block {
    margin-bottom: 3rem;
}

.term-block h3 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.terms__contract {
    padding: 3rem;
    background: var(--bg-soft);
}

.terms__contract h3 {
    margin-bottom: 2rem;
}

.contract-list li {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.contract-list li span {
    color: var(--accent);
    font-weight: 600;
}

/* FAQ */
.faq__item {
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding: 1.5rem 0;
}

.faq__question {
    font-size: 1.125rem;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq__question::-webkit-details-marker {
    display: none;
}

.faq__question::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--accent);
    transition: transform 0.3s;
}

details[open] .faq__question::after {
    transform: rotate(45deg);
}

.faq__answer {
    padding: 1.5rem 0 0.5rem;
    color: var(--text-muted);
}

/* Footer */
.footer {
    background: var(--bg-soft);
    border-top: 1px solid rgba(255,255,255,0.05);
}

.footer__grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 4rem;
}

.footer__title {
    font-size: var(--f-h2);
    margin-bottom: 3rem;
}

.footer__actions {
    display: flex;
    gap: 2rem;
}

.footer__info {
    text-align: right;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Animations */
[data-reveal] {
    opacity: 0;
    transition: transform 1.2s var(--transition), opacity 1.2s var(--transition);
}

[data-reveal="up"] { transform: translateY(50px); }
[data-reveal="fade"] { transform: none; }
[data-reveal="scale"] { transform: scale(0.9); }

.is-visible[data-reveal] {
    opacity: 1;
    transform: none;
}

/* JS Detection Fallback */
.no-js [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
}

body.is-loading {
    /* Optional: Show a subtle progress bar or nothing */
}

/* 5. INFRASTRUCTURE - Sticky Horizontal Scroll */
.infrastructure {
    position: relative;
    /* Height is dynamic, set by JS */
    min-height: 150vh; 
}

/* Mobile */
@media (max-width: 991px) {
    .nav { display: none; }
    .location__grid, .terms__content { grid-template-columns: 1fr; }
    .footer__grid { flex-direction: column; text-align: center; }
    .footer__info { text-align: center; }
    .footer__actions { flex-direction: column; }
}

/* POPUP Styles */
.popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(10px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: 0.5s ease;
}

.popup-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

.popup-content {
    background: var(--bg-soft);
    padding: 3rem;
    max-width: 500px;
    width: 90%;
    position: relative;
    border-radius: 4px;
    box-shadow: 0 40px 100px rgba(0,0,0,0.8);
    border: 1px solid rgba(255,255,255,0.1);
}

.popup-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 2.5rem;
    color: var(--accent);
    background: none;
    border: none;
    cursor: pointer;
}

.popup-header h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--accent);
}

.popup-header p {
    margin-bottom: 2rem;
    color: var(--text-muted);
}

.popup-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.popup-form input {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 1rem 1.5rem;
    color: #fff;
    font-family: inherit;
    border-radius: 2px;
}

.popup-form input:focus {
    border-color: var(--accent);
    outline: none;
}

.btn--full {
    width: 100%;
}

.form-note {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 1rem;
}
