@font-face {
  font-family: "Public Sans";
  src: url("fonts/public-sans.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* Colours: monochrome. a = top panel, b = bottom panel, rails/spark = the lit seam. */
:root {
  --bg: #000000;
  --a1: #1c1c1c; --a2: #050505; --a-glow: #ffffff; --a-glow-op: 0.06;
  --b1: #ffffff; --b2: #ededed; --b3: #d4d4d4; --b-sheen: #ffffff; --b-sheen-op: 0.3;
  --b-shadow: rgba(255, 255, 255, 0.12);
  --top-text: #f5f5f5; --top-muted: #8f8f8f; --mark: #ffffff;
  --bottom-text: #0a0a0a; --bottom-soft: #4a4a4a;
  --rail-a: rgba(160, 160, 160, 0.6); --rail-b: rgba(255, 255, 255, 0.95);
  --spark: #ffffff; --glow: rgba(255, 255, 255, 1); --glow-soft: rgba(200, 200, 200, 0.5);
}

:root {
  --gutter: clamp(20px, 4vw, 64px);
  --font: "Public Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { background: var(--bg); color-scheme: dark; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  color: var(--top-text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection { background: var(--b2); color: var(--bottom-text); }

h1, h2, p { margin: 0; }
a { color: inherit; }
sup { font-size: 0.6em; vertical-align: 0.7em; line-height: 0; }

:focus-visible { outline: 2px solid var(--mark); outline-offset: 4px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

/* Stage: one screen, split by the Z seam.
   --yt / --yb: heights of the two horizontal cuts; --x1: where the diagonal starts; --g: half the gap (px). */
.stage {
  --yt: 38%;
  --yb: 58%;
  --x1: 60%;
  --g: 9;
  --type: min(7vw, 10.5vh);
  --pad: clamp(18px, 3vh, 34px);

  position: relative;
  height: 100svh;
  min-height: 560px;
  overflow: hidden;
}

.seam { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.s-a1 { stop-color: var(--a1); }
.s-a2 { stop-color: var(--a2); }
.s-aglow { stop-color: var(--a-glow); stop-opacity: var(--a-glow-op); }
.s-b1 { stop-color: var(--b1); }
.s-b2 { stop-color: var(--b2); }
.s-b3 { stop-color: var(--b3); }
.s-bsheen { stop-color: var(--b-sheen); stop-opacity: var(--b-sheen-op); }
.seam .s-clear { stop-opacity: 0; }
.piece-b { filter: drop-shadow(0 -6px 30px var(--b-shadow)); }

/* Lit edges along both sides of the seam, with a spark running along each */
.trace path { fill: none; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.trace .rail { stroke: var(--rail-a); stroke-width: 1.5px; filter: drop-shadow(0 0 6px var(--glow-soft)); }
.trace .rail-b { stroke: var(--rail-b); }
.trace .spark { display: none; }

/* Header, inside the top panel */
.top {
  position: absolute; top: 0; left: var(--gutter); right: var(--gutter); z-index: 2;
  padding-top: clamp(20px, 4vh, 40px);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand {
  display: inline-flex; align-items: center; gap: 12px;
  font-weight: 750; font-size: 1.2rem; letter-spacing: -0.03em; text-decoration: none;
}
.brand-mark { width: 24px; height: 24px; color: var(--mark); }


/* The headline, split by the seam */
.line {
  position: absolute;
  font-size: var(--type);
  font-weight: 850;
  line-height: 0.95;
  letter-spacing: -0.045em;
}
.line-a { left: var(--gutter); bottom: calc(100% - var(--yt) + var(--pad)); color: var(--top-text); }
.line-b { right: var(--gutter); top: calc(var(--yb) + var(--pad)); color: var(--bottom-text); text-align: right; }

/* Small note in the pocket beside the diagonal */
.note {
  position: absolute; right: var(--gutter);
  top: calc((var(--yt) + var(--yb)) / 2); transform: translateY(-50%);
  color: var(--top-muted); font-size: 0.85rem; letter-spacing: 0.01em;
}

/* Bottom row, inside the bottom panel */
.bottom {
  position: absolute; left: var(--gutter); right: var(--gutter);
  bottom: clamp(20px, 4.5vh, 44px);
  display: grid; grid-template-columns: repeat(2, minmax(0, 24rem)) 1fr; gap: 32px clamp(32px, 4vw, 64px); align-items: end;
  color: var(--bottom-text);
}
.service h2 { font-size: 1rem; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 2px; }
.service p { color: var(--bottom-soft); font-size: 0.95rem; }
.contact { text-align: right; }
.email {
  font-size: clamp(1.15rem, 1.8vw, 1.6rem); font-weight: 750; letter-spacing: -0.03em; text-decoration: none;
  border-bottom: 2px solid transparent; transition: border-color .2s;
}
.email:hover { border-bottom-color: currentColor; }
.bottom :focus-visible { outline-color: var(--bottom-text); }
.legal { color: var(--bottom-soft); font-size: 0.8rem; margin-top: 4px; }

/* One sequence: panels lock along the diagonal, text appears, then the sparks run */
@media (prefers-reduced-motion: no-preference) {
  .piece-a { animation: lock-a 1100ms cubic-bezier(.16, 1, .3, 1) 150ms both; }
  .piece-b { animation: lock-b 1100ms cubic-bezier(.16, 1, .3, 1) 150ms both; }
  .trace .rail { animation: fade 600ms ease 1000ms both; }
  .reveal { animation: fade 700ms ease 900ms both; }
  .trace .spark {
    display: inline;
    stroke: var(--spark); stroke-width: 3px;
    stroke-dasharray: 8 112; /* one short dash; the long gap keeps a single spark on screen */
    filter: drop-shadow(0 0 4px var(--glow)) drop-shadow(0 0 14px var(--glow-soft));
    animation: spark 5s cubic-bezier(.45, 0, .55, 1) 1400ms 3 both; /* three runs, then rest */
  }
}
@keyframes lock-a { from { transform: translate(64px, -64px); } to { transform: none; } }
@keyframes lock-b { from { transform: translate(-64px, 64px); } to { transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes spark {
  0%   { stroke-dashoffset: 8;    opacity: 0; }
  6%   { opacity: 1; }
  60%  { stroke-dashoffset: -100; opacity: 1; }
  64%, 100% { stroke-dashoffset: -100; opacity: 0; }
}

/* Phones: a taller split, headline on two lines, bottom row stacked */
@media (max-width: 720px) {
  .stage { --yt: 36%; --yb: 47%; --x1: 74%; --g: 6; --type: 10.5vw; min-height: 640px; }
  .line { max-width: 12ch; }
  .note { display: none; }
  .bottom { grid-template-columns: 1fr; gap: 14px; }
  .contact { text-align: left; margin-top: 6px; }
}

/* 404 */
.not-found { min-height: 100vh; display: grid; place-items: center; padding: 24px var(--gutter); text-align: center; }
.not-found .nf-mark { width: 56px; height: 56px; margin: 0 auto 36px; display: block; color: var(--mark); }
.not-found .nf-title { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 650; letter-spacing: -0.04em; line-height: 1.08; }
.not-found .nf-text { color: var(--top-muted); margin: 18px 0 36px; }
.btn {
  display: inline-block; background: var(--b2); color: var(--bottom-text);
  padding: 14px 26px; font-weight: 650; text-decoration: none; transition: background-color .2s;
}
.btn:hover { background: var(--b1); }
