@font-face {
  font-family: Jost;
  src: url("/fonts/jost-latin-var.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

/* Reveal radius, transitionable. */
@property --r {
  syntax: "<length>";
  inherits: false;
  initial-value: 0px;
}

:root {
  --sheet: #fafafa;
  --grid: #eeeeee;
  --trace: #e2e2e2;
  --meta: #6b6b6b;
  --graphite: #3d3d3d;
  --ink: #000000;

  --ghost: 0.07;            /* resting opacity of the plan */
  --reveal-size: 120px;     /* 120px chosen after trying 50px */
  --ease: cubic-bezier(0.65, 0, 0.35, 1);
}

@media (hover: none) {
  :root { --ghost: 0.1; }
}

html {
  background: var(--sheet);
  color: var(--graphite);
  font: 400 1.125rem/1.6 Jost, system-ui, sans-serif;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body { margin: 0; }

/* ---------------------------------------------------------------- paper + plan */

.plan {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

/* Grid and plan share one origin, so walls land on grid lines.
   The plan (3200×2000) sits at a multiple of the 40px major square. */
.sheet {
  position: absolute;
  width: 6400px;
  height: 4000px;
  left: calc(50% - 3200px);
  top: calc(50% - 2000px);
}

@supports (left: round(down, 1.5px, 1px)) {
  .sheet {
    left: round(down, 50% - 3200px, 1px);
    top: round(down, 50% - 2000px, 1px);
  }
}

.paper {
  background-image:
    linear-gradient(to right, var(--trace) 1px, transparent 1px),
    linear-gradient(to bottom, var(--trace) 1px, transparent 1px),
    linear-gradient(to right, var(--grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid) 1px, transparent 1px);
  background-size: 40px 40px, 40px 40px, 8px 8px, 8px 8px;
}

.sheet svg {
  position: absolute;
  left: 1600px;
  top: 1000px;
  fill: none;
  stroke: var(--ink);
  stroke-linecap: square;
}

.plan-base { opacity: var(--ghost); }

.draw .plan-base { opacity: 0.35; }

.draw .plan-base path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}

.draw .plan-base .poche { opacity: 0; }

.reveal {
  position: absolute;
  inset: 0;
  --x: -999px;
  --y: -999px;
  -webkit-mask-image: radial-gradient(circle var(--r) at var(--x) var(--y), #000 0%, #000 35%, transparent 100%);
  mask-image: radial-gradient(circle var(--r) at var(--x) var(--y), #000 0%, #000 35%, transparent 100%);
  transition: --r 700ms var(--ease);
}

.reveal.on {
  --r: var(--reveal-size);
  transition-duration: 500ms;
}

/* ---------------------------------------------------------------- content */

main,
footer { position: relative; }

.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-content: center;
  padding: 2rem 1rem;
  box-sizing: border-box;
  text-align: center;
}

h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(3rem, 10vw, 9rem);
  font-weight: 200;
  letter-spacing: -0.01em;
  line-height: 1;
}

.disciplines {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25em 1.75em;
  margin: clamp(1rem, 2.4vw, 2rem) 0 0;
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  font-weight: 300;
  letter-spacing: 0.08em;
  line-height: 1.4;
}

/* tracking adds space after the last letter; take it back so words centre */
.disciplines span { margin-right: -0.08em; }

.draw .hero > * { animation: fade-in 900ms 600ms both; }

@keyframes fade-in {
  from { opacity: 0; }
}

.column {
  width: min(34rem, 100% - 2rem);
  margin: 0 auto;
}

.column > section { padding-top: clamp(6rem, 14vh, 10rem); }

.column > section:first-child { padding-top: clamp(3rem, 7vh, 5rem); }

p { margin: 0; }

h2 {
  margin: 0 0 1rem;
  color: var(--ink);
  font-size: 1.5rem;
  font-weight: 300;
  line-height: 1.3;
}

abbr[title] {
  text-decoration: underline dotted 1px;
  text-underline-offset: 0.2em;
}

.work {
  margin: 2.5rem 0 0;
  padding: 0;
  list-style: none;
}

.work li { padding: 0.75rem 0; }

.work .example {
  display: block;
  color: var(--meta);
}

.meta,
.work .example,
.title-block {
  font-size: 0.9375rem;
  letter-spacing: 0.01em;
  line-height: 1.5;
}

@media (min-width: 768px) {
  .work li {
    display: grid;
    grid-template-columns: 13rem 1fr;
    gap: 1.5rem;
    align-items: baseline;
  }
}

a {
  color: inherit;
  text-decoration: underline 1px;
  text-underline-offset: 0.2em;
}

a:hover { color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

/* ---------------------------------------------------------------- title block */

footer {
  display: flex;
  justify-content: flex-end;
  padding: clamp(6rem, 14vh, 10rem) 2rem 2rem;
}

.title-block {
  width: 21rem;
  border: 1px solid var(--trace);
  font-style: normal;
}

.title-block > * { padding: 0.625rem 0.875rem; }

.title-block > * + * { border-top: 1px solid var(--trace); }

.title-block .row {
  display: grid;
  grid-template-columns: 1fr auto;
  padding: 0;
  color: var(--meta);
}

.title-block .row > * { padding: 0.625rem 0.875rem; }

.title-block .row > * + * { border-left: 1px solid var(--trace); }

@media (max-width: 767px) {
  footer { padding: clamp(6rem, 14vh, 10rem) 1rem 1rem; }
  .title-block { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { transition: none; }
}
