/* 
  Builtium Design System
  Based on PRD: Phase 1
*/

:root {
    /* Color Palette */
    --bg-primary: #ffffff;
    --text-primary: #000000;
    --accent-color: #3a7bff;
    --secondary-color: #cfe8ff;

    /* Spacing & Layout */
    --u-spacing-base: 8px;
    /* Base unit for spacing */

    /* Typography */
    --font-family-primary: 'Poppins', sans-serif;

    /* Z-Index Layers */
    --z-nav: 1000;
    --z-overlay: 999;
}

/* Reset & Base Styles */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-family-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Tech Vibe: Subtle Mesh Gradient Background */
    background-image:
        radial-gradient(circle at 10% 20%, rgba(207, 232, 255, 0.4) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, rgba(58, 123, 255, 0.05) 0%, transparent 20%);
    background-attachment: fixed;
    /* Prevent horizontal scroll when menu is open if needed */
    overflow-x: hidden;
}

body.nav-open {
    overflow: hidden;
    /* Lock scroll when menu is open */
}

/* Utility / Global Styles */
h1,
h2,
h3,
h4,
h5,
h6 {
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.02em;
    /* Tech feel: tighter tracking */
}

/* Fade-in Animation for sections */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content,
.service-item,
.section-headline,
.services-supporting-copy {
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    opacity: 0;
}

/* Stagger animations */
.hero-content {
    animation-delay: 0.1s;
}

.section-headline {
    animation-delay: 0.2s;
}

.service-item:nth-child(1) {
    animation-delay: 0.3s;
}

.service-item:nth-child(2) {
    animation-delay: 0.4s;
}

.service-item:nth-child(3) {
    animation-delay: 0.5s;
}

.service-item {
    background-color: var(--bg-primary);
    border: 1px solid var(--secondary-color);
    padding: 32px;
    transition: all 0.3s ease;
}

.service-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border-color: var(--accent-color);
}

.services-supporting-copy {
    animation-delay: 0.6s;
}

img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

button {
    cursor: pointer;
    font-family: inherit;
    border: none;
    border-radius: 0;
    /* Strict requirement: Sharp corners */
}

/* Accessibility: Visible Focus Indicators */
:focus-visible {
    outline: 2px solid var(--text-primary);
    outline-offset: 2px;
}

/* Helper Classes */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    /* Default padding from PRD */
}

/* Mobile Responsive Helper defaults */

/* --- Navigation --- */
.site-header {
    position: sticky;
    top: 0;
    width: 100%;
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--secondary-color);
    z-index: var(--z-nav);
    padding: 20px 0;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 1001;
    /* Ensure logo is above mobile menu if we want it to persist or be part of it */
    position: relative;
}

.logo-icon {
    height: 32px;
    /* Adjust size as appropriate */
    width: auto;
}

.brand-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    /* Slight tightening for modern look */
}

/* Mobile Nav Toggle */
.mobile-nav-toggle {
    display: none;
    /* Hidden by default */
    background: transparent;
    padding: 8px;
    z-index: 1001;
}

.mobile-nav-toggle svg {
    width: 28px;
    height: 28px;
    color: var(--text-primary);
}

.close-icon {
    display: none;
}

/* Toggle State Icons */
body.nav-open .hamburger-icon {
    display: none;
}

body.nav-open .close-icon {
    display: block;
}

.site-nav {
    display: flex;
    gap: 32px;
}

.nav-link {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    padding-bottom: 4px;
}

/* Modern underline slide effect */
.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--accent-color);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover {
    color: var(--accent-color);
}

.nav-link:hover::after {
    width: 100%;
}



/* --- Hero Section --- */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 80px 0;
    background-color: var(--bg-primary);
}

.hero-content {
    max-width: 900px;
}

.hero-headline {
    font-size: 64px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
    margin-bottom: 24px;
}

.hero-subheading {
    font-size: 20px;
    font-weight: 400;
    color: var(--text-primary);
    opacity: 0.8;
    margin-bottom: 40px;
    max-width: 600px;
}

.cta-button {
    background-color: var(--accent-color);
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    padding: 16px 32px;
    border: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
    position: relative;
    overflow: hidden;
}

.cta-button:hover {
    background-color: #2a6ae0;
    box-shadow: 0 8px 20px rgba(58, 123, 255, 0.3);
    /* Softer, colored shadow */
    transform: translateY(-2px);
    /* Slight lift */
}

.cta-button:active {
    transform: translateY(0);
}


/* --- Services Section --- */
.services-section {
    padding: 80px 0;
    border-top: 1px solid var(--secondary-color);
    background-color: var(--bg-primary);
}

.section-headline {
    font-size: 48px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 60px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 60px;
}

.service-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.service-description {
    font-size: 16px;
    font-weight: 400;
    color: var(--text-primary);
    opacity: 0.7;
    line-height: 1.6;
}

.services-supporting-copy {
    font-size: 18px;
    font-weight: 400;
    color: var(--text-primary);
    opacity: 0.7;
    margin-top: 60px;
    max-width: 800px;
}






/* --- Positioning Section --- */
.positioning-section {
    padding: 80px 0;
    background-color: var(--secondary-color);
    color: var(--text-primary);
}

.positioning-copy {
    font-size: 20px;
    font-weight: 400;
    line-height: 1.8;
    max-width: 600px;
}

/* --- Vision Section --- */
.vision-section {
    padding: 80px 0;
    background-color: var(--bg-primary);
    border-top: 1px solid var(--secondary-color);
}

.vision-copy {
    font-size: 20px;
    font-weight: 400;
    line-height: 1.8;
    opacity: 0.8;
    max-width: 600px;
}

/* --- Contact Section --- */
.contact-section {
    padding: 100px 0;
    background-color: var(--bg-primary);
    border-top: 1px solid var(--secondary-color);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
}

.contact-subtext {
    font-size: 18px;
    color: var(--text-primary);
    opacity: 0.7;
    margin-bottom: 32px;
    max-width: 400px;
}

.contact-email {
    font-size: 24px;
    font-weight: 600;
    color: var(--accent-color);
    display: inline-block;
    transition: all 0.3s ease;
}

.contact-email:hover {
    color: #2a6ae0;
    text-decoration: underline;
    text-underline-offset: 8px;
}

/* Form Styles */
/* Form Styles */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: relative;
    /* For Overlay */
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-primary);
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 16px;
    background-color: #f8faff;
    border: 1px solid var(--secondary-color);
    font-family: inherit;
    font-size: 16px;
    color: var(--text-primary);
    transition: all 0.3s ease;
    border-radius: 0;
    /* Sharp corners */
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(58, 123, 255, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.form-submit {
    align-self: flex-start;
    margin-top: 8px;
    width: 100%;
}

/* Success Overlay */
.success-message {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    border: 1px solid var(--secondary-color);

    /* Hidden State */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.4s ease;
}

.success-message.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.check-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-color: #E6F4EA;
    /* Light Green */
    color: #1E8E3E;
    /* Success Green */
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0.8);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.success-message.active .check-icon {
    transform: scale(1);
}

.check-icon svg {
    width: 32px;
    height: 32px;
}

.success-message p {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}



/* --- Footer --- */
.site-footer {
    padding: 80px 0 40px;
    background-color: #f8faff;
    border-top: 1px solid var(--secondary-color);
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-brand {
    max-width: 300px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.brand-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-logo {
    height: 48px;
    width: auto;
    display: block;
}

.footer-wordmark {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.footer-tagline {
    font-size: 14px;
    color: var(--text-primary);
    opacity: 0.6;
    margin-top: 0;
}

.footer-nav {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.footer-socials {
    display: flex;
    flex-direction: row;
    /* Horizontal icons */
    gap: 24px;
    align-items: center;
}

.footer-link {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    opacity: 0.7;
    transition: all 0.2s ease;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    opacity: 0.7;
    transition: all 0.2s ease;
}

.social-link svg {
    width: 24px;
    height: 24px;
}

/* Specific Social Colors */
.social-link.twitter:hover {
    color: #000000;
}

.social-link.facebook:hover {
    color: #1877F2;
}

.social-link.instagram:hover {
    color: #E1306C;
}

.footer-link:hover,
.social-link:hover {
    opacity: 1;
    transform: translateY(-2px);
}

.footer-link:hover {
    color: var(--accent-color);
}

.footer-bottom {
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding-top: 32px;
    text-align: center;
}

.copyright {
    font-size: 12px;
    color: var(--text-primary);
    opacity: 0.4;
}

/* =========================================
   Responsive Design System
   ========================================= */

/* --- Tablet (768px - 1024px) --- */
@media (max-width: 1024px) {

    /* Layout & Spacing */
    .container {
        padding: 0 40px;
    }

    /* Typography */
    .hero-headline {
        font-size: 48px;
    }

    .section-headline {
        font-size: 36px;
    }

    /* Components */
    .contact-grid {
        gap: 40px;
    }
}

/* --- Mobile (Max 768px) --- */
@media (max-width: 768px) {

    /* Layout & Spacing */
    .container {
        padding: 0 24px;
    }

    .hero-section,
    .services-section,
    .positioning-section,
    .vision-section,
    .contact-section {
        padding: 60px 0;
    }

    /* Navigation */
    .site-nav {
        gap: 16px;
    }

    .nav-link {
        font-size: 14px;
        /* Bumped for legibility */
    }

    /* Mobile Menu - The "Cool" Part */
    .mobile-nav-toggle {
        display: block;
        /* Show on mobile */
    }

    .site-nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: rgba(255, 255, 255, 0.95);
        /* High opacity for legibility */
        backdrop-filter: blur(10px);
        /* Glassmorphism effect */
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 40px;
        z-index: 1000;

        /* Animation State: Hidden */
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    /* Menu Active State */
    body.nav-open .site-nav {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    /* Stagger fade-in for links */
    .site-nav .nav-link {
        font-size: 24px;
        opacity: 0;
        transform: translateY(20px);
        transition: all 0.3s ease;
    }

    body.nav-open .site-nav .nav-link {
        opacity: 1;
        transform: translateY(0);
    }

    body.nav-open .site-nav .nav-link:nth-child(1) {
        transition-delay: 0.1s;
    }

    body.nav-open .site-nav .nav-link:nth-child(2) {
        transition-delay: 0.2s;
    }

    body.nav-open .site-nav .nav-link:nth-child(3) {
        transition-delay: 0.3s;
    }

    body.nav-open .site-nav .nav-link:nth-child(4) {
        transition-delay: 0.4s;
    }

    /* Typography */
    .hero-headline {
        font-size: 36px;
        margin-bottom: 32px;
    }

    .hero-subheading {
        font-size: 18px;
        margin-bottom: 32px;
    }

    .section-headline {
        font-size: 28px;
        margin-bottom: 40px;
    }

    .positioning-copy,
    .vision-copy {
        font-size: 16px;
    }

    .services-supporting-copy {
        font-size: 16px;
        margin-top: 40px;
    }

    /* Grids & Flex Stacking */
    .services-grid,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .contact-form {
        margin-top: 20px;
    }

    .footer-top {
        flex-direction: column;
        gap: 40px;
    }

    .footer-nav {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 24px 32px;
    }

    .footer-socials {
        width: 100%;
        justify-content: flex-start;
    }

    /* Elements */
    .contact-email {
        font-size: 20px;
        word-break: break-all;
    }

    .cta-button {
        font-size: 14px;
        padding: 14px 24px;
        width: 100%;
        /* Full width on mobile for easier tapping */
        text-align: center;
    }
}