/* ==========================================
   WHITTLEVILLE WEBSITE - MOBILE FIRST
   ========================================== */

/* ==========================================
   CSS RESET & BASE STYLES
   ========================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Color Palette */
    --olive-green: #4a4f2c;
    --dark-olive: #3a3f1c;
    --tan-gold: #e2ab58;
    --rust-orange: #a65039;
    --cream: #f5f0e8;
    --sage-green: #a8b89f;
    --dark-green: #2a2f1c;
    --light-cream: #fdfbf7;
    --sand: #d4b797;
    --font-body:
        -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu,
        sans-serif;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 4rem;

    /* Container */
    --container-padding: 1.5rem;
}

.color-rust {
    color: var(--rust-orange);
}

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

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--dark-olive);
    background-color: var(--light-cream);
}

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

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

ul {
    list-style: none;
}

.d-flex {
    display: flex;
}

.flex-column {
    flex-direction: column;
}

/* ==========================================
   TYPOGRAPHY
   ========================================== */

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2rem;
}

h2 {
    font-size: 1.75rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

p {
    margin-bottom: 1rem;
}

/* ==========================================
   BUTTONS
   ========================================== */

.btn {
    display: inline-block;
    padding: 0.875rem 2.5rem;
    background-color: var(--tan-gold);
    color: var(--dark-olive);
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn:hover {
    background-color: #c99560;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(0);
}

/* ==========================================
   LAYOUT
   ========================================== */

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.section {
    padding: var(--spacing-xl) 0;
}

/* ==========================================
   HEADER & NAVIGATION
   ========================================== */

.header {
    background-color: var(--light-cream);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav__logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-olive);
}

.nav__logo-icon {
    width: 3rem;
    height: 1.5rem;
    display: block;
}

.nav__menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--cream);
    padding: 1rem;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.nav__menu.active {
    display: flex;
}

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

.nav__link {
    font-family: var(--font-heading);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--dark-olive);
    padding: 0.5rem 0;
    transition: color 0.3s ease;
}

.nav__link:hover {
    color: var(--rust-orange);
}

.nav__toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 4px;
    z-index: 1001;
}

.nav__toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--dark-olive);
    transition: all 0.3s ease;
    border-radius: 2px;
}

.nav__toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.nav__toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav__toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* ==========================================
   HERO SECTION
   ========================================== */

.hero {
    background-color: var(--olive-green);
    color: var(--light-cream);
    text-align: center;
    padding: var(--spacing-xl) var(--container-padding);
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.hero__title {
    font-family: var(--font-heading);
    font-size: 2.25rem;
    line-height: 1.3;
    margin-bottom: 1.5rem;
    color: var(--tan-gold);
    max-width: 800px;
}

.hero__text {
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    max-width: 700px;
    opacity: 0.95;
}

/* ==========================================
   SERVICES BANNER
   ========================================== */

.services-banner {
    background-color: var(--rust-orange);
    color: var(--light-cream);
    padding: 1rem 0;
    overflow: hidden;
    white-space: nowrap;
}

.services-banner__text {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    animation: scroll-text 15s linear infinite;
}

@keyframes scroll-text {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

/* ==========================================
   SERVICES SECTION
   ========================================== */

.services {
    background-color: var(--cream);
    padding: 0;
}

.services__container {
    display: flex;
    flex-direction: column;
    min-height: 400px;
}

.services__image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    flex-shrink: 0;
}

.services__list {
    background-color: var(--cream);
    display: flex;
    flex-wrap: wrap;
}

.services__item {
    padding: 1.5rem 0;
    border-bottom: 2px solid var(--olive-green);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.services__item h3 {
    margin-bottom: 0;
}

.services__item:last-child {
    border-bottom: none;
}

.services__name {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--dark-olive);
    text-transform: uppercase;
    transition: color 0.3s ease;
}

.services__item:hover .services__name {
    color: var(--rust-orange);
}

/* ==========================================
   ABOUT SECTION
   ========================================== */

.about {
    position: relative;
    overflow: hidden;
}

.about__container {
    display: flex;
    flex-direction: column;
    padding: 0;
}

.about__content {
    background-color: var(--sage-green);
    padding: var(--spacing-xl) var(--container-padding);
}

.about__subtitle {
    font-family: var(--font-heading);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--rust-orange);
    margin-bottom: 0.5rem;
}

.about__title {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--dark-green);
    margin-bottom: 1.5rem;
}

.about__text {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--dark-olive);
    margin-bottom: 1rem;
    opacity: 0.9;
}

.about__image-wrapper {
    width: 100%;
    min-height: 400px;
}

.about__image {
    width: 100%;
    height: 100%;
    min-height: 400px;
    object-fit: cover;
    display: block;
}

/* ==========================================
   FOOTER
   ========================================== */

.footer > .container {
    width: 100%;
    margin-top: -10px;
    background-color: var(--cream);
    color: var(--dark-olive);
    padding: var(--spacing-md) 0;
    text-align: center;
}

.footer__text {
    font-size: 0.875rem;
    opacity: 0.8;
    margin-bottom: 0;
}

/* ==========================================
   PAGE SPECIFIC STYLES
   ========================================== */

/* Page header for internal pages */
.page-header {
    background-color: var(--olive-green);
    color: var(--light-cream);
    padding: var(--spacing-lg) var(--container-padding);
    text-align: center;
}

.page-header__title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--tan-gold);
    margin-bottom: 1rem;
}

.page-header__subtitle {
    font-size: 1.125rem;
    opacity: 0.9;
}

/* Services Detail (services.html) */
.services-detail {
    max-width: 800px;
    margin: 0 auto;
}

.services-detail__block {
    margin-bottom: 4rem;
}

.services-detail__title {
    font-family: var(--font-heading);
    color: var(--rust-orange);
    margin-bottom: 1rem;
}

.services-detail__text {
    line-height: 1.8;
}

.services-detail__cta {
    text-align: center;
    margin-top: 3rem;
}

/* Portfolio - Project Sections */
.project {
    padding: var(--spacing-xl) var(--container-padding);
    border-bottom: 2px solid var(--sage-green);
}

.project:last-child {
    border-bottom: none;
}

.project:nth-child(even) {
    background-color: var(--cream);
}

.project__header {
    max-width: 700px;
    margin-bottom: var(--spacing-lg);
}

.project__title {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--dark-olive);
    margin-bottom: 0.75rem;
}

.project__description {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--dark-olive);
    opacity: 0.85;
    margin-bottom: 0;
}

.project__phase {
    margin-bottom: var(--spacing-md);
}

.project__phase:last-child {
    margin-bottom: 0;
}

.project__phase-label {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--rust-orange);
    margin-bottom: 0.75rem;
    border-bottom: 2px solid var(--rust-orange);
    padding-bottom: 0.25rem;
}

.project__photos {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.project__photo {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
}

/* Contact Form */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
    padding: var(--spacing-xl) var(--container-padding);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-family: var(--font-heading);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--dark-olive);
    margin-bottom: 0.5rem;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 0.875rem;
    border: 2px solid var(--sage-green);
    background-color: var(--light-cream);
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--dark-olive);
    transition: border-color 0.3s ease;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--rust-orange);
}

.form-textarea {
    resize: vertical;
    min-height: 150px;
}

.form-button {
    width: 100%;
}

/* ==========================================
   TABLET BREAKPOINT (768px+)
   ========================================== */

@media (min-width: 768px) {
    h1 {
        font-size: 3rem;
    }

    h2 {
        font-size: 2.25rem;
    }

    .nav__toggle {
        display: none;
    }

    .nav__menu {
        display: flex;
        position: static;
        flex-direction: row;
        background-color: transparent;
        padding: 0;
        box-shadow: none;
    }

    .nav__list {
        flex-direction: row;
        gap: 2rem;
    }

    .hero__title {
        font-size: 3.5rem;
    }

    .hero__text {
        font-size: 1.125rem;
    }

    .services__container {
        flex-direction: row;
        min-height: 500px;
    }

    .services__image {
        width: 50%;
        height: auto;
        min-height: 100%;
        object-fit: cover;
        flex-shrink: 0;
    }

    .services__list {
        width: 50%;
        align-content: stretch;
    }

    .services__item {
        padding: 0;
        width: 50%;
        height: 25%;
    }

    .services__item:nth-child(even) {
        border-left: 2px solid var(--olive-green);
    }

    .services__item:nth-last-child(-n + 2) {
        border-bottom: none;
    }

    .services__name {
        font-size: 1.5rem;
    }

    .about__container {
        flex-direction: row;
        align-items: stretch;
        min-height: 500px;
    }

    .about__content {
        flex: 0 0 50%;
        width: 50%;
    }

    .about__image-wrapper {
        flex: 0 0 50%;
        width: 50%;
        min-height: auto;
    }

    .about__image {
        min-height: 100%;
    }

    .project {
        padding: var(--spacing-xl) 2rem;
    }

    .project__photos {
        flex-direction: row;
        gap: 1rem;
    }

    .project__photo {
        flex: 1;
        min-width: 0;
    }

    .form-button {
        width: auto;
    }
}

/* ==========================================
   DESKTOP BREAKPOINT (1024px+)
   ========================================== */

@media (min-width: 1024px) {
    :root {
        --container-padding: 2rem;
    }

    .hero {
        min-height: 70vh;
    }

    .hero__title {
        font-size: 4rem;
    }

    .project__photo {
        aspect-ratio: 5 / 4;
    }

    .services__name {
        font-size: 1.75rem;
    }
}
