/* Nodens: black, crimson, blood red, villain orange. One face (Erode). Square corners, flat colour, no rules. */

@font-face { font-family: "Erode"; font-weight: 400; font-style: normal; font-display: swap; src: url("/fonts/erode-400.woff2") format("woff2"); }
@font-face { font-family: "Erode"; font-weight: 500; font-style: normal; font-display: swap; src: url("/fonts/erode-500.woff2") format("woff2"); }
@font-face { font-family: "Erode"; font-weight: 600; font-style: normal; font-display: block; src: url("/fonts/erode-600.woff2") format("woff2"); }

:root {
  --black: #0a0505;
  --black-2: #170b0b;
  --ink: #f5eeec;
  --soft: #d6c8c4;
  --crimson: #c4122f;
  --blood: #7f0a14;
  --orange: #ff6a1a;
  --orange-hi: #ff8a45;
  --on-orange: #0a0505;
  --on-orange-soft: #3b1708;

  --margin: clamp(16px, 2vw, 28px);

  /* five type steps */
  --small: clamp(0.875rem, 0.85rem + 0.1vw, 0.9375rem);
  --body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --lead: clamp(1.375rem, 1.1rem + 1vw, 1.875rem);
  --head: clamp(2rem, 1.3rem + 3.2vw, 4rem);
  --title: clamp(3.5rem, 11vw, 10rem);

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: clip;
  background: var(--black);
  color: var(--ink);
  font: 400 var(--body) / 1.55 "Erode", Georgia, "Times New Roman", serif;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, p, dl, dd, ul { margin: 0; }
ul { padding: 0; list-style: none; }

a { color: inherit; text-underline-offset: 0.22em; text-decoration-thickness: 1px; transition: color 0.2s; }
a:hover { color: var(--orange); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; }

.wrap { padding-inline: var(--margin); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: var(--margin); top: -80px; z-index: 50; background: var(--orange); color: var(--on-orange); padding: 0.6em 1em; text-decoration: none; font-weight: 600; }
.skip:focus { top: var(--margin); color: var(--on-orange); }

.btn {
  display: inline-block;
  background: var(--orange);
  color: var(--on-orange);
  padding: 0.85em 1.6em;
  font-weight: 600;
  text-decoration: none;
  border-radius: 0;
  transition: transform 0.2s var(--ease), background 0.2s;
}
.btn:hover { background: var(--orange-hi); color: var(--on-orange); transform: translateY(-3px); }
.btn:active { transform: translateY(1px); }

/* ---------- reveal (script adds .js; content stays visible without it) ---------- */
.js .rv { opacity: 0; transform: translateY(26px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.js .rv.in { opacity: 1; transform: none; }

/* ---------- the monument ---------- */
/* Erode 600 "NODENS": ink is 3.4726em wide and 0.6406em tall, so font-size = ink width / 3.4726 */
.name {
  --w: calc(100vw - var(--sbw, 0px) - 2 * var(--margin));
  margin: 0; color: var(--crimson);
  font-family: "Erode", Georgia, serif; font-weight: 600; letter-spacing: 0;
  font-size: calc(var(--w) / 3.4726);
  line-height: 0.64; padding-bottom: 0.06em; text-transform: uppercase;
  white-space: nowrap; text-align: center;
}

/* ---------- hero ---------- */
.hero {
  min-height: 100svh;
  padding: var(--margin);
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto 1fr auto;
  column-gap: 24px;
  background: var(--black);
}
.hero .tl, .hero .tr, .hero .bl, .hero .br { position: relative; z-index: 2; }
.hero .tl { grid-column: 1; grid-row: 1; max-width: 36ch; font-size: var(--body); padding-top: 4px; }
.hero .tl p + p { margin-top: 20px; }
.hero .tr { grid-column: 2; grid-row: 1; justify-self: end; display: flex; gap: 28px; font-size: var(--small); padding-top: 6px; }
.hero .tr a { text-decoration: none; }
.hero .tr a:hover { text-decoration: underline; }
.hero .name {
  --w: min(100vw - var(--sbw, 0px) - 2 * var(--margin), max(46vw, (100svh - 340px) * 5.42));
  grid-column: 1 / -1; grid-row: 2;
  align-self: center; justify-self: center;
  transform-origin: 50% 50%;
  will-change: transform;
}
.hero .bl .mark { display: inline-block; width: 28px; height: 28px; vertical-align: middle; margin: -6px 10px -6px 0; mix-blend-mode: lighten; }
.hero .bl { grid-column: 1; grid-row: 3; font-size: var(--small); color: var(--soft); align-self: end; }
.hero .br { grid-column: 2; grid-row: 3; justify-self: end; display: flex; gap: 28px; font-size: var(--small); align-self: end; }
.hero .hero-pic { display: none; }
#clock { font-variant-numeric: tabular-nums; }

/* ---------- blocks ---------- */
.block { padding-block: clamp(96px, 13vw, 200px); }
.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(12px, 1.4vw, 20px); }

/* stats */
.stats .list { grid-column: 2 / 8; }
.stats h2 { font-size: var(--lead); font-weight: 500; line-height: 1.1; margin: 0 0 56px 156px; }
.fig { display: grid; grid-template-columns: 132px minmax(0, 1fr); column-gap: 24px; align-items: baseline; margin-bottom: 28px; }
.fig dt { font-size: var(--lead); font-weight: 500; text-align: right; font-variant-numeric: lining-nums tabular-nums; line-height: 1.2; }
.fig dd { color: var(--soft); max-width: 40ch; }
.stats .hand { grid-column: 9 / 12; margin-top: 80px; align-self: start; }
.stats .hand img { width: 100%; max-width: 338px; height: auto; mix-blend-mode: screen; }

/* how it works */
.how .grid { row-gap: clamp(72px, 9vw, 140px); }
.duo { position: relative; isolation: isolate; background: var(--field, var(--crimson)); overflow: hidden; }
.duo img { width: 100%; height: 100%; object-fit: cover; mix-blend-mode: multiply; transform: scale(1.08); will-change: transform; }
.how .intro { grid-column: 6 / 13; grid-row: 1; align-self: start; }
.how h2 { font-size: var(--head); font-weight: 500; line-height: 1; letter-spacing: -0.03em; max-width: 12ch; margin-bottom: 48px; }
.how .step p { max-width: 36ch; }
.how .step strong { font-weight: 600; color: var(--ink); }
.how .step p { color: var(--soft); }
.how .intro .step { max-width: 36ch; }
.how .p1 { grid-column: 1 / 5; grid-row: 1; aspect-ratio: 3 / 4; --field: var(--crimson); }
.how .p2 { grid-column: 5 / 9; grid-row: 2; aspect-ratio: 1 / 1; --field: var(--orange); }
.how .t2 { grid-column: 9 / 13; grid-row: 2; align-self: start; }
.how .t3 { grid-column: 2 / 6; grid-row: 3; align-self: start; }
.how .p3 { grid-column: 7 / 13; grid-row: 3; aspect-ratio: 16 / 10; --field: var(--blood); }
.how .p3 img { filter: brightness(1.8); }

/* skills (the torn stage) */
.skills { background: var(--black); }
.skills .stage-h { font-size: var(--lead); font-weight: 500; position: absolute; top: 32px; left: 32px; z-index: 6; line-height: 1.1; }
.proj { position: relative; height: 100svh; overflow: hidden; }
.pane { position: absolute; top: 0; bottom: 0; width: 50%; overflow: hidden; background: var(--field); opacity: var(--o, 1); }
.pane.l { left: 0; }
.pane.r { right: 0; }
.pane img { width: 100%; height: 100%; object-fit: cover; mix-blend-mode: multiply; filter: brightness(var(--lift, 1)); }
.pane::after { content: ""; position: absolute; inset: 0; background: rgba(10, 5, 5, 0.26); }
.pane.native { background: var(--black); }
.pane.native img { mix-blend-mode: normal; filter: none; }
.pane.native::after { background: rgba(10, 5, 5, 0.22); }
.label { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: max-content; max-width: 100%; z-index: 4; opacity: var(--o, 1); display: grid; justify-items: center; text-align: center; padding-inline: var(--margin); }
.tt {
  position: relative; margin: 0;
  font-size: var(--title); font-weight: 600; line-height: 0.8; letter-spacing: -0.04em; text-transform: uppercase;
  white-space: nowrap; color: var(--ink);
  /* a transparent box tall enough to hold both torn halves, so the title is one hit target while it travels */
  padding-block: 34svh; margin-block: -34svh;
}
.tt .a { display: block; will-change: transform; clip-path: inset(0 50% 0 0); transform: translate3d(0, var(--tl, 0px), 0); }
.tt::after { content: attr(data-t); content: attr(data-t) / ""; position: absolute; inset: 0; display: block; will-change: transform; clip-path: inset(0 0 0 50%); transform: translate3d(0, var(--tr, 0px), 0); }
.meta { margin-top: 32px; font-size: var(--body); line-height: 1.4; }
.meta strong { display: block; font-weight: 600; }
.meta span { display: block; color: var(--ink); }
.meta a { pointer-events: auto; font-weight: 600; }

.js .pin { height: calc(100svh + var(--n) * 95svh); }
.js .stage { position: sticky; top: 0; height: 100svh; overflow: hidden; }
.js .proj { position: absolute; inset: 0; visibility: hidden; }
.js .proj:first-of-type { visibility: visible; }
.stage { position: relative; background: var(--black); }

/* operator (inset panel, arch portrait) */
.operator { padding: 20px; background: var(--black); }
.panel {
  position: relative; overflow: hidden;
  min-height: max(110svh, 820px);
  background: var(--blood);
  padding: 56px;
}
.panel h2 { font-size: var(--head); font-weight: 500; line-height: 1; letter-spacing: -0.03em; max-width: 16ch; position: relative; z-index: 2; }
.arch {
  position: absolute; left: 56px; bottom: 0;
  width: 38vw; aspect-ratio: 4 / 5;
  transform: translateY(20%);
  clip-path: inset(0 round 999px 999px 0 0);
  background: var(--black);
}
.arch img { width: 100%; height: 100%; object-fit: cover; }
.blocks { position: absolute; z-index: 2; top: 56px; left: 53%; right: 56px; display: grid; grid-template-columns: repeat(2, minmax(0, 300px)); column-gap: 64px; row-gap: 32px; align-items: start; }
.blocks h3 { font-size: var(--lead); font-weight: 500; line-height: 1.15; margin-bottom: 12px; }
.blocks p { color: var(--ink); }
.blocks .cta { grid-column: 1 / -1; margin-top: 8px; }
.chain { position: absolute; z-index: 2; left: 53%; right: 56px; bottom: 56px; font-size: var(--lead); line-height: 1.2; font-weight: 500; max-width: 22ch; }

/* contact rows */
.rows > * { display: flex; justify-content: space-between; align-items: baseline; gap: 24px; padding: clamp(28px, 4vw, 56px) var(--margin) clamp(24px, 3vw, 40px); font-size: var(--head); line-height: 1; font-weight: 500; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.rows .note { flex: none; margin-left: auto; font-size: var(--body); font-weight: 400; letter-spacing: 0; line-height: 1.2; color: var(--soft); text-align: right; }
.rows > :nth-child(odd) { background: var(--black); }
.rows > :nth-child(even) { background: var(--black-2); }
.rows a { text-decoration: none; }
.rows a:hover { color: var(--orange); }
.rows .greet { background: var(--crimson); color: var(--ink); align-items: center; }
.rows .greet .note { color: var(--ink); }
.face { flex: none; margin-left: auto; width: 0.95em; aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: var(--black); }
.face img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 24%; }
.round { display: inline-grid; place-items: center; width: 0.9em; height: 0.9em; border-radius: 50%; background: var(--orange); color: var(--on-orange); transition: transform 0.25s var(--ease); flex: none; }
.round svg { width: 46%; height: 46%; }
.rows .greet a { color: inherit; display: flex; align-items: center; gap: 24px; text-decoration: none; }
.rows .greet a:hover { color: inherit; }
.rows .greet a:hover .round { transform: translateX(10px) rotate(-45deg); }

/* footer */
.foot {
  background: var(--orange); color: var(--on-orange);
  min-height: 100svh; padding: 40px var(--margin) 24px;
  display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(120px, 1fr) auto; row-gap: 40px;
}
.foot a { text-decoration-thickness: 1px; }
.foot a:hover { color: var(--on-orange); text-decoration-thickness: 3px; }
.cols4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; font-size: var(--small); line-height: 1.6; }
.cols4 strong { display: block; font-weight: 600; font-size: var(--small); }
.cols4 span, .cols4 li { display: block; color: var(--on-orange-soft); }
.cols4 a { color: var(--on-orange-soft); }
.invite { position: relative; z-index: 2; align-self: end; font-size: var(--lead); line-height: 1.15; font-weight: 500; max-width: 20ch; }
.foot .name { color: var(--on-orange); display: flex; justify-content: center; transform-origin: 50% 100%; will-change: transform; }
.legal { margin-top: 20px; font-size: var(--small); color: var(--on-orange-soft); }
.legal details { margin-bottom: 14px; }
.legal summary { cursor: pointer; color: var(--on-orange); font-weight: 600; }
.legal ul { margin-top: 12px; display: grid; gap: 6px; max-width: 110ch; }
.legal li { display: block; }
.legal a { color: var(--on-orange); }

/* ---------- privacy page ---------- */
.bar .inner { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; padding-block: 20px; }
.bar .wordmark { display: inline-flex; align-items: center; gap: 10px; }
.bar .wordmark img { width: 26px; height: 26px; mix-blend-mode: lighten; margin-block: -6px; }
.bar .wordmark { font-size: var(--lead); font-weight: 600; text-decoration: none; letter-spacing: 0.02em; text-transform: uppercase; color: var(--orange); }
.bar nav { display: flex; gap: 28px; font-size: var(--small); }
.bar nav a { text-decoration: none; }
.bar nav a:hover { text-decoration: underline; }
.bar nav a[aria-current="page"] { color: var(--orange); }
.doc-hero { padding-block: clamp(72px, 12vw, 160px) clamp(56px, 8vw, 110px); }
.doc-hero h1 { font-size: var(--title); font-weight: 600; line-height: 0.9; letter-spacing: -0.04em; color: var(--crimson); max-width: 10ch; }
.doc-hero .inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 48px; align-items: end; }
.doc-hero p { margin-top: 28px; max-width: 34ch; font-size: var(--lead); line-height: 1.3; }
.doc-hero .btn { margin-top: 32px; }
.doc-hero .hand-sm { grid-column: 2; grid-row: 1 / 5; align-self: center; margin: 0; }
.doc-hero .hand-sm img { width: clamp(120px, 18vw, 260px); height: auto; mix-blend-mode: screen; }
.doc-hero .updated { font-size: var(--small); color: var(--soft); margin-top: 20px; }
.doc .band { padding-block: clamp(56px, 8vw, 110px); }
.doc .band:nth-of-type(odd) { background: var(--black-2); }
.cols { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px clamp(24px, 6vw, 96px); }
.cols h2 { font-size: var(--lead); font-weight: 500; line-height: 1.1; max-width: 16ch; }
.cols p + p, .cols p + ul { margin-top: 1em; }
.cols p, .cols ul { max-width: 68ch; }
.cols ul { list-style: disc; padding-left: 1.2em; }
.cols li { margin-bottom: 0.6em; }
.cols strong { font-weight: 600; }

/* ---------- phone ---------- */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; grid-template-rows: auto auto auto auto 1fr; row-gap: 20px; overflow: hidden; }
  .hero .tr { grid-column: 1; grid-row: 1; justify-self: start; flex-wrap: wrap; gap: 8px 20px; }
  .hero .name { grid-row: 2; margin-top: clamp(24px, 6svh, 56px); }
  .hero .tl { grid-column: 1; grid-row: 3; font-size: 1.125rem; }
  .hero .tl .btn { display: block; text-align: center; }
  .hero .bl { grid-column: 1; grid-row: 4; align-self: start; }
  .hero .br { grid-column: 1; grid-row: 4; justify-self: end; align-self: start; display: none; }
  .hero .hero-pic { display: block; grid-row: 5; justify-self: center; align-self: end; width: min(86%, 360px); aspect-ratio: 4 / 5; object-fit: cover; object-position: top; margin-bottom: -22%; }

  .stats .list { grid-column: 1 / -1; }
  .stats h2 { margin-left: 112px; font-size: var(--lead); }
  .fig { grid-template-columns: 88px minmax(0, 1fr); column-gap: 20px; }
  .stats .hand { grid-column: 1 / -1; margin-top: 56px; justify-self: end; width: 56%; }

  .how .p1 { grid-column: 1 / -1; grid-row: auto; }
  .how .intro { grid-column: 1 / -1; grid-row: auto; order: -1; }
  .how h2 { margin-bottom: 28px; }
  .how .p1 { width: 100%; }
  .how .p2 { grid-column: 4 / -1; grid-row: auto; }
  .how .t2 { grid-column: 1 / -1; grid-row: auto; }
  .how .p3 { grid-column: 1 / 11; grid-row: auto; }
  .how .t3 { grid-column: 1 / -1; grid-row: auto; order: 5; }
  .how .grid { row-gap: 40px; }

  .skills .stage-h { top: 20px; left: 16px; }
  .tt { font-size: 12.5vw; }
  .meta { margin-top: 20px; }

  .operator { padding: 10px; }
  .panel { padding: 24px; min-height: 0; }
  .blocks { position: static; margin-top: 32px; grid-template-columns: 1fr; }
  .chain { position: static; margin-top: 32px; }
  .arch { position: relative; left: auto; bottom: auto; width: 86%; margin: 48px auto -22%; transform: none; }

  .cols4 { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 32px; }
  .cols { grid-template-columns: 1fr; }
  .doc-hero .inner { grid-template-columns: 1fr; }
  .doc-hero .hand-sm { grid-column: 1; grid-row: auto; justify-self: end; margin-top: 24px; }
  .rows > * { font-size: clamp(1.75rem, 8.6vw, 2.4rem); }
  .rows .mail a { font-size: clamp(1.2rem, 6.1vw, 1.6rem); }
  .foot { min-height: 0; row-gap: 48px; }
}

@media (max-width: 860px) {
  .rows .note { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .rv { opacity: 1; transform: none; transition: none; }
  .btn, .round { transition: none; }
}
