/* ===========================
   1. Variables & Reset
   =========================== */
:root {
    --color-primary: #E7530B;
    --color-primary-dark: #C94609;
    --color-accent: #F3A985;
    --color-text: #333333;
    --color-white: #FFFFFF;
    --font-primary: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --content-width: 800px;
    --content-width-wide: 1100px;
    --spacing-page: clamp(1.5rem, 4vw, 3rem);
}

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

html {
    scroll-behavior: smooth;
}

/* ===========================
   2. Base / Typography
   =========================== */
body {
    font-family: var(--font-primary);
    font-size: 17px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.bg-orange {
    background-color: var(--color-primary);
    color: var(--color-white);
}

body.bg-white {
    background-color: var(--color-white);
    color: var(--color-text);
}

h1, h2, h3, h4 {
    line-height: 1.2;
    font-weight: 700;
}

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

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

/* ===========================
   3. Layout
   =========================== */
.content-wrap {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 0 var(--spacing-page);
}

.content-wrap--wide {
    max-width: var(--content-width-wide);
}

main {
    min-height: calc(100vh - 80px);
}

/* ===========================
   4. Header & Navigation
   =========================== */
.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem var(--spacing-page);
    max-width: var(--content-width-wide);
    margin: 0 auto;
}

.site-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-white);
}

.bg-white .site-logo {
    color: var(--color-primary);
}

.site-nav {
    display: flex;
    gap: 2rem;
}

.site-nav a {
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--color-white);
    padding-bottom: 4px;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s ease;
}

.site-nav a:hover,
.site-nav a.active {
    border-bottom-color: var(--color-white);
}

.bg-white .site-nav a {
    color: var(--color-text);
}

.bg-white .site-nav a:hover,
.bg-white .site-nav a.active {
    border-bottom-color: var(--color-primary);
}

/* Mobile nav toggle */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    flex-direction: column;
    gap: 5px;
}

.nav-toggle-bar {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--color-white);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.bg-white .nav-toggle-bar {
    background-color: var(--color-text);
}

/* ===========================
   5. Homepage
   =========================== */
.home {
    max-width: var(--content-width-wide);
    margin: 0 auto;
    padding: 0 var(--spacing-page);
}

/* Hero headline */
.home-hero {
    padding: 3rem 0 3.5rem;
}

.home-hero-title {
    font-size: clamp(2rem, 4.5vw, 3rem);
    font-weight: 700;
    line-height: 1.15;
    max-width: 600px;
    animation: fadeInUp 0.6s ease-out both;
}

/* Photo + intro row */
.home-about {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: clamp(2rem, 4vw, 4rem);
    align-items: start;
    padding-bottom: 4rem;
}

.home-photo img {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

.home-intro {
    padding-top: 0.25rem;
}

.home-greeting {
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.home-intro p {
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.6;
    margin-bottom: 0.3rem;
}

/* CTA */
.home-cta {
    padding: 2rem 0 5rem;
    text-align: center;
}

.home-cta-link {
    display: inline-block;
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    font-weight: 700;
    color: var(--color-white);
    border-bottom: 3px solid var(--color-white);
    padding-bottom: 4px;
    transition: opacity 0.2s ease;
}

.home-cta-link:hover {
    opacity: 0.8;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===========================
   6. About Page
   =========================== */
.about-content {
    padding: 2rem var(--spacing-page) 4rem;
    max-width: var(--content-width);
    margin: 0 auto;
}

.about-content h1 {
    font-size: 2rem;
    font-style: italic;
    margin-bottom: 2rem;
    font-weight: 300;
}

.about-content h2 {
    font-size: 1.1rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
}

.about-content ul {
    list-style: disc;
    padding-left: 1.2rem;
    margin-bottom: 1.5rem;
}

.about-content li {
    font-size: 1rem;
    margin-bottom: 0.6rem;
    font-weight: 400;
}

.about-content p {
    font-size: 1rem;
    margin-bottom: 1.2rem;
    font-weight: 400;
}

.about-content a {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.about-content a:hover {
    opacity: 0.85;
}

/* ===========================
   7. Work Page — Password Form
   =========================== */
.work-password {
    padding: 4rem var(--spacing-page);
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
}

.work-password h1 {
    font-size: 2rem;
    font-style: italic;
    margin-bottom: 1rem;
    font-weight: 300;
}

.work-password p {
    margin-bottom: 2rem;
    font-size: 1rem;
    opacity: 0.9;
}

.work-password form {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.work-password input[type="password"] {
    padding: 0.6rem 1rem;
    font-size: 1rem;
    font-family: var(--font-primary);
    border: 2px solid var(--color-white);
    background: var(--color-white);
    color: var(--color-text);
    border-radius: 4px;
    width: 240px;
}

.work-password input[type="password"]:focus {
    outline: none;
    box-shadow: 0 0 0 3px var(--color-accent);
}

.work-password button {
    padding: 0.6rem 1.5rem;
    font-size: 1rem;
    font-family: var(--font-primary);
    font-weight: 700;
    background: transparent;
    color: var(--color-white);
    border: 2px solid var(--color-white);
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.work-password button:hover {
    background: var(--color-white);
    color: var(--color-primary);
}

.work-password .error {
    color: var(--color-accent);
    margin-top: 1rem;
    font-size: 0.9rem;
}

/* ===========================
   8. Work Page — Portfolio Grid
   =========================== */
.work-grid-section {
    padding: 2rem var(--spacing-page) 4rem;
    max-width: var(--content-width-wide);
    margin: 0 auto;
}

.work-grid-section h1 {
    font-size: 2rem;
    font-style: italic;
    margin-bottom: 0.5rem;
    font-weight: 300;
}

.work-grid-heading {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
}

.portfolio-item {
    text-decoration: none;
    color: var(--color-white);
    display: block;
    transition: transform 0.2s ease;
}

.portfolio-item:hover {
    transform: translateY(-4px);
}

.portfolio-thumb {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: 6px;
    margin-bottom: 0.75rem;
    background: rgba(0, 0, 0, 0.1);
}

.portfolio-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.portfolio-item:hover .portfolio-thumb img {
    transform: scale(1.03);
}

.portfolio-item h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 0.15rem;
}

.portfolio-client {
    font-size: 0.85rem;
    opacity: 0.75;
    font-weight: 300;
}

/* ===========================
   9. Detail Pages
   =========================== */
.detail-header {
    background: var(--color-primary);
    padding: 3rem var(--spacing-page) 2rem;
}

.detail-header h1 {
    max-width: var(--content-width);
    margin: 0 auto;
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    color: var(--color-white);
}

.detail-content {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 2.5rem var(--spacing-page) 4rem;
}

.detail-section {
    margin-bottom: 2rem;
}

.detail-section h2 {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-primary);
    margin-bottom: 0.75rem;
    border-bottom: 2px solid var(--color-primary);
    display: inline-block;
    padding-bottom: 2px;
}

.detail-section p {
    margin-bottom: 0.75rem;
    line-height: 1.7;
}

.detail-section .team-list {
    list-style: none;
    padding: 0;
}

.detail-section .team-list li {
    margin-bottom: 0.3rem;
}

.detail-images {
    margin-top: 3rem;
}

.detail-images h2 {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.detail-images figure {
    margin-bottom: 2rem;
}

.detail-images figcaption {
    font-size: 0.85rem;
    color: #888;
    margin-top: 0.5rem;
}

.detail-images img {
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.detail-link {
    display: inline-block;
    color: var(--color-primary);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: opacity 0.2s ease;
}

.detail-link:hover {
    opacity: 0.7;
}

.back-link {
    display: inline-block;
    margin-top: 3rem;
    color: var(--color-primary);
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.back-link::before {
    content: '\2190\00a0';
}

.back-link:hover {
    opacity: 0.7;
}

/* ===========================
   10. Editorial Page
   =========================== */
.editorial-list {
    list-style: none;
    padding: 0;
}

.editorial-item {
    margin-bottom: 2.5rem;
    text-align: center;
}

.editorial-item h3 {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--color-text);
}

.editorial-item .btn-read {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    font-size: 0.85rem;
    font-weight: 700;
    font-family: var(--font-primary);
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
    border-radius: 4px;
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
}

.editorial-item .btn-read:hover {
    background: var(--color-primary);
    color: var(--color-white);
}

/* ===========================
   11. Responsive
   =========================== */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .site-nav {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        flex-direction: column;
        padding: 1.5rem var(--spacing-page);
        gap: 1rem;
        z-index: 100;
    }

    .bg-orange .site-nav {
        background: var(--color-primary-dark);
    }

    .bg-white .site-nav {
        background: var(--color-white);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }

    .site-nav.open {
        display: flex;
    }

    .site-header {
        position: relative;
    }

    /* Hamburger animation */
    .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
        opacity: 0;
    }
    .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .home-about {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .home-photo {
        max-width: 220px;
    }
}
