/* ==========================================================================
   Madelief Meubelstoffering
   Eén stylesheet voor de hele site.

   Kleuren, lettertypes en afstanden staan als variabelen bovenaan.
   Pas die aan en de hele site verandert mee.
   ========================================================================== */

:root {
  /* Kleur — wijnrood komt uit het logo */
  --paper:      #F2F1ED;   /* achtergrond */
  --linen:      #E5E2DB;   /* rustvlak, panelen */
  --ink:        #1E1C1A;   /* tekst */
  --ink-soft:   #6C675F;   /* bijschriften, secundaire tekst */
  --wine:       #6F071D;   /* merkkleur */
  --wine-deep:  #550516;   /* hover */
  --rule:       #CFCAC0;   /* lijnen */

  /* Typografie */
  --serif: "Newsreader", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans:  "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --s--2: 0.75rem;
  --s--1: 0.8125rem;
  --s-0:  1.0625rem;
  --s-1:  1.1875rem;
  --s-2:  clamp(1.375rem, 2.2vw, 1.75rem);
  --s-3:  clamp(1.875rem, 3.6vw, 2.75rem);
  --s-4:  clamp(2.375rem, 5.6vw, 4rem);

  /* Ritme */
  --gutter:  clamp(1.25rem, 5vw, 4.5rem);
  --section: clamp(4rem, 9vw, 8rem);
  --measure: 34rem;
}

/* --------------------------------------------------------------- reset -- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--s-0);
  line-height: 1.65;
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
[hidden] { display: none !important; }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 300;
  line-height: 1.08;
  letter-spacing: -0.012em;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
figure { margin: 0; }
a { color: inherit; }

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

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 0.75rem 1.25rem;
  z-index: 20;
}
.skip:focus { left: 0; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* -------------------------------------------------------------- layout -- */

.site {
  max-width: 100rem;
  margin-inline: auto;
  background: var(--paper);
  overflow-x: clip;
}

.wrap { padding-inline: var(--gutter); }

.section { padding-block: var(--section); }
.section--tight { padding-block: calc(var(--section) * 0.55); }

.measure { max-width: var(--measure); }

.stack { display: flex; flex-direction: column; align-items: flex-start; gap: 1.5rem; }
.stack--wide { gap: 2.25rem; }

/* ----------------------------------------------------------- typografie -- */

.title   { font-size: var(--s-4); font-weight: 200; line-height: 1.04; }
.heading { font-size: var(--s-3); font-weight: 300; }
.sub     { font-size: var(--s-2); font-weight: 300; }

.lead { font-size: var(--s-1); line-height: 1.6; max-width: var(--measure); }

.prose { color: var(--ink-soft); max-width: var(--measure); }
.prose p + p { margin-top: 1.4em; }
.prose ul { margin-block: 1.1em; }
.prose strong { color: var(--ink); font-weight: 500; }

.note {
  font-family: var(--serif);
  font-style: italic;
  font-size: var(--s--1);
  color: var(--ink-soft);
}

/* ---------------------------------------------------------------- links -- */

.link {
  display: inline-block;
  font-size: var(--s--1);
  letter-spacing: 0.05em;
  text-decoration: none;
  padding-bottom: 0.3rem;
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 100% 1px;
  transition: background-size 0.35s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.link:hover { background-size: 0 1px; background-position: 100% 100%; }
.link--wine { color: var(--wine); }

.button {
  display: inline-block;
  font-size: var(--s--1);
  letter-spacing: 0.05em;
  text-decoration: none;
  padding: 0.95rem 1.9rem;
  border: 1px solid currentColor;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-family: inherit;
  transition: background-color 0.3s ease, color 0.3s ease;
}
.button:hover { background: var(--ink); color: var(--paper); }

.button--wine { color: var(--wine); }
.button--wine:hover { background: var(--wine); color: var(--paper); }

/* --------------------------------------------------------------- stitch -- */
/* Stiksellijn: 10px steek, 6px ruimte. Het enige lijnpatroon op de site. */

.stitch,
.stitched-top,
.stitched-bottom {
  background-image: linear-gradient(to right, var(--rule) 0 10px, transparent 10px 16px);
  background-size: 16px 1px;
  background-repeat: repeat-x;
}

.stitch { border: 0; height: 1px; margin: 0; }
.stitched-top    { background-position: 0 0; }
.stitched-bottom { background-position: 0 100%; }

/* --------------------------------------------------------------- header -- */

.header {
  padding-block: clamp(1.25rem, 2.6vw, 2rem);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  position: relative;
}

.header--home { justify-content: flex-end; }

.brand { display: block; line-height: 0; }
.brand img { height: clamp(3.25rem, 6vw, 4.75rem); width: auto; }

.nav__toggle {
  display: none;
  font: inherit;
  font-size: var(--s--1);
  letter-spacing: 0.08em;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--rule);
  padding: 0.6rem 1rem;
  cursor: pointer;
  align-items: center;
  gap: 0.6rem;
}

.nav__toggle:hover { border-color: var(--ink); }

.nav__bars { display: block; width: 1.1rem; height: 7px; position: relative; }
.nav__bars::before,
.nav__bars::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 1px;
  background: currentColor;
}
.nav__bars::before { top: 0; }
.nav__bars::after  { bottom: 0; }

.nav__list {
  display: flex;
  gap: clamp(1.25rem, 2.6vw, 2.25rem);
}

.nav__list a {
  font-size: var(--s--1);
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--ink-soft);
  padding-bottom: 0.2rem;
  border-bottom: 1px solid transparent;
  transition: color 0.25s ease, border-color 0.25s ease;
}
.nav__list a:hover { color: var(--ink); border-color: var(--rule); }
.nav__list a[aria-current="page"] { color: var(--wine); border-color: var(--wine); }

/* -------------------------------------------------------------- opening -- */
/* De titelpagina: logo, één zin, en een draadje naar beneden. */

.opening {
  min-height: min(85vh, 44rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: clamp(1.75rem, 4vw, 3rem);
  padding: clamp(2rem, 6vw, 4rem) var(--gutter) clamp(3rem, 7vw, 5rem);
}

.opening__logo {
  width: clamp(11rem, 26vw, 19rem);
  height: auto;
}

.opening__line {
  font-family: var(--serif);
  font-size: var(--s-2);
  font-weight: 300;
  line-height: 1.4;
  max-width: 30rem;
  text-wrap: balance;
}

.cue {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.9rem;
  font-size: var(--s--1);
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  text-decoration: none;
}

.cue::after {
  content: "";
  width: 1px;
  height: 3rem;
  background-image: linear-gradient(to bottom, var(--rule) 0 6px, transparent 6px 11px);
  background-size: 1px 11px;
  transition: height 0.4s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.cue:hover { color: var(--ink); }
.cue:hover::after { height: 4rem; }

/* -------------------------------------------------- foto's & placeholders */
/*
   Zolang er geen foto is, toont .ph een geweven vlak met de notitie welke
   foto daar hoort. Vervang het hele <div class="ph" ...></div> door
   <img src="assets/foto/naam.jpg" alt="beschrijving"> zodra de foto er is.
*/

.ph {
  position: relative;
  width: 100%;
  max-height: 36rem;
  aspect-ratio: var(--ar, 4 / 5);
  background-color: var(--linen);
  background-image:
    repeating-linear-gradient(90deg, rgba(30,28,26,0.05)  0 1px, transparent 1px 6px),
    repeating-linear-gradient(0deg,  rgba(30,28,26,0.038) 0 1px, transparent 1px 6px);
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.ph::after {
  content: attr(data-note);
  font-family: var(--serif);
  font-style: italic;
  font-size: var(--s--1);
  line-height: 1.5;
  color: var(--ink-soft);
  text-align: center;
  max-width: 22rem;
}

.bleed { padding-inline: 0; }

figcaption {
  margin-top: 0.85rem;
  font-size: var(--s--1);
  color: var(--ink-soft);
  line-height: 1.5;
}

/* --------------------------------------------------------- mogelijkheden -- */

.services { border-top: 1px solid var(--rule); }

.service {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 0.4rem clamp(1.5rem, 4vw, 4rem);
  padding-block: clamp(1.6rem, 2.8vw, 2.4rem);
}

.service h3 { font-size: var(--s-2); font-weight: 300; }
.service p  { color: var(--ink-soft); max-width: 32rem; }

/* ------------------------------------------------------------- projecten -- */

.grid {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  gap: clamp(1.75rem, 3vw, 2.75rem) clamp(1.5rem, 2.5vw, 2rem);
}

@media (min-width: 40rem) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 62rem) { .grid { grid-template-columns: repeat(3, 1fr); } }

/* De middelste kolom zakt iets weg — alleen als er echt drie kolommen staan. */
@media (min-width: 62rem) {
  .grid--offset > *:nth-child(3n + 2) { margin-top: 4.5rem; }
}

/* ------------------------------------------------------------- werkwijze -- */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  gap: clamp(2rem, 4vw, 3rem);
}

.step { display: flex; flex-direction: column; gap: 0.55rem; }

.step__n {
  font-family: var(--serif);
  font-size: var(--s-2);
  font-weight: 200;
  color: var(--wine);
  line-height: 1;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 0.4rem;
}

.step h3 {
  font-family: var(--sans);
  font-size: var(--s-0);
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.4;
}
.step p { color: var(--ink-soft); font-size: var(--s--1); line-height: 1.6; }

/* ------------------------------------------------------------------ duo -- */

.duo {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}

.duo--flip .duo__media { order: -1; }

.duo--top { align-items: start; }

/* -------------------------------------------------------------- panelen -- */

.panel { background: var(--linen); padding: clamp(2.5rem, 6vw, 5rem) var(--gutter); }

.panel--wine {
  background: var(--wine);
  color: var(--paper);
}
.panel--wine .prose { color: rgba(242, 241, 237, 0.82); }
.panel--wine .button { color: var(--paper); }
.panel--wine .button:hover { background: var(--paper); color: var(--wine); }
.panel--wine :focus-visible { outline-color: var(--paper); }

/* -------------------------------------------------------------- contact -- */

.details {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  gap: clamp(1.75rem, 4vw, 3rem);
  border-top: 1px solid var(--rule);
  padding-top: clamp(1.75rem, 3vw, 2.5rem);
}

.details dt {
  font-size: var(--s--1);
  color: var(--ink-soft);
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
}

.details dd {
  margin: 0 0 1.75rem;
  font-family: var(--serif);
  font-size: var(--s-1);
  font-weight: 300;
  line-height: 1.5;
}
.details dd:last-child { margin-bottom: 0; }

.details a { text-decoration: none; border-bottom: 1px solid var(--rule); }
.details a:hover { border-color: var(--wine); color: var(--wine); }

/* ------------------------------------------------------------- formulier -- */

.form { display: flex; flex-direction: column; gap: 1.5rem; max-width: 36rem; }

.field { display: flex; flex-direction: column; gap: 0.45rem; }

.field label { font-size: var(--s--1); color: var(--ink-soft); letter-spacing: 0.04em; }

.field input,
.field textarea {
  font: inherit;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--rule);
  border-radius: 0;
  padding: 0.6rem 0;
  transition: border-color 0.25s ease;
}

.field input:focus,
.field textarea:focus { outline: none; border-bottom-color: var(--wine); }

.field textarea { resize: vertical; min-height: 7rem; }

/* --------------------------------------------------------------- footer -- */

.footer {
  border-top: 1px solid var(--rule);
  padding-block: clamp(2.5rem, 5vw, 4rem);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
  gap: clamp(1.75rem, 4vw, 3rem);
  font-size: var(--s--1);
  color: var(--ink-soft);
}

.footer h2 {
  font-family: var(--sans);
  font-size: var(--s--1);
  font-weight: 500;
  color: var(--ink);
  letter-spacing: 0.04em;
  margin-bottom: 0.75rem;
}

.footer a { text-decoration: none; border-bottom: 1px solid transparent; }
.footer a:hover { border-color: var(--rule); color: var(--ink); }
.footer li + li { margin-top: 0.4rem; }

.footer__mark { width: 3.25rem; height: auto; margin-bottom: 1rem; }

.footer__end {
  grid-column: 1 / -1;
  padding-top: clamp(1.5rem, 3vw, 2.5rem);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  justify-content: space-between;
  font-size: var(--s--2);
}

/* Op brede schermen: vier vaste kolommen, en de onderste regel valt
   precies onder de kolommen erboven (privacyverklaring rechts uitgelijnd). */
@media (min-width: 52rem) {
  .footer { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .footer__end {
    display: grid;
    grid-template-columns: subgrid;
    align-items: baseline;
  }
  .footer__end > :last-child { justify-self: end; }
}

/* ------------------------------------------------------------- pagina's -- */

.pagehead {
  padding-block: clamp(2.5rem, 6vw, 5rem) clamp(1.75rem, 3.5vw, 3rem);
  border-top: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.5rem;
}

/* --------------------------------------------------------------- mobiel -- */

@media (max-width: 52rem) {
  .nav__toggle { display: inline-flex; }

  .nav {
    order: 3;
    flex-basis: 100%;
  }

  .nav__list {
    display: none;
    flex-direction: column;
    align-items: flex-end;
    gap: 0;
    padding-top: 0.75rem;
  }

  .nav__list[data-open="true"] { display: flex; }

  .nav__list li { width: 100%; }

  .nav__list a {
    display: block;
    text-align: right;
    padding: 0.85rem 0;
    font-size: var(--s-0);
    border-bottom: 1px solid var(--rule);
  }
  .nav__list a[aria-current="page"] { border-color: var(--wine); }

  .service { grid-template-columns: 1fr; gap: 0.3rem; }
  .duo--flip .duo__media { order: 0; }
  .opening { min-height: 0; }
}

/* ------------------------------------------------------------- beweging -- */
/* Eén geënsceneerd moment: de opening komt bij het laden rustig binnen. */

@keyframes rise {
  from { opacity: 0; transform: translateY(0.75rem); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: no-preference) {
  .opening > * { animation: rise 1s cubic-bezier(0.2, 0.7, 0.3, 1) backwards; }
  .opening > *:nth-child(1) { animation-delay: 0.08s; }
  .opening > *:nth-child(2) { animation-delay: 0.26s; }
  .opening > *:nth-child(3) { animation-delay: 0.44s; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* --------------------------------------------------------------- print -- */

@media print {
  .nav, .cue, .ph { display: none; }
  body { background: #fff; color: #000; }
}

/* ------------------------------------------------------------- ritme -- */

.mt-l  { margin-top: clamp(2rem, 4vw, 2.75rem); }
.mb-l  { margin-bottom: clamp(2rem, 4vw, 2.75rem); }
.mb-xl { margin-bottom: clamp(2.5rem, 5vw, 3.5rem); }

.stack--measure { max-width: var(--measure); }

/* -------------------------------------------------- brede beeldvlakken -- */

.ph--wide { --ar: 21 / 9; }

@media (max-width: 52rem) {
  .ph--wide { --ar: 4 / 3; }
}

/* Zet deze klasse op een <img> die een placeholder vervangt. */
.foto {
  width: 100%;
  max-height: 36rem;
  object-fit: cover;
}

/* ------------------------------------------------------------- juridisch -- */

.legal {
  display: flex;
  flex-direction: column;
  gap: clamp(2.25rem, 4vw, 3.25rem);
  max-width: var(--measure);
}

.legal h2 { font-size: var(--s-2); font-weight: 300; margin-bottom: 0.75rem; }
.legal ul { list-style: none; }
.legal li { color: var(--ink-soft); padding-left: 1.1rem; position: relative; }
.legal li + li { margin-top: 0.5rem; }
.legal li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.75em;
  width: 6px; height: 1px;
  background: var(--rule);
}
