/* Jost, self-hosted (no requests to Google, GDPR-friendly). See fonts/README.md */
@font-face {
  font-family: "Jost";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/jost-latin-wght-normal.woff2") format("woff2-variations"),
       url("fonts/jost-latin-wght-normal.woff2") format("woff2");
}

/* Palette: blue-green, signal red, print black, paper. */
:root {
  --kitchen: #24606B;
  --kitchen-deep: #1A4A53;
  --paper: #EFEDE4;
  --paper-dim: rgba(239, 237, 228, 0.7);
  --paper-line: rgba(239, 237, 228, 0.22);
  --signal: #F0482F;
  --black: #101417;

  --type: "Jost", "Futura", "Futura PT", "Century Gothic", "Avenir Next", sans-serif;

  --gutter: clamp(1.25rem, 5vw, 4.5rem);
  --measure: 34rem;
  --ease: cubic-bezier(.65, 0, .35, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }

body {
  margin: 0;
  color: var(--paper);
  font-family: var(--type);
  font-size: 1.1875rem;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(ellipse 70% 55% at 12% -8%, rgba(239, 237, 228, 0.13), transparent 60%),
    radial-gradient(ellipse 60% 50% at 100% 55%, rgba(16, 20, 23, 0.22), transparent 70%),
    linear-gradient(180deg, var(--kitchen) 0%, var(--kitchen-deep) 100%);
  background-color: var(--kitchen);
  overflow-x: clip;
}

/* Construction grid + paper grain: the page as a drafting sheet */
body::before, body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
}
body::before {
  background-image: repeating-linear-gradient(90deg, rgba(239, 237, 228, 0.045) 0 1px, transparent 1px calc(100% / 12));
}
body::after {
  opacity: 0.09; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

a { color: inherit; text-decoration-color: var(--signal); text-decoration-thickness: 2px; text-underline-offset: 0.22em; }
a:hover { text-decoration-thickness: 4px; }
:focus-visible { outline: 3px solid var(--paper); outline-offset: 4px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.wrap { position: relative; z-index: 1; max-width: 78rem; margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Top bar ---------- */
.top {
  display: flex; justify-content: space-between; align-items: baseline;
  padding-top: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 500; font-size: 1.125rem; letter-spacing: 0.01em;
}
.top a { text-decoration: none; }
.top a:hover { text-decoration: underline; text-decoration-color: var(--signal); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-top: clamp(5rem, 15vh, 10rem);
  padding-bottom: clamp(4.5rem, 12vh, 8rem);
}

.disc {
  position: absolute; z-index: -1;
  width: clamp(15rem, 36vw, 33rem); aspect-ratio: 1;
  right: clamp(-9rem, -6vw, -2rem); top: clamp(1.5rem, 6vh, 4rem);
  border-radius: 50%;
  background: var(--signal);
  transform-origin: center;
  animation: disc 1100ms var(--ease) 100ms both;
}

.hero h1 {
  margin: 0;
  font-weight: 500;
  font-size: clamp(3rem, 9vw, 8.5rem);
  line-height: 0.94;
  letter-spacing: -0.025em;
  max-width: 12ch;
  text-transform: lowercase;
}

.was, .now { display: block; }

.was {
  position: relative; width: fit-content;
  color: var(--paper);
  animation: dim 500ms ease 1300ms both;
}
.was::after {
  content: ""; position: absolute;
  left: -0.05em; right: -0.05em; top: 55%;
  height: 0.09em;
  background: var(--signal);
  transform-origin: left center; transform: scaleX(0);
  animation: grow 650ms var(--ease) 750ms forwards;
}

.now {
  margin-top: 0.14em;
  clip-path: inset(0 100% 0 0);
  animation: reveal 950ms var(--ease) 1450ms forwards;
}

.bar {
  display: block;
  width: min(26rem, 62%); height: clamp(0.7rem, 1.2vw, 1.1rem);
  margin-top: clamp(2rem, 5vw, 3.25rem);
  background: var(--black);
  transform-origin: left center;
  animation: grow 800ms var(--ease) 350ms both;
}

.intro {
  margin: clamp(2rem, 4vw, 2.75rem) 0 0;
  max-width: var(--measure);
  font-size: clamp(1.3rem, 1.9vw, 1.6rem);
  line-height: 1.45;
  animation: settle 700ms ease 2150ms both;
}

.previously {
  margin: 1.25rem 0 0;
  max-width: var(--measure);
  color: var(--paper-dim);
  font-size: 1.0625rem;
  line-height: 1.55;
  animation: settle 700ms ease 2300ms both;
}

@keyframes disc   { from { transform: scale(0); } to { transform: scale(1); } }
@keyframes grow   { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes dim    { to { color: var(--paper-dim); } }
@keyframes reveal { to { clip-path: inset(-0.1em -0.2em -0.2em 0); } }
@keyframes settle { from { opacity: 0; transform: translateY(0.6rem); } to { opacity: 1; transform: none; } }

/* ---------- Sections ---------- */
.block { position: relative; z-index: 1; }
.block > .wrap {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 9fr);
  gap: 2rem var(--gutter);
  padding-top: clamp(4rem, 9vw, 7rem);
  padding-bottom: clamp(4rem, 9vw, 7rem);
}
.block + .block > .wrap { border-top: 2px solid var(--paper-line); }

.block h2 {
  margin: 0;
  font-weight: 500;
  font-size: clamp(1.75rem, 3vw, 2.75rem);
  line-height: 1;
  letter-spacing: -0.02em;
  text-transform: lowercase;
  color: var(--paper-dim);
}

@media (min-width: 900px) {
  .block h2 {
    writing-mode: vertical-rl;
    text-orientation: sideways;
    transform: rotate(180deg);
    justify-self: start;
    align-self: start;
    position: sticky; top: 2.5rem;
  }
}

.block-body > p { margin: 0; max-width: var(--measure); }
.block-body > p + p { margin-top: 1em; }

/* Principles */
.principles { list-style: none; margin: 0; padding: 0; }
.principles li + li { margin-top: clamp(2.75rem, 5vw, 4rem); }
.principles h3 {
  margin: 0 0 0.85rem;
  font-weight: 500;
  font-size: clamp(1.75rem, 3.4vw, 2.75rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  max-width: 20ch;
  text-transform: lowercase;
}
.principles p { margin: 0; max-width: var(--measure); }

/* Work */
.work { margin: 0; }
.work > div {
  display: grid;
  grid-template-columns: minmax(0, 14rem) minmax(0, 1fr);
  gap: 0.4rem 2.25rem;
  padding: 1.75rem 0;
  border-top: 2px solid var(--paper-line);
}
.work > div:first-child { border-top: 0; padding-top: 0.25rem; }
.work dt {
  font-weight: 600;
  font-size: 1.1875rem;
  line-height: 1.3;
  padding-top: 0.1em;
}
.work dd { margin: 0; max-width: var(--measure); }
.result {
  display: block;
  position: relative;
  margin-top: 0.75rem;
  padding-left: 1.4rem;
  font-weight: 500;
}
.result::before {
  content: ""; position: absolute; left: 0; top: 0.5em;
  width: 0.65rem; height: 0.65rem; border-radius: 50%;
  background: var(--signal);
}

.block-body > .context {
  margin: 0 0 2.25rem;
  color: var(--paper-dim);
  font-size: 1.0625rem;
}

/* Outside work: one paper sheet in the sequence */
.sheet { background: var(--paper); color: var(--black); }
.sheet h2 { color: rgba(16, 20, 23, 0.55); }
.sheet > .wrap { border-top: 0 !important; }
.sheet .block-body > p { font-size: clamp(1.3rem, 2vw, 1.6rem); line-height: 1.45; max-width: 36rem; }

/* Contact: the signal */
.signal { background: var(--signal); color: var(--black); }
.signal > .wrap { border-top: 0 !important; }
.signal h2 { color: rgba(16, 20, 23, 0.6); }
.signal a { text-decoration-color: var(--black); }
.signal :focus-visible { outline-color: var(--black); }

.contact-mail {
  display: inline-block;
  margin-top: 2rem;
  font-weight: 500;
  font-size: clamp(2rem, 6vw, 4.5rem);
  line-height: 1;
  letter-spacing: -0.03em;
  text-decoration-thickness: 0.06em;
  text-underline-offset: 0.16em;
  word-break: break-word;
}
.where { margin-top: 1.75rem !important; font-size: 1.0625rem; }

footer { position: relative; z-index: 1; background: var(--black); color: var(--paper-dim); }
footer .wrap {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.75rem 2rem;
  padding-top: 1.75rem; padding-bottom: 2rem;
  font-size: 0.9375rem;
}
footer a { text-decoration: none; }
footer a:hover { text-decoration: underline; text-decoration-color: var(--signal); }

/* ---------- Small screens ---------- */
@media (max-width: 899px) {
  body { font-size: 1.125rem; }
  .block > .wrap { grid-template-columns: 1fr; gap: 1.75rem; }
  .work > div { grid-template-columns: 1fr; }
  .hero { padding-top: 10.5rem; }
  .disc { width: 9rem; top: 1rem; right: -1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .disc, .bar, .was, .was::after, .now, .intro, .previously { animation: none; }
  .was { color: var(--paper-dim); }
  .was::after { transform: scaleX(1); }
  .now { clip-path: none; }
}
