/* World Wyss Web
   Direction: the name as a monument (seed 398061845). Type: Imbue / Albert Sans. Colour: soot and lime. */

@font-face {
  font-family: 'Imbue';
  src: url('assets/fonts/imbue.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Albert Sans';
  src: url('assets/fonts/albert-sans.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- tokens ---------- */
:root {
  --bg: #0f0f0f;
  --surface: #1a1a1a;
  --ink: #ffffff;
  --muted: #8f8f8f;
  --accent: #dafa9c;
  --accent-ink: #0f0f0f;
  --field-1: #ffffff;  --field-1-ink: #0f0f0f;  --field-1-muted: #5c5c5c;  --field-1-surface: #ececec;
  --field-2: #dafa9c;  --field-2-ink: #0f0f0f;

  /* the three sites' own grounds, sampled from their screenshots */
  --pdf-yellow: #f9e04b;

  --font-display: 'Imbue', 'Didot', 'Bodoni 72', serif;
  --font-text: 'Albert Sans', system-ui, sans-serif;

  --step-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-head: clamp(2rem, 1.7rem + 0.9vw, 2.5rem);
  --step-display: 19.6vw; /* the name, edge to edge on one line */

  --margin: clamp(1rem, 2vw, 2rem);
  --gutter: clamp(0.75rem, 1.6vw, 1.5rem);
  --section: clamp(7.5rem, 13vw, 13.5rem);
  --radius: 0px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.76, 0, 0.24, 1);
  --ease-soft: cubic-bezier(0.33, 1, 0.68, 1);
  --t-press: 140ms;
  --t-hover: 180ms;
  --t-ui: 240ms;
  --t-reveal: 800ms;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-text); font-size: var(--step-body); line-height: 1.55; font-kerning: normal; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
h1, h2, h3, p, figure, ul, dl, dd { margin: 0; }
ul { padding: 0; list-style: none; }
img, canvas { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
:target { scroll-margin-top: 2rem; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
p { text-wrap: pretty; }

.wrap { padding-inline: var(--margin); }

.link { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 0.2em; text-decoration-thickness: 0.07em; transition: text-decoration-color var(--t-hover) ease; }
.link-plain { text-decoration: underline; text-underline-offset: 0.2em; text-decoration-thickness: 0.07em; }
@media (hover: hover) and (pointer: fine) {
  .link:hover { text-decoration-color: currentColor; }
}

.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.3em;
  min-height: 3.25rem; padding: 0 1.5rem;
  background: var(--accent); color: var(--accent-ink);
  border-radius: var(--radius); text-decoration: none; white-space: nowrap; font-weight: 500;
  transition: transform var(--t-press) var(--ease-out), background-color var(--t-ui) ease, color var(--t-ui) ease;
}
.button:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) {
  .button:hover { transform: translateY(-2px); }
  .button:active { transform: scale(0.97); }
}

.field-light { background: var(--field-1); color: var(--field-1-ink); --muted: var(--field-1-muted); --surface: var(--field-1-surface); }
.field-lime { background: var(--field-2); color: var(--field-2-ink); }

.display-type {
  font-family: var(--font-display); font-weight: 400; text-transform: uppercase;
  font-size: var(--step-display); line-height: 0.86; letter-spacing: -0.02em; white-space: nowrap;
}

/* ---------- hero: the name pinned over the three sites ---------- */
.hero {
  --c-bg: var(--bg); --c-ink: var(--ink); --c-muted: var(--muted);
  position: relative;
}
.hero[data-chapter="1"] { --c-bg: var(--pdf-yellow); --c-ink: #0f0f0f; --c-muted: #4a4220; }
.hero[data-chapter="2"] { --c-bg: #ececec; --c-ink: #0f0f0f; --c-muted: #525252; }
.js .hero.is-pinned { height: 280svh; }

.hero-pin {
  position: sticky; top: 0;
  height: 100svh; min-height: 34rem; overflow: hidden;
  background: var(--c-bg); color: var(--c-ink);
  transition: background-color 600ms var(--ease-soft), color 600ms var(--ease-soft);
}

.nav {
  position: absolute; z-index: 4; top: 1.25rem; left: var(--margin); right: var(--margin);
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: var(--step-small); line-height: 1.4;
}
.wordmark { font-weight: 700; text-decoration-thickness: 0.09em; }
.nav-links { display: flex; gap: clamp(1rem, 2vw, 1.75rem); font-weight: 500; }

.monument {
  position: absolute; z-index: 2; left: 0; right: 0; top: 6.25rem;
  text-align: center;
  font-family: var(--font-display); font-weight: 400; text-transform: uppercase;
  font-size: var(--step-display); line-height: 0.86; letter-spacing: -0.02em; white-space: nowrap;
  pointer-events: none;
}
.monument .word { display: inline-block; }

/* the site sits under the name, never behind it, and runs off the bottom edge */
.portraits {
  position: absolute; z-index: 1; left: 0; right: 0;
  top: calc(6.25rem + 1.03 * var(--step-display) + 1rem); /* clears the face's full glyph box, not only the line box */
  margin-inline: auto;
  width: min(36vw, 36rem); aspect-ratio: 2 / 3;
  background: var(--surface);
}
.portrait { position: absolute; inset: 0; display: block; overflow: hidden; opacity: 0; pointer-events: none; transition: opacity 700ms var(--ease-soft); }
.portrait.is-on { opacity: 1; pointer-events: auto; }
.portrait img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }

.hero-foot {
  position: absolute; z-index: 3; left: var(--margin); right: var(--margin); bottom: 2rem;
  display: flex; justify-content: space-between; align-items: flex-end; gap: 1.5rem;
}
.hero-say { max-width: min(26ch, 27vw); }
.hero-line { font-weight: 700; line-height: 1.4; }
.hero-caption { margin-top: 0.6rem; font-size: var(--step-small); color: var(--c-muted); transition: color 600ms var(--ease-soft); }
.hero[data-chapter="1"] .hero-action,
.hero[data-chapter="2"] .hero-action { background: #0f0f0f; color: var(--accent); }

/* ---------- projects ---------- */
/* continues the last chapter's grey, so the white screenshots read as panels */
.work { padding-block: var(--section); background: var(--field-1-surface); --surface: #ffffff; }
.section-head {
  font-family: var(--font-display); font-weight: 400; text-transform: uppercase;
  font-size: var(--step-head); line-height: 1; letter-spacing: 0;
}

.work-grid {
  --col: calc((100vw - 2 * var(--margin) - 11 * var(--gutter)) / 12);
  --name-h: 2.25rem;
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter);
  margin-top: clamp(3rem, 6vw, 6rem);
}
.project-name { height: var(--name-h); font-family: var(--font-text); font-size: var(--step-small); font-weight: 500; line-height: 1.4; color: var(--muted); }
.project-name a { color: var(--field-1-ink); }
.project-pic { display: block; overflow: hidden; background: var(--surface); }
.project-pic img { width: 100%; height: 100%; object-fit: cover; object-position: top left; transition: transform 700ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .project-pic:hover img { transform: scale(1.025); }
}
.pic-3x2 { aspect-ratio: 3 / 2; }
.pic-16x9 { aspect-ratio: 16 / 9; }
.pic-4x5 { aspect-ratio: 4 / 5; }
.project-text { margin-top: 1rem; max-width: 46ch; }

.project-a { grid-column: 1 / 7; grid-row: 1; }
.project-b {
  grid-column: 9 / 13; grid-row: 1 / span 2;
  /* starts 80px above where the first picture ends, so the two overlap in height */
  margin-top: calc(var(--name-h) + (6 * var(--col) + 5 * var(--gutter)) / 1.5 - 5rem);
}
.remark { grid-column: 2 / 6; grid-row: 2; align-self: center; font-size: var(--step-lead); line-height: 1.35; max-width: 31ch; padding-block: 4rem; }
.project-c { grid-column: 3 / 10; grid-row: 3; margin-top: clamp(8rem, 24vh, 16rem); }

/* the live thing: clickforart's effects on its own sample */
.effect-stage { position: relative; overflow: hidden; background: #0f0f0f; }
.effect-source, .effect-canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.effect-canvas { visibility: hidden; }
.effect.is-live .effect-canvas { visibility: visible; }
.effect-controls { display: none; margin-top: 1rem; }
.effect.is-live .effect-controls { display: block; }
.effect-ask { font-size: var(--step-small); color: var(--muted); }
.effect-buttons { display: flex; flex-wrap: wrap; gap: 0.375rem; margin-top: 0.625rem; }
.chip {
  min-height: 2.75rem; padding: 0 0.95rem;
  background: var(--surface); color: var(--field-1-ink);
  font-size: var(--step-small); font-weight: 500; border-radius: var(--radius);
  transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease, color var(--t-hover) ease;
}
.chip:active { transform: scale(0.95); }
.chip[aria-pressed="true"] { background: var(--field-1-ink); color: var(--field-1); }
@media (hover: hover) and (pointer: fine) {
  .chip:not([aria-pressed="true"]):hover { background: #dcdcdc; }
}
.effect-link { display: inline-block; margin-top: 0.875rem; }

/* ---------- marquee ---------- */
.marquee { overflow: hidden; padding-block: clamp(1.5rem, 3vw, 3rem) clamp(1rem, 2.2vw, 2.25rem); }
.marquee-track { display: flex; width: max-content; }
.marquee-run {
  font-family: var(--font-display); font-weight: 400; text-transform: uppercase;
  font-size: var(--step-display); line-height: 0.86; letter-spacing: -0.02em; white-space: nowrap;
  padding-right: 0.4em;
}

/* ---------- about ---------- */
.about { padding-block: var(--section); }
.about-grid {
  display: grid;
  grid-template-columns: calc(34vw - var(--margin)) minmax(0, 1fr);
  row-gap: 7.5rem;
}
.facts { display: grid; gap: 1.25rem; align-content: start; font-size: var(--step-small); line-height: 1.4; }
.facts dt { color: var(--muted); }
.facts dd { font-weight: 500; }
.about-text { font-size: var(--step-lead); line-height: 1.35; max-width: 56vw; }
.tools-word { font-size: var(--step-small); color: var(--muted); }
.tools { display: flex; flex-wrap: wrap; gap: 2.5rem 4rem; }
.tool-list { width: 16.25rem; display: grid; gap: 0.625rem; }
.tool-site { font-weight: 700; margin-bottom: 0.375rem; }

/* ---------- footer ---------- */
.footer { padding-block: clamp(4rem, 8vw, 7.5rem) 2rem; overflow: hidden; }
.footer-name {
  max-width: none; text-align: center; margin-inline: calc(var(--margin) * -1);
  font-family: var(--font-display); font-weight: 400; text-transform: uppercase;
  font-size: var(--step-display); line-height: 0.86; letter-spacing: -0.02em; white-space: nowrap;
}
.footer-row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); margin-top: 4.5rem; }
.footer-sites { grid-column: 1 / 7; display: grid; gap: 0.5rem; font-size: var(--step-head); line-height: 1.15; color: var(--accent); }
.footer-links { grid-column: 9 / 13; display: grid; gap: 0.5rem; align-content: start; font-size: var(--step-small); }
.footer-legal { display: flex; justify-content: space-between; gap: 1rem; margin-top: 6rem; font-size: var(--step-small); color: var(--muted); }
.footer-legal a { color: var(--ink); }

/* ---------- imprint ---------- */
.imprint-head { padding-top: 1.25rem; }
.nav-static { position: static; }
.imprint-title {
  margin-top: clamp(4rem, 10vw, 9rem);
  font-family: var(--font-display); font-weight: 400; text-transform: uppercase;
  font-size: var(--step-display); line-height: 0.86; letter-spacing: -0.02em; white-space: nowrap;
}
.imprint { padding-block: clamp(4rem, 7vw, 7rem) var(--section); }
.imprint-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: 3rem; }
.imprint-block { grid-column: span 4; }
.imprint-label { font-family: var(--font-text); font-size: var(--step-small); font-weight: 500; color: var(--muted); margin-bottom: 0.75rem; }
.imprint-address { font-size: var(--step-lead); line-height: 1.35; font-style: normal; }
.imprint-note p { max-width: 40ch; }
.footer-small { padding-block: 2rem; }
.footer-small .footer-legal { margin-top: 0; }

/* ---------- tablet and phone: the hero stacks ---------- */
@media (max-width: 63.99em) {
  .hero-pin { --chrome: calc(13.75rem + 1.03 * var(--step-display)); display: flex; flex-direction: column; padding: 1rem var(--margin); min-height: 0; }
  .nav { position: static; }
  .monument { position: relative; top: auto; margin-top: 1.5rem; }
  .portraits {
    position: relative; top: auto; flex: none;
    width: min(100%, calc((100svh - var(--chrome)) * 2 / 3));
    margin: calc(0.17 * var(--step-display) + 0.5rem) auto 0;
  }
  .hero-foot { position: static; margin-top: 1rem; flex-wrap: wrap; gap: 0.875rem 1.5rem; }
  .hero-say { max-width: 34ch; }
  .hero-action { margin-left: auto; }
}

/* ---------- phone ---------- */
@media (max-width: 47.99em) {
  :root { --step-display: 19.4vw; }

  .hero-pin { --chrome: calc(15.65rem + 1.03 * var(--step-display)); }
  .nav-links { gap: 1rem; }
  .hero-say { flex-basis: 100%; }

  .work-grid { display: block; }
  .project + .project, .remark + .project { margin-top: 4.5rem; }
  /* widths alternate against the margins; the live one gets the full width for thumbs */
  .project-a { width: 82%; }
  .project-b { width: 100%; margin-top: 4.5rem; }
  .project-c { width: 68%; margin-left: auto; margin-top: 4.5rem; }
  .remark { max-width: none; padding-block: 0; margin-top: 4.5rem; }
  .effect-buttons { gap: 0.375rem; }
  .chip { flex: 1 1 auto; padding: 0 0.6rem; }

  .about-grid { grid-template-columns: 1fr 1fr; row-gap: 2.5rem; column-gap: var(--gutter); }
  .about-text { grid-column: 1 / -1; order: -1; max-width: none; font-size: 1.1875rem; }
  .facts { grid-column: 1 / -1; grid-template-columns: 1fr 1fr; gap: 1rem var(--gutter); font-size: 0.875rem; }
  .tools-word { display: none; }
  .tools { grid-column: 1 / -1; flex-direction: column; gap: 2.5rem; }
  .tool-list { width: auto; }

  .footer-row { display: grid; grid-template-columns: 1fr; margin-top: 3rem; row-gap: 2.5rem; }
  .footer-sites, .footer-links { grid-column: 1 / -1; }
  .footer-legal { margin-top: 3.5rem; }

  .imprint-block { grid-column: 1 / -1; }
}

/* ---------- motion (content stays visible without JavaScript) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js [data-rise] { opacity: 0; transform: translateY(28px); animation: rise 900ms var(--ease-out) forwards; animation-delay: calc(var(--i, 0) * 90ms + 100ms); }
  .js .portraits[data-rise] { transform: translateY(48px); animation-duration: 1200ms; }
  .js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity 700ms var(--ease-out), transform 900ms var(--ease-out); transition-delay: calc(var(--i, 0) * 80ms); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }

  /* the picture of each site settles as it arrives */
  .portrait img { transform: scale(1.08); transform-origin: top center; transition: transform 2400ms var(--ease-soft); }
  .portrait.is-on img { transform: none; }

  /* signature move: the three addresses travel edge to edge */
  .marquee-track { animation: marquee 46s linear infinite; }
  .marquee:hover .marquee-track, .marquee.is-off .marquee-track { animation-play-state: paused; }

  .effect-canvas.is-fresh { animation: settle 520ms var(--ease-out); }
}
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes settle { from { opacity: 0.35; transform: scale(1.03); } to { opacity: 1; transform: none; } }
