/* 
    NECISS Premium Architectural Stylesheet
    Theme: Editorial, Modern, Blueprint, High-End
*/

:root {
    /* Core Colors */
    --bg-color: #FAFAFA; /* Alabaster White */
    --surface-color: #FFFFFF; /* Pure White */
    --text-main: #111111; /* Onyx Black */
    --text-muted: #555555;
    
    /* Accent */
    --accent-gold: #C8A96E;
    --accent-hover: #b3955b;

    /* Structural */
    --border-color: #E0E0E0;
    --grid-line: 1px solid var(--border-color);

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing */
    --space-sm: 1rem;
    --space-md: 2.5rem;
    --space-lg: 5rem;
    --space-xl: 8rem;

    /* Blueprint constraints */
    --max-width: 1440px;
    --grid-gap: 2rem;
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    color: var(--text-main);
    background-color: var(--bg-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ==========================================================================
   Typography
   ========================================================================== */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 500;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.hero-title {
    font-size: clamp(3.5rem, 8vw, 6.5rem);
    font-weight: 700;
    margin-bottom: 2rem;
}

.section-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 500;
}

p {
    font-size: 1.125rem;
    color: var(--text-muted);
}

.overline {
    font-family: var(--font-heading);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    font-weight: 700;
    color: var(--accent-gold);
    margin-bottom: 1.5rem;
    display: block;
}

/* ==========================================================================
   Layout & Grid Architecture
   ========================================================================== */
.grid-section {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 5%;
}

.border-bottom {
    border-bottom: var(--grid-line);
}

.border-top {
    border-top: var(--grid-line);
}

.top-line {
    width: 100%;
    height: 4px;
    background-color: var(--text-main);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1001;
}

/* ==========================================================================
   Buttons & Links
   ========================================================================== */
.btn-solid, .btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid transparent;
}

.btn-solid {
    background-color: var(--text-main);
    color: var(--surface-color);
}

.btn-solid:hover {
    background-color: var(--accent-gold);
}

.btn-outline {
    background-color: transparent;
    border-color: var(--text-main);
    color: var(--text-main);
}

.btn-outline:hover {
    background-color: var(--text-main);
    color: var(--surface-color);
}

.btn-full {
    width: 100%;
}

.link-hover {
    position: relative;
    display: inline-block;
    color: var(--text-main);
    font-weight: 500;
}
.link-hover::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -2px;
    left: 0;
    background-color: var(--text-main);
    transition: width 0.3s ease;
}
.link-hover:hover::after {
    width: 100%;
}

/* ==========================================================================
   Header & Nav
   ========================================================================== */
.header {
    position: fixed;
    top: 4px; /* Account for top line */
    left: 0;
    width: 100%;
    background-color: rgba(250, 250, 250, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: var(--grid-line);
    z-index: 1000;
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-img {
    height: 35px;
}

.desktop-nav {
    display: none;
    gap: 3rem;
}

@media (min-width: 992px) {
    .desktop-nav {
        display: flex;
    }
}

.nav-link {
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background-color: var(--accent-gold);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease, top 0.3s ease;
}

.nav-link:hover::before {
    opacity: 1;
    top: -10px;
}

.header .btn-outline {
    display: none;
}
@media (min-width: 992px) {
    .header .btn-outline {
        display: inline-flex;
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1002;
}

@media (min-width: 992px) {
    .mobile-menu-btn {
        display: none;
    }
}

.mobile-menu-btn .line {
    width: 100%;
    height: 2px;
    background-color: var(--text-main);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.mobile-menu-btn.active .line-1 {
    transform: translateY(8px) rotate(45deg);
}
.mobile-menu-btn.active .line-2 {
    transform: translateY(-0px) rotate(-45deg);
}

/* Mobile Nav Overlay */
.mobile-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--bg-color);
    z-index: 999;
    display: flex;
    align-items: center;
    padding: 2rem 5%;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

.mobile-nav.active {
    opacity: 1;
    pointer-events: auto;
}

.mobile-nav-inner {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.mobile-link {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 500;
    color: var(--text-main);
    text-transform: uppercase;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    padding-top: calc(80px + var(--space-lg));
    padding-bottom: var(--space-lg);
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-md);
    min-height: 90vh;
    align-items: center;
}

@media (min-width: 992px) {
    .hero {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-xl);
    }
}

.hero-text-col {
    position: relative;
    z-index: 2;
}

.hero-desc-wrapper {
    margin-top: var(--space-md);
    padding-left: 2rem;
    border-left: 1px solid var(--text-main);
}

.hero-description {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    max-width: 500px;
}

.img-frame {
    width: 100%;
    height: 100%;
    min-height: 400px;
    border: var(--grid-line);
    padding: 1rem;
    background-color: var(--surface-color);
}

@media (min-width: 992px) {
    .img-frame {
        min-height: 600px;
    }
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(20%);
    transition: filter 0.8s ease;
}
.hero-img:hover {
    filter: grayscale(0%);
}

/* ==========================================================================
   Stats / Company Section
   ========================================================================== */
.stats-section {
    display: grid;
    grid-template-columns: 1fr;
    border-top: var(--grid-line);
    border-bottom: var(--grid-line);
    padding-top: 0;
    padding-bottom: 0;
}

@media (min-width: 768px) {
    .stats-section {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1200px) {
    .stats-section {
        grid-template-columns: 1fr 1.5fr 1fr 2.5fr;
    }
}

.stat-block {
    padding: var(--space-md) 0;
    border-bottom: var(--grid-line);
    display: flex;
    flex-direction: column;
}

@media (min-width: 768px) {
    .stat-block {
        padding: var(--space-md) 2rem;
        border-bottom: none;
        border-right: var(--grid-line);
    }
    .stat-block:last-child {
        border-right: none;
    }
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 500;
    line-height: 1;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.stat-label {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    color: var(--text-muted);
}

.about-summary {
    justify-content: center;
}
.about-summary p {
    font-size: 1.1rem;
    color: var(--text-main);
    font-weight: 400;
}

/* ==========================================================================
   Expertise (Accordion) Section
   ========================================================================== */
.expertise-section {
    padding: var(--space-lg) 0;
}

.section-header {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding-bottom: var(--space-md);
    margin-bottom: var(--space-md);
}

@media (min-width: 768px) {
    .section-header {
        flex-direction: row;
        align-items: flex-end;
    }
    .col-half {
        flex: 1;
    }
    .section-intro {
        padding-left: 2rem;
        border-left: var(--grid-line);
    }
}

.section-intro p {
    font-size: 1.25rem;
    color: var(--text-main);
}

/* Accordion Logic */
.expertise-list {
    border-top: 2px solid var(--text-main);
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 5%;
}

.expertise-item {
    border-bottom: var(--grid-line);
}

.expertise-header {
    display: flex;
    align-items: center;
    padding: 2rem 0;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.expertise-header:hover {
    background-color: var(--surface-color);
}

.expertise-num {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: var(--accent-gold);
    width: 60px;
    font-weight: 500;
}

.expertise-name {
    flex: 1;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    font-weight: 500;
}

.expertise-toggle {
    width: 40px;
    height: 40px;
    border: var(--grid-line);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.icon-plus {
    position: relative;
    width: 14px;
    height: 14px;
}
.icon-plus::before, .icon-plus::after {
    content: '';
    position: absolute;
    background-color: var(--text-main);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.icon-plus::before {
    width: 14px;
    height: 1.5px;
}
.icon-plus::after {
    width: 1.5px;
    height: 14px;
}

.expertise-item.active .icon-plus::after {
    transform: translate(-50%, -50%) rotate(90deg);
}
.expertise-item.active .expertise-toggle {
    background-color: var(--text-main);
    border-color: var(--text-main);
}
.expertise-item.active .icon-plus::before,
.expertise-item.active .icon-plus::after {
    background-color: var(--surface-color);
}

.expertise-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.expertise-content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    padding-bottom: 3rem;
    padding-left: 60px; /* Aligns with text */
}

@media (min-width: 992px) {
    .expertise-content-grid {
        grid-template-columns: 1fr 1fr;
        gap: 4rem;
    }
}

.expertise-desc p {
    font-size: 1.15rem;
    color: var(--text-main);
    margin-bottom: 2rem;
}

.minimal-list {
    list-style: none;
}
.minimal-list li {
    padding: 0.75rem 0;
    border-bottom: 1px dashed var(--border-color);
    position: relative;
    padding-left: 1.5rem;
    color: var(--text-muted);
}
.minimal-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 1.2rem;
    width: 6px;
    height: 6px;
    background-color: var(--accent-gold);
    border-radius: 50%;
}

.expertise-img-wrapper {
    width: 100%;
    height: 300px;
    background-color: var(--surface-color);
    border: var(--grid-line);
    padding: 0.5rem;
}

.expertise-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.placeholder-bg {
    background: repeating-linear-gradient(
        45deg,
        var(--surface-color),
        var(--surface-color) 10px,
        #f5f5f5 10px,
        #f5f5f5 20px
    );
    display: flex;
    align-items: center;
    justify-content: center;
}
.img-placeholder-text {
    background-color: var(--surface-color);
    padding: 0.5rem 1rem;
    border: var(--grid-line);
    font-family: var(--font-heading);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* ==========================================================================
   Network / Partners Section
   ========================================================================== */
.network-section {
    padding: var(--space-lg) 5%;
}

.network-header {
    margin-bottom: var(--space-md);
    text-align: center;
}

.network-desc {
    margin-top: 1rem;
}

.network-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    border: var(--grid-line);
}

@media (min-width: 576px) {
    .network-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 992px) {
    .network-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.network-brand {
    padding: 2rem 1rem;
    text-align: center;
    border-right: var(--grid-line);
    border-bottom: var(--grid-line);
    font-family: var(--font-heading);
    font-weight: 500;
    color: var(--text-muted);
    font-size: 1.1rem;
    transition: all 0.3s ease;
    background-color: var(--surface-color);
}

/* Fix grid borders based on columns */
@media (max-width: 575px) {
    .network-brand:nth-child(2n) { border-right: none; }
    .network-brand:nth-last-child(-n+2) { border-bottom: none; }
}
@media (min-width: 576px) and (max-width: 991px) {
    .network-brand:nth-child(3n) { border-right: none; }
    .network-brand:nth-last-child(-n+3) { border-bottom: none; }
    /* fix the odd one out if 8 items */
    .network-brand:last-child { border-bottom: none; }
}
@media (min-width: 992px) {
    .network-brand:nth-child(4n) { border-right: none; }
    .network-brand:nth-last-child(-n+4) { border-bottom: none; }
}

.network-brand:hover {
    color: var(--text-main);
    background-color: var(--bg-color);
}

/* ==========================================================================
   Contact Section & Form
   ========================================================================== */
.contact-section {
    padding: var(--space-lg) 0;
    background-color: var(--surface-color);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-lg);
}

@media (min-width: 992px) {
    .contact-grid {
        grid-template-columns: 1fr 1.5fr;
    }
}

.contact-text {
    margin: 1.5rem 0 3rem 0;
    font-size: 1.25rem;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.detail-block {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.detail-label {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    color: var(--accent-gold);
    font-weight: 700;
}

.detail-value {
    font-size: 1.25rem;
    color: var(--text-main);
}

/* Architectural Form Styling */
.architectural-form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .form-row {
        grid-template-columns: 1fr 1fr;
    }
}

.input-group {
    position: relative;
    border-bottom: 2px solid var(--border-color);
}

.input-group input, 
.input-group textarea, 
.input-group select {
    width: 100%;
    padding: 1rem 0;
    background: transparent;
    border: none;
    outline: none;
    font-family: var(--font-body);
    font-size: 1.1rem;
    color: var(--text-main);
    resize: none;
}

.input-group label {
    position: absolute;
    left: 0;
    top: 1rem;
    color: var(--text-muted);
    transition: all 0.3s ease;
    pointer-events: none;
    font-size: 1rem;
}

.input-group input:focus ~ label,
.input-group input:not(:placeholder-shown) ~ label,
.input-group textarea:focus ~ label,
.input-group textarea:not(:placeholder-shown) ~ label {
    top: -0.75rem;
    font-size: 0.75rem;
    color: var(--accent-gold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.input-group::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0%;
    height: 2px;
    background-color: var(--text-main);
    transition: width 0.4s ease;
}

.input-group:focus-within::after {
    width: 100%;
}

.select-group select {
    appearance: none;
    cursor: pointer;
    color: var(--text-muted);
}
.select-group select:focus,
.select-group select:valid {
    color: var(--text-main);
}

.select-arrow {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0; 
    height: 0; 
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid var(--text-main);
    pointer-events: none;
}

.form-message {
    padding: 1rem;
    margin-top: 1rem;
    display: none;
    border: 1px solid var(--border-color);
}
.form-message.success {
    display: block;
    border-left: 4px solid #2e7d32;
    background-color: #f1f8e9;
    color: #1b5e20;
}
.form-message.error {
    display: block;
    border-left: 4px solid #c62828;
    background-color: #ffebee;
    color: #b71c1c;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background-color: var(--text-main);
    color: var(--surface-color);
    padding-top: var(--space-lg);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-lg);
    padding-bottom: var(--space-lg);
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.footer-logo {
    height: 40px;
    margin-bottom: 1.5rem;
    filter: brightness(0) invert(1);
}

.footer-legal {
    color: #a0a0a0;
    font-size: 1rem;
    max-width: 300px;
}

.footer-links {
    display: flex;
    gap: 4rem;
}

.link-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.column-title {
    font-family: var(--font-heading);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    color: var(--accent-gold);
    margin-bottom: 0.5rem;
}

.footer-link {
    color: #e0e0e0;
    transition: color 0.3s ease;
}
.footer-link:hover {
    color: var(--accent-gold);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 1.5rem 0;
}

.footer-bottom-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 5%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: space-between;
    font-size: 0.9rem;
    color: #888;
}

@media (min-width: 768px) {
    .footer-bottom-inner {
        flex-direction: row;
    }
}
