/*
Theme Name: Kessler Photography
Theme URI: https://photo-kessler.com
Author: Mathias Kessler
Description: Custom portfolio theme for Mathias Kessler Photography. Dark editorial design with CMS image management, captions, and drag-and-drop reordering.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: Private
Text Domain: kessler
*/

/* ══════════════════════════════════════
   DESIGN TOKENS
   ══════════════════════════════════════ */
:root {
    --bg: #0e0d0b;
    --bg-elev: #15130f;
    --bg-elev-2: #1e1b16;
    --bg-elev-3: #2c2820;
    --cream: #f5f1e8;
    --cream-dim: #d8d3c5;
    --muted: #8c857a;
    --muted-dark: #4a463f;
    --accent: #c1542d;
    --accent-hover: #d4633a;
    --line: rgba(245, 241, 232, 0.08);
    --line-strong: rgba(245, 241, 232, 0.18);
    --font-display: 'Fraunces', Georgia, serif;
    --font-body: 'DM Sans', system-ui, sans-serif;
    --font-mono: 'DM Mono', ui-monospace, monospace;
    --nav-h: 72px;
}

/* ══════════════════════════════════════
   RESET & BASE
   ══════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--cream);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* Film grain */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.04;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ══════════════════════════════════════
   NAVIGATION
   ══════════════════════════════════════ */
.site-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 50;
    height: var(--nav-h);
    padding: 0 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(14, 13, 11, 0.75);
    border-bottom: 1px solid var(--line);
    transition: all 0.4s;
}
.site-nav.shrunk {
    height: 56px;
    background: rgba(14, 13, 11, 0.92);
}
.nav-brand {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 400;
    letter-spacing: 0.02em;
}
.nav-brand em {
    font-style: italic;
    color: var(--accent);
    font-weight: 300;
}
.nav-links {
    display: flex;
    gap: 28px;
    list-style: none;
}
.nav-links a {
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted);
    transition: color 0.2s;
    padding: 4px 0;
    position: relative;
}
.nav-links a:hover,
.nav-links a.active { color: var(--cream); }
.nav-links a.active::after {
    content: "";
    position: absolute;
    bottom: -2px;
    left: 0; right: 0;
    height: 1px;
    background: var(--accent);
}

/* Mobile nav */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--cream);
    font-size: 24px;
    cursor: pointer;
}
@media (max-width: 768px) {
    .site-nav { padding: 0 20px; }
    .nav-toggle { display: block; }
    .nav-links {
        display: none;
        position: absolute;
        top: var(--nav-h);
        left: 0; right: 0;
        background: rgba(14, 13, 11, 0.96);
        flex-direction: column;
        padding: 20px 24px;
        gap: 16px;
        border-bottom: 1px solid var(--line);
    }
    .nav-links.open { display: flex; }
}

/* ══════════════════════════════════════
   HERO
   ══════════════════════════════════════ */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 120px 40px 80px;
    position: relative;
    overflow: hidden;
}
.hero-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
}
.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.25;
}
.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(14,13,11,0.4), var(--bg));
}
.hero-name {
    font-family: var(--font-display);
    font-size: clamp(56px, 12vw, 220px);
    font-weight: 300;
    line-height: 0.9;
    letter-spacing: -0.02em;
    margin-bottom: 24px;
}
.hero-name em {
    font-style: italic;
    color: var(--accent);
    font-weight: 200;
}
.hero-intro {
    max-width: 520px;
    color: var(--cream-dim);
    font-size: 16px;
    line-height: 1.65;
}
.hero-scroll {
    position: absolute;
    bottom: 32px;
    left: 40px;
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--muted);
}

/* ══════════════════════════════════════
   SECTION HEADERS
   ══════════════════════════════════════ */
.section-head {
    display: flex;
    align-items: baseline;
    gap: 16px;
    padding: 40px 40px 24px;
    border-top: 1px solid var(--line);
}
.section-num {
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--accent);
}
.section-title {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 400;
    color: var(--muted);
    font-style: italic;
}
.section-link {
    margin-left: auto;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--muted);
    letter-spacing: 0.08em;
}

/* ══════════════════════════════════════
   FEATURED CAMPAIGN (Naturbewusst leben)
   ══════════════════════════════════════ */
.featured-card {
    margin: 0 40px 60px;
    background: var(--bg-elev);
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    min-height: 420px;
}
.featured-image {
    overflow: hidden;
}
.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 6s;
}
.featured-card:hover .featured-image img {
    transform: scale(1.03);
}
.featured-content {
    padding: 48px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.featured-meta {
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent);
    margin-bottom: 16px;
}
.featured-title {
    font-family: var(--font-display);
    font-size: clamp(28px, 3.5vw, 48px);
    font-weight: 300;
    line-height: 1.1;
    margin-bottom: 16px;
}
.featured-title em {
    font-style: italic;
    font-weight: 200;
}
.featured-body {
    color: var(--cream-dim);
    font-size: 15px;
    line-height: 1.65;
    margin-bottom: 24px;
    max-width: 400px;
}
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
    font-family: var(--font-mono);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 5px 12px;
    border: 1px solid var(--line-strong);
    border-radius: 20px;
    color: var(--cream-dim);
}

@media (max-width: 768px) {
    .featured-card { grid-template-columns: 1fr; }
    .featured-card { margin: 0 16px 40px; }
    .featured-content { padding: 28px 24px; }
}

/* ══════════════════════════════════════
   PROJECT INDEX GRID
   ══════════════════════════════════════ */
.project-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2px;
    padding: 0 40px 80px;
}
.project-card {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    display: block;
    background: var(--bg-elev);
}
.project-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s, opacity 0.4s;
}
.project-card:hover img {
    transform: scale(1.04);
    opacity: 0.6;
}
.project-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 32px;
    background: linear-gradient(to top, rgba(14,13,11,0.8) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.35s;
}
.project-card:hover .project-overlay { opacity: 1; }
.project-num {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--accent);
    letter-spacing: 0.12em;
    margin-bottom: 6px;
}
.project-title {
    font-family: var(--font-display);
    font-size: clamp(22px, 3vw, 36px);
    font-weight: 400;
    line-height: 1.15;
}
.project-count {
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--muted);
    margin-top: 6px;
}

@media (max-width: 768px) {
    .project-grid {
        grid-template-columns: 1fr;
        padding: 0 16px 40px;
    }
}

/* ══════════════════════════════════════
   SINGLE PORTFOLIO / GALLERY
   ══════════════════════════════════════ */
.portfolio-header {
    padding: 140px 40px 40px;
    max-width: 800px;
}
.portfolio-header h1 {
    font-family: var(--font-display);
    font-size: clamp(36px, 5vw, 64px);
    font-weight: 300;
    margin-bottom: 16px;
}
.portfolio-header .desc {
    color: var(--cream-dim);
    font-size: 16px;
    line-height: 1.65;
    max-width: 560px;
}

.gallery-grid {
    padding: 0 40px 80px;
    columns: 2;
    column-gap: 16px;
}
.gallery-item {
    break-inside: avoid;
    margin-bottom: 16px;
    position: relative;
    overflow: hidden;
    border-radius: 4px;
}
.gallery-item img {
    width: 100%;
    display: block;
    transition: transform 0.5s;
}
.gallery-item:hover img { transform: scale(1.02); }
.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0; right: 0;
    padding: 24px 20px 16px;
    background: linear-gradient(to top, rgba(14,13,11,0.85), transparent);
    font-size: 13px;
    color: var(--cream-dim);
    opacity: 0;
    transition: opacity 0.3s;
    font-style: italic;
}
.gallery-item:hover .gallery-caption { opacity: 1; }

@media (max-width: 768px) {
    .gallery-grid { columns: 1; padding: 0 16px 40px; }
    .portfolio-header { padding: 120px 20px 32px; }
}

/* ══════════════════════════════════════
   CLIENTS
   ══════════════════════════════════════ */
.clients-section {
    padding: 40px 40px 80px;
}
.clients-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
}
.client {
    flex: 0 0 auto;
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--cream-dim);
    padding: 8px 20px 8px 0;
}
.client em {
    font-style: normal;
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-left: 8px;
}

/* ══════════════════════════════════════
   ABOUT SECTION
   ══════════════════════════════════════ */
.about-section {
    padding: 60px 40px 100px;
    max-width: 680px;
}
.about-section h2 {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 300;
    margin-bottom: 24px;
}
.about-section p {
    color: var(--cream-dim);
    font-size: 15px;
    line-height: 1.75;
    margin-bottom: 16px;
}
.about-section a {
    color: var(--accent);
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s;
}
.about-section a:hover { border-bottom-color: var(--accent); }

/* ══════════════════════════════════════
   FOOTER
   ══════════════════════════════════════ */
.site-footer {
    border-top: 1px solid var(--line);
    padding: 32px 40px;
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--muted);
    letter-spacing: 0.06em;
}

@media (max-width: 768px) {
    .site-footer {
        flex-direction: column;
        gap: 8px;
        padding: 24px 20px;
    }
}

/* ══════════════════════════════════════
   ANIMATIONS
   ══════════════════════════════════════ */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    animation: revealUp 0.8s ease forwards;
}
.reveal-1 { animation-delay: 0.1s; }
.reveal-2 { animation-delay: 0.25s; }
.reveal-3 { animation-delay: 0.4s; }
.reveal-4 { animation-delay: 0.55s; }

@keyframes revealUp {
    to { opacity: 1; transform: translateY(0); }
}

/* Scroll-triggered reveal */
.scroll-reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s, transform 0.6s;
}
.scroll-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}
