/* Editorial pages: Info, Courses, Project detail, modals */

:root {
  /* One face, four roles.
   *
   * The site used to run three: Instrument Serif for display, Archivo for UI,
   * Plus Jakarta Sans for name plates, and a system mono for the loading
   * label. Four voices on a portfolio whose content is already busy — the
   * type was doing the arguing rather than the work.
   *
   * It is one monospace now, everywhere: menu, titles, plates, body. A single
   * fixed advance under all of it is the strongest thing a site like this can
   * have, because the work in the cards is what varies and the frame around
   * it should not.
   *
   * SWAPPING THE FACE: this is the only line to change. Add an @font-face
   * block above and put its family at the front of this stack; every token
   * below and every consumer in the other five stylesheets follows. Saans
   * Mono is the intended face and is not licensed for web use on the trial,
   * so Geist Mono stands in — same genre, same proportions, OFL.
   *
   * The system monos behind it are deliberate: if the webfont is slow the
   * fallback is still fixed-advance, so the page reflows in width but never
   * changes character.
   */
  --font-stack: 'Geist Mono', ui-monospace, SFMono-Regular, 'SF Mono', Menlo, 'Roboto Mono', monospace;

  /* The four role tokens stay, so every existing consumer keeps working and
     the roles stay nameable if the site ever wants a second face again. */
  --font-display: var(--font-stack);
  --font-ui: var(--font-stack);
  /* Tile name plates */
  --font-plate: var(--font-stack);
  /* Loading label */
  --font-mono: var(--font-stack);

  /* Mono tracking, as three steps rather than a value guessed per rule.
   *
   * A fixed advance gives narrow letters a lot of side bearing, so mono sets
   * looser than a proportional face at the same size, and the bigger it is
   * set the looser it looks. Display sizes need pulling in; body text does
   * not, because at 16-18px the extra space is what makes mono readable
   * rather than what makes it look gappy. Uppercase labels still want to
   * open up, just less than they would in a proportional face — the advance
   * has already done half the job. */
  --track-display: -0.03em;
  --track-tight: -0.015em;
  --track-label: 0.04em;
  --bg: #fafafa;
  --bg-canvas: #f0f0f0;
  --card-bg: #fff;
  --text: #111;
  --text-muted: #76766e;
  --text-soft: #4a4a45;
  --focus: #111;
  --border: rgba(0, 0, 0, 0.06);
  --border-strong: rgba(0, 0, 0, 0.1);
  --accent: #5de6c8;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.2);
  --radius: 16px;
  --radius-sm: 12px;
  --radius-lg: 24px;
  /* Every duration and easing comes from motion.css — load it first. */
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* Tapping anything on a phone drew a black box over it for a moment. That is
   the platform's own tap highlight, and it takes its colour from the element's
   text colour — near-black here, so on a card it covered the work you had just
   pressed. Turned off globally; what replaces it is a real :active state on
   each of the things you can press (cards, list rows, buttons, menu items), so
   touch still gets an answer, just one the site chose. */
html { -webkit-tap-highlight-color: transparent; }

html, body {
  background: var(--bg);
  font-family: var(--font-ui);
  font-synthesis-weight: none;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  scrollbar-color: rgba(0, 0, 0, 0.28) transparent;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* Browser surfaces: selection, caret and focus belong to the palette too */
::selection { background: var(--text); color: #fff; }
input, textarea { caret-color: var(--text); }
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

/* The floating nav lives in nav.css — shared with the world view. */

/* Editorial layout container */
.editorial {
  max-width: 680px;
  margin: 0 auto;
  padding: 140px 32px 120px;
}

.heading-xl {
  font-family: var(--font-display);
  font-size: clamp(34px, 5.2vw, 52px); font-weight: 500;
  line-height: 1.16; margin-bottom: 28px;
  letter-spacing: var(--track-display);
  text-wrap: balance;
}

.body-text {
  font-size: 16px; line-height: 1.7;
  color: var(--text-soft);
  max-width: 54ch;
  margin-bottom: 56px;
}

.section { margin-bottom: 56px; }

.section-title {
  font-size: 15px; font-weight: 500;
  color: var(--text-muted); margin-bottom: 16px;
}

/* --- Work with me ---------------------------------------------------------

   This used to scope the page to Jakarta while the rest of the site ran
   Archivo over Instrument Serif. There is one face now, so the declaration
   is a no-op — kept so the page still has somewhere to say what it is set in
   if that ever stops being true. */
.page-work { font-family: var(--font-plate); }

/* The headline is a full sentence rather than two words, so it comes down
   from display size to something that can carry several lines without
   shouting — further in mono than it was in the sans, because the fixed
   advance adds width the sans didn't and the sentence is long.

   It sits in a column of the spread now rather than across a 680px page, so
   the ceiling comes up: at 34px in a 600px column the sentence ran to six
   short lines and read as a paragraph rather than a headline. */
.page-work .heading-xl {
  font-family: var(--font-plate);
  font-size: clamp(26px, 3vw, 40px);
  font-weight: 500;
  letter-spacing: var(--track-display);
  line-height: 1.25;
  margin-bottom: 24px;
}

.page-work .body-text { margin-bottom: 40px; }

/* Inside the lede the terms are the last thing in the column, and the column
   is set to the floor of the picture beside it. A trailing margin there would
   push the headline up off that shared line for no reason. */
.studio-lede .body-text { margin-bottom: 0; }

/* --- The studio page ------------------------------------------------------

   Wider than the 680px reading column the rest of the editorial pages use,
   because this one is composed rather than read: a headline against a picture,
   a band of pictures, then the ladder. 1160 is the width at which the tall
   frame can sit beside the headline without either of them becoming a stripe.

   Nothing here introduces a colour, a face or a radius the site did not
   already own. What it borrows is the board's own move — a photograph held in
   a fixed frame and filled — which is the one thing this page had opted out
   of while every other page was built on it. */
.studio {
  max-width: 1160px;
  margin: 0 auto;
  padding: 140px 32px 120px;
}

/* The arrival, in the order you read the page: the opening, then its evidence,
   then the ladder one rung at a time. --enter-delay is the same handle
   .page-in already takes everywhere else. */
.studio-band { --enter-delay: var(--duration-micro); }
.ladder-row:nth-child(1) { --enter-delay: calc(var(--duration-micro) * 2); }
.ladder-row:nth-child(2) { --enter-delay: calc(var(--duration-micro) * 2 + var(--duration-stagger)); }
.ladder-row:nth-child(3) { --enter-delay: calc(var(--duration-micro) * 2 + var(--duration-stagger) * 2); }
.ladder-row:nth-child(4) { --enter-delay: calc(var(--duration-micro) * 2 + var(--duration-stagger) * 3); }
.studio-close { --enter-delay: calc(var(--duration-micro) * 3); }

/* --- The opening spread --------------------------------------------------- */

.studio-spread {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 56px;
  align-items: end;
  margin-bottom: 20px;
}

/* Set to the bottom of the picture beside it, so the headline and the frame
   share a line along the floor rather than both starting at the ceiling and
   ending wherever their content runs out. */
.studio-lede {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

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

   One frame, filled — the same call world.css and list.css make. Three
   proportions, because a band of identical crops is a contact sheet and this
   is meant to read as a composition. */
.shot {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg-canvas);
  box-shadow: var(--shadow-sm);
}

.shot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.shot-tall { aspect-ratio: 4 / 5; }
.shot-wide { aspect-ratio: 16 / 10; }
.shot-square { aspect-ratio: 1 / 1; }

/* No photograph at this path yet. Rather than a torn icon and an alt string in
   the corner, the frame keeps its proportion and sets its own alt line in the
   middle of it — a plate waiting for a picture, which is exactly what it is.
   studio-shots.js sets the attribute; the alt text is echoed into ::after by
   the markup's own words, so there is nothing to keep in sync. */
.shot[data-empty] {
  border: 1px solid var(--border-strong);
  box-shadow: none;
}

.shot[data-empty] img { visibility: hidden; }

.shot[data-empty]::after {
  content: attr(data-label);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  text-align: center;
  font-size: 12px;
  letter-spacing: var(--track-label);
  color: var(--text-muted);
}

/* --- The evidence band ---------------------------------------------------- */

.studio-band {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
  margin: 72px 0 96px;
}

/* --- The ladder -----------------------------------------------------------

   Four rows on hairlines rather than four boxes in a grid. The tiers are a
   sequence — each is the one above it with more of us in it — and a 2×2 of
   identical cards flattens that into four things to compare. Read down, the
   price column does the comparing on its own.

   Rules rather than cards is also what lets the row be full width: a card at
   this width would be a lot of empty white around three short pieces of text. */
.ladder {
  border-top: 1px solid var(--border-strong);
  margin-bottom: 64px;
}

.ladder-row {
  display: grid;
  grid-template-columns: 8.5rem 10rem minmax(0, 1fr);
  gap: 24px;
  align-items: baseline;
  padding: 26px 12px 28px;
  border-bottom: 1px solid var(--border);
  transition: background var(--duration-quick) ease;
}

/* The whole row answers a pointer, which is the affordance a card used to
   carry. Quieter than the card's lift, and it survives being full width. */
@media (hover: hover) and (pointer: fine) {
  .ladder-row:hover { background: rgba(0, 0, 0, 0.025); }
}

/* Names the row and gets out of the way. It was 13/600 solid grey inside a
   card, which made STARTER STUDIO PRO EQUITY compete with the prices under
   them. A transparent black rather than --text-muted, so it sits back from
   the page without becoming a second colour. */
.ladder-name {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  color: rgba(17, 17, 17, 0.38);
}

/* The column that does the work. Tabular figures so €2K, €5K and €10K stack
   on the same stems down the ladder. */
.ladder-price {
  font-family: var(--font-plate);
  font-size: clamp(26px, 2.6vw, 34px);
  font-weight: 500;
  letter-spacing: var(--track-display);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

/* The unit rides along at text size, so "€5K" is the thing you read — at the
   same transparency as the row's name, so the two pieces of furniture around
   the number recede together instead of one being grey and the other greyer. */
.ladder-per {
  font-size: 15px;
  font-weight: 400;
  letter-spacing: var(--track-tight);
  color: rgba(17, 17, 17, 0.38);
}

.ladder-line {
  font-size: 16px;
  line-height: 1.55;
  color: var(--text-soft);
  /* Wide enough that each of the three priced lines sets on one line. Broken
     over two, a nine-word sentence reads as a paragraph and the ladder stops
     scanning as a list of four comparable things. */
  max-width: 62ch;
}

/* Equity's line runs across the column the others keep for a number. That gap
   is the whole statement: this is the row without a price, and it says so by
   its shape rather than by a dash standing in for one. */
.ladder-row-equity .ladder-line {
  grid-column: 2 / -1;
  max-width: 62ch;
}

/* The arrangement, at the head of its own line. Full --text rather than the
   soft grey around it, which is the whole reason it can be a sentence instead
   of a price. */
.ladder-line strong {
  font-weight: 600;
  color: var(--text);
}

.cta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* --- Narrower ------------------------------------------------------------- */

@media (max-width: 900px) {
  .studio { padding: 110px 20px 90px; }

  /* The spread stops being a spread: headline first, then the picture under
     it, which is the reading order the grid was expressing sideways. */
  .studio-spread {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
  }

  .shot-tall { aspect-ratio: 5 / 4; }

  /* The wide frame takes the full row and the two squares share the one under
     it — the band keeps its change of pace instead of collapsing into a
     single column of equal pictures. */
  .studio-band {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin: 48px 0 64px;
  }

  .studio-band .shot-wide { grid-column: 1 / -1; }

  /* Name and price on one line, the sentence under them. Three columns at this
     width would give the price about four characters. */
  .ladder-row {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 6px 20px;
    padding: 22px 4px 24px;
  }

  .ladder-name { grid-column: 1; align-self: center; }
  .ladder-price { grid-column: 2; text-align: right; }
  .ladder-line,
  .ladder-row-equity .ladder-line { grid-column: 1 / -1; max-width: none; }
}

@media (max-width: 560px) {
  .cta-row .btn-primary,
  .cta-row .btn-secondary { flex: 1 1 100%; justify-content: center; }
}

/* Pill links row */
.link-row {
  display: flex; gap: 12px; flex-wrap: wrap;
  margin-top: 32px;
}
.link-pill {
  background: #f0f0f0; color: var(--text-soft);
  padding: 10px 20px; border-radius: 24px;
  font-size: 14px; font-weight: 500;
  display: flex; align-items: center; gap: 6px;
  transition: background var(--duration-quick) ease;
}
.link-pill:hover { background: #e5e5e5; }

/* Pill link arrows */
.pill-arrow {
  width: 12px; height: 12px;
  stroke: currentColor; fill: none;
  stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
}

/* Buttons */
.btn-primary {
  display: inline-flex; height: 44px; align-items: center; gap: 8px;
  background: #000; color: #fff;
  padding: 0 22px; border-radius: 24px;
  font-size: 16px; font-weight: 500;
  border: none; cursor: pointer;
  transition: background var(--duration-quick) ease, transform 100ms ease;
}
.btn-primary:hover { background: rgba(0,0,0,0.88); }
.btn-primary:active { transform: scale(0.98); }

.btn-secondary {
  display: inline-flex; height: 44px; align-items: center; gap: 8px;
  background: #f0f0f0; color: #666;
  padding: 0 22px; border-radius: 24px;
  font-size: 16px; font-weight: 500;
  border: none; cursor: pointer;
  transition: background var(--duration-quick) ease, transform 100ms ease;
}
.btn-secondary:hover { background: #e5e5e5; }
.btn-secondary:active { transform: scale(0.98); }

/* --- Contact drawer ------------------------------------------------------

   The form is a sheet that rises from the bottom edge rather than a box that
   lands in the middle of the screen: it leaves whatever you were looking at
   in place above it, which matters most inside the /max frame, where the room
   you just walked into is the point.

   Two fields, no labels, no boxes — an address and a message on ruled lines,
   in the same face as the wordmark it opens from, which is now the same face
   as everything else.

   White paper on the dark scrim. The sheet used to be a second shade of ink,
   which made writing a message feel like more of the room rather than a thing
   handed to you; a white sheet reads as paper the moment it clears the edge,
   and the ink on it is the site's own text colour. Everything below inverts
   together — a half-inverted sheet is how you end up with white type on
   white. */

.drawer-scrim {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(10, 10, 12, 0.5);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity var(--duration-normal) ease;
}

.drawer-scrim[hidden] { display: none; }
.drawer-scrim.is-open { opacity: 1; }

.drawer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  justify-content: center;
  padding: 0 16px calc(16px + env(safe-area-inset-bottom));
  pointer-events: none;
}

.drawer[hidden] { display: none; }

.drawer-sheet {
  pointer-events: auto;
  position: relative;
  width: 100%;
  max-width: 560px;
  background: #fff;
  color: var(--text);
  border-radius: 22px;
  padding: 14px 26px 26px;
  font-family: var(--font-plate);
  box-shadow: 0 -2px 18px rgba(0, 0, 0, 0.5), 0 -20px 70px rgba(0, 0, 0, 0.45);
  /* Starts a sheet's height below the edge and rides up on the same curve the
     frame grows on, so the two moves belong to one piece of software. */
  transform: translateY(calc(100% + 24px));
  transition: transform 520ms cubic-bezier(0.32, 0.72, 0, 1);
}

.drawer.is-open .drawer-sheet { transform: translateY(0); }

/* The grip reads as something you could pull, and is the click target for
   putting the sheet away. */
.drawer-grip {
  display: block;
  width: 42px;
  height: 4px;
  /* With the heading gone the grip sits straight above the first field, so it
     takes the space the heading used to hold open. */
  margin: 0 auto 26px;
  padding: 0;
  border: none;
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.16);
  cursor: pointer;
  transition: background var(--duration-quick) ease;
}

.drawer-grip:hover { background: rgba(0, 0, 0, 0.3); }

.drawer-field {
  display: block;
  width: 100%;
  background: transparent;
  border: none;
  /* The rule is the lightest thing on the sheet — it marks where to write
     without competing with what gets written there. */
  border-bottom: 1px solid rgba(0, 0, 0, 0.13);
  border-radius: 0;
  padding: 12px 0;
  color: var(--text);
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: var(--track-tight);
  outline: none;
  transition: border-color var(--duration-normal) ease;
}

/* These placeholders are the only labels the fields have, so they carry real
   content and have to be read, not just glimpsed. On ink a 34% white cleared
   that easily; the same alpha in black on paper lands at 2.5:1, which doesn't. */
.drawer-field::placeholder { color: rgba(0, 0, 0, 0.5); }
.drawer-field:focus { border-bottom-color: rgba(0, 0, 0, 0.55); }

textarea.drawer-field {
  min-height: 86px;
  resize: none;
  line-height: 1.5;
}

.drawer-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
}

.drawer-note {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}

.drawer-note a {
  color: var(--text-soft);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.drawer-send {
  flex: none;
  height: 44px;
  padding: 0 26px;
  border: none;
  border-radius: 24px;
  background: #111;
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--duration-quick) ease, transform 100ms ease;
}

.drawer-send:hover { background: rgba(17, 17, 17, 0.86); }
.drawer-send:active { transform: scale(0.98); }
.drawer-send:disabled { opacity: 0.5; cursor: not-allowed; }

.drawer-error {
  margin-top: 14px;
  font-size: 14px;
  font-weight: 500;
  /* The pale red that read on ink is barely there on paper. */
  color: #b3261e;
}

.drawer-done {
  padding: 18px 0 8px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: var(--track-tight);
}

/* The grip and the buttons take a ring; the fields don't. A ruled field's focus
   is the rule going bright — boxing it as well draws a rectangle around a
   control whose whole design is that it hasn't got one. */
.drawer-grip:focus-visible,
.drawer-send:focus-visible,
.drawer-note a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

/* Keyboard arrivals need more than a hairline shift, so the rule thickens as
   well as darkening. */
.drawer-field:focus-visible {
  border-bottom-color: var(--text);
  box-shadow: 0 1px 0 0 var(--text);
}

@media (max-width: 640px) {
  .drawer-sheet { padding: 12px 20px 22px; border-radius: 20px; }
  .drawer-foot { flex-direction: column-reverse; align-items: stretch; }
  .drawer-send { width: 100%; }
  .drawer-note { text-align: center; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .drawer-sheet { transition: none; transform: translateY(0); }
}

/* --- Liquid metal ---------------------------------------------------------

   Shared by the studio card's button and the nav, which is why it sits in the
   sheet every page loads rather than in world.css with the rest of the canvas.

   The metal canvas is a sibling of the thing it surrounds rather than a child,
   because it has to run past that thing's edge and a child of a rounded box is
   clipped by it. The wrap is the shared origin for the two, and isolates them
   so the canvas can sit at a negative index — behind the button — without
   falling through to whatever is underneath. */
.metal-wrap {
  position: relative;
  display: inline-flex;
  isolation: isolate;
}

.metal-canvas {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: -1;
  display: block;
  pointer-events: none;
}

/* --- Arriving -------------------------------------------------------------

   Every page here paints the same way: the HTML is a shell, a fetch resolves,
   and the whole of the content lands in one appendChild. That last step was a
   cut — nothing, then everything, on a single frame — which is what made the
   site feel like it was loading rather than opening.

   Written as animations rather than transitions, deliberately. An animation's
   resting state in CSS is the visible one, so if the markup never gets its
   class — script fails, old browser — the content is simply there. Nothing on
   this site is parked at opacity: 0 waiting on JavaScript to release it.

   And the fill is `backwards`, never `forwards`. A forwards-filled animation
   keeps overriding the element afterwards, which would freeze every card's
   transform and kill its hover for the rest of the session. `backwards` only
   reaches back over the stagger delay, then gets out of the way. */

/* The scale's page slide: --distance-base of travel and a pre-blur settling to
   0. The blur is what separates this from a plain fade — it reads as the page
   focusing rather than brightening. One element carries it, so one filter
   surface, for 400ms, once. Note that a filter makes an element the containing
   block for fixed-position descendants; these containers have none (the nav is
   a child of body), which is the only reason it is affordable here. */
@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(var(--distance-base));
    filter: blur(var(--blur-medium));
  }
}

/* --enter-delay lets a caller order two arrivals — the main content, then the
   secondary block under it — without a second set of keyframes. The backwards
   fill reaches back over the delay, so nothing appears at full opacity first
   and then animates. Unset it is 0ms: this is the rule it has always been. */
.page-in {
  animation: page-in var(--duration-slow) var(--ease-smooth-out) var(--enter-delay, 0ms) backwards;
}

/* The loading label used to be switched off with display: none on the same
   frame the content appeared, so the two swapped with a flicker between them.
   It fades under the content coming up instead. visibility rides on a zero
   length transition delayed to the end, which takes it out of the tab order
   without a timer to keep in step. */
.loading.is-done {
  opacity: 0;
  visibility: hidden;
  transition:
    opacity var(--duration-quick) ease,
    visibility 0s linear var(--duration-quick);
}

@media (prefers-reduced-motion: reduce) {
  /* Reduced motion is gentler, not absent: the fade stays, because a cut is
     the jarring thing it was there to fix. The travel and the blur go. */
  @keyframes page-in {
    from { opacity: 0; }
  }
  .page-in {
    animation-duration: var(--duration-fast);
    /* Sequencing two arrivals is itself motion. Reduced motion gets both at
       once. */
    --enter-delay: 0ms;
  }
}
