/* --- Local Font Definitions --- */
@font-face {
    font-family: 'Trade Gothic';
    src: url('../assets/TradeGothicRoman.woff2') format('woff2');
    font-weight: 400; /* Normal */
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Trade Gothic';
    src: url('../assets/TradeGothicBoldCondensed20.woff2') format('woff2');
    font-weight: 700; /* Bold */
    font-style: normal;
    font-display: swap;
}

/* --- Root Variables --- */
:root {
    --color-black: #000;
    --color-white: #fff;
    --color-yellow: #ffd200;
    --font-primary: 'Trade Gothic', sans-serif;
    --topbar-height: 7.5em;
    --topbar-height-scrolled: 6em;
}

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

html {
    font-size: 10px; /* Base for rem units */
    scroll-behavior: smooth;
    scroll-padding-top: var(--topbar-height-scrolled);
}

body {
    font-family: var(--font-primary);
    background-color: var(--color-white);
    color: var(--color-black);
    line-height: 1.6;
    font-size: 1.6rem;
}

main {
    padding-top: var(--topbar-height);
}

h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.2;
    /* Adjustments for Trade Gothic */
    letter-spacing: .03em;
    /* The bold font is condensed, so we apply this to headings */
    font-stretch: condensed;
    font-kerning: normal;
    text-transform: uppercase;
}

body.nav-locked {
    overflow: hidden;
}

h2 {
    font-size: 5.0rem;
    margin-bottom: 0.5em;
    color: var(--color-yellow);
}

h3 {
    font-size: 2.5rem;
    color: var(--color-yellow);
}

p {
    max-width: 70ch;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* --- Theme --- */
.on-dark {
    background-color: var(--color-black);
    color: var(--color-white);
}

.on-dark a {
    color: var(--color-yellow);
}

.on-dark a:hover {
    color: var(--color-black);
}

/* --- Header --- */
.top-bar {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    background-color: var(--color-black);
    height: var(--topbar-height);
    transition: height 0.3s ease;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 4vw;
}

.logo {
    width: 17.5em;
}

.logo img {
    width: 100%;
    height: auto;
}

.main-nav ul {
    display: flex;
    gap: 2.4em;
}

.main-nav a {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--color-white);
    padding: 0.5em 0;
    position: relative;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--color-yellow);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.main-nav a:hover::after {
    transform: scaleX(1);
}

/* --- Hamburger & Mobile Nav --- */
.hamburger-menu {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
    width: 40px;
    height: 40px;
    position: relative;
}

.hamburger-line {
    display: block;
    width: 100%;
    height: 3px;
    background-color: var(--color-yellow);
    margin: 5px 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.mobile-nav-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--color-black);
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(.4,0,.2,1);
    z-index: 999;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: var(--topbar-height);
}

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

.mobile-nav li {
    margin: 2em 0;
}

.mobile-nav a {
    color: var(--color-white);
    font-size: 2.4rem;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    padding: 0.5em;
}


/* --- Hero Section --- */
.hero-section {
    display: grid;
    grid-template-columns: 1fr; /* Default to 1 column for mobile */
    /* align-items: center; */
    min-height: calc(100vh - var(--topbar-height));
    padding: 8rem 4vw;
    gap: 4rem;
}

.hero-content {
    margin-left: 8vw;
}

.hero-images {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.2rem;
    justify-items: center;
}

.hero-images img {
    max-height: 500px;
    width: 100%;
    object-fit: scale-down;
}

.title-home {
    /* font-size: 9rem; */
    font-size: clamp(4.5rem, 10vw, 9rem); /* Scales smoothly from 45px to 90px */
    color: var(--color-yellow);
    line-height: 1.1;
}

.title-home span {
    color: var(--color-white);
}

.hero-cta {
    margin-top: 2em;
}

/* --- General Content Section --- */
.content-section {
    padding: 8em 0;
}

.content-section .container {
    display: flex;
    flex-direction: column;
    gap: 2em;
}

/* --- Split Layout Component --- */
.split-layout {
    display: grid;
    grid-template-columns: 1fr; /* Mobile-first: single column */
    gap: 3rem;
    align-items: center;
}

.split-layout__image img {
    width: 100%;
    height: auto;
    max-width: 450px; /* Prevents image from becoming too large */
    display: block;
    margin: 0 auto; /* Center image in its column */
}


/* --- Awards Section --- */
.awards {
    display: flex;
    flex-wrap: wrap;
    gap: 2em 4em;
    margin-top: 4em;
    align-items: center;
}
.award-image {
    flex: 0 0 100px;
}
.award-title {
    color: var(--color-yellow);
    font-weight: 700;
    font-size: 1.6em;
    text-transform: uppercase;
}
.award-text {
    flex-basis: 100%;
}

/* --- Industries Section --- */
#industries-we-serve .container {
    text-align: center;
}

#industries-we-serve p {
    margin: auto;
}

.industries {
    /* Use a responsive grid that automatically wraps items */
    display: grid;
    /* This creates columns that are at least 250px wide.
       'auto-fit' tells the grid to fit as many columns as possible
       before wrapping to the next row. */
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem; /* A slightly smaller gap for better wrapping */
    margin-top: 4em;
}

.industry-item {
    /* The aspect-ratio is now on the item, not the container */
    aspect-ratio: 4 / 3;
}

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

.industry-item h3 {
    color: var(--color-white);
    margin-top: 0.8em;
}

/* --- Contact Section --- */
#contact .container {
    text-align: center;
}

#contact h2 {
    color: var(--color-white);
}

#contact h4 {
    color: var(--color-yellow);
}

/* --- Coordinates Section --- */
.coordinates-container {
    display: flex;
    gap: 5%;
    flex-wrap: wrap;
}
.address {
    flex: 1 1 30%;
}
.map-placeholder {
    flex: 1 1 65%;
    background-color: #333;
    min-height: 300px;
}
.footer-logo {
    width: 16em;
    margin-bottom: 3em;
}

/* --- Footer --- */
.footer {
    padding: 3em 0;
    text-align: center;
}

.footer p {
    margin: auto;
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    background-color: var(--color-black);
    color: var(--color-yellow);
    padding: 1.35em 1.8em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    border: 1px solid var(--color-yellow);
    position: relative;
    z-index: 1;
    transition: color 0.3s ease;
    cursor: pointer;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--color-yellow);
    transform: scaleY(0);
    transform-origin: 50% 100%;
    transition: transform 0.3s ease;
    z-index: -1;
}

.btn:hover {
    color: var(--color-black);
}

.btn:hover::before {
    transform: scaleY(1);
}

.top-bar.nav-open .hamburger-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.top-bar.nav-open .hamburger-line:nth-child(2) {
    opacity: 0;
}

.top-bar.nav-open .hamburger-line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.top-bar.nav-open ~ .mobile-nav-panel {
    transform: translateX(0);
}

.btn-large {
    font-size: 1.25em;
    padding: 1.55em 2.7em;
}

/* --- Responsive --- */
/* The new grid layout for .industries is fully responsive and doesn't need a breakpoint */

@media (max-width: 850px) {
    html {
        font-size: 8px;
    }
    .main-nav {
        display: none; /* Hide desktop nav */
    }
    .hamburger-menu {
        display: block; /* Show hamburger */
    }
    .hero-section {
        text-align: center;
    }
    .hero-content {
        /* padding-left: 4vw; */ /* No longer needed */
        text-align: center;
    }
    .awards {
        justify-content: center;
        text-align: center;
    }
}

@media (min-width: 851px) {
    .hero-section {
        grid-template-columns: repeat(2, 1fr);
    }
    .split-layout {
        grid-template-columns: 1fr 1fr; /* Two columns on desktop */
        gap: 5rem;
    }
}