/* Daniel Goron — London
   The photographs hang on a light gallery wall: every picture is mounted in a
   black frame with a white mat and throws a shadow. The wall grey and the ink
   are drawn from his own mirror self-portrait, as is the single amber accent —
   the café lights behind him. */

@font-face {
  font-family: "Fraunces";
  src: url("../fonts/fraunces-100-900.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-400-700.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Space Mono";
  src: url("../fonts/space-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Space Mono";
  src: url("../fonts/space-mono-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* palette */
  --ink:      #17181B;   /* the coat — text, and the frame moulding */
  --charcoal: #2B2D31;
  --wall:     #E7E7E4;   /* the gallery wall */
  --wall-lit: #EFEFEC;
  --card:     #F6F6F4;
  --hairline: #D4D4CF;
  --zinc:     #63676C;   /* captions and metadata */
  --amber:    #A9762A;   /* café lights, deepened to hold on a pale ground */
  --amber-lit:#C08F3E;
  --white:    #FFFFFF;   /* the mat inside every frame */

  /* semantic — both stylesheets speak in these */
  --ground:  var(--wall);
  --surface: var(--card);
  --raised:  var(--wall-lit);
  --text:    var(--ink);
  --muted:   var(--zinc);
  --rule:    var(--hairline);
  --accent:  var(--amber);

  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body:    "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono:    "Space Mono", ui-monospace, "SFMono-Regular", monospace;

  --wonk: "SOFT" 0, "WONK" 1;

  --gutter: clamp(1.25rem, 5vw, 4.5rem);
  --stack:  clamp(3rem, 7vw, 6rem);
  --measure: 62ch;

  /* The frame: museum build, ash moulding, lifted hang.
     Geometry and colour are separate, so any of them can be retuned alone. */
  --lip: 4px;                                  /* the moulding, thin by design */
  --moulding: #A6A49C;                         /* ash */
  --mat: #FCFBF7;                              /* the board, warm to suit ash */
  --bevel: #F2EFE6;                            /* the 45-degree cut */
  --bevel-line: rgba(23, 24, 27, 0.11);
  --recess: rgba(23, 24, 27, 0.38);            /* opening cast onto the print */
  /* Percentages resolve against the frame's own width, so the board stays in
     proportion whether a picture is alone or one of three in a row. Sizing this
     in vw made the mat swell as the columns narrowed. */
  --board: 7.5%;
  --board-bottom: 9.5%;                        /* weighted, the traditional cut */

  /* A pale moulding leans on its shadow — it is what lifts the frame off the wall. */
  --hang: 0 2px 3px rgba(23, 24, 27, 0.12),
          0 30px 44px -20px rgba(23, 24, 27, 0.40),
          0 60px 90px -40px rgba(23, 24, 27, 0.34);
  --hang-lifted: 0 3px 5px rgba(23, 24, 27, 0.14),
          0 40px 56px -22px rgba(23, 24, 27, 0.44),
          0 78px 110px -44px rgba(23, 24, 27, 0.36);
}

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

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

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--ground);
  color: var(--text);
  font-family: var(--body);
  font-size: clamp(1rem, 0.97rem + 0.15vw, 1.0625rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 {
  font-family: var(--display);
  font-variation-settings: var(--wonk), "opsz" 72;
  font-weight: 400;
  line-height: 1.04;
  letter-spacing: -0.012em;
  text-wrap: balance;
  margin: 0;
}
h1 { font-size: clamp(2.5rem, 7vw, 4.75rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.375rem); font-variation-settings: var(--wonk), "opsz" 40; }
h3 { font-size: 1.125rem; font-family: var(--body); font-weight: 600; letter-spacing: 0; }

p { margin: 0; }

a { color: inherit; text-decoration-color: color-mix(in oklab, var(--accent) 55%, transparent); text-underline-offset: 4px; }
a:hover { text-decoration-color: var(--accent); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 1px; }

.dot { color: var(--accent); }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 400;
}

.skip { position: absolute; left: -9999px; }
.skip:focus {
  left: var(--gutter);
  top: 0.75rem;
  z-index: 20;
  background: var(--accent);
  color: var(--white);
  padding: 0.5rem 0.9rem;
}

/* ---------------------------------------------------------------- masthead */

.masthead {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.4rem var(--gutter);
  border-bottom: 1px solid var(--rule);
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in oklab, var(--ground) 88%, transparent);
  backdrop-filter: blur(10px);
}

.brand { display: inline-flex; align-items: center; gap: 0.7rem; text-decoration: none; flex: 0 0 auto; }
.brand__mark {
  width: 1.75rem;
  height: 1.75rem;
  fill: var(--accent);
  /* The aperture ring turns, blade onto blade, so it lands back on itself. */
  transition: transform 620ms cubic-bezier(0.33, 0, 0.15, 1), fill 300ms ease;
}
.brand:hover .brand__mark,
.brand:focus-visible .brand__mark { transform: rotate(60deg); fill: var(--amber-lit); }
.brand__name {
  font-family: var(--display);
  font-variation-settings: var(--wonk), "opsz" 24;
  font-size: 1.1875rem;
  letter-spacing: 0.004em;
  white-space: nowrap;
}

.menu { margin-left: auto; display: flex; gap: clamp(1rem, 3vw, 2.25rem); font-size: 0.9375rem; }
.menu a {
  text-decoration: none;
  color: color-mix(in oklab, var(--text) 72%, transparent);
  padding-bottom: 3px;
  border-bottom: 2px solid transparent;
  transition: color 200ms ease, border-color 200ms ease;
}
.menu a:hover { color: var(--text); }
.menu a[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent); }

.menu-toggle, .menu-button { display: none; }

@media (max-width: 40rem) {
  .masthead { flex-wrap: wrap; row-gap: 0.9rem; }
  .menu-button {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    margin-left: auto;
    width: 2.25rem;
    height: 2.25rem;
    cursor: pointer;
  }
  .menu-button span { display: block; height: 1.5px; background: var(--text); }
  .menu { display: none; width: 100%; margin-left: 0; flex-direction: column; gap: 0.75rem; }
  .menu-toggle:checked ~ .menu { display: flex; }
}

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

main {
  display: flex;
  flex-direction: column;
  gap: var(--stack);
  padding: var(--stack) var(--gutter);
  max-width: 88rem;
  margin: 0 auto;
  width: 100%;
}

.page-head { display: flex; flex-direction: column; gap: 1rem; }
.page-head--tall { padding-block: clamp(2rem, 8vw, 6rem); }
.lede { font-size: 1.1875rem; color: var(--muted); max-width: var(--measure); }
.crumb { font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; }
.crumb a { color: var(--muted); }

.section-title { display: flex; align-items: baseline; gap: 1rem; }

/* -------------------------------------------------------------------- hero */

.hero { display: flex; flex-direction: column; gap: 2.25rem; padding-block: clamp(1rem, 6vw, 5rem); }
.hero__statement {
  font-family: var(--display);
  font-variation-settings: var(--wonk), "opsz" 96;
  font-size: clamp(2rem, 5.4vw, 3.75rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  text-wrap: balance;
  max-width: 21ch;   /* measured in the display face, where the line is set */
}
.hero__meta { display: flex; }

.button {
  display: inline-block;
  font-family: var(--body);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 0.7rem 1.4rem;
  border: 1px solid var(--accent);
  color: var(--accent);
  text-decoration: none;
  background: none;
  cursor: pointer;
  transition: background 220ms ease, color 220ms ease;
}
.button:hover, button:hover { background: var(--accent); color: var(--white); }

/* ------------------------------------------------------- the frame itself */

/* Ash moulding, deep board, and the shadow of something hung on a wall. */
.mount {
  display: block;
  background: var(--mat);
  border: var(--lip) solid var(--moulding);
  padding: var(--board) var(--board) var(--board-bottom);
  box-shadow: var(--hang);
  transition: box-shadow 340ms ease, transform 340ms ease;
}

/* The mat board is cut at 45 degrees, so a pale core shows along the opening,
   and the print sits below it and catches the cast. Without these two the
   frame is only a rectangle around a rectangle. */
.opening {
  display: block;
  position: relative;
  box-shadow:
    0 0 0 1px var(--bevel-line),
    0 0 0 3px var(--bevel),
    0 0 0 4px var(--bevel-line);
}
.opening::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 3px 7px -3px var(--recess);
}

.grid { display: flex; flex-direction: column; gap: 2.5rem; }

@supports (columns: 2) {
  .grid--gallery, .grid--recent { display: block; columns: 1; column-gap: 3rem; }
  .grid--gallery > .frame, .grid--recent > .frame { break-inside: avoid; margin-bottom: 3.25rem; }
  @media (min-width: 48rem) { .grid--gallery, .grid--recent { columns: 2; } }
  @media (min-width: 78rem) { .grid--gallery { columns: 3; } }
}

.frame { margin: 0; display: flex; flex-direction: column; gap: 0.9rem; }

.frame__open {
  display: block;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  width: 100%;
}
.frame__open:hover .mount { box-shadow: var(--hang-lifted); transform: translateY(-2px); }
.frame__open img { width: 100%; }

.frame figcaption {
  font-family: var(--mono);
  font-size: 0.78125rem;
  line-height: 1.5;
  color: var(--muted);
  padding-left: 1.1rem;
  position: relative;
}
/* The amber dot, doing its recurring job. */
.frame figcaption::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.52em;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--accent);
}

.more { font-size: 0.9375rem; }
.empty { color: var(--muted); font-family: var(--mono); font-size: 0.875rem; }
.empty code { background: var(--card); padding: 0.1rem 0.35rem; }

/* ----------------------------------------------------------------- albums */

.albums {
  display: grid;
  gap: clamp(2rem, 4vw, 3.25rem);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr));
}
.album { display: flex; flex-direction: column; gap: 0.9rem; text-decoration: none; }
.album .mount { overflow: hidden; }
/* Covers share one shape so the wall reads as a hang, not a jumble. */
.album .mount img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.album:hover .mount { box-shadow: var(--hang-lifted); transform: translateY(-2px); }
.album__meta { display: flex; flex-direction: column; gap: 0.15rem; }
.album__name {
  font-family: var(--display);
  font-variation-settings: var(--wonk), "opsz" 32;
  font-size: 1.375rem;
}
.album__count {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ------------------------------------------------------------------- about */

.about { display: grid; gap: clamp(2rem, 5vw, 4rem); grid-template-columns: 1fr; align-items: start; }
@media (min-width: 60rem) { .about { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.about__portrait { margin: 0; display: flex; flex-direction: column; gap: 0.9rem; }
.about__portrait figcaption { font-family: var(--mono); font-size: 0.78125rem; color: var(--muted); }
.about__text { display: flex; flex-direction: column; gap: 1.4rem; max-width: var(--measure); }
.about__text p { color: color-mix(in oklab, var(--text) 86%, var(--muted)); }
.about__elsewhere { display: flex; gap: 1.5rem; font-size: 0.9375rem; padding-top: 0.5rem; }

/* ------------------------------------------------------------------- forms */

.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field__label {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
input[type="text"], input[type="email"], input[type="password"], textarea, select {
  font: inherit;
  color: var(--text);
  background: var(--white);
  border: 1px solid var(--rule);
  padding: 0.7rem 0.85rem;
  width: 100%;
  border-radius: 0;
  transition: border-color 200ms ease;
}
input:focus, textarea:focus, select:focus { border-color: var(--accent); outline: none; }
textarea { resize: vertical; min-height: 9rem; }
::placeholder { color: color-mix(in oklab, var(--muted) 70%, transparent); }

button {
  font-family: var(--body);
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 0.7rem 1.4rem;
  border: 1px solid var(--accent);
  color: var(--accent);
  background: none;
  cursor: pointer;
  align-self: flex-start;
  transition: background 220ms ease, color 220ms ease;
}

.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.contact { display: grid; gap: clamp(2rem, 5vw, 4rem); grid-template-columns: 1fr; align-items: start; }
@media (min-width: 54rem) { .contact { grid-template-columns: minmax(0, 32rem) minmax(0, 1fr); } }
.form { display: flex; flex-direction: column; gap: 1.25rem; }
.contact__aside { display: flex; flex-direction: column; gap: 0.9rem; }

.bullets { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.bullets li { display: flex; gap: 0.6rem; align-items: baseline; }
.bullets li::before {
  content: "";
  width: 0.4rem; height: 0.4rem;
  border-radius: 50%;
  background: var(--accent);
  flex: 0 0 auto;
}

/* -------------------------------------------------------------- mailing list */

.signup {
  display: grid;
  gap: clamp(1.5rem, 4vw, 3rem);
  grid-template-columns: 1fr;
  padding: clamp(1.75rem, 4vw, 2.75rem);
  border: 1px solid var(--rule);
  background: var(--surface);
  align-items: start;
}
@media (min-width: 54rem) { .signup { grid-template-columns: minmax(0, 1fr) minmax(0, 24rem); } }
.signup__text { display: flex; flex-direction: column; gap: 0.7rem; }
.signup__text p { color: var(--muted); max-width: 46ch; }
.signup__form { display: flex; flex-direction: column; gap: 0.9rem; }

/* ---------------------------------------------------------------- flashes */

.flashes {
  padding: 0 var(--gutter);
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 88rem;
  margin-inline: auto;
  width: 100%;
}
.flash {
  font-family: var(--mono);
  font-size: 0.8125rem;
  padding: 0.7rem 0.9rem;
  border-left: 3px solid var(--accent);
  background: var(--surface);
}
.flash--error { border-left-color: #A6413A; }

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

.footer { border-top: 1px solid var(--rule); padding: 2.5rem var(--gutter) 3.5rem; margin-top: auto; }
.footer__inner {
  max-width: 88rem;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 1rem 2.5rem;
}
.footer__name { font-family: var(--display); font-variation-settings: var(--wonk), "opsz" 28; font-size: 1.25rem; }
.footer__links { display: flex; gap: 1.5rem; font-size: 0.9375rem; }
.footer__note { font-family: var(--mono); font-size: 0.75rem; color: var(--muted); margin-left: auto; }

/* --------------------------------------------------------------- lightbox */

/* A closed <dialog> is display:none by default — only style the open one, or
   the overlay paints over every page. */
.lightbox:not([open]) { display: none; }

.lightbox[open] {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  gap: 1rem;
  padding: clamp(1rem, 4vw, 3rem);
  /* Viewing goes dark whatever the wall does — it is how a print is looked at. */
  background: #101012;
  border: 0;
  max-width: 100vw;
  max-height: 100dvh;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.lightbox::backdrop { background: rgba(8, 8, 10, 0.95); }

/* The picture gets whatever height the caption leaves, so a portrait frame
   fits on screen whole. A fixed cap (78dvh) could not know how tall the
   caption would be, and the two together overflowed. minmax(0, 1fr) is what
   lets the image row shrink — a plain 1fr floors at the image's own height. */
.lightbox__figure {
  margin: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  justify-items: center;
  align-content: center;
  gap: 1rem;
  width: 100%;
  height: 100%;
  min-height: 0;
}
.lightbox img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  min-height: 0;
  object-fit: contain;
  align-self: center;
  /* The aperture opening: the picture irises in rather than fading. */
  clip-path: circle(0% at 50% 50%);
  animation: iris-open 620ms cubic-bezier(0.22, 0.6, 0.2, 1) forwards;
}
.lightbox figcaption {
  font-family: var(--mono);
  font-size: 0.8125rem;
  color: #9AA0A6;
  text-align: center;
  max-width: 60ch;
}
.lightbox__close { position: fixed; top: 1rem; right: 1rem; border-color: #4A4E54; color: #C9CDD2; }
.lightbox__close:hover { background: #C9CDD2; color: #101012; }

/* Stepping between photographs: a short fade, not another iris. */
.lightbox__figure.is-stepping img {
  clip-path: none;
  animation: step-fade 200ms ease forwards;
}
@keyframes step-fade { from { opacity: 0; } to { opacity: 1; } }

/* The arrows sit against the edges of the screen, clear of the picture. */
.lightbox__step {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: clamp(2.75rem, 6vw, 3.75rem);
  height: clamp(2.75rem, 6vw, 3.75rem);
  padding: 0;
  border: 1px solid #3A3E44;
  background: rgba(16, 16, 18, 0.72);
  color: #C9CDD2;
  cursor: pointer;
  transition: background 200ms ease, color 200ms ease, border-color 200ms ease;
}
.lightbox__step:hover { background: #C9CDD2; color: #101012; border-color: #C9CDD2; }
.lightbox__step[hidden] { display: none; }
.lightbox__step--prev { left: clamp(0.5rem, 2vw, 1.5rem); }
.lightbox__step--next { right: clamp(0.5rem, 2vw, 1.5rem); }
.lightbox__step svg {
  width: 45%;
  height: 45%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@keyframes iris-open {
  from { clip-path: circle(0% at 50% 50%); }
  to   { clip-path: circle(150% at 50% 50%); }
}
@media (prefers-reduced-motion: reduce) {
  .lightbox img { animation: none; clip-path: none; }
}

/* The language switch sits at the end of the menu, set apart from the pages. */
.menu__lang {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  padding-bottom: 3px;
  white-space: nowrap;
}
.menu__lang:hover { color: var(--text); border-bottom-color: var(--accent); }
@media (min-width: 40.0625rem) {
  .menu__lang { margin-left: 0.5rem; padding-left: 1.25rem; border-left: 1px solid var(--rule); }
}
