/* =========================================
   BASE STYLES & VARIABLES
   ========================================= */
:root {
    --bg-primary: #f4f4f0;
    /* Off-white/cream */
    --bg-secondary: #0a0a0a;
    /* Deep black */
    --text-primary: #0a0a0a;
    --text-inverse: #ffffff;
    --text-muted: #555555;

    --font-display: 'Anton', impact, sans-serif;
    --font-body: 'Inter', helvetica neue, sans-serif;

    --header-height: 80px;
    --border-color: rgba(0, 0, 0, 0.1);
    --border-inverse: rgba(255, 255, 255, 0.15);
}

html {
    scroll-behavior: smooth;
    box-sizing: border-box;
}

*,
*:before,
*:after {
    box-sizing: inherit;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

img,
video {
    max-width: 100%;
    display: block;
}

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

a:hover {
    opacity: 0.7;
}

/* Typography Base */
h1,
h2,
h3,
.hero-title,
.section-title,
.project-title {
    font-family: var(--font-display);
    text-transform: uppercase;
    font-weight: 400;
    line-height: 0.95;
    letter-spacing: 0.02em;
}

p {
    margin-bottom: 1.5rem;
    font-size: 1.125rem;
}

/* Layout Utilities */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

.text-block {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.text-white {
    color: var(--text-inverse);
}

.dark-section {
    background-color: var(--bg-secondary);
    color: var(--text-inverse);
}

/* =========================================
   HEADER NAVIGATION (TOP FIXED)
   ========================================= */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    z-index: 100;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.brand-link {
    display: flex;
    align-items: center;
    height: 100%;
}

.brand-logo {
    height: 40px;
    /* Adjusted roughly for horizontal layout */
    width: auto;
}

.menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 10px;
}

.menu-toggle span {
    display: block;
    width: 30px;
    height: 2px;
    background-color: var(--text-primary);
    transition: 0.3s;
}

.menu-toggle:hover span {
    background-color: var(--text-muted);
}

/* Mobile Nav Overlay */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--bg-secondary);
    color: var(--text-inverse);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transform: translateY(-100%);
    transition: transform 0.5s cubic-bezier(0.77, 0, 0.175, 1);
}

.mobile-nav-overlay.active {
    transform: translateY(0);
}

.menu-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: none;
    border: none;
    color: var(--text-inverse);
    font-size: 3rem;
    cursor: pointer;
    line-height: 1;
}

.mobile-nav-overlay ul {
    list-style: none;
    text-align: center;
}

.mobile-nav-overlay li {
    margin: 1.5rem 0;
}

.mobile-nav-overlay a {
    font-family: var(--font-display);
    font-size: 3rem;
    text-transform: uppercase;
}

/* =========================================
   MAIN CONTENT AREA
   ========================================= */
main {
    margin-top: var(--header-height);
}

/* --- Hero Section --- */
.section-hero {
    position: relative;
    /* Hero should still be viewport height, but subtract header so it doesn't push down too much */
    height: calc(100vh - var(--header-height));
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    overflow: hidden;
    /* For zooming iframe */
    background-color: #000;
}

.bg-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    filter: grayscale(100%);
    z-index: 0;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1;
}

.hero-content {
    text-align: center;
    color: var(--text-inverse);
    padding: 0 2rem;
    max-width: 1000px;
}

.hero-title {
    /* Reduced by 50% from clamp(3rem, 8vw, 7rem) */
    font-size: clamp(1.5rem, 4vw, 3.5rem);
    margin-bottom: 3rem;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn-primary {
    display: inline-block;
    background-color: var(--text-inverse);
    color: var(--text-primary);
    padding: 1rem 3rem;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: background-color 0.3s, color 0.3s;
}

.btn-primary:hover {
    background-color: rgba(255, 255, 255, 0.8);
    opacity: 1;
}

/* --- Shared Section Title Style --- */
.section-title {
    font-size: clamp(4rem, 10vw, 8rem);
    text-align: center;
    margin-bottom: 4rem;
    word-wrap: break-word;
}

/* --- About Us --- */
.section-about {
    border-bottom: 1px solid var(--border-color);
}

.section-about .text-block p {
    font-size: clamp(1.125rem, 2vw, 1.5rem);
}

/* --- The Team --- */
.section-team {
    border-bottom: 1px solid var(--border-color);
}

.team-grid {
    display: grid;
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
}

.team-grid-top {
    grid-template-columns: repeat(3, 1fr);
    margin-bottom: 4rem;
}

.team-grid-bottom {
    grid-template-columns: repeat(3, 1fr);
}

.team-card {
    display: flex;
    flex-direction: column;
}

.team-image-wrapper {
    width: 100%;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    margin-bottom: 1.5rem;
    background-color: #ccc;
    /* placeholder color */
}

.team-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%) contrast(1.1);
    /* Nordic Noir aesthetic from Architecture doc */
    transition: filter 0.4s ease;
}

.team-card:hover .team-image {
    filter: grayscale(0%) contrast(1);
}

.team-name {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.team-role {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.team-bio {
    font-size: 1rem;
    color: var(--text-muted);
}

/* --- What We Do --- */
.section-what-we-do {
    padding: 6rem 2rem;
}

.wwd-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.wwd-layout .section-title {
    margin-bottom: 2rem;
}

.wwd-layout .text-block {
    text-align: left;
}

.wwd-layout .text-block p {
    font-size: clamp(1.125rem, 2vw, 1.5rem);
    color: rgba(255, 255, 255, 0.9);
}

/* --- Projects --- */
.section-projects {
    border-bottom: 1px solid var(--border-color);
}

.project-list {
    max-width: 1000px;
    margin: 0 auto;
}

.project-item {
    border-top: 1px solid var(--border-color);
    padding: 3rem 0;
    transition: padding-left 0.3s ease;
}

.project-item:hover {
    padding-left: 1rem;
}

.project-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.project-title {
    font-size: clamp(3rem, 6vw, 5rem);
}

.project-year {
    font-family: var(--font-body);
    font-size: 1.25rem;
    color: var(--text-muted);
}

.project-desc {
    font-size: 1.125rem;
    color: var(--text-muted);
    max-width: 800px;
}

/* --- Footer --- */
.section-footer {
    background-color: var(--bg-primary);
    padding: 4rem 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-brand h2 {
    font-size: 3rem;
}

.footer-address p,
.footer-contact p {
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

/* =========================================
   MEDIA QUERIES (RESPONSIVENESS)
   ========================================= */
@media (max-width: 900px) {

    .team-grid-top,
    .team-grid-bottom {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .header {
        height: 60px;
    }

    .brand-logo {
        height: 30px;
    }

    main {
        margin-top: 60px;
        /* offset for top fixed bar */
    }

    .section-hero {
        height: calc(100vh - 60px);
    }

    .project-header {
        flex-direction: column;
        align-items: flex-start;
    }
}