/* Mattéo Jules — site styles
   Two text sizes only: --small (UI, captions) and --large (bio, statements). */

@font-face { font-family: "Inter"; src: url("/fonts/inter-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/fonts/inter-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }

:root {
  --ink: #111;
  --grey: #8A8A8A;
  --placeholder: #EDEDEB;
  --bg: #fff;
  --small: 14px;
  --large: 19px;
  --pad: 10px;
  --block: 24px;      /* space between sidebar blocks */
  --sidebar: 290px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: "Inter", system-ui, sans-serif; font-size: var(--small);
  line-height: 1.12; letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--ink); text-decoration: none; }
a:hover, .linklike:hover { color: var(--grey); }
img { display: block; max-width: 100%; height: auto; }
p { margin: 0; }
figure { margin: 0; }
.upper { text-transform: uppercase; }
.grey { color: var(--grey); }
.large { font-size: var(--large); line-height: 1.0; letter-spacing: -0.015em; }
.large b, .large strong { font-weight: 600; }
.stack { display: flex; flex-direction: column; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--ink); letter-spacing: inherit; text-transform: inherit; cursor: pointer; text-align: left; }
.arrow { display: inline-flex; align-items: center; gap: 5px; }
.arrow svg { width: 11px; height: 11px; flex: none; }

/* ---------- Layout with sidebar (home, info) ---------- */
.layout { display: flex; flex-wrap: wrap; gap: var(--pad); align-items: flex-start; padding: var(--pad); }
.sidebar {
  flex: 1 1 220px; max-width: var(--sidebar); padding-right: 20px;
  display: flex; flex-direction: column;
  position: sticky; top: var(--pad);
}
.sidebar > * + * { margin-top: var(--block); }
.sidebar .intro { margin-top: 30px; max-width: 250px; }
/* A bit more room between the bio and the links */
.sidebar > .intro + * { margin-top: 40px; }
.content { flex: 999 1 560px; min-width: 0; padding-top: 33px; }

/* Nav */
.nav { display: flex; gap: 22px; padding-top: 3px; text-transform: uppercase; }
.nav .lang { margin-left: auto; display: flex; gap: 4px; }

/* ---------- Home gallery ---------- */
.gallery { display: flex; flex-wrap: wrap; gap: 9px; align-items: flex-start; }
.gallery .col { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.gallery .col-a { flex: 2 1 200px; }
.gallery .col-b { flex: 3 1 300px; }
.tile img, .tile .ph { width: 100%; object-fit: cover; background: var(--placeholder); }
.tile .ph { display: flex; align-items: flex-end; padding: 10px; font-size: 11px; color: var(--grey); }
.tile figcaption { margin-top: 10px; display: flex; flex-direction: column; }
.r-3-2 { aspect-ratio: 3 / 2; }
.r-4-5 { aspect-ratio: 4 / 5; }
.r-10-7 { aspect-ratio: 10 / 7; }

/* ---------- Info ---------- */
.info-top { display: flex; flex-wrap: wrap; gap: 9px; align-items: flex-start; }
.bio { flex: 1 1 400px; min-width: 0; padding-left: 32px; }
.bio-text { max-width: 330px; display: flex; flex-direction: column; gap: 12px; }
.bio-text .after-link { margin-top: -6px; font-size: var(--small); line-height: 1.12; letter-spacing: -0.01em; }
.bio .facts { margin-top: 34px; }
.portrait { flex: 0 1 600px; min-width: 300px; }
.portrait img { width: 100%; aspect-ratio: 17 / 20; object-fit: cover; background: var(--placeholder); }

.marquee { margin-top: 90px; overflow: hidden; white-space: nowrap; font-size: 44px; line-height: 1.1; letter-spacing: -0.025em; text-transform: uppercase; padding: 6px 0; }
.marquee__track { display: inline-flex; gap: 0.4em; animation: marquee 45s linear infinite; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee__track { animation: none; } }

.street { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.street img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: var(--placeholder); }
.full-bleed { margin-left: calc(var(--pad) * -1); margin-right: calc(var(--pad) * -1); }
.more { margin-top: 12px; display: inline-flex; padding-bottom: var(--pad); }

/* Info page footer */
.site-footer { margin: 80px var(--pad) 0; padding: 16px 0 var(--pad); border-top: 1px solid var(--ink); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; align-items: start; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ---------- Project page (no sidebar) ---------- */
.page { padding: var(--pad); }
.topbar { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; flex-wrap: wrap; text-transform: uppercase; }
.topbar .right { display: flex; flex-direction: column; align-items: flex-end; padding-top: 3px; }
.project-head { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 10px; row-gap: 24px; margin-top: 160px; align-items: start; }
.project-head .title { grid-column: 1 / span 3; }
.project-head h1 { margin: 0 0 6px; font-size: var(--large); font-weight: 600; line-height: 1; letter-spacing: -0.015em; text-transform: uppercase; }
.project-head .meta { grid-column: 4 / span 2; display: flex; flex-direction: column; gap: 12px; }
.project-head .desc { grid-column: 6 / span 6; max-width: 620px; }
.project-images { margin-top: 120px; display: flex; flex-direction: column; gap: 10px; }
.project-images .row { display: flex; flex-wrap: wrap; gap: 10px; }
.project-images .row img { flex: 1 1 320px; min-width: 0; aspect-ratio: 4 / 5; object-fit: cover; background: var(--placeholder); }
.project-images .wide { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: var(--placeholder); }
.go-up { margin-top: 60px; display: flex; justify-content: center; text-transform: uppercase; }

/* ---------- Contact dialog ---------- */
.contact-dialog {
  width: min(520px, calc(100vw - 20px)); max-height: calc(100vh - 20px);
  border: 0; padding: 24px; background: var(--bg); color: var(--ink);
}
.contact-dialog::backdrop { background: rgba(255, 255, 255, 0.85); }
.contact-dialog .close { position: absolute; top: 18px; right: 20px; text-transform: uppercase; }
.contact-dialog .email-row { display: flex; gap: 16px; align-items: baseline; flex-wrap: wrap; margin-top: 10px; }
.contact-form { margin-top: 32px; display: flex; flex-direction: column; gap: 14px; }
.contact-form label { display: flex; flex-direction: column; gap: 6px; color: var(--grey); text-transform: uppercase; }
.contact-form input, .contact-form textarea {
  font: inherit; font-size: 16px; /* 16px stops iOS zooming in */
  color: var(--ink); text-transform: none; letter-spacing: -0.01em;
  border: 0; border-bottom: 1px solid #CFCFCC; padding: 6px 0; background: transparent; border-radius: 0;
}
.contact-form textarea { resize: vertical; min-height: 96px; }
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-bottom-color: var(--ink); }
.contact-form .hp { display: none; }
.contact-form button[type="submit"] { align-self: flex-start; margin-top: 8px; text-transform: uppercase; min-height: 44px; }

/* ---------- Small screens ---------- */
@media (max-width: 760px) {
  /* Phone: nav and intro on top, the work straight after, links at the end */
  .layout { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 0; padding-bottom: 28px; }
  .sidebar { display: contents; }
  .sidebar > .nav { order: 1; }
  .sidebar > .intro { order: 2; margin-top: 28px; max-width: none; }
  .bio { padding-left: 0; margin-top: 32px; }
  .has-footer .sidebar > :not(.nav):not(.intro) { display: none; } /* the footer has these links */
  .site-footer { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 56px; }
  /* Info page on phones: photo, bio and services first, then the commission line and Contact */
  .page-info .sidebar > .intro { order: 4; margin-top: 40px; }
  .page-info .sidebar > .intro + * { display: flex !important; order: 5; margin-top: 16px; }
  .bio-text { max-width: none; }
  .content { order: 3; padding-top: 32px; }
  .sidebar > :not(.nav):not(.intro) { order: 4; margin-top: 20px; }
  .sidebar > .intro + * { margin-top: 48px; }
  .portrait { min-width: 0; flex-basis: 100%; }
  /* Homepage on phones: one column, projects in ranking order (set with order on each tile) */
  .gallery { flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 10px; }
  .gallery .col { display: contents; }
  .street { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .marquee { font-size: 30px; margin-top: 60px; }
  .project-head { grid-template-columns: 1fr; margin-top: 80px; }
  .project-head > * { grid-column: 1 / -1 !important; }
  .project-images { margin-top: 60px; }
}

/* Home intro: two short paragraphs */
.intro p + p { margin-top: 1em; }
.contact-dialog h2 { margin: 0; font-weight: 400; }
.page-simple { padding: var(--pad); min-height: 100vh; display: flex; flex-direction: column; }
.page-simple main { margin-top: 160px; max-width: 420px; display: flex; flex-direction: column; gap: 24px; }
.below { padding: 0 var(--pad); }
.contact-dialog { border: 1px solid #E5E5E2; }
.contact-form ::placeholder { color: #B5B5B2; opacity: 1; }
.tps-text { margin-top: 10px; }
.contact-form .check { flex-direction: row; gap: 10px; align-items: flex-start; text-transform: none; color: var(--ink); line-height: 1.25; }
.contact-form input[type="checkbox"] { border: 0; padding: 0; margin: 1px 0 0; width: 16px; height: 16px; flex: none; accent-color: var(--ink); }
/* Project images in their natural portrait ratio, and a single centred image */
.project-images .row.natural img { aspect-ratio: 2 / 3; }
.project-images .single { width: calc(50% - 5px); align-self: center; aspect-ratio: 2 / 3; object-fit: cover; background: var(--placeholder); }
@media (max-width: 760px) { .project-images .single { width: 100%; } }
.project-images .row.three img { flex-basis: 240px; }
.project-images .row.landscape img { aspect-ratio: 3 / 2; }

/* ---------- Project pages: one row of photos that slides sideways as you scroll ---------- */
.hp-section { position: relative; }
.hp-sticky { position: sticky; top: 0; height: 100vh; height: 100svh; display: flex; flex-direction: column; padding: var(--pad); overflow: hidden; }
.hp-main { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.hp-main .project-head { margin-top: 40px; }
.hp-wrap { flex: 1; min-height: 0; display: flex; align-items: flex-end; margin: 24px calc(var(--pad) * -1) 0; padding: 0 var(--pad); overflow: hidden; }
/* Same photo height on every project page: two thirds of the screen height */
.hp-track { display: flex; align-items: flex-end; gap: 10px; height: clamp(300px, 66vh, 820px); height: clamp(300px, 66svh, 820px); max-height: 100%; will-change: transform; }
.hp-track img { height: 100%; width: auto; flex: none; background: var(--placeholder); }
.hp-next { flex: none; width: 240px; padding: 0 24px; display: flex; flex-direction: column; text-transform: uppercase; }

@media (max-width: 760px) {
  .hp-section { height: auto !important; }
  .hp-sticky { position: static; height: auto; overflow: visible; }
  .hp-main .project-head { margin-top: 80px; }
  .hp-wrap { display: block; margin: 40px 0 0; padding: 0; overflow: visible; }
  .hp-track { flex-direction: column; align-items: stretch; width: 100%; height: auto; max-height: none; transform: none !important; }
  .hp-track img { width: 100%; height: auto; }
  .hp-next { width: auto; padding: 24px 0; }
}
