/* The Red Planter Project · website concept, shared foundation.
   Layout concept: one cream drawing sheet; a 12-column grid with a 5% margin; type, line and image placed
   freely on it; one red square that marks the one thing that matters. Single deliberate light look. */

:root {
  /* Brand guide Rev D: four colours, shown in the proportion they are used */
  --cream: #FEFAF4;          /* the ground */
  --ink: #141414;            /* lines and type (charcoal) */
  --line: #CFC8BC;           /* secondary lines only */
  --red: #A3302C;            /* planter red, once per screen */
  --mute: #8A847A;           /* annotation text */
  --soft: #5F5A52;           /* secondary body text */
  --veil: rgba(254, 250, 244, .92);

  --f-display: "Jost", "Futura", "Century Gothic", "Avenir Next", sans-serif;
  --f-body: "IBM Plex Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* Grid: 12 columns, margin 5% of the width (never under 24px), 24px gap. Spacing steps 8 16 24 32 48 64 96. */
  --m: max(24px, 5vw);
  --gap: 24px;
  --col: calc((100vw - 2 * var(--m) - 11 * var(--gap)) / 12);
  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 32px; --s5: 48px; --s6: 64px; --s7: 96px;
  --hd: 76px;

  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
  --ease-soft: cubic-bezier(.33, 0, .2, 1);

  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--cream); -webkit-text-size-adjust: 100%; }
html, body { margin: 0; }
body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  min-height: 100vh;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
::selection { background: var(--ink); color: var(--cream); }
:focus-visible { outline: 1px solid var(--ink); outline-offset: 4px; }
[hidden] { display: none !important; }

#app { position: relative; min-height: 100vh; }

/* ------------------------------------------------------------------ type roles */
.t-display { font-family: var(--f-display); font-weight: 400; letter-spacing: .02em; line-height: .8; font-variant-numeric: lining-nums; }
.t-name    { font-family: var(--f-display); font-weight: 400; text-transform: uppercase; letter-spacing: .22em; line-height: 1.1; }
.t-label   { font-family: var(--f-display); font-weight: 400; font-size: 12.5px; text-transform: uppercase; letter-spacing: .24em; line-height: 1.3; }
.t-lead    { font-family: var(--f-body); font-weight: 400; font-size: clamp(20px, 1.55vw, 27px); line-height: 1.38; letter-spacing: -.003em; text-wrap: balance; }
.t-body    { font-family: var(--f-body); font-size: 17px; line-height: 1.6; max-width: 62ch; }
.t-note    { font-family: var(--f-mono); font-size: 12px; line-height: 1.5; color: var(--mute); letter-spacing: .01em; }
.t-tag     { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .05em; color: var(--ink); opacity: .62; }
.t-mute    { color: var(--mute); }
.num       { font-variant-numeric: tabular-nums lining-nums; }

/* ------------------------------------------------------------------ header */
.hd {
  position: fixed; z-index: 100; left: 0; right: 0; top: 0;
  height: calc(var(--hd) + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) var(--m) 0;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  color: var(--ink);
  transition: transform .7s var(--ease-out), color .4s ease, background-color .4s ease;
  pointer-events: none;
}
.hd > * { pointer-events: auto; }
.hd.is-scrolled { background: var(--veil); }
.hd.is-hidden { transform: translateY(-100%); }
.hd.on-dark { color: var(--cream); background: transparent; }
.hd-mark { display: block; line-height: 0; }
.logo-hd { display: block; height: 38px; width: auto; overflow: visible; color: currentColor; }
.logo-hd .lm { fill: var(--cream); }
.logo-hd .leaf { fill: currentColor; stroke: var(--cream); stroke-width: 20; paint-order: stroke; stroke-linejoin: round; }
.logo-hd .lp { fill: var(--red); }
.hd.on-dark .logo-hd .lm { fill: transparent; }
.hd.on-dark .logo-hd .leaf { stroke: transparent; }
.hd-nav { display: flex; gap: clamp(20px, 2.6vw, 44px); }
.hd-nav a { font-family: var(--f-display); font-size: 12.5px; letter-spacing: .24em; text-transform: uppercase; position: relative; padding: 6px 0; }
.hd-nav a::after {
  content: ""; position: absolute; left: 0; right: .24em; bottom: 0; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: left; transition: transform .6s var(--ease-out);
}
.hd-nav a:hover::after, .hd-nav a.is-on::after { transform: scaleX(1); }
@media (max-width: 640px) {
  :root { --hd: 60px; }
  .logo-hd { height: 30px; }
  .hd-nav { gap: 16px; }
  .hd-nav a { font-size: 10.5px; letter-spacing: .18em; }
}

/* ------------------------------------------------------------------ page wipe: the parallel rule sweeps the sheet */
.wipe {
  position: fixed; inset: 0; z-index: 95; background: var(--cream);
  transform: translateY(-101%); pointer-events: none; will-change: transform;
}
.wipe::before, .wipe::after { content: ""; position: absolute; left: 0; right: 0; height: 1px; background: var(--ink); }
.wipe::before { top: 0; }
.wipe::after { bottom: 0; }
.wipe-label { position: absolute; left: var(--m); bottom: 14px; font-family: var(--f-mono); font-size: 11px; letter-spacing: .06em; color: var(--ink); opacity: .7; }
.wipe-label b { font-weight: 400; color: var(--mute); margin-left: 14px; }

/* ------------------------------------------------------------------ the red square */
.rs {
  position: fixed; left: 0; top: 0; z-index: 110; width: 44px; height: 44px;
  transform: translate3d(-200px, -200px, 0);
  opacity: 0; transition: opacity .6s var(--ease-soft);
  pointer-events: none; outline: none;
}
.rs.is-on { opacity: 1; }
.rs.is-yield { opacity: 0 !important; }
.rs.is-live { pointer-events: auto; cursor: pointer; }
.rs-body { position: absolute; inset: 0; background: var(--red); }
.rs-sprig { position: absolute; left: -10%; bottom: 100%; width: 120%; color: var(--ink); pointer-events: none; }
.rs-sprig svg { display: block; width: 100%; height: auto; overflow: visible; }
.rs-sprig .leaf { fill: var(--ink); stroke: var(--cream); stroke-width: 20; paint-order: stroke; stroke-linejoin: round;
  transform-box: fill-box; transform: scale(0) rotate(0deg); transition: transform .7s cubic-bezier(.2, 1.25, .35, 1); }
.rs-sprig .leaf:nth-child(1) { transform-origin: 94% 100%; transform: scale(0) rotate(14deg); }
.rs-sprig .leaf:nth-child(2) { transform-origin: 6% 100%;  transform: scale(0) rotate(-14deg); transition-delay: .07s; }
.rs-sprig .leaf:nth-child(3) { transform-origin: 28% 100%; transition-delay: .14s; }
.rs.is-sprout .rs-sprig .leaf { transform: scale(1) rotate(0deg); }
.rs-g { position: absolute; width: 7px; height: 7px; background: var(--cream); border: 1px solid var(--ink);
  transform: scale(0); transition: transform .45s var(--ease-out); }
.rs-g.g1 { left: -4px; top: -4px; } .rs-g.g2 { right: -4px; top: -4px; transition-delay: .04s; }
.rs-g.g3 { right: -4px; bottom: -4px; transition-delay: .08s; } .rs-g.g4 { left: -4px; bottom: -4px; transition-delay: .12s; }
.rs.is-insp .rs-g { transform: scale(1); }
.rs:focus-visible { outline: 1px solid var(--ink); outline-offset: 6px; }

.rs-ext { position: fixed; inset: 0; z-index: 105; pointer-events: none; }
.rs-ext i { position: absolute; background: var(--ink); opacity: .55; transition: clip-path .9s var(--ease-out), opacity .4s ease; }
.rs-ext .x-t, .rs-ext .x-b { left: 0; right: 0; height: 1px; }
.rs-ext .x-l, .rs-ext .x-r { top: 0; bottom: 0; width: 1px; }
.rs-ext:not(.on) i { opacity: 0; transition: clip-path .35s ease, opacity .25s ease; }
.rs-read { position: absolute; font-family: var(--f-mono); font-size: 11px; line-height: 1.55; color: var(--ink); white-space: pre; opacity: 0; transition: opacity .3s ease; }
.rs-ext.on .rs-read { opacity: 1; }
.rs-read b { font-weight: 400; color: var(--mute); }
.rs-read { text-shadow: 0 0 2px var(--cream), 0 0 5px var(--cream), 0 0 9px var(--cream); }

/* ------------------------------------------------------------------ sheet furniture */
.marks { position: absolute; inset: 0; pointer-events: none; }
.marks i { position: absolute; width: 14px; height: 14px; border: 0 solid var(--ink); }
.marks i:nth-child(1) { left: 16px; top: 16px; border-left-width: 1px; border-top-width: 1px; }
.marks i:nth-child(2) { right: 16px; top: 16px; border-right-width: 1px; border-top-width: 1px; }
.marks i:nth-child(3) { right: 16px; bottom: 16px; border-right-width: 1px; border-bottom-width: 1px; }
.marks i:nth-child(4) { left: 16px; bottom: 16px; border-left-width: 1px; border-bottom-width: 1px; }

/* A note with a leader line. Place .ld absolutely; set --len for the leader length. */
.ld { position: absolute; display: flex; align-items: center; gap: 10px; font-family: var(--f-mono); font-size: 11.5px; color: var(--soft); white-space: nowrap; }
.ld::before { content: ""; width: var(--len, 64px); height: 1px; background: var(--ink); opacity: .5; order: var(--side, 0); }
.ld.to-right::before { order: 2; }
.ld .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--ink); }

/* Images: whole, square corners, no shadows, no frames. */
.pl { position: relative; margin: 0; overflow: hidden; background: var(--line); }
.pl img { width: 100%; height: 100%; object-fit: cover; }

/* ------------------------------------------------------------------ reserved media field (projects without imagery yet)
   An empty site in elevation: corner ticks at the final proportion, a ground line, a level datum, the number in line gray. */
.rv { position: relative; container-type: size; color: var(--ink); background: transparent; }
.rv-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.rv-svg .tick { stroke: var(--ink); stroke-width: 1; fill: none; vector-effect: non-scaling-stroke; }
.rv-svg .grd { stroke: var(--ink); stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.rv-svg .ax { stroke: var(--line); stroke-width: 1; stroke-dasharray: 14 4 2 4; vector-effect: non-scaling-stroke; }
.rv-svg .env { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 6 5; fill: none; opacity: .45; vector-effect: non-scaling-stroke; }
.rv-num { position: absolute; left: 5%; bottom: calc(var(--g, 14%) + 5%); font-family: var(--f-display); font-weight: 400; line-height: .8;
  font-size: clamp(22px, 30cqh, 240px); letter-spacing: .02em; color: var(--line); user-select: none; }
.rv-note { position: absolute; left: 5%; top: 6%; font-family: var(--f-mono); font-size: clamp(9.5px, 4.6cqh, 12px); color: var(--mute); line-height: 1.5; white-space: nowrap; }
.rv-datum { position: absolute; right: 8%; bottom: var(--g, 14%); transform: translateY(50%); display: flex; align-items: center; gap: 8px;
  font-family: var(--f-mono); font-size: clamp(9px, 4.2cqh, 11px); color: var(--soft); }
.rv-datum svg { width: clamp(14px, 7cqh, 20px); height: auto; color: var(--ink); background: var(--cream); }
.rv-bub { position: absolute; top: 24%; transform: translate(-50%, -100%); width: clamp(14px, 7cqh, 22px); aspect-ratio: 1; border: 1px solid var(--line);
  border-radius: 50%; display: grid; place-items: center; font-family: var(--f-mono); font-size: clamp(7px, 3.4cqh, 10px); color: var(--mute); background: var(--cream); }

/* ------------------------------------------------------------------ title block (footer of every sheet) */
.tb { position: relative; margin: 0 var(--m); padding: var(--s7) 0 calc(28px + env(safe-area-inset-bottom, 0px)); }
.tb-row { display: grid; grid-template-columns: 3.2fr 2.2fr 2.2fr 1fr .7fr 1.3fr; border-top: 1px solid var(--ink); min-height: 54px; }
.tb-c { border-left: 1px solid var(--line); padding: 9px 12px 0; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tb-c:first-child { border-left: 0; padding-left: 0; flex-direction: row; align-items: center; gap: 12px; padding-top: 0; }
.tb-c em { font-style: normal; font-family: var(--f-display); font-size: 9px; letter-spacing: .24em; text-transform: uppercase; color: var(--mute); }
.tb-c b { font-weight: 400; font-family: var(--f-mono); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-c a:hover { text-decoration: underline; text-underline-offset: 3px; }
.tb-brand { font-family: var(--f-display); font-size: 10.5px; letter-spacing: .26em; text-transform: uppercase; white-space: nowrap; }
.tb-mark { width: 22px; height: auto; flex: none; }
.tb-nav { display: flex; gap: 28px; margin-top: 18px; justify-content: flex-end; }
.tb-nav a { font-family: var(--f-display); font-size: 11px; letter-spacing: .24em; text-transform: uppercase; color: var(--soft); }
.tb-nav a:hover { color: var(--ink); }
@media (max-width: 900px) {
  .tb-row { grid-template-columns: 1fr 1fr; }
  .tb-c { border-left: 0; padding: 10px 0; border-top: 1px solid var(--line); }
  .tb-c:first-child { grid-column: 1 / -1; border-top: 0; padding: 14px 0; }
  .tb-nav { justify-content: flex-start; flex-wrap: wrap; }
}

/* ------------------------------------------------------------------ helpers */
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { padding-inline: var(--m); }
.grid12 { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); }
.typing::after { content: ""; display: inline-block; width: .55em; height: .9em; margin-left: 2px; vertical-align: -.08em; background: currentColor; opacity: .7; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* Scroll reveal (U.reveal). Content is visible unless JS marks it .rev-pre right before observing. */
[data-reveal].rev-pre { opacity: 0; transform: translateY(28px); }
[data-reveal].rev-pre.is-in { opacity: 1; transform: none; transition: opacity 1.1s var(--ease-soft), transform 1.3s var(--ease-out); transition-delay: var(--d, 0s); }

/* ------------------------------------------------------------------ the street (RPP.Street) */
.st-frame { position: relative; overflow: hidden; touch-action: pan-y; }
.st { position: absolute; inset: 0; }
.st-ground { position: absolute; left: 0; right: 0; top: 0; height: 1.4px; background: var(--ink); will-change: transform; }
.st-item { position: absolute; left: 0; top: 0; display: block; color: var(--ink); transition: opacity .6s var(--ease-soft); }
.st-plate { position: absolute; left: 0; top: 0; will-change: transform; transform-origin: 0 0; }
.st-plate.pl { background: transparent; }
.st-plate.rv { aspect-ratio: auto !important; }
.st-cap { position: absolute; left: 0; top: 0; display: flex; gap: 14px; align-items: flex-start; transition: opacity .5s var(--ease-soft); pointer-events: none; }
.st-num { font-family: var(--f-display); font-size: clamp(26px, 2.4vw, 46px); line-height: .85; letter-spacing: .03em; }
.st-tx { display: flex; flex-direction: column; gap: 4px; padding-top: 2px; min-width: 0; }
.st-t { font-family: var(--f-display); font-size: clamp(12.5px, .85vw, 15px); letter-spacing: .2em; text-transform: uppercase; line-height: 1.2; white-space: nowrap; }
.st-c { font-family: var(--f-body); font-size: 13.5px; line-height: 1.3; color: var(--soft); white-space: nowrap; }
.st-s { font-family: var(--f-mono); font-size: 11px; color: var(--mute); display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.st-line { display: inline-block; width: 18px; height: 0; border-top: 1.4px solid var(--ink); }
.st-line[data-line="image"] { height: 6px; border: 0; background: var(--ink); }
.st-line[data-line="dashed"] { border-top-style: dashed; }
.no-caps .st-cap { opacity: 0; }
.st-hovering .st-item:not(.is-hot) { opacity: .22; }
.st-item:focus-visible { outline: none; }
.st-item:focus-visible .st-plate { outline: 1px solid var(--ink); outline-offset: 6px; }
.is-static .st-item { pointer-events: none; }
