/* ===========================================================
   Francien van Maasdijk Design — portfolio
   Black canvas · serif + grotesque pairing · modern
   =========================================================== */

:root {
  /* palette */
  --bg:        #0b0b0c;
  --panel:     #141416;
  --panel-2:   #191a1d;
  --fg:        #ece6da;          /* warm off-white */
  --muted:     rgba(236, 230, 218, 0.52);
  --faint:     rgba(236, 230, 218, 0.16);
  --hair:      rgba(236, 230, 218, 0.12);
  --accent:    oklch(0.66 0.16 303);   /* brand purple, set by tweaks */
  --brand:     #5e2a82;                 /* FVM logo purple */

  /* type */
  --serif: "Cormorant Garamond", Georgia, serif;
  --display: var(--serif);   /* heading face — direction B swaps this to sans */
  --sans:  "Jost", "Helvetica Neue", Arial, sans-serif;
  --mono:  "Space Mono", "SFMono-Regular", monospace;

  /* rhythm */
  --gap: 22px;
  --page-x: clamp(20px, 5vw, 88px);
  --maxw: 1640px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body { overflow-x: hidden; }

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

::selection { background: var(--accent); color: #0b0b0c; }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-inline: var(--page-x);
}

/* ---------------- header ---------------- */
.masthead {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1cm;
  padding-top: clamp(26px, 4vw, 48px);
  padding-bottom: clamp(10px, 2vw, 18px);
}

.logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.logo-img {
  height: clamp(50px, 6vw, 66px);
  width: auto;
  display: block;
  box-sizing: border-box;
}

nav.menu {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2vw, 30px);
}
nav.menu a {
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  position: relative;
  margin-top: 5px;
  padding-top: 5px;
  padding-bottom: 4px;
  transition: color 0.25s ease;
}
nav.menu a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
nav.menu a:hover { color: var(--fg); }
nav.menu a:hover::after { transform: scaleX(1); }

/* phones: logo on its own line (flush left), nav as one horizontal row below */
@media (max-width: 600px) {
  .masthead {
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 16px;
    padding-top: clamp(20px, 7vw, 34px);
  }
  .logo-img { height: 48px; }
  nav.menu {
    flex-basis: 100%;
    flex-wrap: nowrap;
    gap: 24px;
  }
}

/* ---------------- quote heading ---------------- */
.hero {
  padding-top: clamp(6px, 1.4vw, 18px);
  padding-bottom: clamp(20px, 3.5vw, 48px);
  border-top: 1px solid var(--hair);
  margin-top: clamp(14px, 2vw, 26px);
}
.hero blockquote {
  margin: 0;
  max-width: none;
}
.hero .qt {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(30px, 5vw, 76px);
  line-height: 1.04;
  letter-spacing: -0.01em;
  max-width: none;
}
.hero .qt .accent { color: var(--accent); font-style: italic; }
.hero .attrib {
  display: inline;
  white-space: nowrap;
  font-family: var(--mono);
  font-size: clamp(13px, 1.1vw, 17px);
  font-style: normal;
  letter-spacing: 0.02em;
  color: var(--muted);
}
.hero .attrib .dash { color: var(--accent); margin: 0 0.45em; }

/* ---------------- work grid ---------------- */
.work {
  padding-top: clamp(6px, 1.4vw, 18px);
  padding-bottom: clamp(50px, 7vw, 96px);
}
.work-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: clamp(20px, 3vw, 34px);
}
.work-head .label {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.work-head .count {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--faint);
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
}

/* uniform square cells */
.cell,
.cell.w5, .cell.w4, .cell.w3 { grid-column: auto; }

@media (max-width: 1040px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .grid { grid-template-columns: 1fr; }
}

/* ---------------- project cell ---------------- */
.project { display: block; cursor: pointer; }

.frame {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #ffffff;
  overflow: hidden;
  border: 1px solid var(--hair);
}

/* slides */
.slide {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.slide.is-active { opacity: 1; }

/* real project image */
.slide-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.slide-img.contain {
  object-fit: contain;
  object-position: center center;
  padding: 6%;
  box-sizing: border-box;
}
.slide-img.contain.tight {
  padding: 3%;
}
.slide-img.framed {
  width: auto;
  height: 72%;
  max-width: 72%;
  object-fit: contain;
  border: 1px solid rgba(0, 0, 0, 0.85);
  box-sizing: border-box;
}

/* striped placeholder */
.ph {
  position: absolute;
  inset: 0;
  background-color: #ffffff;
  background-image: repeating-linear-gradient(
    -45deg,
    rgba(11,11,12,0.05) 0px,
    rgba(11,11,12,0.05) 1px,
    transparent 1px,
    transparent 11px
  );
}
.ph-label {
  position: relative;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: rgba(11,11,12,0.62);
  text-align: center;
  padding: 10px 18px;
  border: 1px solid rgba(11,11,12,0.18);
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(2px);
  text-transform: lowercase;
}

/* hover scrim + zoom */
.frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(11,11,12,0.55), transparent 55%);
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}
.project:hover .frame::after { opacity: 1; }
.project:hover .frame { border-color: var(--faint); }

/* progress dots */
.dots {
  position: absolute;
  left: 16px; bottom: 14px;
  display: flex;
  gap: 6px;
  z-index: 3;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.project:hover .dots { opacity: 1; }
.dots .dot {
  width: 16px; height: 2px;
  background: var(--faint);
  transition: background 0.3s ease;
}
.dots .dot.on { background: var(--accent); }

/* caption */
.cap {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding-top: 16px;
}
.cap .num {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--accent);
  flex: none;
}
.cap .title {
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(16px, 1.4vw, 21px);
  line-height: 1.1;
  letter-spacing: 0.005em;
  flex: 1;
}
.cap .meta {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-align: right;
  max-width: 42%;
  transition: color 0.25s ease;
}
.project:hover .cap .title { color: var(--accent); }
.cap .meta .live { color: var(--fg); }

/* ---------------- footer ---------------- */
footer.site {
  border-top: 1px solid var(--hair);
  padding-top: clamp(40px, 6vw, 80px);
  padding-bottom: clamp(36px, 5vw, 64px);
}
.foot-grid {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: flex-start;
  gap: clamp(26px, 4vw, 60px);
}
.foot-name {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(30px, 4vw, 56px);
  line-height: 1.04;
  max-width: 16ch;
}
.foot-name em { font-style: italic; color: var(--accent); }
.foot-contact {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: var(--mono);
  font-size: 14px;
  color: var(--muted);
}
.foot-contact a:hover { color: var(--fg); }

.foot-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: clamp(40px, 6vw, 72px);
  padding-top: 22px;
  border-top: 1px solid var(--hair);
}
.socials { display: flex; gap: 14px; }
.social {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--hair);
  padding: 9px 16px;
  border-radius: 999px;
  transition: all 0.25s ease;
}
.social svg { width: 15px; height: 15px; display: block; }
.social:hover {
  color: var(--bg);
  background: var(--accent);
  border-color: var(--accent);
}
.colophon {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--faint);
}

/* ---------------- over / about ---------------- */
.about {
  border-top: 1px solid var(--hair);
  padding-top: clamp(28px, 4vw, 56px);
  padding-bottom: clamp(50px, 7vw, 96px);
}
.about-head { padding-bottom: clamp(18px, 2.4vw, 30px); }
.about-head .label {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.disciplines {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 11px;
  padding-bottom: clamp(30px, 4vw, 52px);
}
.disciplines .disc {
  font-family: var(--sans);
  font-size: clamp(11px, 1vw, 13.5px);
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--fg);
  white-space: nowrap;
}
.disciplines.disciplines-below {
  padding-bottom: 0;
  padding-top: 44px;
}
.disciplines .pipe { color: var(--accent); font-size: 14px; }

.about-body { max-width: 77ch; }
.about-body p {
  margin: 0 0 1.5em;
  font-family: var(--sans);
  font-weight: 400;
  font-size: clamp(15px, 1.05vw, 18px);
  line-height: 1.72;
  color: rgba(236, 230, 218, 0.78);
  text-wrap: pretty;
}
.about-body .lead {
  font-size: clamp(18px, 1.5vw, 23px);
  line-height: 1.5;
  color: var(--fg);
  margin-bottom: 1.6em;
}
.about-body .closing {
  margin-top: 1.4em;
  margin-bottom: 0;
  font-weight: 500;
  font-size: clamp(17px, 1.4vw, 21px);
  line-height: 1.4;
  color: var(--accent);
}

/* =========================================================
   DIRECTION B — "Modern grotesque"
   sans-forward, uppercase, tighter, numbered
   ========================================================= */
[data-direction="b"] {
  --display: var(--sans);
}
[data-direction="b"] .logo .mark {
  font-weight: 600;
  letter-spacing: -0.02em;
}
[data-direction="b"] .logo .mark em { font-style: normal; }
[data-direction="b"] .hero .qt {
  font-weight: 500;
  font-size: clamp(28px, 4.4vw, 64px);
  letter-spacing: -0.03em;
  line-height: 1.05;
  text-transform: uppercase;
  max-width: none;
}
[data-direction="b"] .hero .qt .accent { font-style: normal; }
[data-direction="b"] .cap .title {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  font-size: clamp(18px, 1.6vw, 24px);
}
[data-direction="b"] .foot-name {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: -0.02em;
}
[data-direction="b"] .foot-name em { font-style: normal; }
[data-direction="b"] .frame { border-radius: 0; }

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
