/* Marius Boven — kleuren uit zijn eigen werk: lucht, klaproos, goudsbloem */
:root {
    --paper: #f3f0e8;
    --ink: #1c1d1f;
    --muted: #6d6a63;
    --line: #d9d4c8;
    --sky: #7fa3bf;
    --poppy: #d8432a;
    --gold: #e9b23a;
    --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
    --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --pad: clamp(1.25rem, 4vw, 3.5rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font: 400 1.0625rem/1.65 var(--sans);
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.01em; }

/* ---------- header / footer ---------- */
.site-header {
    display: flex; justify-content: space-between; align-items: baseline;
    padding: 1.5rem var(--pad);
    position: relative; z-index: 2;
}
.brand { font-family: var(--serif); font-size: 1.2rem; text-decoration: none; }
.site-header nav { display: flex; gap: clamp(1rem, 3vw, 2.25rem); }
.site-header nav a { text-decoration: none; font-size: .95rem; color: var(--muted); transition: color .2s; }
.site-header nav a:hover { color: var(--ink); }

.site-footer {
    display: flex; flex-wrap: wrap; gap: .5rem 2rem; justify-content: space-between;
    padding: 2rem var(--pad) 2.5rem;
    border-top: 1px solid var(--line);
    font-size: .875rem; color: var(--muted);
}
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--ink); }

/* ---------- hero ---------- */
.hero {
    position: relative;
    min-height: min(78vh, 760px);
    padding: 0 var(--pad);
    display: flex; flex-direction: column; justify-content: flex-end;
    padding-bottom: clamp(3rem, 8vh, 6rem);
    overflow: hidden;
}
.hero h1 {
    position: relative; z-index: 1;
    margin: 0;
    font-size: clamp(3.5rem, 13vw, 11rem);
    line-height: .88;
}
/* De punt op de i van Marius: een blauwe "aarde". De stip en de ı staan in dezelfde grid-cel op
   dezelfde basislijn en de stip schuift 1ex (de x-hoogte van het lettertype dat echt gebruikt wordt) omhoog.
   Zo staat hij bij elk lettertype net boven de stam van de i. */
.dot-i { display: inline-grid; }
.dot-i > span { grid-area: 1 / 1; align-self: baseline; }
.dot-i > .dot {
    justify-self: center;
    width: .15em; height: .15em; border-radius: 50%;
    background: var(--sky);
    transform: translateY(calc(-1ex - .025em));
}
.hero .lead {
    position: relative; z-index: 1;
    max-width: 30ch; margin: 1.5rem 0 0;
    font-family: var(--serif); font-size: clamp(1.15rem, 2vw, 1.5rem); color: var(--muted);
}
/* Zon, aarde en maan. De baan is gekanteld (scaleY) en elke laag draait de kanteling en rotatie
   voor zijn kind weer terug, zodat de bollen rond blijven. De z-index wisselt halverwege de baan:
   in de voorste helft schuift de aarde vóór de zon langs, in de achterste helft erachter. */
.cosmos {
    --sun: clamp(150px, 21vw, 320px);
    --R: calc(var(--sun) * 1.25);
    --earth: calc(var(--sun) * .46);
    --r: calc(var(--earth) * 1.1);
    --moon: calc(var(--earth) * .4);
    --year: 96s;
    --month: 22s;
    position: absolute; left: 66%; top: 44%; width: 0; height: 0;
    pointer-events: none;
}
.cosmos div { position: absolute; left: 0; top: 0; }
.cosmos .tilt, .cosmos .untilt, .cosmos .spin, .cosmos .arm, .cosmos .unspin { width: 0; height: 0; transform-origin: 0 0; }
.cosmos .tilt   { transform: rotate(-12deg) scaleY(.45); }
.cosmos .untilt { transform: scaleY(2.2222) rotate(12deg); }
.cosmos .sun, .cosmos .earth, .cosmos .moon { border-radius: 50%; }

.cosmos .sun {
    width: var(--sun); height: var(--sun);
    left: calc(var(--sun) / -2); top: calc(var(--sun) / -2);
    background: var(--gold);
}
.cosmos > .tilt > .untilt { z-index: 2; }

.cosmos .earth-orbit { mix-blend-mode: multiply; animation: orbit var(--year) linear infinite, front var(--year) linear infinite; }
.cosmos .earth-orbit > .arm { transform: translateX(var(--R)); }
.cosmos .earth-orbit > .arm > .unspin { animation: orbit var(--year) linear infinite reverse; }
.cosmos .earth {
    z-index: 2;
    width: var(--earth); height: var(--earth);
    left: calc(var(--earth) / -2); top: calc(var(--earth) / -2);
    background: var(--sky);
}

.cosmos .moon-tilt { mix-blend-mode: multiply; animation: front var(--month) linear infinite; }
.cosmos .moon-orbit { animation: orbit var(--month) linear infinite; }
.cosmos .moon-orbit > .arm { transform: translateX(var(--r)); }
.cosmos .moon-orbit > .arm > .unspin { animation: orbit var(--month) linear infinite reverse; }
.cosmos .moon {
    width: var(--moon); height: var(--moon);
    left: calc(var(--moon) / -2); top: calc(var(--moon) / -2);
    background: #b9b3a7;
}

/* Startpunt: de aarde staat al half vóór de zon en de maan half vóór de aarde, zodat de vlakken
   meteen overlappen. Een negatieve delay laat de animatie halverwege beginnen. */
.cosmos .earth-orbit, .cosmos .earth-orbit > .arm > .unspin { animation-delay: calc(var(--year) * -0.25); }
.cosmos .moon-tilt, .cosmos .moon-orbit, .cosmos .moon-orbit > .arm > .unspin { animation-delay: calc(var(--month) * -0.3); }

@keyframes orbit { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes front { 0%, 49.9% { z-index: 3; } 50%, 100% { z-index: 1; } }
@media (prefers-reduced-motion: reduce) { .cosmos * { animation: none !important; } html { scroll-behavior: auto; } }

/* ---------- sections ---------- */
main > section { padding: clamp(3rem, 8vw, 6rem) var(--pad); }
.section-title {
    font-size: .8rem; font-family: var(--sans); font-weight: 500;
    text-transform: uppercase; letter-spacing: .18em; color: var(--muted);
    margin: 0 0 2.25rem;
    display: flex; align-items: center; gap: 1rem;
}
.section-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---------- grid ---------- */
/* Werken gecentreerd onder elkaar, elk op zijn eigen verhouding */
.grid { display: flex; flex-direction: column; align-items: center; gap: clamp(3.5rem, 9vw, 7rem); }
.card {
    display: flex; flex-direction: column; align-items: center;
    max-width: min(100%, 880px);
    text-decoration: none;
}
.card figure { margin: 0; position: relative; overflow: hidden; background: #e7e2d6; }
.card img { width: auto; max-width: 100%; height: auto; max-height: 82vh; transition: transform .6s cubic-bezier(.2,.7,.2,1); }
.card:hover img { transform: scale(1.025); }
.card.is-sold img { filter: saturate(.55); opacity: .8; }
.badge {
    position: absolute; top: .75rem; left: .75rem;
    background: var(--paper); color: var(--ink);
    font-size: .75rem; letter-spacing: .06em; padding: .25rem .6rem;
}
.card .meta { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .2rem; padding-top: 1.1rem; }
.card .t { font-family: var(--serif); font-size: clamp(1.3rem, 2.2vw, 1.6rem); }
.card .p { color: var(--muted); font-size: .95rem; white-space: nowrap; }
.card .p:empty { display: none; }
.works .empty { text-align: center; }
.noimg { aspect-ratio: 4/5; background: linear-gradient(135deg, var(--sky), var(--paper)); }
.noimg.big { aspect-ratio: 4/3; }
.empty { color: var(--muted); font-family: var(--serif); font-size: 1.25rem; }

/* ---------- about ---------- */
.about-inner {
    display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 62ch);
    gap: clamp(2rem, 6vw, 5rem); align-items: start;
}
.portrait { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 50%; filter: saturate(.85); }
.about-text { font-family: var(--serif); font-size: clamp(1.15rem, 1.6vw, 1.35rem); line-height: 1.6; }
.about-text p:first-child { margin-top: 0; }
@media (max-width: 720px) {
    .about-inner { grid-template-columns: 1fr; }
    .portrait { max-width: 220px; }
}

/* ---------- contact ---------- */
.contact p { color: var(--muted); max-width: 45ch; margin: 0 0 1rem; }
.mail-big {
    display: inline-block;
    font-family: var(--serif); font-size: clamp(1.6rem, 5vw, 3.75rem);
    text-decoration: none; word-break: break-word;
    background: linear-gradient(var(--poppy), var(--poppy)) 0 100% / 0 2px no-repeat;
    transition: background-size .4s;
}
.mail-big:hover { background-size: 100% 2px; }

/* ---------- detail ---------- */
.work {
    display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr);
    gap: clamp(2rem, 5vw, 5rem);
    padding: 1rem var(--pad) clamp(3rem, 8vw, 6rem);
    align-items: start;
}
.main-img { margin: 0; background: #e7e2d6; }
.main-img img { width: 100%; max-height: 86vh; object-fit: contain; margin: 0 auto; }
.thumbs { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .9rem; }
.thumb { padding: 0; border: 0; background: none; cursor: pointer; width: 76px; height: 76px; opacity: .55; transition: opacity .2s; outline-offset: 3px; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.active, .thumb:hover { opacity: 1; }
.work-info { position: sticky; top: 1.5rem; }
.back { display: inline-block; text-decoration: none; color: var(--muted); font-size: .9rem; margin-bottom: 1.5rem; }
.back:hover { color: var(--ink); }
.work-info h1 { font-size: clamp(2rem, 4vw, 3.25rem); line-height: 1.05; margin: 0 0 1.5rem; }
.specs { display: grid; grid-template-columns: auto 1fr; gap: .35rem 1.25rem; margin: 0 0 1.75rem; font-size: .95rem; }
.specs dt { color: var(--muted); }
.specs dd { margin: 0; }
.price-row { display: flex; align-items: baseline; gap: 1rem; padding: 1.1rem 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 1.5rem; }
.price { font-family: var(--serif); font-size: 1.75rem; }
.status { font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; color: var(--poppy); }
.status.sold { color: var(--muted); font-size: 1rem; }
.btn {
    display: inline-block; background: var(--ink); color: var(--paper);
    padding: .95rem 1.6rem; text-decoration: none; font-size: 1rem;
    transition: background .2s;
}
.btn:hover { background: var(--poppy); }
.note { font-size: .85rem; color: var(--muted); max-width: 40ch; margin: .8rem 0 0; }
.story { margin-top: 2.25rem; font-family: var(--serif); font-size: 1.15rem; line-height: 1.65; }
.story p:first-child { margin-top: 0; }
@media (max-width: 860px) {
    .work { grid-template-columns: 1fr; }
    .work-info { position: static; }
}
.notfound { padding: 6rem var(--pad); }

:focus-visible { outline: 2px solid var(--poppy); outline-offset: 3px; }

@media (max-width: 640px) {
    .hero { min-height: 72vh; }
    .cosmos { --sun: 30vw; left: 58%; top: 30%; }
}

/* ---------- contactformulier ---------- */
.contact-page { max-width: 680px; margin: 0 auto; padding: 1rem var(--pad) clamp(3rem, 8vw, 6rem); }
.contact-page h1 { font-size: clamp(2rem, 5vw, 3.25rem); line-height: 1.08; margin: 0 0 1.75rem; }
.contact-page h1 em { font-style: italic; }
.contact-work { display: flex; align-items: center; gap: 1rem; padding: .8rem 0; margin-bottom: 1.75rem; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.contact-work img { width: 64px; height: 64px; object-fit: cover; }
.contact-work div { display: flex; flex-direction: column; }
.contact-work strong { font-family: var(--serif); font-weight: 400; font-size: 1.15rem; }
.contact-work span { color: var(--muted); font-size: .9rem; }
.contact-form { display: grid; gap: 1.15rem; }
.contact-form label { display: grid; gap: .4rem; font-size: .9rem; color: var(--muted); }
.contact-form .opt { font-size: .8rem; }
.contact-form input, .contact-form textarea {
    font: inherit; color: var(--ink); font-size: 1.05rem;
    background: transparent; border: 0; border-bottom: 1px solid #bdb6a6;
    padding: .55rem 0; border-radius: 0; width: 100%;
    transition: border-color .2s;
}
.contact-form textarea { border: 1px solid #bdb6a6; padding: .75rem .85rem; resize: vertical; line-height: 1.55; }
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--poppy); }
.contact-form .btn { justify-self: start; border: 0; cursor: pointer; font: inherit; }
.f-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.15rem; }
@media (max-width: 600px) { .f-row { grid-template-columns: 1fr; } }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-errors { border-left: 3px solid var(--poppy); padding: .25rem 1rem; margin-bottom: 1.5rem; color: #9b2a17; }
.form-errors p { margin: .4rem 0; }
.thanks { padding-top: clamp(2rem, 10vh, 6rem); }
.thanks p { font-family: var(--serif); font-size: 1.25rem; color: var(--muted); max-width: 40ch; }
