@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700&family=Sora:wght@400;500;600;700&family=Outfit:wght@500;600;700&display=swap');

/**
 * Portfolio CSS - Phase 1 Foundation
 * Minimal styling for HTML structure visibility
 * Full styling will be added in Phase 2
 */

/* ===================================================
   CSS VARIABLES (To be customized in Phase 2)
   =================================================== */
:root {
    --color-primary: #2c3e50;
    --color-secondary: #e74c3c;
    --color-background: #ffffff;
    --color-text: #333333;
    --color-text-light: #666666;
    --color-border: #e0e0e0;
    --color-placeholder: #f0f0f0;

    --font-family-heading: 'Fraunces', Georgia, serif;
    --font-family-body: 'Sora', 'Segoe UI', sans-serif;
    --font-family-ui: 'Outfit', 'Avenir Next', sans-serif;

    --spacing-xs: 8px;
    --spacing-sm: 16px;
    --spacing-md: 24px;
    --spacing-lg: 48px;
    --spacing-xl: 64px;

    --container-max-width: 1200px;
    --container-padding: 20px;

    --breakpoint-mobile: 480px;
    --breakpoint-tablet: 768px;
    --breakpoint-desktop: 1024px;

    /* Hero background tuning controls */
    --hero-bg-x: 50%;
    --hero-bg-y: 22%;
    --hero-bg-size: cover;
}

/* ===================================================
   RESET & BASE STYLES
   =================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family-body);
    font-size: 16px;
    line-height: 1.7;
    letter-spacing: 0.01em;
    color: var(--color-text);
    background-color: var(--color-background);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-heading);
    font-weight: 600;
    letter-spacing: 0.01em;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
}

h1 { font-size: 48px; }
h2 { font-size: 36px; }
h3 { font-size: 28px; }
h4 { font-size: 24px; }
h5 { font-size: 20px; }
h6 { font-size: 16px; }

p {
    margin-bottom: var(--spacing-md);
}

a {
    color: var(--color-secondary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ===================================================
   SKIP LINK (Accessibility)
   =================================================== */
.skip-link {
    position: absolute;
    top: 14px;
    left: 14px;
    padding: 10px 14px;
    border-radius: 4px;
    background: #1f2a36;
    color: #fff;
    z-index: 1200;
    text-decoration: none;
    opacity: 0;
    transform: translateY(-14px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.skip-link:focus {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* ===================================================
   CONTAINER & GRID
   =================================================== */
.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* ===================================================
   HEADER & NAVIGATION
   =================================================== */
.site-header {
    background-color: transparent;
    color: white;
    font-family: var(--font-family-ui);
    padding: 26px 0 0;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: none;
}

.site-header--solid {
    background-color: var(--color-primary);
    position: relative;
}

.header-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 32px;
}

.logo-link {
    display: inline-flex;
    align-items: center;
}

.logo-image {
    display: block;
    width: auto;
    max-height: 68px;
}

/* Desktop Navigation */
.site-nav {
    display: flex;
    margin-left: auto;
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 24px;
    align-items: center;
}

.nav-item-has-children {
    position: relative;
    padding-bottom: 14px;
    margin-bottom: -14px;
}

.nav-item-has-children::after {
    content: "";
    position: absolute;
    left: -16px;
    right: -16px;
    top: 100%;
    height: 24px;
}

.nav-link {
    color: white;
    text-decoration: none;
    transition: transform 0.22s ease, opacity 0.22s ease, color 0.22s ease;
    display: inline-block;
    padding: 4px 0;
    border: 0;
    border-radius: 0;
    background-color: transparent;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    transform-origin: 50% 100%;
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-item-has-children:hover > .nav-link {
    opacity: 1;
    color: #fff6df;
    transform: translateY(-1px) scale(1.08);
    text-decoration: none;
}

.submenu {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    background-color: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(4px);
    list-style: none;
    padding: 10px;
    min-width: 244px;
    border: 1px solid rgba(40, 49, 60, 0.15);
    box-shadow: 0 16px 34px rgba(19, 26, 34, 0.2);
    border-radius: 6px;
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
}

.submenu,
.mobile-submenu {
    list-style: none;
    padding-left: 0;
}

.submenu li {
    margin: 0;
}

.submenu a {
    display: block;
    padding: 9px 12px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: #2d3947;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.submenu a:hover,
.submenu a:focus-visible {
    background-color: rgba(60, 80, 107, 0.12);
    color: #243140;
    transform: translateX(2px);
    text-decoration: none;
}

.nav-item-has-children:hover .submenu,
.nav-item-has-children:focus-within .submenu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background-color: rgba(255, 255, 255, 0.08);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    padding: 7px;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
    transition: background-color 0.22s ease, border-color 0.22s ease, transform 0.22s ease;
}

.hamburger {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3.5px;
}

.hamburger-line {
    width: 20px;
    height: 2px;
    background-color: #fffdf7;
    border-radius: 2px;
    transition: transform 0.22s ease, opacity 0.22s ease, background-color 0.22s ease;
}

#mobile-menu-toggle:hover,
#mobile-menu-toggle:focus-visible {
    background-color: rgba(255, 255, 255, 0.16);
    transform: translateY(-1px);
}

#mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(1) {
    transform: translateY(5.5px) rotate(45deg);
}

#mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(2) {
    opacity: 0;
}

#mobile-menu-toggle[aria-expanded="true"] .hamburger-line:nth-child(3) {
    transform: translateY(-5.5px) rotate(-45deg);
}

#mobile-menu-toggle[aria-expanded="true"] {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Mobile Navigation */
.mobile-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 999;
    margin: 0;
    padding: 10px 18px 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    background: var(--color-primary);
    box-shadow: 0 12px 28px rgba(10, 18, 29, 0.34);
}

.mobile-nav.active {
    display: block;
    animation: mobileNavFadeIn 0.22s ease;
}

.mobile-menu {
    list-style: none;
    padding: 0;
}

.mobile-menu > li + li {
    margin-top: 4px;
}

.mobile-nav-link,
.mobile-nav-toggle {
    display: flex;
    align-items: center;
    color: #f8f4ea;
    text-decoration: none;
    padding: 11px 12px;
    border: none;
    background: none;
    cursor: pointer;
    width: 100%;
    text-align: left;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.mobile-nav-toggle {
    justify-content: space-between;
}

.mobile-nav-link:hover,
.mobile-nav-toggle:hover {
    background-color: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.mobile-submenu {
    margin-top: 6px;
    margin-left: 8px;
    padding: 2px 0 4px;
    background-color: transparent;
    border-radius: 0;
}

.mobile-submenu li + li {
    margin-top: 1px;
}

.mobile-submenu a {
    display: block;
    padding: 7px 12px;
    color: rgba(235, 241, 247, 0.9);
    text-decoration: none;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.02em;
    border-radius: 6px;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.mobile-submenu a:hover,
.mobile-submenu a:focus-visible {
    background-color: rgba(255, 255, 255, 0.08);
    color: #fff;
    transform: translateX(2px);
}

.toggle-arrow {
    margin-left: auto;
    font-size: 9px;
    transition: transform 0.2s ease;
}

.mobile-nav-toggle[aria-expanded="true"] .toggle-arrow {
    transform: rotate(180deg);
}

.mobile-cta {
    margin-top: 8px;
    border: 1px solid rgba(255, 255, 255, 0.72);
}

@keyframes mobileNavFadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header CTA Button */
.header-cta {
    display: flex;
    flex-shrink: 0;
}

.btn {
    font-family: var(--font-family-ui);
    padding: 10px 20px;
    border: 1px solid transparent;
    border-radius: 999px;
    cursor: pointer;
    text-decoration: none;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    transition: transform 0.28s ease, box-shadow 0.28s ease, background-color 0.28s ease, color 0.28s ease;
    display: inline-block;
}

.btn-primary {
    background-color: rgba(231, 76, 60, 0.96);
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 18px rgba(174, 44, 31, 0.28);
}

.btn-primary::after {
    content: "";
    position: absolute;
    top: -140%;
    left: -30%;
    width: 44%;
    height: 380%;
    background: linear-gradient(120deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.32) 50%, rgba(255, 255, 255, 0) 100%);
    transform: rotate(18deg) translateX(-120%);
    transition: transform 0.52s ease;
    pointer-events: none;
}

.btn-primary:hover {
    transform: translateY(-2px) scale(1.03);
    background-color: rgba(231, 76, 60, 1);
    box-shadow: 0 14px 26px rgba(174, 44, 31, 0.4);
    text-decoration: none;
}

.btn-primary:hover::after {
    transform: rotate(18deg) translateX(360%);
}

.btn-primary:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.9);
    outline-offset: 2px;
}

/* ===================================================
   HERO SECTION
   =================================================== */
.hero-section {
    position: relative;
    min-height: 660px;
    display: flex;
    align-items: stretch;
    justify-content: center;
    color: white;
    overflow: hidden;
    padding: 106px 0 56px;
    background-image:
        linear-gradient(rgba(20, 28, 36, 0.24), rgba(20, 28, 36, 0.24)),
        url("../assets/backgroundArt.png");
    background-size: 100% 100%, var(--hero-bg-size);
    background-position: 0 0, var(--hero-bg-x) var(--hero-bg-y);
    background-repeat: no-repeat;
}

.hero-background-placeholder {
    position: relative;
    background-image:
        linear-gradient(rgba(20, 28, 36, 0.24), rgba(20, 28, 36, 0.24)),
        url("../assets/homepage-top-header-image.png");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 540px;
    border-radius: 0;
    box-shadow: 0 28px 60px rgba(17, 24, 31, 0.24);
}

.hero-container {
    position: relative;
    z-index: 1;
    width: min(1280px, calc(100% - 56px));
    margin: 0 auto;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr;
    align-items: center;
    justify-items: center;
    gap: 0;
}

.hero-subtitle {
    font-family: var(--font-family-ui);
    font-size: 12px;
    letter-spacing: 0.34em;
    margin-bottom: 18px;
    opacity: 0.82;
}

.hero-title {
    font-family: var(--font-family-ui);
    font-size: clamp(58px, 6.2vw, 92px);
    margin-bottom: 14px;
    font-weight: bold;
    line-height: 0.96;
    max-width: none;
}

.hero-tagline {
    font-family: var(--font-family-ui);
    font-size: clamp(22px, 2.2vw, 30px);
    margin-bottom: 18px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-description {
    font-family: var(--font-family-ui);
    max-width: 44ch;
    font-size: 16px;
    line-height: 1.7;
    opacity: 0.9;
    margin: 0 auto;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 880px;
    margin: 0 auto;
    padding: 44px 0;
    text-align: center;
    text-shadow: 0 12px 32px rgba(17, 24, 31, 0.22);
}

/* ===================================================
   SECTIONS - GENERAL
   =================================================== */
section {
    padding: var(--spacing-xl) 0;
}

.section-title {
    text-align: center;
    margin-bottom: var(--spacing-lg);
    font-weight: 700;
    letter-spacing: 0.015em;
    font-size: 36px;
}

.section-subtitle {
    text-align: center;
    color: var(--color-text-light);
    margin-bottom: var(--spacing-md);
}

.section-description {
    text-align: center;
    color: var(--color-text-light);
    max-width: 600px;
    margin: 0 auto var(--spacing-lg);
}

/* ===================================================
   IMAGE PLACEHOLDERS
   =================================================== */
.image-placeholder {
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-placeholder);
    border-radius: 4px;
    font-size: 14px;
    color: #999;
    text-align: center;
    padding: var(--spacing-md);
}

.image-caption {
    margin-top: var(--spacing-sm);
    font-size: 14px;
    color: var(--color-text-light);
    text-align: center;
}

/* ===================================================

   PROJECTS SECTION
   =================================================== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 48px 52px;
    align-items: start;
}

/* First-cell text intro (matches Salmon reference row 1 left) */
.project-card--intro {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 16px 0;
}

.project-card--intro h2 {
    font-size: clamp(22px, 2.4vw, 30px);
    line-height: 1.22;
    margin-bottom: 20px;
}

.project-card--intro p {
    font-size: 14px;
    line-height: 1.8;
    color: var(--color-text-light);
    margin-bottom: 12px;
}

.project-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

article.project-card {
    align-items: center;
    text-align: center;
    padding-bottom: 16px;
}

.project-image-wrapper {
    width: 100%;
    margin-bottom: 18px;
    border-radius: 4px;
    overflow: hidden;
}

.project-image-wrapper img {
    width: 100%;
    height: auto;
    display: block;
}

/* Wider landscape aspect ratio, like the Salmon reference */
.project-image-wrapper .image-placeholder {
    aspect-ratio: 4 / 3;
    border-radius: 4px;
}

.project-title {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.02em;
    margin-bottom: 8px;
}

.project-description {
    color: var(--color-text-light);
    font-size: 13px;
    line-height: 1.7;
    width: 100%;
    max-width: none;
    margin-bottom: 0;
}

.project-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    margin-top: 14px;
    padding: 8px 18px 7px;
    border: 1px solid #2f3744;
    border-radius: 0;
    background-color: #ffffff;
    color: #2f3744;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    text-decoration: none;
    transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.project-link:hover {
    background-color: #2f3744;
    border-color: #2f3744;
    color: #ffffff;
    text-decoration: none;
}

/* ===================================================
   SERVICES SECTION
   =================================================== */
.services-section {
    background: linear-gradient(180deg, #f7f1e8 0%, #efe4d2 100%);
    border-top: 1px solid rgba(76, 57, 33, 0.12);
    border-bottom: 1px solid rgba(76, 57, 33, 0.12);
}

.services-section .section-title {
    color: #2f2418;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-lg);
}

.service-card {
    text-align: center;
    padding: 28px 16px;
    border-radius: 10px;
    border: 1px solid rgba(76, 57, 33, 0.14);
    background-color: rgba(255, 255, 255, 0.76);
    box-shadow: 0 6px 16px rgba(61, 45, 28, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 10px 22px rgba(61, 45, 28, 0.16);
}

.service-icon {
    font-size: 42px;
    margin-bottom: 14px;
    filter: saturate(0.92);
}

.service-title {
    font-size: 15px;
    line-height: 1.35;
    color: #34281c;
    margin-bottom: 0;
}

/* ===================================================
   GALLERY SECTION
   =================================================== */
/* ===================================================
   CASE STUDY PAGE
   =================================================== */

/* Breadcrumb */
.breadcrumb {
    font-size: 0.85rem;
    color: var(--color-text-light);
    margin-bottom: var(--spacing-md);
}

.breadcrumb a {
    color: var(--color-secondary);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* Hero image */
.case-study-hero {
    width: 100%;
    max-height: 520px;
    object-fit: cover;
    display: block;
    border-radius: 4px;
    margin-bottom: var(--spacing-xl);
}

/* Two-column layout: meta sidebar + body */
.case-study-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: var(--spacing-xl);
    align-items: start;
}

.case-study-meta {
    position: sticky;
    top: var(--spacing-lg);
}

.case-study-meta-item {
    margin-bottom: var(--spacing-lg);
}

.case-study-meta-item h4 {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-light);
    margin-bottom: 4px;
}

.case-study-meta-item p,
.case-study-meta-item ul {
    font-size: 0.95rem;
    color: var(--color-text);
    margin: 0;
    padding: 0;
    list-style: none;
}

/* Body sections */
.case-study-body section {
    margin-bottom: var(--spacing-xl);
    padding: 0;
}

.case-study-body section:last-child {
    margin-bottom: 0;
}

.case-study-body h2 {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
    color: var(--color-primary);
}

.case-study-body h3 {
    font-size: 1.15rem;
    margin-bottom: var(--spacing-sm);
    color: var(--color-primary);
}

.case-study-body--american-eagle h3 {
    margin-bottom: var(--spacing-md);
}

.case-study-body p {
    line-height: 1.8;
    color: var(--color-text-light);
    margin-bottom: var(--spacing-md);
}

/* Inline figures */
.case-study-body figure {
    margin: var(--spacing-lg) 0;
}

.case-study-body figure img {
    width: 100%;
    border-radius: 4px;
    display: block;
}

.case-study-body figcaption {
    font-size: 0.8rem;
    color: var(--color-text-light);
    margin-top: 8px;
    text-align: center;
}

/* Award callout */
.award-callout {
    background: var(--color-placeholder);
    border-left: 4px solid var(--color-secondary);
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: 0 4px 4px 0;
    margin-bottom: var(--spacing-md);
}

.award-callout h4 {
    font-size: 0.95rem;
    color: var(--color-primary);
    margin-bottom: 4px;
}

.award-callout p {
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin: 0;
}

/* Back link */
.case-study-back {
    display: inline-block;
    margin-bottom: var(--spacing-xs);
    font-size: 0.9rem;
    color: var(--color-secondary);
    text-decoration: none;
}

.case-study-back:hover {
    text-decoration: underline;
}

/* Bulleted list inside case study body */
.case-study-body ul.content-list {
    list-style: disc;
    padding-left: 1.4em;
    color: var(--color-text-light);
    line-height: 1.9;
    margin-bottom: var(--spacing-md);
}

/* 3-column image row (overview / process / mockups) */
.image-row-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
    margin: var(--spacing-lg) 0;
}

.image-row-3 img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 4px;
    display: block;
    background: var(--color-placeholder);
}

/* 2-column image row */
.image-row-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
    margin: var(--spacing-lg) 0;
}

.image-row-2 img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 4px;
    display: block;
    background: var(--color-placeholder);
}

/* 2×2 image grid for 4 deliverable/final images */
.image-row-2x2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
    margin: var(--spacing-lg) 0;
}

.image-row-2x2 img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 4px;
    display: block;
    background: var(--color-placeholder);
}

/* Full-width single image block */
.image-full {
    width: 100%;
    border-radius: 4px;
    display: block;
    margin: var(--spacing-lg) 0;
    background: var(--color-placeholder);
    min-height: 320px;
    object-fit: cover;
}

/* Visual inspiration 3-up grid (above two-column layout) */
.inspiration-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
    margin: var(--spacing-lg) 0 var(--spacing-xl);
}

.inspiration-grid img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 4px;
    display: block;
    background: var(--color-placeholder);
}

/* Responsive */
@media (max-width: 768px) {
    .case-study-layout {
        grid-template-columns: 1fr;
    }

    .case-study-meta {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-md);
        border-bottom: 1px solid var(--color-border);
        padding-bottom: var(--spacing-lg);
        margin-bottom: var(--spacing-lg);
    }

    .image-row-3,
    .image-row-2,
    .image-row-2x2,
    .inspiration-grid {
        grid-template-columns: 1fr;
    }
}

/* ===================================================
   GALLERY SECTION
   =================================================== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
}

.gallery-item {
    cursor: pointer;
}

.gallery-image-wrapper {
    border-radius: 4px;
    overflow: hidden;
    aspect-ratio: 1;
}

/* ===================================================
   CASE-STUDY CAROUSEL
   =================================================== */
.cs-carousel {
    margin: var(--spacing-lg) 0;
    --cs-carousel-fit: contain;
    --cs-carousel-max-height: min(78vh, 900px);
    --cs-carousel-image-width: 100%;
}

.cs-carousel__track-wrapper {
    overflow: hidden;
    border-radius: 4px;
}

.cs-carousel__track {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    transition: transform 0.4s ease;
}

.cs-carousel__slide {
    flex: 0 0 100%;
}

.cs-carousel__slide img {
    width: var(--cs-carousel-image-width);
    height: auto;
    max-height: var(--cs-carousel-max-height);
    object-fit: var(--cs-carousel-fit);
    display: block;
    border-radius: 4px;
    background: var(--color-placeholder);
    margin-left: auto;
    margin-right: auto;
}

.cs-carousel__controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
    margin-top: var(--spacing-sm);
}

.cs-carousel__btn {
    background: none;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    padding: 8px 14px;
    cursor: pointer;
    font-size: 1rem;
    color: var(--color-text);
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.cs-carousel__btn:hover {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
}

.cs-carousel__btn:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.cs-carousel__dots {
    display: flex;
    gap: 8px;
    align-items: center;
}

.cs-carousel__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1px solid var(--color-border);
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s, border-color 0.2s;
}

.cs-carousel__dot.is-active {
    background: var(--color-primary);
    border-color: var(--color-primary);
}

.cs-carousel__dot:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.cs-carousel__thumbnails {
    display: flex;
    gap: 10px;
    margin-top: var(--spacing-sm);
    overflow-x: auto;
    padding-bottom: 4px;
    justify-content: flex-start;
}

@media (min-width: 1024px) {
    .cs-carousel__thumbnails {
        justify-content: center;
    }
}

.cs-carousel--center-thumbs .cs-carousel__thumbnails {
    justify-content: center;
    overflow-x: visible;
}

.cs-carousel__thumb {
    border: 1px solid var(--color-border);
    border-radius: 4px;
    padding: 0;
    background: #fff;
    cursor: pointer;
    overflow: hidden;
    opacity: 0.78;
    transition: opacity 0.2s, border-color 0.2s, transform 0.2s;
}

.cs-carousel__thumb:hover {
    opacity: 1;
    transform: translateY(-1px);
}

.cs-carousel__thumb.is-active {
    opacity: 1;
    border-color: var(--color-primary);
}

.cs-carousel__thumb:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.cs-carousel__thumb-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
}

.case-study-single-image {
    margin: var(--spacing-lg) 0;
}

.case-study-single-image img {
    width: 90%;
    height: auto;
    max-height: 68vh;
    object-fit: contain;
    display: block;
    border-radius: 4px;
    background: var(--color-placeholder);
    margin-left: auto;
    margin-right: auto;
}

.back-to-top {
    position: fixed;
    right: 22px;
    bottom: 22px;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(76, 57, 33, 0.35);
    border-radius: 999px;
    background: #f6ecde;
    color: var(--color-primary);
    font-size: 1.3rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 26px rgba(76, 57, 33, 0.18);
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease, background 0.25s ease;
    z-index: 1100;
}

.back-to-top.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.back-to-top:hover {
    background: #ead7bc;
}

.back-to-top:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 3px;
}

/* ===================================================
   BIO SECTION
   =================================================== */
.bio-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
    align-items: center;
}

.bio-image {
    border-radius: 4px;
    overflow: hidden;
}

.bio-image img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
}

.bio-text p {
    color: var(--color-text-light);
    margin-bottom: var(--spacing-md);
    line-height: 1.8;
}

/* ===================================================
   TESTIMONIALS SECTION
   =================================================== */
.testimonials-section {
    position: relative;
    margin-bottom: 72px;
    padding-bottom: 20px;
}

.testimonials-section::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 48px;
    background: linear-gradient(180deg, #efe4d2 0%, #e6d8c2 100%);
    border-top: 1px solid rgba(76, 57, 33, 0.14);
    border-bottom: 1px solid rgba(76, 57, 33, 0.14);
    z-index: 0;
}

.testimonials-section .container {
    position: relative;
    z-index: 1;
}

.testimonials-section .section-title {
    position: relative;
    color: #2f2418;
    font-size: clamp(32px, 3.2vw, 44px);
    letter-spacing: 0.02em;
    margin-bottom: 34px;
}

.testimonials-section .section-title::after {
    content: "";
    display: block;
    width: 92px;
    height: 2px;
    margin: 12px auto 0;
    background-color: rgba(74, 55, 33, 0.34);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-lg);
}

.testimonial-card {
    position: relative;
    padding: 52px 20px 24px;
    background-color: rgba(255, 255, 255, 0.84);
    border: 1px solid rgba(76, 57, 33, 0.14);
    border-radius: 12px;
    box-shadow: 0 10px 22px rgba(61, 45, 28, 0.11);
    transform: translateY(32px);
}

.testimonial-logo {
    position: absolute;
    top: 0;
    left: 50%;
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 2px solid rgba(75, 56, 33, 0.36);
    background: linear-gradient(180deg, #fffdf8 0%, #f2eadf 100%);
    color: #594126;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    transform: translate(-50%, -50%);
    box-shadow: 0 8px 18px rgba(61, 45, 28, 0.18);
}

/* Ensure SVG logos fit inside the circular logo container */
.testimonial-logo img {
    width: 56%;
    height: 56%;
    object-fit: contain;
    display: block;
}

.testimonial-quote {
    font-style: normal;
    margin-bottom: var(--spacing-md);
    color: #3a2f23;
    line-height: 1.72;
    font-size: 14px;
}

.testimonial-author {
    display: flex;
    flex-direction: column;
}

.testimonial-author strong {
    margin-bottom: var(--spacing-xs);
    font-size: 15px;
    color: #2f2418;
}

.testimonial-title {
    font-size: 12px;
    color: #6c5b46;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* ===================================================
   CONTACT SECTION
   =================================================== */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.contact-form-status {
    display: none;
    margin-bottom: var(--spacing-md);
    padding: 10px 12px;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.5;
}

.contact-form-status.is-success {
    display: block;
    background: #eaf5ec;
    border: 1px solid #8bb698;
    color: #1f4d2b;
}

.contact-form-status.is-error {
    display: block;
    background: #fbeceb;
    border: 1px solid #d49590;
    color: #7a1f1a;
}

.contact-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.form-group {
    margin-bottom: var(--spacing-md);
}

.form-group label {
    display: block;
    margin-bottom: var(--spacing-sm);
    font-weight: bold;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: var(--spacing-sm);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-family: inherit;
    font-size: 16px;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-secondary);
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

/* ===================================================
   FOOTER
   =================================================== */
.site-footer {
    background: linear-gradient(180deg, #243446 0%, #1d2b3a 100%);
    color: white;
    padding: 56px 0 28px;
    margin-top: var(--spacing-xl);
}

.footer-container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.footer-content {
    display: grid;
    grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(140px, 1fr));
    gap: 34px;
    margin-bottom: 24px;
}

.footer-brand h3 {
    margin-bottom: 8px;
    font-size: 24px;
}

.footer-brand p {
    margin: 0;
    color: rgba(222, 229, 236, 0.92);
    font-size: 14px;
    line-height: 1.6;
}

.footer-logo-link {
    display: inline-flex;
    margin-bottom: 12px;
}

.footer-logo-image {
    width: auto;
    max-height: 74px;
    display: block;
}

.footer-nav h4,
.footer-social h4,
.footer-contact h4 {
    margin-bottom: 12px;
    font-size: 14px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.94);
}

.footer-nav ul,
.footer-social ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-nav li,
.footer-social li {
    margin-bottom: 10px;
}

.footer-nav a,
.footer-social a {
    color: #ccd6df;
    font-size: 14px;
    line-height: 1.5;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-nav a:hover,
.footer-social a:hover {
    color: #ffffff;
}

.footer-contact a {
    color: #ccd6df;
    font-size: 14px;
    text-decoration: none;
    transition: color 0.2s ease;
    overflow-wrap: break-word;
    word-break: break-all;
}

.footer-contact {
    min-width: 0;
}

.footer-contact a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.16);
    padding-top: 16px;
    text-align: center;
    font-size: 14px;
    color: #c5d0db;
}

/* ===================================================
   RESPONSIVE DESIGN
   =================================================== */

/* Tablet (768px and up) */
@media (max-width: 768px) {
    h1 { font-size: 36px; }
    h2 { font-size: 28px; }

    .site-header {
        padding-top: 18px;
    }

    .header-container {
        padding: 0 18px;
    }

    .site-nav {
        display: none;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .header-cta {
        display: none;
    }

    .logo-image {
        max-height: 56px;
    }

    .hero-section {
        min-height: auto;
        padding: 88px 0 36px;
        --hero-bg-y: 18%;
    }

    .hero-container {
        width: min(100%, calc(100% - 36px));
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .hero-content {
        margin-right: 0;
        padding: 6px 0;
        text-align: center;
    }

    .hero-title {
        font-size: clamp(44px, 9vw, 66px);
        max-width: none;
        text-align: center;
    }

    .hero-tagline {
        font-size: clamp(18px, 4vw, 24px);
    }

    .hero-description {
        max-width: 42ch;
        font-size: 15px;
        margin: 0 auto;
    }

    .hero-background-placeholder {
        min-height: 360px;
    }

    .bio-grid {
        grid-template-columns: 1fr;
    }

    .projects-grid {
        gap: 28px;
        flex-direction: column;
    }

    .projects-col {
        gap: 32px;
    }

    .project-card--intro p {
        max-width: none;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .testimonials-grid {
        grid-template-columns: 1fr;
    }

    .back-to-top {
        right: 14px;
        bottom: 14px;
        width: 42px;
        height: 42px;
    }

    .testimonials-section {
        margin-bottom: 56px;
    }

    .testimonials-section::before {
        bottom: 34px;
    }

    .testimonial-card {
        transform: translateY(20px);
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 26px 22px;
    }
}

/* Mobile (480px and below) */
@media (max-width: 480px) {
    :root {
        --container-padding: 16px;
        --spacing-lg: 32px;
        --spacing-xl: 40px;
    }

    h1 { font-size: 28px; }
    h2 { font-size: 22px; }

    .hero-title {
        font-size: 42px;
    }

    .hero-section {
        padding: 84px 0 32px;
        --hero-bg-y: 14%;
    }

    .hero-tagline {
        font-size: 18px;
    }

    .hero-description {
        font-size: 15px;
    }

    .hero-background-placeholder {
        min-height: 280px;
    }

    section {
        padding: var(--spacing-lg) 0;
    }

    .section-title {
        font-size: 24px;
    }

    .projects-grid,
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .service-card {
        padding: 16px 10px;
    }

    .service-icon {
        font-size: 28px;
        margin-bottom: 8px;
    }

    .service-title {
        font-size: 13px;
    }

    .projects-grid {
        flex-direction: column;
    }

    .project-card--intro p {
        max-width: none;
    }



    .about-text p,
    .bio-text p {
        font-size: 14px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 18px;
        margin-bottom: 20px;
    }

    .footer-logo-image {
        max-height: 60px;
    }

    .testimonials-section {
        margin-bottom: 44px;
    }

    .testimonials-section::before {
        bottom: 24px;
    }

    .testimonial-card {
        transform: translateY(14px);
    }
}
