/* ============================================================
   DACNEX v2 — Premium Minimalist Design System
   Inspired by Tesla, Ørsted, Siemens Energy
   Signature: "Energy Line" — a thin vertical green rule on
   section left edges, pulsing with the brand's living-green.
   ============================================================ */

:root {
    --white:       #FFFFFF;
    --off-white:   #F7F7F7;
    --light-gray:  #F0F0F0;
    --mid-gray:    #E0E0E0;
    --text-muted:  #888888;
    --text-body:   #444444;
    --text-dark:   #111111;
    --navy:        #28396C;
    --navy-deep:   #1a2444;
    --green:       #B5E18B;
    --green-dark:  #8ecf5a;
    --line-color:  rgba(40, 57, 108, 0.10);

    --font-display: 'Inter', 'Helvetica Neue', Arial, sans-serif;
    --font-body:    'Inter', 'Helvetica Neue', Arial, sans-serif;

    --max-w: 1280px;
    --pad-x: clamp(1.5rem, 5vw, 5rem);
    --section-y: clamp(5rem, 10vw, 9rem);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
    font-family: var(--font-body);
    color: var(--text-body);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; }
ul, ol { list-style: none; }

::selection { background: var(--green); color: var(--navy-deep); }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* ── Layout helpers ── */
.container {
    width: 100%;
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 var(--pad-x);
}

section { padding: var(--section-y) 0; position: relative; }

/* ── Type scale ── */
.t-display {
    font-size: clamp(3rem, 7vw, 6.5rem);
    font-weight: 700;
    line-height: 1.0;
    letter-spacing: -0.03em;
    color: var(--text-dark);
}

.t-h1 {
    font-size: clamp(2.4rem, 5vw, 4.5rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.025em;
    color: var(--text-dark);
}

.t-h2 {
    font-size: clamp(1.8rem, 3.5vw, 3rem);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--text-dark);
}

.t-h3 {
    font-size: clamp(1.2rem, 2vw, 1.6rem);
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-dark);
}

.t-body {
    font-size: clamp(1rem, 1.5vw, 1.125rem);
    line-height: 1.75;
    color: var(--text-body);
}

.t-caption {
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.t-label {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

/* ── Signature: Energy Line ── */
.energy-line {
    display: block;
    width: 2px;
    height: 3rem;
    background: var(--green);
    margin-bottom: 2rem;
}

/* ── Horizontal rule ── */
.dx-rule {
    width: 100%;
    height: 1px;
    background: var(--line-color);
    border: none;
}

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    font-size: 0.92rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    padding: 1rem 2.5rem;
    border-radius: 999px;
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    white-space: nowrap;
    cursor: pointer;
}

.btn-primary {
    background: var(--navy);
    color: var(--white);
    border: 2px solid var(--navy);
    box-shadow: 0 1px 2px rgba(17,17,17,0.04);
}
.btn-primary:hover {
    background: var(--navy-deep);
    border-color: var(--navy-deep);
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(26,36,68,0.28);
}

.btn-outline {
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255,255,255,0.6);
}
.btn-outline:hover {
    border-color: var(--white);
    background: rgba(255,255,255,0.1);
    transform: translateY(-2px);
}

.btn-outline-dark {
    background: transparent;
    color: var(--navy);
    border: 2px solid var(--navy);
}
.btn-outline-dark:hover {
    background: var(--navy);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(26,36,68,0.22);
}

.btn-green {
    background: var(--green);
    color: var(--navy-deep);
    border: 2px solid var(--green);
    font-weight: 700;
    box-shadow: 0 1px 2px rgba(17,17,17,0.04);
}
.btn-green:hover {
    background: var(--green-dark);
    border-color: var(--green-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(142,207,90,0.35);
}

.btn-arrow { transition: transform 0.22s ease; }
.btn:hover .btn-arrow { transform: translateX(4px); }

/* ── Topbar (removed per request — Baku/Azerbaijan line hidden) ── */
.topbar {
    display: none;
}
.topbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.topbar-text {
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.55);
    text-transform: uppercase;
}
.topbar a { color: rgba(255,255,255,0.55); transition: color 0.2s; }
.topbar a:hover { color: var(--green); }
.topbar-right { display: flex; gap: 1.5rem; }

/* ── Navbar ── */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,255,255,0.7);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(0,0,0,0.06);
    transition: background 0.3s ease;
}
.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 76px;
}
.nav-logo img {
    height: 40px;
    width: auto;
}
.nav-links {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
.nav-links a {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-body);
    position: relative;
    padding: 0.6rem 1.1rem;
    border-radius: 999px;
    transition: color 0.25s ease, background 0.25s ease;
}
.nav-links a:hover,
.nav-links a.active {
    color: var(--navy);
    background: var(--light-gray);
}

.nav-cta { margin-left: 1.5rem; }

/* CSS-only mobile nav */
.nav-check { display: none; }
.nav-toggle {
    display: none;
    width: 44px; height: 44px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 1px solid var(--mid-gray);
}

/* ── Hero ── */
.hero {
    position: relative;
    min-height: 100svh;
    display: flex;
    align-items: flex-end;
    padding-bottom: clamp(4rem, 8vw, 7rem);
    overflow: hidden;
    background: var(--navy-deep);
}
.hero-media {
    position: absolute;
    inset: 0;
}
.hero-media img,
.hero-media video {
    width: 100%; height: 100%;
    object-fit: cover;
    opacity: 0.45;
}
.hero-media::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(26,36,68,0.2) 0%,
        rgba(26,36,68,0.55) 50%,
        rgba(26,36,68,0.85) 100%
    );
}
.hero-content {
    position: relative;
    z-index: 2;
    max-width: 820px;
}
.hero-content .t-display {
    color: var(--white);
    margin-bottom: 1.5rem;
}
.hero-content .t-body {
    color: rgba(255,255,255,0.78);
    max-width: 52ch;
    margin-bottom: 2.5rem;
    font-size: 1.15rem;
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

/* Hero scroll indicator */
.hero-scroll {
    position: absolute;
    bottom: 2.5rem;
    right: var(--pad-x);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}
.hero-scroll span {
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.4);
    writing-mode: vertical-rl;
}
.hero-scroll-line {
    width: 1px;
    height: 48px;
    background: linear-gradient(to bottom, transparent, var(--green));
}

/* ── Who We Are split ── */
.split-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    min-height: 600px;
}
.split-text {
    padding: var(--section-y) var(--pad-x) var(--section-y) 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-left: max(var(--pad-x), calc((100vw - var(--max-w)) / 2));
}
.split-image {
    position: relative;
    overflow: hidden;
}
.split-image img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}
.split-section:hover .split-image img { transform: scale(1.03); }

/* ── Vision cards ── */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}
.card-item {
    padding: 3rem 2.5rem;
    border: 1px solid var(--mid-gray);
    border-radius: 20px;
    position: relative;
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.card-item:hover {
    border-color: transparent;
    box-shadow: 0 16px 40px rgba(17,17,17,0.08);
    transform: translateY(-4px);
}
.card-icon {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    display: block;
}
.card-item .t-h3 { margin-bottom: 1rem; }
.card-item .t-body { font-size: 0.95rem; color: var(--text-muted); }

/* ── Featured project ── */
.project-feature {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}
.project-feature-img {
    position: relative;
    aspect-ratio: 4 / 3;
    border-radius: 24px;
    overflow: hidden;
}
.project-feature-img img {
    width: 100%; height: 100%;
    object-fit: cover;
}
.project-stats {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 2.5rem;
}
.project-stat {
    padding-left: 1.25rem;
    border-left: 2px solid var(--green);
}
.project-stat-num {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--navy);
    line-height: 1;
    letter-spacing: -0.03em;
}
.project-stat-label {
    font-size: 0.82rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-top: 0.25rem;
}

/* ── Impact numbers ── */
.impact-section { background: var(--off-white); }
.impact-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--mid-gray);
    border-radius: 24px;
    overflow: hidden;
}
.impact-item {
    padding: 3.5rem 2rem;
    background: var(--off-white);
    text-align: center;
    transition: background 0.25s ease;
}
.impact-item:hover { background: var(--white); }
.impact-num {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    color: var(--navy);
    line-height: 1;
    letter-spacing: -0.04em;
    display: block;
    margin-bottom: 0.75rem;
}
.impact-label {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

/* ── CTA band ── */
.cta-band {
    background: var(--navy);
    padding: clamp(5rem, 10vw, 8rem) 0;
    text-align: center;
}
.cta-band .t-h1 { color: var(--white); margin-bottom: 2.5rem; }
.cta-band .t-body { color: rgba(255,255,255,0.65); max-width: 52ch; margin: 0 auto 2.5rem; }

/* ── Page header ── */
.page-header {
    padding: clamp(8rem, 14vw, 12rem) 0 clamp(4rem, 7vw, 6rem);
    border-bottom: 1px solid var(--mid-gray);
}
.page-header .t-h1 { max-width: 820px; margin-top: 1.5rem; }
.page-header .t-body {
    max-width: 56ch;
    margin-top: 1.5rem;
    font-size: 1.1rem;
}

/* ── Page header with background image ── */
.page-header-media {
    position: relative;
    min-height: 50vh;
    display: flex;
    align-items: flex-end;
    padding: 0;
    overflow: hidden;
    background: var(--navy-deep);
}
.page-header-media .media-bg {
    position: absolute;
    inset: 0;
}
.page-header-media .media-bg img {
    width: 100%; height: 100%;
    object-fit: cover;
    opacity: 0.4;
}
.page-header-media .media-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--navy-deep) 0%, transparent 60%);
}
.page-header-media .page-header-inner {
    position: relative;
    z-index: 2;
    padding: 5rem var(--pad-x) 4rem;
    width: 100%;
    max-width: var(--max-w);
    margin: 0 auto;
}
.page-header-media .t-h1 { color: var(--white); }
.page-header-media .t-body { color: rgba(255,255,255,0.7); }
.page-header-media .t-caption { color: rgba(255,255,255,0.5); }

/* ── Services / project cards ── */
.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}
.service-card {
    background: var(--white);
    border: 1px solid var(--mid-gray);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.service-card:hover {
    border-color: transparent;
    box-shadow: 0 16px 40px rgba(17,17,17,0.08);
    transform: translateY(-4px);
}
.service-card-img {
    aspect-ratio: 3/2;
    overflow: hidden;
}
.service-card-img img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}
.service-card:hover .service-card-img img { transform: scale(1.05); }
.service-card-body { padding: 2.25rem 2rem; }
.service-card-body .t-h3 { margin-bottom: 0.85rem; }
.service-card-body .t-body { font-size: 0.95rem; color: var(--text-muted); }

/* ── Projects gallery ── */
.project-gallery { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.25rem; margin-top: 3rem; }
.gallery-item { position: relative; aspect-ratio: 4/3; border-radius: 18px; overflow: hidden; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.gallery-item:hover img { transform: scale(1.06); }

/* ── Contact ── */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 6rem;
    align-items: start;
}
.contact-info { display: flex; flex-direction: column; gap: 2rem; }
.contact-item { padding-bottom: 2rem; border-bottom: 1px solid var(--mid-gray); }
.contact-item:last-child { border-bottom: none; }
.contact-item .t-label { color: var(--text-muted); margin-bottom: 0.5rem; display: block; }
.contact-item a, .contact-item p { font-size: 1rem; color: var(--text-dark); }
.contact-item a:hover { color: var(--navy); }

/* Form */
.dx-form { display: flex; flex-direction: column; gap: 1.25rem; }
.dx-field { display: flex; flex-direction: column; gap: 0.5rem; }
.dx-field label {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.dx-field input,
.dx-field textarea {
    width: 100%;
    padding: 1rem 1.25rem;
    background: var(--off-white);
    border: 1px solid var(--mid-gray);
    border-radius: 14px;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text-dark);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.dx-field input:focus,
.dx-field textarea:focus {
    outline: none;
    border-color: var(--navy);
    box-shadow: 0 0 0 4px rgba(40,57,108,0.1);
}
.dx-field textarea { resize: vertical; min-height: 130px; }
.dx-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }

/* ── Footer ── */
.footer {
    background: var(--navy-deep);
    padding: 5rem 0 2.5rem;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 4rem;
    padding-bottom: 4rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.footer-brand img { height: 38px; width: auto; margin-bottom: 1.25rem; }
.footer-brand p {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.45);
    max-width: 28ch;
    line-height: 1.7;
}
.footer-col h5 {
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.3);
    margin-bottom: 1.25rem;
}
.footer-links { display: flex; flex-direction: column; gap: 0.75rem; }
.footer-links a {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.55);
    transition: color 0.2s;
}
.footer-links a:hover { color: var(--green); }
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    font-size: 0.78rem;
    color: rgba(255,255,255,0.25);
}

/* ── Back to top ── */
.back-top {
    position: fixed;
    right: 2rem;
    bottom: 2rem;
    width: 48px; height: 48px;
    border-radius: 50%;
    background: var(--navy);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    z-index: 80;
    box-shadow: 0 8px 20px rgba(26,36,68,0.25);
    transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.back-top:hover { background: var(--navy-deep); transform: translateY(-3px); box-shadow: 0 12px 28px rgba(26,36,68,0.32); }

/* ── Reveal animations ── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}
.reveal { animation: fadeUp 0.75s ease both; }
.reveal-d1 { animation-delay: 0.1s; }
.reveal-d2 { animation-delay: 0.2s; }
.reveal-d3 { animation-delay: 0.3s; }

/* ── Responsive ── */
@media (max-width: 1024px) {
    .split-section { grid-template-columns: 1fr; min-height: auto; }
    .split-text {
        padding: var(--section-y) var(--pad-x);
        order: 2;
    }
    .split-image { min-height: 360px; order: 1; }

    .project-feature { grid-template-columns: 1fr; gap: 3rem; }
    .impact-grid { grid-template-columns: repeat(2,1fr); }
    .cards-grid { grid-template-columns: 1fr 1fr; }
    .contact-grid { grid-template-columns: 1fr; gap: 3rem; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 2.5rem; }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .nav-toggle { display: flex; }
    .nav-cta { display: none; }

    .nav-check:checked ~ .nav-links {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 76px; left: 0; right: 0;
        background: var(--white);
        border-bottom: 1px solid var(--mid-gray);
        padding: 1rem var(--pad-x) 1.5rem;
        gap: 0;
        z-index: 99;
    }
    .nav-check:checked ~ .nav-links a {
        padding: 0.9rem 0;
        border-top: 1px solid var(--mid-gray);
    }

    .cards-grid { grid-template-columns: 1fr; }
    .services-grid { grid-template-columns: 1fr; }
    .impact-grid { grid-template-columns: 1fr 1fr; }
    .project-gallery { grid-template-columns: 1fr 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
    .footer-bottom { flex-direction: column; gap: 0.5rem; text-align: center; }
    .dx-row-2 { grid-template-columns: 1fr; }
    .hero-actions { flex-direction: column; align-items: flex-start; }
    .topbar-right { display: none; }
}

@media (max-width: 480px) {
    .project-gallery { grid-template-columns: 1fr; }
    .impact-grid { grid-template-columns: 1fr; }
}
