:root {
    --bg: #0a100d;
    --bg-2: #0f1812;
    --bg-3: #141f18;
    --ivory: #f3ede1;
    --muted: #a8b0a6;
    --gold: #c9a96a;
    --gold-soft: #e6d3a3;
    --line: rgba(201, 169, 106, 0.22);
    --serif: 'Cormorant Garamond', 'Times New Roman', serif;
    --sans: 'Manrope', system-ui, sans-serif;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --pad: clamp(20px, 6vw, 96px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--sans);
    font-weight: 300;
    color: var(--ivory);
    background: var(--bg);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
body.is-loading { overflow: hidden; animation: unlock 0s linear 5s forwards; }
@keyframes unlock { to { overflow: auto; } }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
::selection { background: var(--gold); color: var(--bg); }

/* ---------- Preloader ---------- */
.preloader {
    position: fixed; inset: 0; z-index: 100;
    display: grid; place-content: center; justify-items: center; gap: 18px;
    background: var(--bg);
    transition: transform 1.1s var(--ease) 0.2s, visibility 0s 1.4s;
    animation: preloader-failsafe 0s linear 5s forwards;
}
@keyframes preloader-failsafe { to { transform: translateY(-100%); visibility: hidden; } }
.preloader img { width: 84px; animation: breathe 2.4s ease-in-out infinite; }
.preloader-title { letter-spacing: 0.5em; font-size: 0.8rem; color: var(--gold); padding-left: 0.5em; }
.preloader-line { width: 160px; height: 1px; background: var(--line); overflow: hidden; }
.preloader-line i { display: block; height: 100%; background: var(--gold); transform: translateX(-100%); animation: load 1.4s var(--ease) forwards; }
.preloader.is-done { transform: translateY(-100%); visibility: hidden; }
@keyframes load { to { transform: none; } }
@keyframes breathe { 50% { transform: scale(1.06); opacity: 0.8; } }

/* ---------- Chrome ---------- */
.scroll-progress {
    position: fixed; top: 0; left: 0; height: 2px; width: 100%; z-index: 60;
    background: linear-gradient(90deg, var(--gold), var(--gold-soft));
    transform: scaleX(0); transform-origin: left;
}
.cursor-glow {
    position: fixed; top: 0; left: 0; width: 420px; height: 420px; margin: -210px 0 0 -210px;
    border-radius: 50%; pointer-events: none; z-index: 1; opacity: 0;
    background: radial-gradient(circle, rgba(201, 169, 106, 0.1), transparent 65%);
    transition: opacity 0.6s;
    mix-blend-mode: screen;
}
.cursor-glow.is-on { opacity: 1; }

.site-header {
    position: fixed; top: 0; left: 0; right: 0; z-index: 50;
    display: flex; align-items: center; justify-content: space-between;
    padding: 22px var(--pad);
    transition: transform 0.6s var(--ease), background 0.5s, padding 0.5s var(--ease), backdrop-filter 0.5s;
}
.site-header.is-scrolled {
    padding-block: 12px;
    background: rgba(10, 16, 13, 0.72);
    backdrop-filter: blur(18px) saturate(1.2);
    border-bottom: 1px solid var(--line);
}
.site-header.is-hidden { transform: translateY(-100%); }
.brand { display: inline-flex; align-items: center; gap: 14px; }
.brand img { width: 46px; transition: width 0.5s var(--ease); }
.is-scrolled .brand img { width: 36px; }
.brand span { font-size: 0.82rem; letter-spacing: 0.4em; font-weight: 500; }
.site-nav { display: flex; align-items: center; gap: clamp(18px, 3vw, 42px); font-size: 0.78rem; letter-spacing: 0.22em; text-transform: uppercase; }
.site-nav a { position: relative; padding: 6px 0; color: var(--ivory); opacity: 0.8; transition: opacity 0.3s, color 0.3s; }
.site-nav a::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--gold);
    transform: scaleX(0); transform-origin: right; transition: transform 0.5s var(--ease);
}
.site-nav a:hover, .site-nav a.is-active { opacity: 1; color: var(--gold-soft); }
.site-nav a:hover::after, .site-nav a.is-active::after { transform: scaleX(1); transform-origin: left; }
.nav-cta { padding: 10px 22px !important; border: 1px solid var(--line); border-radius: 999px; }
.nav-cta::after { display: none; }
.nav-cta:hover { background: var(--gold); color: var(--bg) !important; }

/* ---------- Type ---------- */
.eyebrow { font-size: 0.72rem; letter-spacing: 0.42em; text-transform: uppercase; color: var(--gold); display: flex; align-items: center; gap: 16px; }
.eyebrow::before { content: ''; width: 44px; height: 1px; background: var(--gold); }
.display { font-family: var(--serif); font-weight: 400; font-size: clamp(2.2rem, 5vw, 4.4rem); line-height: 1.08; letter-spacing: -0.01em; }
.display em, h1 em { font-style: italic; color: var(--gold-soft); }
.lead { color: var(--muted); font-size: clamp(0.98rem, 1.2vw, 1.1rem); max-width: 56ch; }

/* ---------- Buttons ---------- */
.btn {
    position: relative; display: inline-flex; align-items: center; justify-content: center;
    padding: 18px 40px; border: 0; border-radius: 999px; cursor: pointer; overflow: hidden;
    background: linear-gradient(135deg, var(--gold-soft), var(--gold));
    color: var(--bg); font-size: 0.76rem; letter-spacing: 0.24em; text-transform: uppercase; font-weight: 600;
    transition: transform 0.4s var(--ease), box-shadow 0.4s;
    box-shadow: 0 18px 50px -18px rgba(201, 169, 106, 0.6);
    will-change: transform;
}
.btn span { position: relative; z-index: 1; }
.btn::before {
    content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.55) 50%, transparent 70%);
    transform: translateX(-120%); transition: transform 0.9s var(--ease);
}
.btn:hover::before { transform: translateX(120%); }
.btn-ghost { background: transparent; color: var(--gold-soft); border: 1px solid var(--gold); box-shadow: none; }
.btn-ghost::before { background: linear-gradient(100deg, transparent 30%, rgba(201, 169, 106, 0.3) 50%, transparent 70%); }

/* ---------- Reveal ---------- */
[data-reveal] { opacity: 0; transform: translateY(46px); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease); transition-delay: var(--d, 0s); }
[data-reveal].is-visible { opacity: 1; transform: none; }
[data-reveal="mask"] { opacity: 1; transform: none; position: relative; overflow: hidden; }
[data-reveal="mask"]::after { content: ''; position: absolute; inset: -1px; z-index: 3; background: var(--bg); transform-origin: top; transition: transform 1.4s var(--ease); pointer-events: none; }
[data-reveal="mask"].is-visible::after { transform: scaleY(0); }
[data-reveal="mask"] img { transform: scale(1.25); transition: transform 2s var(--ease); }
[data-reveal="mask"].is-visible img { transform: scale(1); }

/* ---------- Hero ---------- */
.hero { position: relative; height: 100vh; height: 100dvh; min-height: 560px; display: flex; align-items: center; overflow: hidden; }
#heroCanvas, .hero-fallback { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-fallback { z-index: 0; animation: kenburns 24s ease-in-out infinite alternate; transition: opacity 1.2s; }
#heroCanvas { z-index: 1; opacity: 0; transition: opacity 1.2s; }
.gl-ready #heroCanvas { opacity: 1; }
.gl-ready .hero-fallback { opacity: 0; }
@keyframes kenburns { to { transform: scale(1.12) translate(-1.5%, 1%); } }
.hero-veil {
    position: absolute; inset: 0; z-index: 2;
    background:
        linear-gradient(90deg, rgba(10, 16, 13, 0.92) 0%, rgba(10, 16, 13, 0.7) 50%, rgba(10, 16, 13, 0.2) 100%),
        linear-gradient(0deg, var(--bg) 0%, transparent 30%);
}
.hero-inner { position: relative; z-index: 3; padding: 0 var(--pad); max-width: 1100px; will-change: transform, opacity; }
.hero-title { font-family: var(--serif); font-weight: 400; font-size: clamp(2.6rem, 7vw, 6.4rem); line-height: 1.02; margin: 28px 0; letter-spacing: -0.015em; }
.hero-title .line { display: block; overflow: hidden; padding-bottom: 0.08em; }
.hero-title .line > span { display: inline-block; transform: translateY(110%) rotate(3deg); transform-origin: left bottom; transition: transform 1.4s var(--ease); }
.hero-text { max-width: 52ch; color: rgba(243, 237, 225, 0.78); font-size: clamp(1rem, 1.3vw, 1.15rem); margin-bottom: 42px; }
.hero-eyebrow, .hero-text, .hero .btn { opacity: 0; transform: translateY(24px); transition: opacity 1.2s var(--ease), transform 1.2s var(--ease); }
.hero.is-ready .hero-title .line > span { transform: none; }
.hero.is-ready .line:nth-child(2) > span { transition-delay: 0.12s; }
.hero.is-ready .line:nth-child(3) > span { transition-delay: 0.24s; }
.hero.is-ready .hero-eyebrow { opacity: 1; transform: none; transition-delay: 0.1s; }
.hero.is-ready .hero-text { opacity: 1; transform: none; transition-delay: 0.7s; }
.hero.is-ready .btn { opacity: 1; transform: none; transition-delay: 0.95s; }
.scroll-hint { position: absolute; z-index: 3; left: 50%; bottom: 28px; width: 26px; height: 46px; margin-left: -13px; border: 1px solid var(--gold); border-radius: 20px; opacity: 0.8; }
.scroll-hint i { position: absolute; left: 50%; top: 8px; width: 3px; height: 8px; margin-left: -1.5px; border-radius: 2px; background: var(--gold); animation: wheel 1.8s ease-in-out infinite; }
@keyframes wheel { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(18px); } }

/* ---------- Vision ---------- */
.vision { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 6vw, 100px); align-items: center; padding: clamp(80px, 12vw, 180px) var(--pad); position: relative; z-index: 2; }
.vision-media { aspect-ratio: 4 / 5; overflow: hidden; border-radius: 4px; box-shadow: 0 50px 100px -40px #000, 0 0 0 1px var(--line); }
.vision-media img { width: 100%; height: 118%; object-fit: cover; will-change: transform; }
.vision-body .display { margin: 24px 0 56px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; border-top: 1px solid var(--line); padding-top: 36px; }
.stats strong { display: block; font-family: var(--serif); font-weight: 400; font-size: clamp(2.2rem, 4vw, 3.6rem); color: var(--gold-soft); line-height: 1; margin-bottom: 10px; }
.stats span { font-size: 0.74rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }

/* ---------- Project ---------- */
.project { padding: clamp(60px, 8vw, 120px) var(--pad) clamp(80px, 10vw, 160px); background: radial-gradient(ellipse at 80% 0%, rgba(201, 169, 106, 0.08), transparent 55%), var(--bg-2); position: relative; z-index: 2; }
.project-head { max-width: 900px; margin-bottom: clamp(48px, 6vw, 90px); }
.project-head .display { margin: 24px 0 32px; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; perspective: 1200px; }
.card {
    position: relative; padding: 44px 36px 48px; border: 1px solid var(--line); border-radius: 6px;
    background: linear-gradient(160deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01));
    backdrop-filter: blur(6px); transform-style: preserve-3d; overflow: hidden;
    transition: opacity 1.1s var(--ease), transform 0.5s var(--ease), border-color 0.4s;
}
.card::before { content: ''; position: absolute; inset: 0; background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 0%), rgba(201, 169, 106, 0.18), transparent 60%); opacity: 0; transition: opacity 0.4s; }
.card:hover { border-color: var(--gold); }
.card:hover::before { opacity: 1; }
.card-num { font-family: var(--serif); font-size: 3.4rem; color: var(--gold); opacity: 0.55; line-height: 1; display: block; margin-bottom: 36px; transform: translateZ(40px); }
.card h3 { font-family: var(--serif); font-weight: 500; font-size: 1.9rem; margin-bottom: 14px; transform: translateZ(30px); }
.card p { color: var(--muted); font-size: 0.96rem; transform: translateZ(20px); }
.card[data-reveal].is-visible { transition: opacity 1.1s var(--ease), transform 0.2s ease-out, border-color 0.4s; }

/* ---------- 3D tunnel gallery ---------- */
.tunnel { position: relative; height: 650vh; background: radial-gradient(ellipse at 70% 50%, var(--bg-3), var(--bg) 70%); z-index: 2; }
.tunnel-sticky { position: sticky; top: 0; height: 100vh; height: 100dvh; overflow: hidden; display: grid; grid-template-columns: minmax(280px, 34%) 1fr; align-items: center; }
.tunnel-heading { position: relative; z-index: 5; padding: 0 0 0 var(--pad); max-width: 520px; }
.tunnel-heading .display { margin: 20px 0 18px; font-size: clamp(2rem, 3.4vw, 3.4rem); }
.tunnel-heading .lead { font-size: 0.95rem; }
.tunnel-scene { position: relative; height: 100%; overflow: hidden; perspective: 900px; perspective-origin: 50% 50%; --iw: min(34vw, 540px); }
.tunnel-world { position: absolute; inset: 0; transform-style: preserve-3d; will-change: transform; }
.t-item {
    position: absolute; left: 50%; top: 50%; width: var(--iw); aspect-ratio: 4 / 3;
    border-radius: 4px; overflow: hidden; backface-visibility: hidden; will-change: opacity, transform;
    box-shadow: 0 40px 120px -20px #000, 0 0 0 1px var(--line);
}
.t-item img { width: 100%; height: 100%; object-fit: cover; }
.tunnel-bar { position: absolute; z-index: 5; left: var(--pad); right: var(--pad); bottom: 32px; height: 1px; background: var(--line); }
.tunnel-bar i { display: block; height: 100%; background: var(--gold); transform: scaleX(0); transform-origin: left; }

/* ---------- Innovation ---------- */
.innovation { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 100px); align-items: center; padding: clamp(90px, 12vw, 180px) var(--pad); position: relative; z-index: 2; background: var(--bg); }
.innovation-copy .display { margin: 24px 0 30px; font-size: clamp(2rem, 4vw, 3.5rem); }
.innovation-copy strong { color: var(--gold-soft); font-weight: 500; }
.points { list-style: none; margin: 34px 0 42px; display: grid; gap: 14px; }
.points li { position: relative; padding-left: 34px; color: var(--ivory); opacity: 0.9; }
.points li::before { content: '◆'; position: absolute; left: 0; top: 0; color: var(--gold); font-size: 0.7rem; line-height: 2.6; }
.innovation-visual {
    position: relative; display: grid; place-items: center; aspect-ratio: 1 / 1; max-width: 620px; justify-self: center; width: 100%;
    border-radius: 50%; transform-style: preserve-3d;
    background: radial-gradient(circle at 50% 45%, rgba(201, 169, 106, 0.22), rgba(201, 169, 106, 0.05) 45%, transparent 68%);
    transition: transform 0.4s var(--ease);
}
.innovation-visual::before { content: ''; position: absolute; left: 20%; right: 20%; bottom: 12%; height: 8%; border-radius: 50%; background: radial-gradient(ellipse, rgba(0, 0, 0, 0.55), transparent 70%); filter: blur(10px); animation: shadow-float 6s ease-in-out infinite; }
.innovation-visual .ring { position: absolute; inset: 4%; border-radius: 50%; border: 1px dashed rgba(201, 169, 106, 0.4); animation: spin 60s linear infinite; }
.innovation-visual .ring-2 { inset: 14%; border: 1px solid rgba(201, 169, 106, 0.18); animation-duration: 90s; animation-direction: reverse; }
.innovation-visual img {
    position: relative; z-index: 1; width: 78%; max-width: 480px; height: auto;
    filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.55)) saturate(1.05) contrast(1.04);
    -webkit-mask-image: linear-gradient(90deg, #000 90%, transparent 100%); mask-image: linear-gradient(90deg, #000 90%, transparent 100%);
    animation: float 6s ease-in-out infinite;
}
@keyframes float { 50% { transform: translateY(-14px); } }
@keyframes shadow-float { 50% { transform: scale(0.88); opacity: 0.7; } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 100px); padding: clamp(80px, 10vw, 150px) var(--pad); position: relative; z-index: 2; background: radial-gradient(ellipse at 10% 100%, rgba(201, 169, 106, 0.1), transparent 55%), var(--bg-2); }
.contact-copy .display { margin: 24px 0 28px; }
.contact-map { margin-top: 44px; border-radius: 6px; overflow: hidden; border: 1px solid var(--line); }
#map { height: 320px; filter: grayscale(0.25) contrast(1.05); }
.contact-form { display: grid; gap: 30px; align-content: start; padding: clamp(28px, 4vw, 56px); border: 1px solid var(--line); border-radius: 6px; background: rgba(255, 255, 255, 0.03); backdrop-filter: blur(10px); }
.field { position: relative; }
.field input, .field textarea { width: 100%; padding: 22px 0 10px; background: transparent; border: 0; border-bottom: 1px solid rgba(243, 237, 225, 0.25); outline: none; resize: vertical; font-size: 1rem; transition: border-color 0.4s; }
.field label { position: absolute; left: 0; top: 22px; color: var(--muted); font-size: 1rem; pointer-events: none; transition: all 0.4s var(--ease); }
.field input:focus + label, .field input:not(:placeholder-shown) + label,
.field textarea:focus + label, .field textarea:not(:placeholder-shown) + label { top: 0; font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold); }
.field input:focus, .field textarea:focus { border-color: var(--gold); }
.form-status { min-height: 1.4em; color: var(--gold-soft); font-size: 0.92rem; }
.leaflet-container { background: var(--bg-3); font-family: var(--sans); }

/* ---------- Footer ---------- */
.site-footer { position: relative; z-index: 2; display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: center; padding: 44px var(--pad); border-top: 1px solid var(--line); background: var(--bg); color: var(--muted); font-size: 0.85rem; }
.footer-brand { display: flex; align-items: center; gap: 16px; }
.footer-brand img { width: 48px; }
.footer-brand strong { display: block; color: var(--ivory); letter-spacing: 0.35em; font-weight: 500; font-size: 0.8rem; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
    .vision, .innovation, .contact { grid-template-columns: 1fr; }
    .cards { grid-template-columns: 1fr; }
    .vision-media { aspect-ratio: 4 / 3; }
    .tunnel { height: 480vh; }
    .tunnel-sticky { grid-template-columns: 1fr; grid-template-rows: auto 1fr; align-items: start; padding-top: 84px; }
    .tunnel-heading { padding: 0 var(--pad); max-width: none; }
    .tunnel-heading .display { font-size: clamp(1.7rem, 7vw, 2.4rem); margin: 12px 0 10px; }
    .tunnel-heading .lead { font-size: 0.85rem; }
    .tunnel-scene { --iw: 74vw; perspective: 700px; }
    .brand span { display: none; }
}
@media (max-width: 560px) {
    .site-nav a:not(.nav-cta) { display: none; }
    .stats { grid-template-columns: 1fr; }
    .hero-veil { background: linear-gradient(180deg, rgba(10, 16, 13, 0.25) 0%, rgba(10, 16, 13, 0.55) 40%, rgba(10, 16, 13, 0.88) 75%, var(--bg) 100%); }
}
@media (hover: none) { .cursor-glow { display: none; } }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
    [data-reveal], .hero-eyebrow, .hero-text, .hero .btn { opacity: 1; transform: none; }
    .hero-title .line > span { transform: none; }
    [data-reveal="mask"]::after { display: none; }
}

.vision-media img[data-parallax] { transition: none; }

.field.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; opacity: 0; }
