/* =================================================================
   CivArc.Vip — Main Stylesheet
   Theme: Navy / White, "drafting table" structural engineering identity
   ================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
    --navy-deep: #081628;
    --navy: #0B1F3A;
    --navy-light: #16335C;
    --steel: #5C7A99;
    --steel-light: #9FB3C8;
    --gold: #C8A24A;
    --gold-light: #DDBE7A;
    --white: #FFFFFF;
    --off-white: #F6F8FA;
    --line: #E3E8EE;
    --text-dark: #16263D;
    --text-muted: #5C6B7E;

    --font-display: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;

    --radius: 10px;
    --shadow-sm: 0 2px 8px rgba(11, 31, 58, 0.06);
    --shadow-md: 0 8px 24px rgba(11, 31, 58, 0.10);
    --shadow-lg: 0 16px 48px rgba(11, 31, 58, 0.16);
    --container: 1180px;
}

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

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    background: var(--white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--navy);
    line-height: 1.2;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

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

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 14px;
}
.eyebrow::before {
    content: '';
    width: 22px;
    height: 2px;
    background: var(--gold);
}

/* Signature: the "load line" — a beam-line that draws under section headings */
.section-heading {
    position: relative;
    display: inline-block;
    font-size: clamp(28px, 4vw, 40px);
    margin-bottom: 18px;
    padding-bottom: 18px;
}
.section-heading::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    height: 3px;
    width: 64px;
    background: linear-gradient(90deg, var(--navy) 0%, var(--gold) 100%);
    border-radius: 2px;
    animation: drawLine 1s ease forwards;
    transform-origin: left;
}
@keyframes drawLine {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

.section-sub {
    max-width: 600px;
    color: var(--text-muted);
    font-size: 16px;
    margin-bottom: 48px;
}

.section { padding: 88px 0; }
.section--alt { background: var(--off-white); }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 6px;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 15px;
    border: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.btn--primary {
    background: var(--navy);
    color: var(--white);
}
.btn--primary:hover { background: var(--navy-light); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn--gold {
    background: var(--gold);
    color: var(--navy-deep);
}
.btn--gold:hover { background: var(--gold-light); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn--outline {
    background: transparent;
    border: 1.5px solid var(--white);
    color: var(--white);
}
.btn--outline:hover { background: rgba(255,255,255,0.1); }
.btn--outline-navy {
    background: transparent;
    border: 1.5px solid var(--navy);
    color: var(--navy);
}
.btn--outline-navy:hover { background: var(--navy); color: var(--white); }
.btn--whatsapp {
    background: #25D366;
    color: var(--white);
}
.btn--whatsapp:hover { background: #1FB855; transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn--block { width: 100%; }

/* ===================== HEADER ===================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255,255,255,0.96);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}
.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 76px;
}
.logo {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    color: var(--navy);
    display: flex;
    align-items: baseline;
    gap: 2px;
}
.logo .logo-vip { color: var(--gold); font-size: 14px; font-weight: 600; }
.logo-mark {
    width: 10px;
    height: 10px;
    background: var(--gold);
    display: inline-block;
    margin-right: 8px;
    transform: rotate(45deg);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 36px;
}
.nav-links a {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-dark);
    position: relative;
    padding: 6px 0;
}
.nav-links a:hover, .nav-links a.active { color: var(--navy); }
.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 2px;
    background: var(--gold);
}
.nav-cta { display: flex; align-items: center; gap: 14px; }
.nav-phone {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--navy);
    font-size: 14px;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    padding: 8px;
}
.nav-toggle span { width: 24px; height: 2px; background: var(--navy); border-radius: 2px; transition: 0.25s; }

/* Mobile nav hidden by default on ALL screen sizes */
.mobile-nav {
    display: none;
}

/* ===================== HERO ===================== */
.hero {
    position: relative;
    background: var(--navy-deep);
    overflow: hidden;
    padding: 80px 0 100px;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(ellipse 80% 80% at 30% 40%, black 30%, transparent 75%);
}
.hero .container {
    position: relative;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 48px;
    align-items: center;
}
.hero-eyebrow {
    color: var(--gold-light);
}
.hero-eyebrow::before { background: var(--gold-light); }
.hero h1 {
    color: var(--white);
    font-size: clamp(34px, 5vw, 54px);
    line-height: 1.12;
    margin-bottom: 22px;
}
.hero h1 span { color: var(--gold-light); }
.hero p {
    color: var(--steel-light);
    font-size: 17px;
    max-width: 480px;
    margin-bottom: 34px;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 56px;
    max-width: 480px;
}
.hero-stat .num {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 700;
    color: var(--white);
}
.hero-stat .label {
    font-size: 13px;
    color: var(--steel-light);
    margin-top: 4px;
}

/* Hero blueprint diagram graphic */
.hero-diagram {
    position: relative;
    aspect-ratio: 1/1;
    max-width: 440px;
    margin-left: auto;
}
.hero-diagram svg { width: 100%; height: 100%; }

/* ===================== SERVICE CARDS ===================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}
.service-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 32px 26px;
    transition: all 0.25s ease;
}
.service-card:hover {
    border-color: var(--navy);
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}
.service-icon {
    width: 52px;
    height: 52px;
    border-radius: 10px;
    background: var(--navy);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--gold-light);
}
.service-icon svg { width: 26px; height: 26px; }
.service-card h3 { font-size: 19px; margin-bottom: 10px; }
.service-card p { color: var(--text-muted); font-size: 14.5px; margin-bottom: 16px; }
.service-card .link-arrow {
    font-size: 14px;
    font-weight: 600;
    color: var(--navy);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.service-card:hover .link-arrow { color: var(--gold); }

/* ===================== ABOUT ===================== */
.about-grid {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 64px;
    align-items: center;
}
.about-portrait {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--navy);
    aspect-ratio: 4/5;
}
.about-portrait img { width: 100%; height: 100%; object-fit: cover; }
.about-credential {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: rgba(8,22,40,0.85);
    backdrop-filter: blur(6px);
    border-radius: 8px;
    padding: 16px 18px;
    color: var(--white);
}
.about-credential .role { font-size: 13px; color: var(--gold-light); font-weight: 600; }
.about-credential .name { font-family: var(--font-display); font-size: 18px; font-weight: 700; }

.about-list { margin-top: 28px; display: grid; gap: 16px; }
.about-list-item { display: flex; gap: 14px; align-items: flex-start; }
.about-list-item .check {
    flex-shrink: 0;
    width: 24px; height: 24px;
    border-radius: 50%;
    background: var(--navy);
    color: var(--gold-light);
    display: flex; align-items: center; justify-content: center;
    margin-top: 2px;
}
.about-list-item .check svg { width: 13px; height: 13px; }
.about-list-item h4 { font-size: 15.5px; margin-bottom: 2px; }
.about-list-item p { font-size: 14px; color: var(--text-muted); }

/* ===================== PORTFOLIO / GALLERY ===================== */
.portfolio-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}
.filter-btn {
    padding: 10px 20px;
    border-radius: 30px;
    border: 1.5px solid var(--line);
    background: var(--white);
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    transition: 0.2s;
}
.filter-btn:hover { border-color: var(--navy); color: var(--navy); }
.filter-btn.active { background: var(--navy); border-color: var(--navy); color: var(--white); }

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}
.portfolio-card {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 4/3;
    background: var(--off-white);
    cursor: pointer;
}
.portfolio-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.portfolio-card:hover img { transform: scale(1.07); }
.portfolio-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(8,22,40,0.92) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.portfolio-card:hover .portfolio-overlay { opacity: 1; }
.portfolio-overlay .cat { font-size: 12px; color: var(--gold-light); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.portfolio-overlay h4 { color: var(--white); font-size: 17px; margin-top: 4px; }

/* Lightbox */
.lightbox {
    position: fixed; inset: 0;
    background: rgba(8,22,40,0.95);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 40px;
}
.lightbox.active { display: flex; }
.lightbox-content { max-width: 900px; width: 100%; }
.lightbox-content img { width: 100%; border-radius: 8px; max-height: 75vh; object-fit: contain; background: #000; }
.lightbox-info { color: var(--white); margin-top: 16px; text-align: center; }
.lightbox-close {
    position: absolute; top: 24px; right: 32px;
    background: none; border: none; color: var(--white);
    font-size: 32px; line-height: 1;
}
.lightbox-nav {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(255,255,255,0.1); border: none; color: var(--white);
    width: 46px; height: 46px; border-radius: 50%; font-size: 20px;
}
.lightbox-nav:hover { background: rgba(255,255,255,0.2); }
.lightbox-prev { left: 24px; }
.lightbox-next { right: 24px; }

/* ===================== CONTACT ===================== */
.contact-grid {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 56px;
}
.contact-info-card {
    background: var(--navy-deep);
    border-radius: var(--radius);
    padding: 40px 32px;
    color: var(--white);
    height: fit-content;
}
.contact-info-card h3 { color: var(--white); font-size: 22px; margin-bottom: 8px; }
.contact-info-card > p { color: var(--steel-light); font-size: 14.5px; margin-bottom: 32px; }
.contact-item { display: flex; gap: 16px; margin-bottom: 26px; }
.contact-item .icon-box {
    width: 42px; height: 42px; border-radius: 8px;
    background: rgba(255,255,255,0.08);
    display: flex; align-items: center; justify-content: center;
    color: var(--gold-light); flex-shrink: 0;
}
.contact-item .icon-box svg { width: 19px; height: 19px; }
.contact-item .label { font-size: 12.5px; color: var(--steel-light); text-transform: uppercase; letter-spacing: 0.04em; }
.contact-item .value { font-weight: 600; font-size: 15px; margin-top: 2px; }
.contact-social { display: flex; gap: 10px; margin-top: 32px; }
.contact-social a {
    width: 40px; height: 40px; border-radius: 8px;
    background: rgba(255,255,255,0.08);
    display: flex; align-items: center; justify-content: center;
    transition: 0.2s;
}
.contact-social a:hover { background: var(--gold); }
.contact-social svg { width: 18px; height: 18px; color: var(--white); }

.contact-form-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 40px;
    box-shadow: var(--shadow-sm);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-group { margin-bottom: 20px; }
.form-group label {
    display: block; font-size: 13.5px; font-weight: 600;
    margin-bottom: 8px; color: var(--text-dark);
}
.form-group input, .form-group textarea, .form-group select {
    width: 100%;
    padding: 13px 16px;
    border: 1.5px solid var(--line);
    border-radius: 6px;
    font-family: var(--font-body);
    font-size: 14.5px;
    transition: 0.2s;
    background: var(--off-white);
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    outline: none;
    border-color: var(--navy);
    background: var(--white);
}
.form-group textarea { resize: vertical; min-height: 130px; }
.form-msg { padding: 14px 18px; border-radius: 6px; margin-bottom: 20px; font-size: 14px; display: none; }
.form-msg.success { background: #E7F7EE; color: #157347; display: block; }
.form-msg.error { background: #FDECEC; color: #B42318; display: block; }

/* Map */
.contact-map { margin-top: 56px; border-radius: var(--radius); overflow: hidden; height: 360px; border: 1px solid var(--line); }
.contact-map iframe { width: 100%; height: 100%; border: 0; }

/* ===================== CTA BAND ===================== */
.cta-band {
    background: var(--navy);
    padding: 64px 0;
    text-align: center;
}
.cta-band h2 { color: var(--white); font-size: clamp(24px, 3.5vw, 32px); margin-bottom: 14px; }
.cta-band p { color: var(--steel-light); margin-bottom: 30px; }
.cta-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ===================== FOOTER ===================== */
.site-footer { background: var(--navy-deep); color: var(--steel-light); padding-top: 64px; }
.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
    gap: 40px;
    padding-bottom: 48px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-logo { font-family: var(--font-display); font-size: 20px; font-weight: 700; color: var(--white); margin-bottom: 14px; }
.footer-logo .logo-vip { color: var(--gold); font-size: 13px; }
.footer-grid p { font-size: 14px; line-height: 1.7; }
.footer-col h5 { color: var(--white); font-family: var(--font-display); font-size: 14px; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 18px; }
.footer-col ul li { margin-bottom: 12px; }
.footer-col ul a { font-size: 14px; transition: 0.2s; }
.footer-col ul a:hover { color: var(--gold-light); }
.footer-bottom { padding: 24px 0; display: flex; justify-content: space-between; align-items: center; font-size: 13px; flex-wrap: wrap; gap: 10px; }
.footer-bottom a { color: var(--steel-light); }
.footer-bottom a:hover { color: var(--gold-light); }

/* ===================== CHAT WIDGET ===================== */
.chat-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1500;
    font-family: var(--font-body);
}
.chat-launcher {
    width: 60px; height: 60px;
    border-radius: 50%;
    background: var(--navy);
    color: var(--white);
    display: flex; align-items: center; justify-content: center;
    box-shadow: var(--shadow-lg);
    border: none;
    position: relative;
    transition: transform 0.2s ease;
}
.chat-launcher:hover { transform: scale(1.06); }
.chat-launcher svg { width: 26px; height: 26px; }
.chat-launcher .badge {
    position: absolute; top: -4px; right: -4px;
    background: var(--gold); color: var(--navy-deep);
    font-size: 11px; font-weight: 700;
    width: 20px; height: 20px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    display: none;
}
.chat-panel {
    position: absolute;
    bottom: 76px;
    right: 0;
    width: 340px;
    max-width: calc(100vw - 48px);
    background: var(--white);
    border-radius: 14px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    display: none;
    flex-direction: column;
    max-height: 480px;
}
.chat-panel.active { display: flex; }
.chat-header {
    background: var(--navy);
    color: var(--white);
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.chat-header .dot { width: 9px; height: 9px; background: #3DDC84; border-radius: 50%; flex-shrink: 0; }
.chat-header strong { font-family: var(--font-display); font-size: 15px; display: block; }
.chat-header span { font-size: 12.5px; color: var(--steel-light); }
.chat-body {
    flex: 1;
    padding: 18px;
    overflow-y: auto;
    background: var(--off-white);
    min-height: 200px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.chat-bubble {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 13.5px;
    line-height: 1.5;
}
.chat-bubble.bot {
    background: var(--white);
    border: 1px solid var(--line);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}
.chat-bubble.visitor {
    background: var(--navy);
    color: var(--white);
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}
.chat-bubble.admin {
    background: var(--white);
    border: 1px solid var(--gold-light);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}
.chat-whatsapp-prompt {
    background: #E7F7EE;
    border: 1px solid #9FE0BA;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 13px;
    align-self: stretch;
}
.chat-whatsapp-prompt a {
    color: #157347;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
}
.chat-input-row {
    display: flex;
    gap: 8px;
    padding: 14px;
    border-top: 1px solid var(--line);
    background: var(--white);
}
.chat-input-row input {
    flex: 1;
    border: 1.5px solid var(--line);
    border-radius: 20px;
    padding: 10px 16px;
    font-size: 13.5px;
    font-family: inherit;
}
.chat-input-row input:focus { outline: none; border-color: var(--navy); }
.chat-send-btn {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: var(--navy);
    color: var(--white);
    border: none;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.chat-send-btn svg { width: 16px; height: 16px; }

/* ===================== UTILITIES / PAGE HEADER ===================== */
.page-hero {
    background: var(--navy-deep);
    padding: 64px 0 56px;
    position: relative;
    overflow: hidden;
}
.page-hero::before {
    content: '';
    position: absolute; inset: 0;
    background-image: linear-gradient(rgba(255,255,255,0.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(ellipse 70% 100% at 20% 0%, black 20%, transparent 70%);
}
.page-hero .container { position: relative; }
.page-hero .eyebrow { color: var(--gold-light); }
.page-hero .eyebrow::before { background: var(--gold-light); }
.page-hero h1 { color: var(--white); font-size: clamp(28px, 4vw, 42px); }
.breadcrumb { color: var(--steel-light); font-size: 14px; margin-top: 10px; }
.breadcrumb a { color: var(--steel-light); }
.breadcrumb a:hover { color: var(--gold-light); }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 980px) {
    .hero .container { grid-template-columns: 1fr; }
    .hero-diagram { display: none; }
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .about-grid { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
    .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .nav-links, .nav-cta .nav-phone { display: none; }
    .nav-toggle { display: flex; }
    .mobile-nav.active {
        display: flex;
        position: fixed;
        top: 76px; left: 0; right: 0; bottom: 0;
        background: var(--white);
        z-index: 999;
        flex-direction: column;
        padding: 32px 24px;
        gap: 4px;
        overflow-y: auto;
    }
    .mobile-nav a {
        padding: 16px 4px;
        border-bottom: 1px solid var(--line);
        font-size: 17px;
        font-weight: 600;
        color: var(--navy);
    }
    .mobile-nav .btn { margin-top: 20px; }
    .form-row { grid-template-columns: 1fr; }
    .services-grid { grid-template-columns: 1fr; }
    .portfolio-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .hero-stats { grid-template-columns: repeat(3, 1fr); gap: 12px; }
    .chat-panel { width: calc(100vw - 32px); right: -8px; }
    .section { padding: 60px 0; }
}
