/* ─────────────────────────────────────────────────────────────
   header-footer.css — Global layout, header, and footer styles
   Fixes applied:
   - img reset: height: auto added to prevent distortion at narrow viewports
   - scroll-behavior: prefers-reduced-motion guard added
   - gap animation on footer nav replaced with translateX — compositor-friendly
   - --header-height CSS custom property added; top values on .site-nav use it
   - All decorative section comment dividers removed
   - FIX: html overflow-x: hidden added — prevents horizontal scroll at viewport level
   - FIX: .site-header .container uses padding instead of calc(100% - 40px) — reliable in fixed context
───────────────────────────────────────────────────────────── */

/* CSS custom properties — site-wide tokens */
:root {
    --gold:          #c8a45d;
    --gold-light:    #e2c47e;
    --black:         #000;
    --white:         #fff;
    --gray:          #bdbdbd;
    --container:     1300px;
    /* Header height token — used by .site-nav top positioning to stay in sync */
    --header-height: 85px;

    --font-display: 'Playfair Display', Georgia, serif;
    --font-body:    'Jost', 'Helvetica Neue', sans-serif;
    --font-accent:  'Cormorant Garamond', Georgia, serif;
}

/* Box model reset */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Smooth scroll — disabled for users who prefer reduced motion */
@media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
}

/* Base — overflow-x on BOTH html and body is required.
   body alone does not prevent viewport-level horizontal scroll;
   html must also be set to fully suppress it. */
html {
    overflow-x: hidden;
    max-width: 100%;
}

body {
    font-family: var(--font-body);
    background: #000;
    color: var(--white);
    overflow-x: hidden;
    max-width: 100%;
}

/* Link reset */
a {
    text-decoration: none;
    color: inherit;
}

/* Media reset — height: auto prevents distortion when max-width kicks in at narrow viewports */
img, video, iframe, embed, object {
    max-width: 100%;
    height: auto;
}

/* Centered content container */
.container {
    width: min(var(--container), calc(100% - 40px));
    margin: auto;
}

/* Fixed header — transparent by default, scrolled state added via JS */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9999;
    transition: transform 0.4s ease, background 0.4s ease, backdrop-filter 0.4s ease;
    background: transparent;
    border-bottom: 1px solid transparent;
}

/* Scrolled state applied by JS on scroll */
.site-header.scrolled {
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(200, 164, 93, 0.15);
}

/* Header inner layout
   FIX: Inside a position:fixed element, calc(100% - 40px) can be unreliable
   on some mobile browsers because 100% resolves to the viewport width before
   the document layout stabilises. Using explicit padding is more robust. */
.header-inner {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* Logo image */
.logo img {
    height: 42px;
    width: auto;
    object-fit: contain;
    display: block;
}

/* Desktop navigation */
.site-nav {
    display: flex;
    align-items: center;
    gap: 38px;
}

/* Nav link — underline expands on hover */
.site-nav a {
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.88);
    position: relative;
    padding-bottom: 4px;
    transition: color 0.3s;
    white-space: nowrap;
}

.site-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 1px;
    background: var(--gold);
    transition: width 0.35s ease;
}

.site-nav a:hover { color: var(--gold-light); }
.site-nav a:hover::after { width: 100%; }

/* Hamburger toggle — hidden on desktop, shown at 991px */
.menu-toggle {
    display: none;
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    padding: 8px 10px;
    cursor: pointer;
    gap: 5px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    min-width: 44px;
    min-height: 44px;
}

.menu-toggle span {
    display: block;
    width: 22px;
    height: 1.5px;
    background: var(--white);
    transition: transform 0.3s, opacity 0.3s;
}

/* Hamburger → X animation when open */
.menu-toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; }
.menu-toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Footer base */
.site-footer {
    background: #060606;
    color: var(--white);
    padding-top: 80px;
    border-top: 1px solid rgba(200, 164, 93, 0.12);
}

/* 5-column footer grid */
.footer-main-grid {
    display: grid;
    grid-template-columns: 1.7fr 1fr 1fr 0.9fr 1.3fr;
    gap: 48px;
    padding-bottom: 60px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

/* Column heading with gold underline accent */
.footer-col-heading {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--white);
    margin-bottom: 28px;
    position: relative;
    padding-bottom: 14px;
}

.footer-col-heading::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 30px;
    height: 1px;
    background: var(--gold);
}

/* Brand column */
.footer-brand-col {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.footer-logo-link {
    display: inline-block;
    margin-bottom: 20px;
}

.footer-logo {
    height: 48px;
    width: auto;
    display: block;
}

.footer-brand-tagline {
    font-family: var(--font-body);
    color: var(--gray);
    font-size: 14px;
    font-weight: 300;
    line-height: 1.9;
    margin-bottom: 26px;
}

/* Gold-coloured inline link */
.footer-gold-link {
    color: var(--gold);
    transition: opacity 0.3s;
}

.footer-gold-link:hover { opacity: 0.75; }

/* Contact row — icon + text pair */
.footer-contact-row {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 16px;
}

.footer-icon-wrap {
    padding-top: 2px;
    flex-shrink: 0;
}

.footer-icon-wrap i {
    color: var(--gold);
    font-size: 15px;
    line-height: 1.6;
}

.footer-contact-lines {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.footer-contact-lines a {
    color: var(--gray);
    font-size: 14px;
    font-weight: 300;
    line-height: 1.6;
    transition: color 0.3s;
}

.footer-contact-lines a:hover { color: var(--gold); }

/* Social icon row */
.footer-social { margin-top: 12px; }

.social-links {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--gray);
    font-size: 14px;
    transition: border-color 0.3s, color 0.3s, background 0.3s;
    flex-shrink: 0;
}

.social-links a:hover {
    border-color: var(--gold);
    color: var(--gold);
    background: rgba(200, 164, 93, 0.08);
}

/* Navigation list — used in Quick Links and project columns */
.footer-nav-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 13px;
}

.footer-nav-list li a {
    color: var(--gray);
    font-size: 14px;
    font-weight: 300;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: color 0.3s;
}

/* Icon uses translateX instead of gap animation — gap triggers layout, transform is GPU-composited */
.footer-nav-list li a i {
    color: var(--gold);
    font-size: 10px;
    transition: transform 0.3s;
    flex-shrink: 0;
}

.footer-nav-list li a:hover { color: var(--white); }
.footer-nav-list li a:hover i { transform: translateX(4px); }

/* Office address entry */
.footer-office-entry {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 24px;
}

.footer-office-entry i {
    color: var(--gold);
    font-size: 15px;
    margin-top: 3px;
    flex-shrink: 0;
}

.footer-office-entry p {
    color: var(--gray);
    font-size: 14px;
    font-weight: 300;
    line-height: 1.9;
}

/* Bottom copyright bar */
.footer-bottom {
    padding: 24px 0;
}

.footer-bottom-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.copyright {
    color: var(--gray);
    font-size: 13px;
    font-weight: 300;
    letter-spacing: 0.03em;
}

/* Back to top button */
#backToTop {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.7);
    border-radius: 50px;
    padding: 10px 24px;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: border-color 0.3s, color 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    min-height: 44px;
}

#backToTop i {
    color: var(--gold);
    font-size: 11px;
}

#backToTop:hover {
    border-color: var(--gold);
    color: var(--gold);
}

/* Policy links row — reserved for future use */
.footer-policy {
    display: flex;
    gap: 24px;
}

.footer-policy a {
    color: var(--gray);
    font-size: 13px;
    font-weight: 300;
    transition: color 0.3s;
}

.footer-policy a:hover { color: var(--gold); }

/* ============================================================
   INDRA POPUP — matches site design system exactly
   ============================================================ */

/* Overlay */
.indra-popup-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(8, 12, 10, 0.78);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}
.indra-popup-overlay.is-active {
    opacity: 1;
    visibility: visible;
}

/* Card */
.indra-popup-card {
    position: relative;
    width: 100%;
    max-width: 520px;
    max-height: 92vh;
    overflow-y: auto;
    overflow-x: hidden;
    background: #0b110d;
    border: 1px solid rgba(200, 164, 93, 0.22);
    border-radius: 18px;
    padding: 48px 40px 36px;
    box-shadow:
        0 0 0 1px rgba(200, 164, 93, 0.06),
        0 32px 80px rgba(0, 0, 0, 0.55),
        inset 0 1px 0 rgba(200, 164, 93, 0.08);
    transform: translateY(28px) scale(0.96);
    transition: transform 0.4s cubic-bezier(0.34, 1.4, 0.64, 1);
    scrollbar-width: thin;
    scrollbar-color: rgba(200,164,93,0.3) transparent;
}
.indra-popup-card::-webkit-scrollbar { width: 4px; }
.indra-popup-card::-webkit-scrollbar-track { background: transparent; }
.indra-popup-card::-webkit-scrollbar-thumb { background: rgba(200,164,93,0.3); border-radius: 4px; }

.indra-popup-overlay.is-active .indra-popup-card {
    transform: translateY(0) scale(1);
}

/* Decorative top accent line */
.indra-popup-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #c8a45d 30%, #a8833d 70%, transparent);
    border-radius: 0 0 2px 2px;
}

/* Close button */
.indra-popup-close {
    position: absolute;
    top: 16px;
    right: 18px;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    color: rgba(240, 235, 226, 0.45);
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    line-height: 1;
}
.indra-popup-close:hover {
    background: rgba(200, 164, 93, 0.12);
    border-color: rgba(200, 164, 93, 0.35);
    color: #c8a45d;
}

/* Badge */
.indra-popup-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(200, 164, 93, 0.08);
    border: 1px solid rgba(200, 164, 93, 0.22);
    color: #c8a45d;
    border-radius: 50px;
    padding: 5px 16px 5px 10px;
    font-family: 'Jost', sans-serif;
    font-size: 11.5px;
    font-weight: 500;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    margin-bottom: 20px;
}
.indra-popup-badge i {
    font-size: 12px;
}

/* Title — Playfair Display, matches your section headings */
.indra-popup-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(22px, 5vw, 30px);
    font-weight: 700;
    color: #f0ebe2;
    line-height: 1.22;
    margin: 0 0 12px;
    letter-spacing: -0.01em;
}
.indra-popup-title em {
    color: #c8a45d;
    font-style: italic;
}

/* Gold rule — matches your .gold-rule class */
.indra-popup-rule {
    width: 48px;
    height: 2px;
    background: linear-gradient(90deg, #c8a45d, #a8833d);
    border-radius: 2px;
    margin: 0 0 16px;
}

/* Subtext */
.indra-popup-sub {
    font-family: 'Jost', sans-serif;
    font-size: 14.5px;
    color: rgba(240, 235, 226, 0.58);
    line-height: 1.65;
    margin: 0 0 20px;
}

/* Highlights — matches your checklist style */
.indra-popup-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin-bottom: 26px;
    padding-bottom: 22px;
    border-bottom: 1px solid rgba(200, 164, 93, 0.1);
}
.indra-popup-highlights span {
    display: flex;
    align-items: center;
    gap: 7px;
    font-family: 'Jost', sans-serif;
    font-size: 12.5px;
    font-weight: 500;
    color: rgba(240, 235, 226, 0.7);
    letter-spacing: 0.02em;
}
.indra-popup-highlights i {
    width: 18px;
    height: 18px;
    background: rgba(200, 164, 93, 0.12);
    border: 1px solid rgba(200, 164, 93, 0.25);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #c8a45d;
    font-size: 9px;
    flex-shrink: 0;
}

/* ---- Form fields ---- */
.indra-popup-form .popup-form-row {
    margin-bottom: 12px;
}
.indra-popup-form .wpcf7-form-control-wrap {
    display: block;
    width: 100%;
}

/* Inputs and select — mirrors your contact.css field style */
.indra-popup-form input[type="text"],
.indra-popup-form input[type="tel"],
.indra-popup-form select {
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(200, 164, 93, 0.18);
    border-radius: 9px;
    padding: 13px 16px;
    font-family: 'Jost', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: #f0ebe2;
    outline: none;
    transition: border-color 0.25s, background 0.25s, box-shadow 0.25s;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}
.indra-popup-form input::placeholder {
    color: rgba(240, 235, 226, 0.28);
    font-style: italic;
}
.indra-popup-form input:focus,
.indra-popup-form select:focus {
    border-color: rgba(200, 164, 93, 0.55);
    background: rgba(200, 164, 93, 0.05);
    box-shadow: 0 0 0 3px rgba(200, 164, 93, 0.08);
}

/* Select arrow */
.indra-popup-form .wpcf7-form-control-wrap:has(select)::after {
    content: '\f107';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(200, 164, 93, 0.5);
    pointer-events: none;
    font-size: 13px;
}
.indra-popup-form .wpcf7-form-control-wrap:has(select) {
    position: relative;
    display: block;
}
.indra-popup-form select option {
    background: #111a13;
    color: #f0ebe2;
}

/* Submit button — matches your .btn.btn-gold */
.indra-popup-form .popup-submit-btn {
    width: 100%;
    background: linear-gradient(135deg, #c8a45d 0%, #b8903d 50%, #a8803d 100%);
    border: none;
    border-radius: 9px;
    padding: 15px 24px;
    font-family: 'Jost', sans-serif;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: #0b110d;
    cursor: pointer;
    margin-top: 8px;
    transition: opacity 0.2s, transform 0.18s, box-shadow 0.2s;
    box-shadow: 0 4px 18px rgba(200, 164, 93, 0.22);
    position: relative;
    overflow: hidden;
}
.indra-popup-form .popup-submit-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
    opacity: 0;
    transition: opacity 0.2s;
}
.indra-popup-form .popup-submit-btn:hover {
    opacity: 0.92;
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(200, 164, 93, 0.32);
}
.indra-popup-form .popup-submit-btn:hover::after {
    opacity: 1;
}
.indra-popup-form .popup-submit-btn:active {
    transform: translateY(0);
}

/* CF7 validation messages */
.indra-popup-form .wpcf7-not-valid-tip {
    display: block;
    font-family: 'Jost', sans-serif;
    font-size: 11.5px;
    color: #e07474;
    margin-top: 4px;
    padding-left: 2px;
}
.indra-popup-form .wpcf7-response-output {
    font-family: 'Jost', sans-serif;
    font-size: 13px;
    border-radius: 8px;
    padding: 10px 14px;
    margin-top: 12px !important;
    border: none !important;
}
.indra-popup-form .wpcf7-mail-sent-ok {
    background: rgba(44, 95, 79, 0.18) !important;
    color: #7ec8a4 !important;
    border-left: 3px solid #2c5f4f !important;
}
.indra-popup-form .wpcf7-validation-errors,
.indra-popup-form .wpcf7-spam-blocked {
    background: rgba(155, 58, 58, 0.15) !important;
    color: #e07474 !important;
    border-left: 3px solid #9b3a3a !important;
}

/* Privacy note */
.indra-popup-privacy {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: 'Jost', sans-serif;
    font-size: 11px;
    color: rgba(240, 235, 226, 0.28);
    margin-top: 16px;
    letter-spacing: 0.02em;
}
.indra-popup-privacy i {
    color: rgba(200, 164, 93, 0.4);
    font-size: 10px;
}

/* ---- Mobile responsive ---- */
@media (max-width: 560px) {
    .indra-popup-card {
        padding: 40px 20px 28px;
        border-radius: 14px;
    }
    .indra-popup-title {
        font-size: 22px;
    }
    .indra-popup-highlights {
        gap: 8px 14px;
    }
    .indra-popup-form input[type="text"],
    .indra-popup-form input[type="tel"],
    .indra-popup-form select {
        padding: 12px 14px;
        font-size: 15px; /* slightly larger on mobile for easier tapping */
    }
    .indra-popup-form .popup-submit-btn {
        padding: 16px 20px;
        font-size: 15px;
    }
}

@media (max-width: 360px) {
    .indra-popup-card {
        padding: 36px 16px 24px;
    }
}

/* ─────────────────────────────────────────────────────────
   Responsive breakpoints
───────────────────────────────────────────────────────── */

@media (max-width: 1200px) {
    .footer-main-grid { gap: 36px; }
    .site-nav          { gap: 26px; }
}

@media (max-width: 1024px) {
    .footer-main-grid {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }

    /* Brand and office columns span full width at this breakpoint */
    .footer-brand-col  { grid-column: 1 / -1; }
    .footer-office-col { grid-column: 1 / -1; }

    .container { width: min(var(--container), calc(100% - 40px)); }
}

@media (max-width: 991px) {
    .menu-toggle { display: flex; }

    /* Mobile nav — full-width dropdown below header */
    .site-nav {
        display: none;
        position: absolute;
        top: var(--header-height); /* synced via CSS custom property */
        left: 0;
        width: 100%;
        background: rgba(0, 0, 0, 0.97);
        backdrop-filter: blur(14px);
        -webkit-backdrop-filter: blur(14px);
        flex-direction: column;
        align-items: flex-start;
        padding: 28px 30px;
        gap: 22px;
        border-top: 1px solid rgba(200, 164, 93, 0.12);
        z-index: 9998;
    }

    .site-nav.open { display: flex; }

    .site-nav a {
        font-size: 14px;
        padding: 4px 0;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .footer-main-grid {
        grid-template-columns: 1fr;
        gap: 36px;
        padding-bottom: 40px;
    }

    .footer-brand-col  { grid-column: auto; }
    .footer-office-col { grid-column: auto; }

    .footer-bottom-inner {
        flex-direction: column;
        text-align: center;
        gap: 18px;
    }

    .footer-policy { justify-content: center; }

    .site-footer { padding-top: 60px; }
}

@media (max-width: 576px) {
    /* Header height token updated — .site-nav top stays in sync automatically */
    :root { --header-height: 70px; }

    .logo img      { height: 36px; }
    .header-inner  { height: var(--header-height); }

    /* FIX: Tighten horizontal padding at small screens */
    .header-inner  { padding: 0 16px; }

    .site-nav {
        padding: 24px 20px;
        gap: 18px;
    }

    .footer-col-heading { font-size: 15px; }

    .footer-policy {
        flex-direction: column;
        gap: 12px;
        align-items: center;
    }

    .container { width: min(var(--container), calc(100% - 32px)); }
}

@media (max-width: 400px) {
    /* Header height token updated — .site-nav top stays in sync automatically */
    :root { --header-height: 64px; }

    .header-inner  { height: var(--header-height); padding: 0 14px; }
    .logo img      { height: 32px; }

    #backToTop {
        padding: 8px 18px;
        font-size: 11px;
    }

    .footer-contact-lines a { font-size: 13px; }
}