/* Daniel Goron — London
   Every colour here was sampled from the mirror self-portrait: the coat, the
   street through the glass, the café lights. Nothing was invented. */

@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 {
  --ink: #0E0F12;
  --coal: #16181C;
  --slate: #22262C;
  --hairline: #2E333A;
  --zinc: #8E949B;
  --daylight: #EAEDEA;
  --amber: #D8B175;
  --amber-lit: #EBC98F;

  --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;
}

*, *::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(--ink);
  color: var(--daylight);
  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(--amber) 55%, transparent); text-underline-offset: 4px; }
a:hover { text-decoration-color: var(--amber); }

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

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

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

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: var(--gutter);
  top: 0.75rem;
  z-index: 20;
  background: var(--amber);
  color: var(--ink);
  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(--hairline);
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in oklab, var(--ink) 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(--amber);
  /* 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(--daylight) 78%, transparent);
  padding-bottom: 3px;
  border-bottom: 2px solid transparent;
  transition: color 200ms ease, border-color 200ms ease;
}
.menu a:hover { color: var(--daylight); }
.menu a[aria-current="page"] { color: var(--daylight); border-bottom-color: var(--amber); }

.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(--daylight); }
  .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(--zinc); max-width: var(--measure); }

.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(--amber);
  color: var(--amber);
  text-decoration: none;
  background: none;
  cursor: pointer;
  transition: background 220ms ease, color 220ms ease;
}
.button:hover, button:hover { background: var(--amber); color: var(--ink); }

/* ------------------------------------------------------------------ frames */

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

@supports (columns: 2) {
  .grid--gallery, .grid--recent {
    display: block;
    columns: 1;
    column-gap: 2.5rem;
  }
  .grid--gallery > .frame, .grid--recent > .frame {
    break-inside: avoid;
    margin-bottom: 2.75rem;
  }
  @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.75rem; }

.frame__open {
  display: block;
  padding: 0;
  border: 0;
  background: var(--coal);
  cursor: zoom-in;
  width: 100%;
  overflow: hidden;
}
.frame__open img {
  width: 100%;
  transition: opacity 400ms ease, transform 700ms cubic-bezier(0.2, 0, 0.1, 1);
}
.frame__open:hover img { opacity: 0.86; transform: scale(1.012); }

.frame figcaption {
  font-family: var(--mono);
  font-size: 0.78125rem;
  line-height: 1.5;
  color: var(--zinc);
  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(--amber);
}

.more { font-size: 0.9375rem; }
.empty { color: var(--zinc); font-family: var(--mono); font-size: 0.875rem; }

/* ------------------------------------------------------------------- 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.8rem; }
.about__portrait figcaption {
  font-family: var(--mono);
  font-size: 0.78125rem;
  color: var(--zinc);
}
.about__text { display: flex; flex-direction: column; gap: 1.4rem; max-width: var(--measure); }
.about__text p { color: color-mix(in oklab, var(--daylight) 88%, var(--zinc)); }
.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(--zinc);
}
input[type="text"], input[type="email"], input[type="password"], textarea {
  font: inherit;
  color: var(--daylight);
  background: var(--coal);
  border: 1px solid var(--hairline);
  padding: 0.7rem 0.85rem;
  width: 100%;
  border-radius: 0;
  transition: border-color 200ms ease;
}
input:focus, textarea:focus { border-color: var(--amber); outline: none; }
textarea { resize: vertical; min-height: 9rem; }
::placeholder { color: color-mix(in oklab, var(--zinc) 70%, transparent); }

button {
  font-family: var(--body);
  font-size: 0.9375rem;
  font-weight: 500;
  padding: 0.7rem 1.4rem;
  border: 1px solid var(--amber);
  color: var(--amber);
  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(--amber);
  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(--hairline);
  background: var(--coal);
  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(--zinc); 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(--amber);
  background: var(--coal);
}
.flash--error { border-left-color: #C4635A; }

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

.footer {
  border-top: 1px solid var(--hairline);
  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(--zinc);
  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);
  background: color-mix(in oklab, var(--ink) 96%, black);
  border: 0;
  max-width: 100vw;
  max-height: 100dvh;
  width: 100%;
  height: 100%;
}
.lightbox::backdrop { background: rgba(6, 7, 9, 0.94); }
.lightbox__figure { margin: 0; display: flex; flex-direction: column; gap: 1rem; align-items: center; max-height: 100%; }
.lightbox img {
  max-height: min(78dvh, 100%);
  width: auto;
  object-fit: contain;
  /* 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: var(--zinc);
  text-align: center;
  max-width: 60ch;
}
.lightbox__close {
  position: fixed;
  top: 1rem;
  right: 1rem;
  border-color: var(--hairline);
  color: var(--zinc);
}
@keyframes iris-open {
  from { clip-path: circle(0% at 50% 50%); }
  to   { clip-path: circle(75% at 50% 50%); }
}
@media (prefers-reduced-motion: reduce) {
  .lightbox img { animation: none; clip-path: none; }
}
