/* === Connect Smederij — Industrial & editorial === */

:root {
    --bg: #111111;
    --bg-warm: #f4f1ec;
    --ink: #e9e6df;
    --ink-dark: #1a1a1a;
    --steel: #5a5a58;
    --steel-soft: #8a8a87;
    --rust: #a04a28;
    --rust-soft: #c1623e;

    --max-w: 66rem;
    --pad-x: clamp(1rem, 4vw, 3rem);

    --font-serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
    --font-sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;

    --t-fast: 150ms ease;
    --t-base: 250ms ease;
    --t-slow: 500ms ease;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a { color: var(--ink); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--rust-soft); }

button { font: inherit; cursor: pointer; background: transparent; border: 0; color: inherit; }

/* === Typography === */

h1, h2, h3, h4 {
    font-family: var(--font-serif);
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -0.01em;
    margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.5rem, 6vw, 5rem); }
h2 { font-size: clamp(1.8rem, 4vw, 3rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.8rem); }

p { margin: 0 0 1em; }

.eyebrow {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--steel-soft);
}

.subtitle { color: var(--steel-soft); font-style: italic; }
.copyright { color: var(--steel-soft); font-style: italic; }
.copyright a { color: var(--steel-soft); }

/* === Layout primitives === */

.site-main { min-height: 60vh; }

.page-body {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: clamp(2rem, 6vw, 5rem) var(--pad-x);
}

/* Hero is a full-bleed background image (50vh on mobile, 60vh desktop) with overlaid title */
.page-hero {
    position: relative;
    width: 100%;
    height: 50vh;
    min-height: 320px;
    max-height: 600px;
    background-size: cover;
    background-position: center;
    background-color: var(--ink-dark);
    display: flex;
    align-items: flex-end;
}
@media (min-width: 800px) { .page-hero { height: 60vh; } }

.page-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(17,17,17,0) 30%, rgba(17,17,17,0.85) 100%);
    pointer-events: none;
}

.page-hero-text {
    position: relative;
    z-index: 1;
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 var(--pad-x) clamp(2rem, 5vw, 4rem);
    width: 100%;
    color: var(--ink);
}

.page-hero-text h1 { margin: 0 0 0.25em; }
.page-subheader { color: var(--steel-soft); font-style: italic; font-size: clamp(1.1rem, 2vw, 1.4rem); }

/* === Site header / nav === */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem var(--pad-x);
    background: rgba(17,17,17,0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #1f1f1f;
}

.site-logo { display: flex; align-items: baseline; gap: 0.6em; }
.site-logo-mark {
    font-family: var(--font-serif);
    font-size: 1.6rem;
    color: var(--rust);
    border: 1.5px solid var(--rust);
    padding: 0 0.4em;
    line-height: 1.4;
}
.site-logo-name {
    font-family: var(--font-sans);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 0.85rem;
    color: var(--ink);
}

.site-nav {
    display: flex;
    gap: clamp(0.8rem, 2.5vw, 2rem);
    align-items: center;
}
.site-nav a {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.82rem;
    padding: 0.3em 0;
    border-bottom: 1px solid transparent;
}
.site-nav a:hover, .site-nav a[aria-current="page"] {
    border-bottom-color: var(--rust);
    color: var(--ink);
}
.site-nav-cta {
    color: var(--rust-soft) !important;
}

@media (max-width: 700px) {
    .site-nav { display: none; }
}

/* Mobile nav toggle */
.site-nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 0.5rem;
}
.site-nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--ink);
    transition: transform var(--t-base);
}
.site-nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.site-nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.site-nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (max-width: 700px) {
    .site-nav-toggle { display: flex; }
}

.mobile-nav {
    position: fixed;
    inset: 60px 0 0 0;
    background: var(--bg);
    flex-direction: column;
    gap: 0;
    z-index: 49;
    display: none;
    padding: 2rem var(--pad-x);
}
.mobile-nav a {
    font-family: var(--font-serif);
    font-size: 2rem;
    padding: 0.8rem 0;
    border-bottom: 1px solid #222;
}
.mobile-nav.open { display: flex; }

/* === Footer === */

.site-footer {
    background: #0c0c0c;
    border-top: 1px solid #1f1f1f;
    margin-top: clamp(3rem, 8vw, 6rem);
}
.site-footer-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: clamp(2rem, 5vw, 4rem) var(--pad-x);
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}
@media (min-width: 700px) {
    .site-footer-inner { grid-template-columns: 1fr 1fr; }
}
.site-footer-col a { display: block; padding: 0.2em 0; color: var(--steel-soft); }
.site-footer-col a:hover { color: var(--rust-soft); }
.site-footer-title {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    margin-bottom: 0.8em;
    color: var(--ink);
}
.site-footer-col address { font-style: normal; color: var(--steel-soft); line-height: 1.7; }

.site-colofon {
    border-top: 1px solid #1f1f1f;
    padding: 1.2rem var(--pad-x);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.78rem;
    color: var(--steel);
    max-width: 100%;
}
.site-colofon a { color: var(--steel-soft); }

/* === Home === */

.home-intro p {
    font-size: clamp(1.05rem, 1.5vw, 1.25rem);
    max-width: 40em;
    line-height: 1.7;
}
.home-figure {
    margin: clamp(2rem, 5vw, 4rem) 0;
    text-align: center;
}
.home-figure img {
    margin: 0 auto;
    filter: grayscale(0.15) contrast(1.05);
    max-width: 320px;
}

/* === Galerij === */

.gallery-section {
    /* Break out of .page-body's horizontal padding so tiles get more width. */
    margin-left:  calc(-1 * var(--pad-x));
    margin-right: calc(-1 * var(--pad-x));
}
.gallery-grid {
    display: grid;
    grid-template-columns: 1fr;
    row-gap: 0.5em;
    column-gap: 0.5em;
    margin: 2rem 0;
}
@media (min-width: 600px) {
    .gallery-grid { grid-template-columns: repeat(3, 1fr); }
}
.gallery-tile {
    position: relative;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: #1a1a1a;
    cursor: zoom-in;
    border: 1px solid transparent;
    transition: border-color var(--t-base);
}
.gallery-tile:hover { border-color: var(--rust); }
.gallery-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(1);
    transition: filter var(--t-slow), transform var(--t-base);
}
.gallery-tile:hover img {
    filter: grayscale(0);
    transform: scale(1.03);
}
.gallery-tile figcaption {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 1rem;
    background: linear-gradient(180deg, rgba(17,17,17,0) 0%, rgba(17,17,17,0.85) 100%);
    color: var(--ink);
    font-family: var(--font-serif);
    font-size: 1.05rem;
    line-height: 1.3;
    opacity: 0;
    transition: opacity var(--t-base);
}
.gallery-tile:hover figcaption { opacity: 1; }

/* === Lightbox (native <dialog>) === */

.lightbox {
    border: 0;
    padding: 0;
    background: rgba(17,17,17,0.96);
    color: var(--ink);
    max-width: 100vw;
    max-height: 100vh;
    width: 100vw;
    height: 100vh;
}
.lightbox::backdrop { background: rgba(0,0,0,0.92); }
.lightbox-figure {
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 2rem;
}
.lightbox-img {
    max-width: min(90vw, 1200px);
    max-height: 75vh;
    width: auto;
    height: auto;
    object-fit: contain;
}
.lightbox-caption {
    margin-top: 1rem;
    font-family: var(--font-serif);
    font-size: 1.1rem;
    color: var(--steel-soft);
    text-align: center;
}
.lightbox-close, .lightbox-prev, .lightbox-next {
    position: absolute;
    background: transparent;
    color: var(--ink);
    font-size: 2rem;
    line-height: 1;
    padding: 0.5em;
    border: 0;
}
.lightbox-close { top: 1rem; right: 1rem; }
.lightbox-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { color: var(--rust); }

/* === Contact === */

.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    margin: 2rem 0;
}
@media (min-width: 800px) {
    .contact-grid { grid-template-columns: 1fr 1.2fr; }
}
.contact-info p { line-height: 1.8; }
.contact-info strong { color: var(--steel-soft); font-weight: 600; }
.contact-map iframe {
    width: 100%;
    height: 100%;
    min-height: 320px;
    border: 1px solid #2a2a2a;
    background: #1a1a1a;
}

.contact-form {
    margin-top: clamp(2rem, 5vw, 4rem);
    padding-top: clamp(2rem, 5vw, 4rem);
    border-top: 1px solid #2a2a2a;
}
.contact-form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    max-width: 40rem;
}
@media (min-width: 600px) {
    .contact-form-grid.two { grid-template-columns: 1fr 1fr; }
}
.contact-form input, .contact-form textarea {
    width: 100%;
    background: #1a1a1a;
    border: 1px solid #2a2a2a;
    color: var(--ink);
    padding: 0.8rem 1rem;
    font: inherit;
    transition: border-color var(--t-fast);
}
.contact-form input:focus, .contact-form textarea:focus {
    outline: 0;
    border-color: var(--rust);
}
.contact-form textarea { min-height: 8em; resize: vertical; }
.contact-form button {
    background: var(--rust);
    color: var(--ink);
    padding: 0.9rem 2rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.85rem;
    transition: background var(--t-base);
    border: 0;
}
.contact-form button:hover { background: var(--rust-soft); }
.contact-form-status {
    margin-top: 1rem;
    font-size: 0.95rem;
    color: var(--steel-soft);
    min-height: 1.5em;
}
.contact-form-status.ok { color: #6db86d; }
.contact-form-status.err { color: #d96b50; }

/* === Buttons === */

.btn {
    display: inline-block;
    padding: 0.9rem 1.8rem;
    background: var(--rust);
    color: var(--ink);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.85rem;
    line-height: 1;
    border: 1px solid var(--rust);
    transition: background var(--t-base), border-color var(--t-base), color var(--t-base);
    text-align: center;
    text-decoration: none;
}
.btn:hover {
    background: var(--rust-soft);
    border-color: var(--rust-soft);
    color: var(--ink);
}
.btn--ghost {
    background: transparent;
    border-color: var(--steel);
    color: var(--ink);
}
.btn--ghost:hover {
    background: transparent;
    border-color: var(--rust);
    color: var(--rust-soft);
}
.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 2rem 0;
}
.btn-row--center {
    justify-content: center;
}

/* === 404 === */

.error-page {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: clamp(3rem, 8vw, 6rem) var(--pad-x);
    text-align: center;
}
.error-page h1 { margin-bottom: 0.5em; }
