/* Alain Brice-Balan portfolio. Design system: Voyager (see CLAUDE.md).
   Black ground, a classical serif, photographs as standing cards in an arc.
   Tokens live here; nothing below uses a new hex value. */

:root {
  --g: #0A0A0B;        /* ground */
  --g2: #141416;       /* raised panels, image placeholders */
  --t: #EFEBE6;        /* text */
  --m: #8E8A86;        /* secondary text */
  --line: #232326;     /* the rare rule */
  --serif: "Cormorant Garamond", "Cormorant", Georgia, "Times New Roman", serif;
  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --r: 0px;           /* photographs are never cropped at the corners (David, 17 October 2026) */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur: 0.8s;
  --wrap: 1180px;
  --gutter: clamp(18px, 4vw, 48px);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--g); -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--g); color: var(--t);
  font-family: var(--serif); font-size: 1.25rem; line-height: 1.5;
  font-feature-settings: "kern", "liga";
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; background: var(--g2); }
a { color: inherit; text-decoration: none; }
p a, figcaption a { text-decoration: underline; text-underline-offset: 0.14em; text-decoration-thickness: 1px; text-decoration-color: var(--m); }
p a:hover, figcaption a:hover { text-decoration-color: var(--t); }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; line-height: 1.05; margin: 0; letter-spacing: -0.01em; text-wrap: balance; }
p { margin: 0; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--t); outline-offset: 3px; border-radius: 2px; }
.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.sans { font-family: var(--sans); font-size: 0.8125rem; letter-spacing: 0.01em; }
.skip-link { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--t); color: var(--g); padding: 0.5rem 0.8rem; font-family: var(--sans); font-size: 0.875rem; }
.skip-link:focus { left: 8px; }

/* Header ------------------------------------------------------------- */
.site-header { position: sticky; top: 0; z-index: 40; background: rgba(10, 10, 11, 0.86); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); padding-block: 1.1rem 0; }
.site-header > .wrap { padding-bottom: 1.1rem; }
.sub-nav { border-top: 1px solid var(--line); }
.sub-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: clamp(0.9rem, 2.5vw, 1.6rem); overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.sub-nav ul::-webkit-scrollbar { display: none; }
.sub-nav a { display: block; font-family: var(--sans); font-size: 0.8125rem; color: var(--m); letter-spacing: 0.01em; padding-block: 0.65rem; white-space: nowrap; transition: color 0.25s; }
.sub-nav a:hover, .sub-nav a[aria-current="page"] { color: var(--t); }
.sub-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 0.45em; text-decoration-thickness: 1px; }
.site-header .wrap { display: flex; justify-content: space-between; align-items: baseline; gap: 1.5rem; }
.wordmark { font-family: var(--serif); font-weight: 500; font-size: 1.4rem; letter-spacing: 0.005em; white-space: nowrap; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: clamp(0.9rem, 2.5vw, 1.6rem); }
.site-nav a { font-family: var(--sans); font-size: 0.8125rem; color: var(--m); letter-spacing: 0.01em; padding-block: 0.3rem; transition: color 0.25s; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--t); }

/* Home hero ----------------------------------------------------------- */
.hero { text-align: center; padding-block: clamp(2rem, 6vh, 4.5rem) 0.5rem; display: grid; gap: 1.1rem; justify-items: center; }
.hero h1 { font-size: clamp(2.1rem, 4.9vw, 4.2rem); white-space: nowrap; } /* one line on a laptop (David, 18 October 2026); wraps again on phones below */
.hero p { color: var(--m); max-width: 66ch; font-size: 1.125rem; } /* two lines on a laptop */
.hero p a { color: var(--t); }

/* The arc ------------------------------------------------------------- */
.arc-block { position: relative; }
.arc-block .label { font-family: var(--sans); font-size: 0.8125rem; letter-spacing: 0.04em; color: var(--m); text-align: center; margin-top: clamp(1.5rem, 4vh, 2.5rem); }
.arc { position: relative; aspect-ratio: 10 / 3.5; max-height: 480px; perspective: 1400px; overflow: hidden; margin-top: 1rem; } /* cards are 22% wide at 3:4, plus a little air */
.arc figure { margin: 0; position: absolute; left: 50%; top: 24px; width: 22%; aspect-ratio: 3 / 4; }
.arc figure a, .arc figure .card { display: block; width: 100%; height: 100%; overflow: hidden; }
.arc img { transition: transform 0.5s ease; transform-origin: 50% 50%; }
.arc figure:hover img { transform: scale(1.08); }
.js .arc { touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.js .arc.dragging figure { transition: none; }
.js .arc.snapping figure { transition: transform 0.4s var(--ease), opacity 0.3s; }
.js .arc.dragging img { transition: none; }
.js .arc.dragging figure:hover img { transform: none; }
.arc img { width: 100%; height: 100%; object-fit: cover; -webkit-user-drag: none; }
.arc figcaption { position: absolute; left: 8%; right: 8%; bottom: 7%; text-align: center; font-family: var(--serif); font-size: clamp(1rem, 1.6vw, 1.35rem); line-height: 1.2; color: var(--t); text-shadow: 0 2px 16px rgba(0, 0, 0, 0.85); transition: opacity 0.4s 0.3s; }
.arc figure:not(.p0) figcaption { opacity: 0; transition-delay: 0s; }

/* positions are written by the script as p-3 ... p3 */
.js .arc figure { transform: translateX(calc(-50% + var(--x))) translateZ(var(--z)) rotateY(var(--ry)); transition: transform var(--dur) var(--ease), opacity 0.5s; opacity: var(--o, 1); z-index: var(--zi); }
.js .arc .p0  { --x: 0%;    --z: 0px;    --ry: 0deg;   --zi: 5; }
.js .arc .p1  { --x: 118%;  --z: -90px;  --ry: -26deg; --zi: 4; }
.js .arc .p-1 { --x: -118%; --z: -90px;  --ry: 26deg;  --zi: 4; }
.js .arc .p2  { --x: 222%;  --z: -220px; --ry: -40deg; --zi: 3; }
.js .arc .p-2 { --x: -222%; --z: -220px; --ry: 40deg;  --zi: 3; }
.js .arc .p3, .js .arc .p-3, .js .arc .pf { --x: 0%; --z: -700px; --ry: 0deg; --zi: 1; --o: 0; pointer-events: none; }
.js .arc figure:not(.p0) { cursor: pointer; }
.js .arc .p0 img { cursor: pointer; }

/* without the script the arc is a strip you scroll sideways */
.no-js .arc { height: auto; perspective: none; overflow-x: auto; display: flex; gap: 10px; scroll-snap-type: x mandatory; padding-bottom: 0.5rem; }
.no-js .arc figure { position: static; flex: 0 0 60%; max-width: 320px; scroll-snap-align: center; }
.no-js .arc figcaption { position: static; opacity: 1; text-shadow: none; padding-top: 0.5rem; }

.arc-controls { display: flex; justify-content: center; align-items: center; gap: 0.75rem; padding-block: 0.6rem 0.4rem; }
.arc-controls button { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); color: var(--t); display: grid; place-items: center; transition: background 0.25s, color 0.25s, border-color 0.25s; }
.arc-controls button:hover { background: var(--t); color: var(--g); border-color: var(--t); }
.arc-controls button svg { width: 16px; height: 16px; }
.arc-controls .count { font-family: var(--sans); font-size: 0.8125rem; color: var(--m); min-width: 5ch; text-align: center; font-variant-numeric: tabular-nums; }
.no-js .arc-controls { display: none; }

/* Collection page ----------------------------------------------------- */
.page-head { padding-block: clamp(1.5rem, 5vh, 3.5rem) 0.5rem; display: grid; gap: 1rem; max-width: 62ch; }
.page-head h1 { font-size: clamp(2.6rem, 6.5vw, 5rem); }
.page-head p, .set > p { color: var(--t); font-size: 1.2rem; line-height: 1.55; max-width: 62ch; }
.set { padding-block: clamp(2rem, 6vh, 4rem) 0; }
.set > h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); max-width: 24ch; }
.set > p { color: var(--m); margin-top: 0.8rem; }
.wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 45%), 1fr)); gap: 10px; margin-top: 1rem; }
.wall figure { margin: 0; }
.wall figure { overflow: hidden; }
.wall img { width: 100%; height: auto; cursor: zoom-in; transition: transform 0.5s ease; }
.wall img:hover { transform: scale(1.06); }
.wall .wide { grid-column: span 2; }
.wall figcaption { padding-top: 0.5rem; font-size: 1.05rem; color: var(--m); }
.neighbours { display: flex; justify-content: space-between; gap: 1rem; padding-block: clamp(2.5rem, 7vh, 5rem) 1rem; border-top: 1px solid var(--line); margin-top: clamp(2rem, 6vh, 4rem); }
.neighbours a { display: grid; gap: 0.2rem; font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
.neighbours a span { font-family: var(--sans); font-size: 0.75rem; color: var(--m); letter-spacing: 0.02em; }
.neighbours a:last-child { text-align: right; }
.neighbours a:hover { text-decoration: underline; text-underline-offset: 0.12em; text-decoration-thickness: 1px; }
.embed { margin-top: 1rem; max-width: 420px; }
.embed iframe { width: 100%; aspect-ratio: 612 / 710; border: 0; border-radius: var(--r); background: var(--g2); }

/* Masonry: equal-width columns, each photo at its own height, no cropping.
   The script places each photo in the shortest column, as his Squarespace grid does;
   without the script the browser's own columns do a near-enough job. */
.masonry { margin-top: 1.25rem; columns: 3; column-gap: 10px; }
.masonry figure { margin: 0 0 10px; break-inside: avoid; overflow: hidden; }
.masonry img { width: 100%; height: auto; cursor: zoom-in; transition: transform 0.5s ease; }
.masonry img:hover { transform: scale(1.06); }
.masonry figcaption { padding: 0.5rem 0 0.2rem; font-size: 1.05rem; color: var(--m); }
.js .masonry { columns: auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; align-items: start; }
.masonry[data-cols="4"] { columns: 4; }
.js .masonry[data-cols="4"] { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.jrows { --gap: 10px; display: grid; gap: var(--gap); margin-top: 1.25rem; }
.jrow { display: flex; gap: var(--gap); align-items: stretch; }
.jrow figure { margin: 0; min-width: 0; overflow: hidden; }
.jrow img { width: 100%; height: auto; display: block; cursor: zoom-in; transition: transform 0.5s ease; }
.jrow img:hover { transform: scale(1.06); }
.jrow figcaption { padding-top: 0.5rem; font-size: 1.05rem; color: var(--m); }
.jrow .reel iframe { display: block; width: 100%; height: 100%; aspect-ratio: 612 / 710; border: 0; background: var(--g2); }
.row-3, .row-2, .row-4 { display: grid; gap: 10px; margin-top: 1.25rem; }
.row-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.row-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.row-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
[class^="row-"] figure { margin: 0; overflow: hidden; }
[class^="row-"] img { width: 100%; height: auto; cursor: zoom-in; transition: transform 0.5s ease; }
[class^="row-"] img:hover { transform: scale(1.06); }
[class^="row-"] figcaption { padding-top: 0.5rem; font-size: 1.05rem; color: var(--m); }
.set.feature { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.set.feature .copy { display: grid; gap: 1rem; }
.set.feature.photo-left .copy { order: 2; }
.set.feature.photo-left .photo { order: 1; }
.set.feature .copy > h2, .set.feature .copy > p { margin: 0; }
.set.feature .photo figure { margin: 0; overflow: hidden; }
.set.feature .photo img { width: 100%; height: auto; cursor: zoom-in; transition: transform 0.5s ease; }
.set.feature .photo img:hover { transform: scale(1.04); }
.js .masonry .col { display: grid; gap: 10px; align-content: start; min-width: 0; }
.js .masonry .col figure { margin: 0; }

/* Story and contact --------------------------------------------------- */
.story-portrait { margin: clamp(0.5rem, 2vh, 1.5rem) 0 0; overflow: hidden; }
.story-portrait img { width: 100%; height: auto; }
.story { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(1.5rem, 5vw, 5rem); align-items: start; padding-block: clamp(2rem, 6vh, 4rem) 0; }
.story .copy { display: grid; gap: 1.3rem; font-size: clamp(1.35rem, 1.9vw, 1.7rem); line-height: 1.45; max-width: 40ch; }
.story figure { margin: 0; overflow: hidden; }
.story img { width: 100%; height: auto; transition: transform 0.5s ease; }
.story img:hover { transform: scale(1.04); }
.story .pair { display: flex; gap: 10px; align-items: stretch; }
.story .pair figure { min-width: 0; }
.contact-page { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; padding-block: clamp(1rem, 3vh, 2rem) 0; }
.contact-page .photos { display: grid; gap: 10px; }
.contact-page figure, .contact-wide figure { margin: 0; overflow: hidden; }
.contact-page img, .contact-wide img { width: 100%; height: auto; transition: transform 0.5s ease; }
.contact-page img:hover, .contact-wide img:hover { transform: scale(1.04); }
.contact-wide { margin: 10px 0 0; }
.form { display: grid; gap: 1.3rem; max-width: 560px; font-family: var(--sans); font-size: 0.9375rem; }
.form fieldset.name legend { margin-bottom: 0.6rem; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form label { display: grid; gap: 0.4rem; color: var(--t); }
.form label small, .form fieldset small { color: var(--m); font-size: 0.8125rem; }
.form input, .form textarea { font: inherit; color: var(--t); background: var(--g2); border: 1px solid var(--line); border-radius: var(--r); padding: 0.7rem 0.8rem; width: 100%; }
.form textarea { min-height: 8rem; resize: vertical; }
.form fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 0.5rem; }
.form legend { padding: 0; margin-bottom: 0.3rem; }
.form .checks { display: flex; flex-wrap: wrap; gap: 0.5rem 1.2rem; }
.form .checks label { display: flex; gap: 0.5rem; align-items: center; }
a.button { display: inline-block; text-decoration: none; font-family: var(--sans); font-size: 0.875rem; letter-spacing: 0.04em; background: var(--t); color: var(--g); padding: 0.85rem 1.4rem; border-radius: 999px; margin-top: 0.4rem; }
a.button:hover { background: var(--m); }
.form button { font-family: var(--sans); font-size: 0.875rem; letter-spacing: 0.04em; background: var(--t); color: var(--g); padding: 0.85rem 1.4rem; border-radius: 999px; justify-self: start; }
.marquee { overflow: hidden; white-space: nowrap; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-top: clamp(2.5rem, 7vh, 5rem); padding-block: 0.8rem; font-size: clamp(1.4rem, 3vw, 2.2rem); }
.marquee span { display: inline-block; padding-right: 2rem; }
.js.motion-full .marquee span { animation: marquee 22s linear infinite; }
.marquee:hover span { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-100%); } }

/* Footer -------------------------------------------------------------- */
.site-footer { margin-top: clamp(2rem, 5vh, 3rem); padding-block: 1.5rem 2rem; border-top: 1px solid var(--line); }
.site-footer .wrap { display: grid; grid-template-columns: 1fr auto; gap: 1rem 3rem; align-items: start; }
.site-footer .left { display: grid; gap: 1.1rem; min-width: 0; }
.site-footer .tagline { color: var(--m); font-size: 1.05rem; line-height: 1.4; }
.site-footer .tagline a { color: var(--t); }
.site-footer .contact { display: grid; gap: 0.2rem; }
.site-footer .contact a { font-size: clamp(1.5rem, 3vw, 2.2rem); }
.site-footer .contact a:hover { text-decoration: underline; text-underline-offset: 0.12em; text-decoration-thickness: 1px; }
.site-footer .contact p { color: var(--m); font-size: 1.1rem; }
.site-footer .links { display: grid; gap: 0.6rem; justify-items: end; padding-top: 0.15rem; }
.site-footer .icons { display: flex; gap: 1rem; }
.site-footer .icons a { display: block; width: 22px; height: 22px; color: var(--m); transition: color 0.25s, transform 0.25s; }
.site-footer .icons a:hover { color: var(--t); transform: translateY(-1px); }
.site-footer .icons svg { width: 100%; height: 100%; display: block; }
.site-footer .links .motion { margin-top: 0.2rem; font-family: var(--sans); font-size: 0.8125rem; color: var(--m); transition: color 0.25s; }
.site-footer .links .motion:hover { color: var(--t); }

/* Lightbox ------------------------------------------------------------ */
.lightbox { position: fixed; inset: 0; z-index: 60; background: rgba(10, 10, 11, 0.96); display: grid; grid-template-rows: 1fr auto auto; align-items: center; justify-items: center; padding: 3.5rem var(--gutter) 1.5rem; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.lightbox .note { font-family: var(--serif); font-size: 1.05rem; line-height: 1.45; color: var(--t); max-width: 70ch; max-height: 26vh; overflow: auto; text-align: left; padding-top: 0.6rem; margin: 0; }
.lightbox .bar .note-toggle { width: auto; height: auto; border-radius: 999px; padding: 0.45rem 0.8rem; font-family: var(--sans); font-size: 0.75rem; letter-spacing: 0.04em; white-space: nowrap; }
.lightbox .bar .note-toggle[aria-expanded="true"] { background: var(--t); color: var(--g); border-color: var(--t); }
.lightbox.open { opacity: 1; pointer-events: auto; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 7rem); min-height: 0; width: auto; height: auto; object-fit: contain; border-radius: var(--r); background: transparent; }
.lightbox .bar { display: flex; align-items: center; gap: 1rem; padding-top: 0.9rem; font-family: var(--sans); font-size: 0.8125rem; color: var(--m); }
.lightbox .bar .cap { font-family: var(--serif); font-size: 1.15rem; color: var(--t); }
.lightbox .bar button, .lightbox .close { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); color: var(--t); display: grid; place-items: center; }
.lightbox .bar button:hover, .lightbox .close:hover { background: var(--t); color: var(--g); border-color: var(--t); }
.lightbox .bar button svg, .lightbox .close svg { width: 16px; height: 16px; }
.lightbox .close { position: absolute; top: 1rem; right: var(--gutter); }
body.lightbox-open { overflow: hidden; }

/* Reveal, view transitions, motion ----------------------------------- */
.js.motion-full [data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.js.motion-full [data-reveal].in { opacity: 1; transform: none; }
.motion-reduce *, .motion-reduce *::before, .motion-reduce *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
.motion-reduce .arc figure { transition: none; }
.todo { font-family: var(--sans); font-size: 0.8125rem; color: var(--g); background: #E7D77A; padding: 0.5rem 0.7rem; border-radius: var(--r); margin-top: 1rem; max-width: 60ch; }

/* Phones -------------------------------------------------------------- */
@media (max-width: 760px) {
  body { font-size: 1.15rem; }
  .hero h1 { white-space: normal; font-size: clamp(2.2rem, 9.5vw, 3rem); max-width: 14ch; }
  .site-header .wrap { flex-wrap: wrap; gap: 0.6rem 1rem; }
  .sub-nav ul { -webkit-mask-image: linear-gradient(to right, #000 85%, transparent); mask-image: linear-gradient(to right, #000 85%, transparent); padding-right: 2rem; } /* hints that the row scrolls */
  .arc { aspect-ratio: 100 / 84; height: auto; max-height: none; } /* a 56%-wide 3:4 card plus its 24px offset and a little air */
  .arc figure { width: 56%; }
  .js .arc .p1  { --x: 60%;  --z: -160px; --ry: -32deg; }
  .js .arc .p-1 { --x: -60%; --z: -160px; --ry: 32deg; }
  .js .arc .p2, .js .arc .p-2 { --o: 0; pointer-events: none; }
  .wall { grid-template-columns: 1fr 1fr; gap: 6px; }
  .wall .wide { grid-column: span 2; }
  .masonry, .masonry[data-cols="4"] { columns: 1; }
  .row-3, .row-4, .row-2 { grid-template-columns: 1fr; gap: 8px; }
  .jrows { --gap: 8px; grid-template-columns: 1fr; } /* one photo per row on phones: whole, full width, no ragged pairs */
  .jrow { display: contents; }
  .jrow figure { flex: none !important; }
  .set.feature { grid-template-columns: 1fr; }
  .masonry figure { margin-bottom: 6px; }
  .js .masonry, .js .masonry[data-cols="4"] { grid-template-columns: 1fr; gap: 8px; }
  .js .masonry .col { gap: 6px; }
  .story { grid-template-columns: 1fr; }
  .form .row { grid-template-columns: 1fr; }
  .contact-page { grid-template-columns: 1fr; }
  .site-footer .wrap { grid-template-columns: 1fr; }
  .site-footer .links { justify-items: start; }
  .neighbours a { font-size: 1.3rem; }
}
@media (hover: none) {
  .arc-controls button { display: none; }
  .arc figure:hover img { transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html:not(.motion-full) .marquee span { animation: none; }
}
