/* ============================================================
   NORMANDY RE — style.css 
   ============================================================ */

/* ==================== VARIABLES ==================== */
:root {
    --dark-blue:   #0a0e27;
    --mid-blue:    #111535;
    --steel-blue:  #1a2045;
    --accent-blue: #2c3a6e;
    --white:       #ffffff;
    --gold:        #c9a96e;
    --gold-lt:     #e2c99a;
    --text-muted:  rgba(255,255,255,0.38);
    --text-sub:    rgba(255,255,255,0.60);
    --border:      rgba(255,255,255,0.07);
    --border-gold: rgba(201,169,110,0.22);
    --font-main:   'Montserrat', sans-serif;
    --font-serif:  'Cormorant Garamond', Georgia, serif;
    --ease-out:    cubic-bezier(0.19, 1, 0.22, 1);

    /* Section vertical rhythm */
    --section-pad: 120px;
}

/* ==================== RESET ==================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    background-color: var(--dark-blue);
}

body {
    background-color: var(--dark-blue);
    font-family: var(--font-main);
    color: var(--white);
    -webkit-font-smoothing: antialiased;
}

/* Global link reset — no browser blue */
a {
    color: inherit;
    text-decoration: none;
}

/* ==================== PRELOADER ==================== */
#preloader {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: all;
}

body.loading { overflow: hidden; }

.preloader-content {
    position: relative;
    z-index: 100;
    transition: opacity 0.8s ease;
}

.preloader-logo {
    height: 70px;
    width: auto;
    filter: invert(13%) sepia(85%) saturate(2250%) hue-rotate(222deg) brightness(96%) contrast(98%);
    animation: premiumPulse 2.5s ease-in-out infinite;
}

.shimmer {
    position: absolute;
    top: 0;
    left: -150%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(10,14,39,0.05), transparent);
    transform: skewX(-20deg);
    animation: shimmerEffect 2.5s infinite;
}

@keyframes premiumPulse {
    0%, 100% { transform: scale(0.95); opacity: 0.8; }
    50%       { transform: scale(1);    opacity: 1;   }
}

@keyframes shimmerEffect {
    0%   { left: -150%; }
    100% { left:  150%; }
}

/* ==== TILE ANIMATION ==== */
.tiles-wrapper {
    position: absolute;
    inset: 0;
    display: flex;
    z-index: 50;
}

.tile {
    flex: 1;
    height: 100%;
    background: #ffffff;
    transform-origin: top;
    transition: transform 1.5s cubic-bezier(0.645, 0.045, 0.355, 1);
    will-change: transform;
}

.tile-1 { transition-delay: 0.2s; }
.tile-2 { transition-delay: 0.4s; }
.tile-3 { transition-delay: 0.6s; }
.tile-4 { transition-delay: 0.8s; }

.nav-closed .tile              { transform: scaleY(0); }
.nav-closed .preloader-content { opacity: 0; pointer-events: none; }
.nav-closed                    { overflow: auto; }

/* ==================== NAVBAR ==================== */
.nre-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 28px 56px;
    transition: background 0.4s ease, padding 0.4s ease, border-color 0.4s ease;
}

.nre-nav.scrolled {
    background: rgba(10,14,39,0.95);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    padding: 16px 56px;
    border-bottom: 1px solid var(--border);
}

/* Nav logo — invisible in hero (logo is dark on dark bg), white when scrolled past hero */
.nre-nav-logo { display: flex; align-items: center; }

.nav-logo-img {
    height: 40px;
    width: auto;
    /* Default: show with dark filter to match the dark logo on hero */
    filter: brightness(0) invert(0);
    opacity: 0;                          /* hidden in hero — hero has its own centered logo */
    transition: opacity 0.4s ease, filter 0.5s ease;
}

/* When scrolled past hero: fade in and make white */
.nre-nav.logo-white .nav-logo-img {
    opacity: 1;
    filter: brightness(0) invert(1);    /* pure white */
}

/* When scrolled but still in hero area: show dark logo if needed — stays hidden */
.nre-nav.scrolled:not(.logo-white) .nav-logo-img {
    opacity: 0;
}

.nre-nav-links {
    display: flex;
    align-items: center;
    gap: 40px;
    list-style: none;
}

.nre-nav-links a {
    font-size: 0.6rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--text-sub);
    text-decoration: none;
    transition: color 0.3s ease;
}

.nre-nav-links a:hover { color: var(--white); }

.nre-nav-cta {
    border: 1px solid rgba(255,255,255,0.28) !important;
    color: var(--white) !important;
    padding: 9px 26px;
    border-radius: 50px;
    transition: background 0.3s ease, color 0.3s ease !important;
}

.nre-nav-cta:hover {
    background: var(--white) !important;
    color: var(--dark-blue) !important;
}

/* ==================== HERO ==================== */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.video-wrapper { position: absolute; inset: 0; z-index: 0; }
.bg-video { width: 100%; height: 100%; object-fit: cover; display: block; }
.overlay {
    position: absolute;
    inset: 0;

    background: linear-gradient(
        to bottom,
        rgba(10, 14, 39, 0.34),  /* top */
        rgba(10, 14, 39, 0.48),  /* middle */
        rgba(10, 14, 39, 0.62)   /* bottom */
    );

    z-index: 1;
}

/* Hero content — groups logo + description as one centered block */
.hero-content {
    position: relative;
    z-index: 10;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0 40px;
    gap: 0;
}

/* Hero logo wrapper — sits above description, close to it */
.hero-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    padding-bottom: 32px;
}

.logo { height: 110px; width: auto; }

.glass-box {
    padding: 0 56px 32px;
    max-width: 860px;
    text-align: center;
}

.description {
    font-size: 1.25rem;
    line-height: 2.2;
    font-weight: 400;
    letter-spacing: 0.5px;
}

/* ==================== HERO ENTRY ANIMATIONS ==================== */
.hero-logo .logo,
.glass-box {
    opacity: 0;
    transform: translateY(40px);
}

.nav-closed .hero-logo .logo {
    animation: revealSlow 1.8s var(--ease-out) forwards;
    animation-delay: 1.2s;
}
.nav-closed .glass-box {
    animation: revealSlow 2.2s var(--ease-out) forwards;
    animation-delay: 1.6s;
}

@keyframes revealSlow { to { opacity: 1; transform: translateY(0); } }

/* ==================== GENERIC SECTION ==================== */
.nre-section {
    position: relative;
    overflow: hidden;
    font-family: var(--font-main);
    color: var(--white);
}

.nre-inner {
    max-width: 1160px;
    margin: 0 auto;
    padding: var(--section-pad) 56px;
}

.nre-section + .nre-section .nre-inner {
    padding-top: 40px;
}

/* ==================== SCROLL REVEAL ==================== */
/* Eyebrow label */
.nre-label {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: .70rem;
    font-weight: 600;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 20px;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}
.nre-label::before {
    content: '';
    width: 28px;
    height: 1px;
    background: var(--gold);
    opacity: 0.55;
    flex-shrink: 0;
}
.nre-label.in { opacity: 1; transform: none; }

/* Section heading */
.nre-heading {
    font-family: var(--font-serif);
    font-size: clamp(2.4rem, 4.5vw, 4rem);
    font-weight: 300;
    line-height: 1.12;
    color: var(--white);
    margin-bottom: 24px;
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.9s var(--ease-out) 0.12s, transform 0.9s var(--ease-out) 0.12s;
}
.nre-heading em { font-style: italic; color: var(--gold-lt); }
.nre-heading.in { opacity: 1; transform: none; }

/* Sub copy */
.nre-sub {
    font-size: 0.72rem;
    font-weight: 300;
    letter-spacing: 0.07em;
    line-height: 2.1;
    color: var(--text-sub);
    max-width: 520px;
    margin-bottom: 56px;
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.9s var(--ease-out) 0.22s, transform 0.9s var(--ease-out) 0.22s;
}
.nre-sub.in { opacity: 1; transform: none; }

/* Generic reveal block */
.nre-reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 1s var(--ease-out) 0.1s, transform 1s var(--ease-out) 0.1s;
}
.nre-reveal.in { opacity: 1; transform: none; }

/* Stagger delays */
.nre-reveal.delay-1 { transition-delay: 0.22s; }
.nre-reveal.delay-2 { transition-delay: 0.36s; }

/* Closing section animatables */
.closing-eyebrow,
.closing-title,
.closing-body,
.cta-group {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}
.closing-eyebrow.in { opacity: 1; transform: none; }
.closing-title.in   { opacity: 1; transform: none; }
.closing-body.in    { opacity: 1; transform: none; }
.cta-group.in       { opacity: 1; transform: none; }

/* ==================== Our Approach ==================== */
.s-philosophy { background: var(--mid-blue); }

.pillar-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 48px;
    margin-top: 64px;
}

.pillar { padding: 0; }

.pillar-num {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    font-weight: 300;
    color: var(--gold);
    opacity: 0.7;
    flex-shrink: 0;
    width: 24px;
    padding-top: 2px;
    padding-bottom: 2px;
    margin-bottom: 40px;
}

.pillar-bar {
    width: 32px;
    height: 1px;
    background: var(--gold);
    opacity: 0.4;
    margin-bottom: 24px;
}

.pillar-title {
    font-family: var(--font-serif);
    font-size: 1.55rem;
    font-weight: 300;
    line-height: 1.2;
    color: var(--white);
    margin-bottom: 20px;
}

.pillar-body {
    font-size: 0.84rem;
    font-weight: 300;
    line-height: 2.0;
    color: var(--text-sub);
    margin-bottom: 24px;
}

.pillar-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pillar-list li {
    font-size: 0.78rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    padding-left: 16px;
    position: relative;
}

.pillar-list li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--gold);
    opacity: 0.6;
}

/* ==================== VALUE CREATION ==================== */
.s-value { background: var(--mid-blue); }

.vc-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 80px;
    align-items: start;
    margin-top: 56px;
}

.vc-lead {
    font-family: var(--font-serif);
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    font-weight: 300;
    line-height: 1.25;
    color: var(--white);
    margin-bottom: 28px;
}

.vc-lead em { font-style: italic; color: var(--gold-lt); }

.vc-note {
    font-size: 0.84rem;
    font-weight: 300;
    line-height: 2.1;
    color: var(--text-sub);
}

.vc-items {
    display: flex;
    flex-direction: column;
    gap: 36px;
}

.vc-item {
    display: flex;
    gap: 28px;
    align-items: flex-start;
    padding-bottom: 36px;
    border-bottom: 1px solid var(--border);
}

.vc-item:last-child { border-bottom: none; padding-bottom: 0; }

.vc-num {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    font-weight: 300;
    color: var(--gold);
    opacity: 0.7;
    flex-shrink: 0;
    width: 24px;
    padding-top: 2px;
}

.vc-item-title {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--white);
    margin-bottom: 10px;
}

.vc-item-body {
    font-size: 0.84rem;
    font-weight: 300;
    line-height: 2.0;
    color: var(--text-sub);
}

/* ==================== CLOSING CTA ==================== */
.s-closing {
    background: var(--steel-blue);
    border-top: 1px solid var(--border-gold);
}

.closing-inner {
    max-width: 760px;
    margin: 0 auto;
    padding: 120px 56px;
    text-align: center;
}

.closing-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 0.58rem;
    font-weight: 600;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 28px;
    transition-delay: 0s;
}

.closing-eyebrow::before,
.closing-eyebrow::after {
    content: '';
    width: 24px;
    height: 1px;
    background: var(--gold);
    opacity: 0.5;
}

.closing-title {
    font-family: var(--font-serif);
    font-size: clamp(2.4rem, 5vw, 3.8rem);
    font-weight: 300;
    line-height: 1.12;
    color: var(--white);
    margin-bottom: 28px;
    transition-delay: 0.12s;
}

.closing-title em { font-style: italic; color: var(--gold-lt); }

.closing-body {
    font-size: 0.78rem;
    font-weight: 300;
    line-height: 2.2;
    color: var(--text-sub);
    max-width: 520px;
    margin: 0 auto 48px;
    transition-delay: 0.22s;
}

.cta-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    transition-delay: 0.32s;
}

/* Gold filled button */
.btn-gold {
    display: inline-block;
    background: var(--gold);
    color: var(--dark-blue);
    padding: 14px 40px;
    border-radius: 50px;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    text-decoration: none;
    transition: background 0.35s ease, transform 0.35s ease;
}

.btn-gold:hover {
    background: var(--gold-lt);
    transform: translateY(-2px);
}

/* Outline button */
.btn-outline {
    display: inline-block;
    border: 1px solid rgba(255,255,255,0.35);
    color: var(--white);
    padding: 13px 36px;
    border-radius: 50px;
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    text-decoration: none;
    transition: background 0.35s ease, color 0.35s ease, transform 0.35s ease;
}

.btn-outline:hover {
    background: var(--white);
    color: var(--dark-blue);
    transform: translateY(-2px);
}

/* ==================== FOOTER ==================== */
.nre-footer {
    background: var(--dark-blue);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 36px 56px;
    gap: 32px;
}

.nre-footer-logo {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    font-weight: 300;
    letter-spacing: 0.06em;
    color: var(--text-sub);
}

.nre-footer-logo span {
    color: var(--gold);
    font-style: italic;
}

.nre-footer-copy {
    font-size: 0.58rem;
    font-weight: 400;
    letter-spacing: 0.14em;
    color: var(--text-muted);
    text-align: center;
}

.nre-footer-addr {
    font-size: 0.62rem;
    font-weight: 300;
    letter-spacing: 0.06em;
    line-height: 1.9;
    color: var(--text-muted);
    text-align: right;
}

/* Footer email link — styled, NOT browser blue */
.footer-email {
    color: var(--gold);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-email:hover { color: var(--gold-lt); }

/* ==================== RESPONSIVE ==================== */
@media screen and (max-width: 960px) {
    :root { --section-pad: 88px; }

    .nre-inner { padding: var(--section-pad) 32px; }

    .pillar-grid      { grid-template-columns: 1fr; gap: 48px; margin-top: 48px; }
    .market-layout    { grid-template-columns: 1fr; gap: 56px; margin-top: 48px; }
    .vc-grid          { grid-template-columns: 1fr; gap: 48px; margin-top: 48px; }
    .team-layout      { grid-template-columns: 1fr; gap: 48px; margin-top: 48px; }

    .port-grid        { grid-template-columns: 1fr 1fr; }
    .port-header      { flex-direction: column; align-items: flex-start; gap: 20px; }
    .port-note        { text-align: left; }
    .port-bar         { flex-direction: column; align-items: flex-start; gap: 20px; }

    .diff-table       { font-size: 0.65rem; }
    .diff-table th,
    .diff-table td    { padding: 14px 16px; }

    .closing-inner    { padding: 96px 32px; }

    .nre-footer {
        flex-direction: column;
        text-align: center;
        padding: 36px 24px;
        gap: 16px;
    }
    .nre-footer-addr  { text-align: center; }

    .nre-nav          { padding: 20px 32px; }
    .nre-nav.scrolled { padding: 14px 32px; }
}

@media screen and (max-width: 640px) {
    :root { --section-pad: 72px; }

    .nre-inner { padding: var(--section-pad) 20px; }

    .navbar    { padding: 24px 20px 0; }
    .logo      { height: 70px; }
    .glass-box { padding: 24px 20px; }
    .description { font-size: 0.9rem; }

    .port-grid { grid-template-columns: 1fr; }
    .stat-grid { grid-template-columns: 1fr; }

    .diff-table { display: none; }

    .cta-group { flex-direction: column; }

    .nre-hamburger {
        display: flex;
    }

    .nre-nav-links {
        width: 100%;
        flex-direction: column;
        align-items: center;
        gap: 24px;

        background: rgba(10,14,39,0.98);
        backdrop-filter: blur(12px);

        max-height: 0;              /* 🔥 hidden by default */
        overflow: hidden;           /* 🔥 prevents overflow */
        transition: max-height 0.4s ease;

        padding: 0;                 /* remove padding when closed */
    }

    /* SHOW MENU */
    .nre-nav.open .nre-nav-links {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }

    .nre-nav { padding: 18px 20px; }
    .nre-nav.scrolled { padding: 12px 20px; }

    .closing-inner { padding: 80px 20px; }
    .nre-footer { padding: 28px 20px; }
}

.footer-logo-img {
    height: 40px;
    width: auto;
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

/* ==================== HAMBURGER ==================== */
.nre-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    z-index: 999; /*  ensure it's above everything */
}

.nre-hamburger span {
    width: 24px;
    height: 2px;
    background: var(--white);
    transition: all 0.3s ease;
}

/* ================= MOBILE NAVIGATION ================= */
.nre-hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 22px;
    cursor: pointer;
    z-index: 250;
    transition: transform 0.3s ease;
}

.nre-hamburger span {
    display: block;
    height: 3px;
    width: 100%;
    background: var(--white);
    border-radius: 2px;
    transition: all 0.4s ease;
}

/* Hamburger open/close animation */
.nre-hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translateY(8px);
}
.nre-hamburger.active span:nth-child(2) {
    opacity: 0;
}
.nre-hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translateY(-8px);
}

/* MOBILE NAV LINKS */
@media (max-width: 768px) {
    .nre-hamburger { display: flex; }

    .nre-nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--mid-blue);
        flex-direction: column;
        gap: 0;
        overflow: hidden;
        max-height: 0;
        transition: max-height 0.5s ease;
    }

    .nre-nav-links.open {
        max-height: 300px;
    }

    .nre-nav-links li {
        padding: 16px 24px;
        border-bottom: 1px solid var(--border-gold);
    }

    .nre-nav-links li:last-child { border-bottom: none; }

    .nre-nav-links a {
        font-size: 0.8rem;
        display: block;
    }

    .nre-nav.open ~ .hero,
    .nre-nav.open ~ .nre-section {
        margin-top: 200px;
        transition: margin-top 0.5s ease;
    }
}