@charset "UTF-8";
/* ==========================================================================
   Pntix — app.css
   A hand-built system: three typefaces with distinct jobs, a warm-paper light
   theme, an ink dark theme, hairline rules instead of drop shadows, and motion
   that only fires where it explains something.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */

:root {
  /* type */
  --display: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --body: "Manrope", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* fluid scale — deliberately uneven so hierarchy is felt, not measured */
  --t-mega: clamp(2.85rem, 1.1rem + 7.4vw, 7.6rem);
  --t-xxl: clamp(2.25rem, 1.2rem + 4.1vw, 4.4rem);
  --t-xl: clamp(1.7rem, 1.15rem + 2.1vw, 2.75rem);
  --t-lg: clamp(1.3rem, 1.05rem + 0.95vw, 1.75rem);
  --t-md: 1.0625rem;
  --t-sm: 0.9375rem;
  --t-xs: 0.8125rem;
  --t-mono: 0.72rem;

  /* rhythm */
  --shell: 1280px;
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --block: clamp(4.5rem, 9vw, 9rem);

  /* radii — mixed on purpose, never one value everywhere */
  --r-xs: 3px;
  --r-sm: 6px;
  --r-lg: 14px;
  --r-pill: 100px;

  /* motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur: 0.55s;

  color-scheme: dark;
}

html[data-theme="dark"] {
  --bg: #0c0f14;
  --bg-alt: #0f1319;
  --surface: #141922;
  --surface-2: #1a212b;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.22);
  --text: #e8ecf2;
  --text-2: #949dab;
  --text-3: #646d7b;
  --accent: #4a76ff;
  --accent-soft: rgba(74, 118, 255, 0.14);
  --accent-ink: #ffffff;
  --signal: #ff7043;
  --grain: 0.045;
  color-scheme: dark;
}

html[data-theme="light"] {
  --bg: #f4f2ec;
  --bg-alt: #eceade;
  --surface: #fbfaf6;
  --surface-2: #f0eee6;
  --line: rgba(18, 22, 28, 0.14);
  --line-strong: rgba(18, 22, 28, 0.32);
  --text: #12161c;
  --text-2: #5b6472;
  --text-3: #8a919c;
  --accent: #0a3ef0;
  --accent-soft: rgba(10, 62, 240, 0.09);
  --accent-ink: #ffffff;
  --signal: #cf4522;
  --grain: 0.03;
  color-scheme: light;
}

/* --------------------------------------------------------------------------
   2. Reset & base
   -------------------------------------------------------------------------- */

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

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
  overflow-x: clip;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: var(--t-md);
  line-height: 1.6;
  font-weight: 400;
  letter-spacing: -0.006em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* `clip`, not `hidden`: hidden turns <body> into a scroll container and
     silently kills every `position: sticky` inside it. */
  overflow-x: clip;
  transition: background-color 0.5s var(--ease), color 0.5s var(--ease);
}

/* Paper grain. Cheap, static, and the single biggest cure for the flat
   "generated" surface look. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: var(--grain);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay;
}

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }

a { color: inherit; text-decoration: none; }

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button { background: none; border: 0; cursor: pointer; }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

::selection { background: var(--accent); color: var(--accent-ink); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--r-xs);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 10000;
  padding: 0.85rem 1.25rem;
  background: var(--accent);
  color: var(--accent-ink);
}
.skip:focus { left: 1rem; top: 1rem; }

/* --------------------------------------------------------------------------
   3. Primitives
   -------------------------------------------------------------------------- */

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.mono-label {
  font-family: var(--mono);
  font-size: var(--t-mono);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-3);
}

.rule {
  height: 1px;
  background: var(--line);
  border: 0;
}

.lede {
  font-size: clamp(1.0625rem, 0.95rem + 0.5vw, 1.3rem);
  line-height: 1.5;
  color: var(--text-2);
  max-width: 46ch;
}

/* Section head: eyebrow + title sharing a hairline. Repeated everywhere so the
   page has one grammar rather than five. */
.sec-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.1rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
  margin-bottom: clamp(2.5rem, 5vw, 4.5rem);
}
.sec-head__title {
  font-size: var(--t-xxl);
  max-width: 20ch;
}
.sec-head__note {
  color: var(--text-2);
  max-width: 42ch;
  font-size: var(--t-sm);
}

@media (min-width: 900px) {
  .sec-head {
    grid-template-columns: 14rem minmax(0, 1fr) 18rem;
    align-items: start;
    gap: 2.5rem;
  }
  .sec-head__note { justify-self: end; }
}

/* Buttons ---------------------------------------------------------------- */

.btn {
  --btn-pad: 0.95rem 1.5rem;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: var(--btn-pad);
  font-family: var(--display);
  font-size: var(--t-sm);
  font-weight: 500;
  letter-spacing: -0.01em;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  white-space: nowrap;
  transition: transform 0.4s var(--ease), background-color 0.3s, color 0.3s, border-color 0.3s;
  will-change: transform;
}
.btn__arrow {
  width: 1.05em;
  height: 1.05em;
  transition: transform 0.4s var(--ease);
}
.btn:hover .btn__arrow { transform: translateX(4px); }

.btn--solid {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}
.btn--solid:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }

.btn--accent {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}
.btn--accent:hover { filter: brightness(1.12); }

.btn--line {
  border-color: var(--line-strong);
  color: var(--text);
}
.btn--line:hover { border-color: var(--text); background: var(--text); color: var(--bg); }

.btn--sm { --btn-pad: 0.6rem 1.05rem; font-size: var(--t-xs); }
.btn--lg { --btn-pad: 1.1rem 1.9rem; font-size: var(--t-md); }
.btn--block { width: 100%; justify-content: center; }

/* Text link with a rule that draws itself in */
.tlink {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 500;
  padding-bottom: 2px;
}
.tlink::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform-origin: right;
  transform: scaleX(0);
  transition: transform 0.45s var(--ease);
}
.tlink:hover::after { transform-origin: left; transform: scaleX(1); }

/* Tag chips */
.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tag {
  font-family: var(--mono);
  font-size: var(--t-mono);
  letter-spacing: 0.06em;
  padding: 0.32rem 0.62rem;
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  color: var(--text-2);
  background: var(--surface);
}

/* --------------------------------------------------------------------------
   4. Masthead
   -------------------------------------------------------------------------- */

.masthead {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 900;
  transition: background-color 0.4s var(--ease), backdrop-filter 0.4s;
}
.masthead::before {
  content: "";
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}
.masthead.is-stuck::before { opacity: 1; }

.masthead__inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: 76px;
  transition: height 0.4s var(--ease);
}
.masthead.is-stuck .masthead__inner { height: 64px; }

.masthead__rule {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--line);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s var(--ease);
}
.masthead.is-stuck .masthead__rule { transform: scaleX(1); }

/* The original Pntix wordmark: heavy type, blue full stop, slogan underneath. */
.wordmark {
  display: flex;
  flex-direction: column;
  margin-right: auto;
}
.wordmark__text {
  font-family: var(--display);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.05em;
  line-height: 1;
  color: var(--text);
}
.logo-dot {
  color: var(--accent);
  transition: color 0.3s;
}
.wordmark:hover .logo-dot { color: var(--signal); }
.wordmark__slogan {
  font-family: var(--mono);
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-3);
  line-height: 1;
  margin-top: 5px;
}

.masthead__nav { display: none; }
.masthead__nav ul {
  display: flex;
  gap: 1.9rem;
  list-style: none;
  padding: 0;
}
.masthead__nav a {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  font-size: var(--t-sm);
  font-weight: 500;
  color: var(--text-2);
  transition: color 0.3s;
}
.masthead__nav a:hover,
.masthead__nav a[aria-current] { color: var(--text); }
.nav-no {
  font-family: var(--mono);
  font-size: 0.6rem;
  color: var(--accent);
  letter-spacing: 0.08em;
}
.nav-label { position: relative; }
.masthead__nav a:hover .nav-label::after,
.masthead__nav a[aria-current] .nav-label::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -5px;
  width: 100%;
  height: 1px;
  background: currentColor;
}

.masthead__actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.theme-toggle {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text-2);
  transition: color 0.3s, border-color 0.3s, transform 0.5s var(--ease);
}
.theme-toggle:hover { color: var(--text); border-color: var(--line-strong); transform: rotate(25deg); }
.theme-toggle svg { width: 17px; height: 17px; }
html[data-theme="dark"] .ic-sun { display: block; }
html[data-theme="dark"] .ic-moon { display: none; }
html[data-theme="light"] .ic-sun { display: none; }
html[data-theme="light"] .ic-moon { display: block; }

.masthead .btn--solid { display: none; }

.burger {
  position: relative;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
}
.burger span {
  position: absolute;
  left: 11px;
  width: 16px;
  height: 1.5px;
  background: var(--text);
  transition: transform 0.4s var(--ease), opacity 0.25s;
}
.burger span:first-child { transform: translateY(-3px); }
.burger span:last-child { transform: translateY(3px); }
.burger[aria-expanded="true"] span:first-child { transform: rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { transform: rotate(-45deg); }

@media (min-width: 940px) {
  .masthead__nav { display: block; margin-right: 1.5rem; }
  .masthead .btn--solid { display: inline-flex; }
  .burger { display: none; }
}

/* Drawer ----------------------------------------------------------------- */

.drawer {
  position: fixed;
  inset: 0;
  z-index: 899;
  background: var(--bg);
  padding: 108px var(--gutter) 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  clip-path: inset(0 0 100% 0);
  transition: clip-path 0.75s var(--ease);
}
.drawer[hidden] { display: none; }
.drawer.is-open { clip-path: inset(0 0 0 0); }
.drawer nav ul { list-style: none; padding: 0; }
.drawer nav li { overflow: hidden; border-bottom: 1px solid var(--line); }
.drawer nav a {
  display: flex;
  align-items: baseline;
  gap: 0.9rem;
  padding: 1.05rem 0;
  font-family: var(--display);
  font-size: clamp(1.9rem, 9vw, 2.6rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  transform: translateY(105%);
  transition: transform 0.7s var(--ease);
}
.drawer.is-open nav a { transform: translateY(0); }
.drawer.is-open nav li:nth-child(2) a { transition-delay: 0.06s; }
.drawer.is-open nav li:nth-child(3) a { transition-delay: 0.12s; }
.drawer.is-open nav li:nth-child(4) a { transition-delay: 0.18s; }
.drawer__foot {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  opacity: 0;
  transition: opacity 0.5s 0.35s;
}
.drawer__foot a {
  font-family: var(--mono);
  font-size: var(--t-sm);
  letter-spacing: 0.02em;
  color: var(--text-2);
}
.drawer.is-open .drawer__foot { opacity: 1; }
body.is-locked { overflow: hidden; }

/* --------------------------------------------------------------------------
   5. Hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  padding-top: clamp(8.5rem, 16vw, 12rem);
  padding-bottom: clamp(3rem, 6vw, 5rem);
  overflow: hidden;
}
.hero__field {
  position: absolute;
  inset: -20% -10% auto -10%;
  height: 130%;
  z-index: -1;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 68px 68px;
  -webkit-mask-image: radial-gradient(115% 78% at 68% 12%, #000 0%, transparent 68%);
  mask-image: radial-gradient(115% 78% at 68% 12%, #000 0%, transparent 68%);
  opacity: 0.85;
}
.hero__glow {
  position: absolute;
  top: -14rem;
  right: -8rem;
  width: min(46rem, 90vw);
  aspect-ratio: 1;
  z-index: -1;
  background: radial-gradient(circle at 50% 50%, var(--accent-soft) 0%, transparent 62%);
  animation: drift 22s var(--ease-in-out) infinite alternate;
}
@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-5rem, 3rem, 0) scale(1.14); }
}

.hero__flag {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.42rem 0.9rem 0.42rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: var(--surface);
  font-family: var(--mono);
  font-size: var(--t-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-2);
  margin-bottom: clamp(1.6rem, 3vw, 2.4rem);
}
.hero__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #35d07f;
  box-shadow: 0 0 0 0 rgba(53, 208, 127, 0.55);
  animation: pulse 2.6s infinite;
}
@keyframes pulse {
  70% { box-shadow: 0 0 0 8px rgba(53, 208, 127, 0); }
  100% { box-shadow: 0 0 0 0 rgba(53, 208, 127, 0); }
}

.hero__title {
  font-size: var(--t-mega);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 0.94;
  max-width: 15ch;
}
.hero__title em {
  font-style: normal;
  color: var(--accent);
}
.hero__title .swap {
  display: inline-block;
  position: relative;
}

.hero__bottom {
  display: grid;
  gap: 2.2rem;
  margin-top: clamp(2rem, 4vw, 3.2rem);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

@media (min-width: 860px) {
  .hero__bottom {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.85fr);
    align-items: end;
    gap: 3.5rem;
  }
}

/* Live console panel — real content, not decoration */
.hero__panel {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(6px);
  overflow: hidden;
}
.hero__panel-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: var(--t-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
}
.hero__panel-rows { padding: 0.35rem 0; }
.hero__panel-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.52rem 0.9rem;
  font-family: var(--mono);
  font-size: var(--t-xs);
}
.hero__panel-row span:first-child { color: var(--text-3); }
.hero__panel-row span:last-child { color: var(--text); }
.hero__panel-row b { color: var(--accent); font-weight: 500; }

/* --------------------------------------------------------------------------
   6. Marquee
   -------------------------------------------------------------------------- */

.strip {
  padding: clamp(2.2rem, 4vw, 3.4rem) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.strip__head {
  margin-bottom: 1.4rem;
}
.marquee {
  display: flex;
  gap: 3.5rem;
  width: max-content;
  will-change: transform;
  /* No-JS fallback. Once app.js takes over it adds .is-js and drives the
     transform on a rAF loop instead — changing an animation's duration while it
     is running makes it jump, which is what the stutter on scroll was. */
  animation: slide 42s linear infinite;
}
.marquee.is-js { animation: none; }
.strip:hover .marquee { animation-play-state: paused; }
@keyframes slide { to { transform: translateX(-50%); } }
.marquee__item {
  display: flex;
  align-items: center;
  gap: 3.5rem;
  font-family: var(--display);
  font-size: clamp(1rem, 2vw, 1.35rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text-3);
  white-space: nowrap;
  transition: color 0.3s;
}
.marquee__item:hover { color: var(--text); }
.marquee__item::after {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.55;
}

/* --------------------------------------------------------------------------
   7. Metrics
   -------------------------------------------------------------------------- */

.metrics {
  display: grid;
  gap: 0;
  border-bottom: 1px solid var(--line);
}
.metric {
  padding: clamp(1.8rem, 4vw, 2.8rem) 0;
  border-top: 1px solid var(--line);
}
.metric:first-child { border-top: 0; }
.metric__value {
  font-family: var(--display);
  font-size: clamp(2.6rem, 5.5vw, 4.2rem);
  font-weight: 500;
  letter-spacing: -0.05em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.metric__label {
  margin-top: 0.7rem;
  color: var(--text-2);
  font-size: var(--t-sm);
  max-width: 24ch;
}
.metric__note {
  margin-top: 0.5rem;
  font-family: var(--mono);
  font-size: var(--t-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

@media (min-width: 720px) {
  .metrics {
    grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid var(--line);
  }
  .metric {
    border-top: 0;
    border-left: 1px solid var(--line);
    padding-inline: clamp(1.2rem, 3vw, 2.4rem);
  }
  .metric:first-child { border-left: 0; padding-left: 0; }
}

/* --------------------------------------------------------------------------
   8. Capabilities — expanding rows, not four identical cards
   -------------------------------------------------------------------------- */

.section { padding-block: var(--block); }
.section--alt { background: var(--bg-alt); }

.caps { border-top: 1px solid var(--line); }

.cap {
  border-bottom: 1px solid var(--line);
}
.cap__head {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr) 2.5rem;
  align-items: center;
  gap: 1rem;
  width: 100%;
  padding: clamp(1.3rem, 2.6vw, 1.9rem) 0;
  text-align: left;
  transition: color 0.3s;
}
.cap__no {
  font-family: var(--mono);
  font-size: var(--t-mono);
  letter-spacing: 0.1em;
  color: var(--text-3);
  transition: color 0.3s;
}
.cap__title {
  font-size: var(--t-xl);
  font-weight: 500;
  transition: transform 0.5s var(--ease);
}
.cap__lede {
  display: none;
  color: var(--text-2);
  font-size: var(--t-sm);
}
.cap__sign {
  position: relative;
  justify-self: end;
  width: 20px;
  height: 20px;
}
.cap__sign::before,
.cap__sign::after {
  content: "";
  position: absolute;
  inset: 50% 0 auto 0;
  height: 1.5px;
  background: var(--text-2);
  transition: transform 0.45s var(--ease), background-color 0.3s;
}
.cap__sign::after { transform: rotate(90deg); }
.cap.is-open .cap__sign::after { transform: rotate(0deg); }
.cap.is-open .cap__sign::before,
.cap.is-open .cap__sign::after { background: var(--accent); }
.cap:hover .cap__no { color: var(--accent); }
.cap:hover .cap__title { transform: translateX(6px); }
.cap.is-open .cap__title { color: var(--accent); }

.cap__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.6s var(--ease);
}
.cap.is-open .cap__panel { grid-template-rows: 1fr; }
.cap__panel > div { overflow: hidden; }
.cap__body {
  display: grid;
  gap: 1.2rem;
  padding: 0 0 2rem;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s 0.1s, transform 0.5s 0.1s var(--ease);
}
.cap.is-open .cap__body { opacity: 1; transform: none; }
.cap__body p { color: var(--text-2); max-width: 62ch; }

@media (min-width: 800px) {
  .cap__head { grid-template-columns: 4.5rem minmax(0, 20rem) minmax(0, 1fr) 2.5rem; }
  .cap__lede { display: block; }
  .cap__body { padding-left: 4.5rem; }
}

/* --------------------------------------------------------------------------
   9. Featured work
   -------------------------------------------------------------------------- */

.work-lead {
  display: grid;
  gap: clamp(2rem, 4vw, 3rem);
}

.shot {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--surface);
  transform-style: preserve-3d;
  transition: transform 0.8s var(--ease), border-color 0.4s;
}
.shot:hover { border-color: var(--line-strong); }
.shot img {
  width: 100%;
  transition: transform 1.1s var(--ease);
}
.shot:hover img { transform: scale(1.022); }
.shot__chrome {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 0.9rem;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.shot__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--line-strong);
}
.shot__url {
  margin-left: 0.5rem;
  font-family: var(--mono);
  font-size: var(--t-mono);
  color: var(--text-3);
  letter-spacing: 0.04em;
}
.shot__live {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--mono);
  font-size: var(--t-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-2);
}
.shot__live i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #35d07f;
  animation: pulse 2.6s infinite;
}

/* ---- Scrolling browser frame -------------------------------------------
   A real full-page capture inside a real scroll container. It follows the
   page as you scroll past it, and you can grab it and scrub it yourself. */

.browser {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--surface);
  transition: border-color 0.4s;
}
.browser:hover { border-color: var(--line-strong); }

.browser__view {
  position: relative;
  height: clamp(300px, 52vh, 560px);
  overflow-y: auto;
  overflow-x: hidden;
  /* auto, not contain: once the inner capture reaches its end the page keeps
     scrolling, so a touch inside the frame never traps the visitor */
  overscroll-behavior-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
  cursor: grab;
  -webkit-user-select: none;
  user-select: none;
}
.browser__view.is-grabbing { cursor: grabbing; }
.browser__view::-webkit-scrollbar { width: 8px; }
.browser__view::-webkit-scrollbar-track { background: transparent; }
.browser__view::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 99px;
  border: 2px solid transparent;
  background-clip: content-box;
}
.browser__view::-webkit-scrollbar-thumb:hover { background: var(--text-3); background-clip: content-box; }

.browser__page {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
}

/* Progress rail down the right edge of the chrome bar */
.browser__rail {
  position: relative;
  height: 2px;
  background: var(--line);
}
.browser__rail span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.12s linear;
}

.browser__hint {
  position: absolute;
  right: 14px;
  bottom: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.36rem 0.7rem;
  border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: var(--t-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-2);
  pointer-events: none;
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
.browser__hint svg { width: 13px; height: 13px; animation: nudge 2.4s var(--ease-in-out) infinite; }
@keyframes nudge {
  0%, 100% { transform: translateY(-2px); }
  50% { transform: translateY(2px); }
}
.browser.is-touched .browser__hint { opacity: 0; transform: translateY(6px); }

.browser__wrap { position: relative; }

@media (prefers-reduced-motion: reduce) {
  .browser__hint svg { animation: none; }
}

.work-meta { display: grid; gap: 1.6rem; align-content: start; }
.work-meta__title {
  font-size: var(--t-xxl);
  letter-spacing: -0.045em;
}
.work-facts {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}
.work-facts div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.72rem 0;
  border-bottom: 1px solid var(--line);
  font-size: var(--t-sm);
}
.work-facts dt { color: var(--text-3); font-family: var(--mono); font-size: var(--t-mono); letter-spacing: 0.12em; text-transform: uppercase; }
.work-facts dd { margin: 0; text-align: right; }

@media (min-width: 1000px) {
  .work-lead {
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
    gap: 3.5rem;
    align-items: center;
  }
}

/* Empty-slot card: honest about there being one project, not padded with
   invented ones. */
.slot {
  margin-top: clamp(2.5rem, 5vw, 4rem);
  display: grid;
  gap: 1.2rem;
  padding: clamp(1.6rem, 3vw, 2.4rem);
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-lg);
  align-items: center;
}
.slot h3 { font-size: var(--t-lg); font-weight: 500; }
.slot p { color: var(--text-2); font-size: var(--t-sm); max-width: 52ch; }
@media (min-width: 800px) {
  .slot { grid-template-columns: minmax(0, 1fr) auto; column-gap: 2.5rem; }
  .slot > .btn { grid-row: span 2; }
}

/* --------------------------------------------------------------------------
   10. Process
   -------------------------------------------------------------------------- */

.steps {
  display: grid;
  gap: 0;
  counter-reset: step;
}
.step {
  position: relative;
  padding: clamp(1.6rem, 3vw, 2.2rem) 0;
  border-top: 1px solid var(--line);
}
.step:last-child { border-bottom: 1px solid var(--line); }
.step__no {
  font-family: var(--mono);
  font-size: var(--t-mono);
  letter-spacing: 0.14em;
  color: var(--accent);
}
.step__title {
  font-size: var(--t-lg);
  font-weight: 500;
  margin: 0.55rem 0 0.6rem;
}
.step__body { color: var(--text-2); font-size: var(--t-sm); max-width: 40ch; }

@media (min-width: 860px) {
  .steps { grid-template-columns: repeat(4, 1fr); border-left: 1px solid var(--line); }
  .step {
    border-top: 1px solid var(--line);
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding-inline: clamp(1rem, 2vw, 1.6rem);
  }
  .step:last-child { border-bottom: 1px solid var(--line); }
}

/* --------------------------------------------------------------------------
   11. Team
   -------------------------------------------------------------------------- */

.team {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  gap: clamp(1.2rem, 2.5vw, 2rem);
}
.person { display: grid; gap: 0.8rem; }
/* stagger the columns so the row is not a perfect ruler line */
@media (min-width: 760px) {
  .person:nth-child(2) { margin-top: 2.4rem; }
  .person:nth-child(3) { margin-top: 1.1rem; }
  .person:nth-child(4) { margin-top: 3.1rem; }
  .person:nth-child(5) { margin-top: 0.6rem; }
}
.person__frame {
  position: relative;
  aspect-ratio: 1 / 1.14;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.person__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.04);
  transform: scale(1.02);
  transition: filter 0.6s var(--ease), transform 0.9s var(--ease);
}
.person:hover .person__frame img { filter: grayscale(0); transform: scale(1.06); }

/* Generated avatars — abstract geometry, never a real face. */
.avatar {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  filter: saturate(0.55);
  transform: scale(1.01);
  transition: filter 0.6s var(--ease), transform 0.9s var(--ease);
}
.person:hover .avatar { filter: saturate(1); transform: scale(1.05); }
.person__tag {
  position: absolute;
  left: 0.6rem;
  bottom: 0.6rem;
  padding: 0.22rem 0.5rem;
  border-radius: var(--r-xs);
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.person__name { font-family: var(--display); font-size: var(--t-md); font-weight: 500; letter-spacing: -0.02em; }
.person__role { font-size: var(--t-xs); color: var(--text-2); }

/* --------------------------------------------------------------------------
   12. Booking
   -------------------------------------------------------------------------- */

.book { background: var(--bg-alt); }
.book__grid { display: grid; gap: clamp(2.5rem, 5vw, 4rem); }
@media (min-width: 980px) {
  .book__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 27rem); gap: 5rem; }
}

.book__title { font-size: var(--t-xxl); max-width: 14ch; }
.book__note { margin-top: 1.3rem; }

.contact-list { margin-top: 2.4rem; display: grid; gap: 0; border-top: 1px solid var(--line); }
.contact-list a,
.contact-list span {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
  font-size: var(--t-sm);
  color: var(--text-2);
  transition: color 0.3s, padding-left 0.4s var(--ease);
}
.contact-list a:hover { color: var(--text); padding-left: 0.5rem; }
.contact-list svg { width: 17px; height: 17px; flex: none; color: var(--accent); }

.form {
  padding: clamp(1.4rem, 3vw, 2.2rem);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
}
.form__title { font-size: var(--t-lg); font-weight: 500; }
.form__sub { font-size: var(--t-xs); color: var(--text-3); margin-top: 0.3rem; margin-bottom: 1.6rem; }

.field { position: relative; margin-bottom: 1.05rem; }
.field label {
  display: block;
  font-family: var(--mono);
  font-size: var(--t-mono);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 0.42rem;
}
.field input,
.field select {
  width: 100%;
  padding: 0.78rem 0.9rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-size: var(--t-sm);
  transition: border-color 0.3s, box-shadow 0.3s, background-color 0.3s;
}
.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 15px;
  padding-right: 2.2rem;
}
.field input:focus,
.field select:focus {
  outline: 0;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field.has-error input,
.field.has-error select { border-color: var(--signal); }
.field__err {
  display: block;
  margin-top: 0.35rem;
  font-size: var(--t-xs);
  color: var(--signal);
  min-height: 0;
}
.field--half { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.hp { position: absolute; left: -9999px; opacity: 0; }

.form__submit { margin-top: 1.3rem; }
.spinner {
  width: 15px;
  height: 15px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.form__status {
  margin-top: 0.9rem;
  font-size: var(--t-xs);
  color: var(--signal);
  min-height: 1.1em;
}

/* Success state replaces the form in place */
.form__done {
  display: none;
  text-align: left;
}
.form.is-done .form__body { display: none; }
.form.is-done .form__done { display: block; }
.tick {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  display: grid;
  place-items: center;
  margin-bottom: 1.1rem;
}
.tick svg { width: 22px; height: 22px; }
.tick path {
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
  animation: draw 0.7s 0.15s var(--ease) forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }

/* --------------------------------------------------------------------------
   13. Inner pages
   -------------------------------------------------------------------------- */

.page-top {
  padding-top: clamp(7.5rem, 14vw, 10.5rem);
  padding-bottom: clamp(2rem, 4vw, 3.5rem);
  border-bottom: 1px solid var(--line);
}
.page-top__crumb {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1.4rem;
}
.page-top__crumb a { color: var(--text-3); transition: color 0.3s; }
.page-top__crumb a:hover { color: var(--accent); }
.page-top__title { font-size: var(--t-xxl); max-width: 18ch; }
.page-top__lede { margin-top: 1.2rem; }

.prose { max-width: 68ch; }
.prose h2 {
  font-size: var(--t-xl);
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  margin-bottom: 0.9rem;
  letter-spacing: -0.035em;
}
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: var(--t-lg); margin-top: 2rem; margin-bottom: 0.6rem; }
.prose p { color: var(--text-2); margin-bottom: 1.05rem; }
.prose ul, .prose ol { color: var(--text-2); padding-left: 1.2rem; margin-bottom: 1.05rem; }
.prose li { margin-bottom: 0.45rem; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.prose strong { color: var(--text); font-weight: 600; }

/* Case study layout */
.case-grid { display: grid; gap: clamp(2.5rem, 5vw, 4rem); }
@media (min-width: 1000px) {
  .case-grid { grid-template-columns: minmax(0, 1fr) 17rem; gap: 4.5rem; align-items: start; }
  .case-aside { position: sticky; top: 106px; }
}
/* Inside the case grid the column already limits the measure, so let the
   figures use its full width while the prose keeps a readable line length. */
.case-grid .prose { max-width: none; }
.case-grid .prose > p,
.case-grid .prose > ul,
.case-grid .prose > ol,
.case-grid .prose > h2,
.case-grid .prose > h3 { max-width: 66ch; }

.case-aside { display: grid; gap: 1.6rem; }
.results { display: grid; gap: 0; border-top: 1px solid var(--line); }
.results div {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}
.results dt {
  font-family: var(--mono);
  font-size: var(--t-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 0.25rem;
}
.results dd { margin: 0; font-family: var(--display); font-size: var(--t-md); font-weight: 500; }

.figure { margin: clamp(2rem, 4vw, 3rem) 0; }
.figure img { border: 1px solid var(--line); border-radius: var(--r-sm); width: 100%; }
.figure figcaption {
  margin-top: 0.7rem;
  font-size: var(--t-xs);
  color: var(--text-3);
  font-family: var(--mono);
  max-width: 60ch;
}

/* 404 */
.oops {
  min-height: 100svh;
  display: grid;
  place-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  padding: 8rem 0 4rem;
}
.oops__code {
  font-family: var(--display);
  font-size: clamp(6rem, 24vw, 16rem);
  font-weight: 700;
  line-height: 0.85;
  letter-spacing: -0.06em;
  margin: 0.5rem 0;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--text-3);
  background: linear-gradient(180deg, var(--accent-soft), transparent 70%);
  -webkit-background-clip: text;
  background-clip: text;
}
.oops__title { font-size: var(--t-xl); margin: 1.4rem 0 0.8rem; }

/* --------------------------------------------------------------------------
   14. Footer
   -------------------------------------------------------------------------- */

.footer {
  border-top: 1px solid var(--line);
  padding-top: clamp(3rem, 6vw, 5rem);
  padding-bottom: 2rem;
}

/* Brand block ------------------------------------------------------------- */

.footer__brand {
  display: grid;
  gap: 2.5rem;
  padding-bottom: clamp(2.5rem, 5vw, 3.5rem);
  border-bottom: 1px solid var(--line);
}

/* Solid, not outlined: white on the dark theme, near-black on the light one. */
.footer__logotype {
  font-family: var(--display);
  font-size: clamp(3.2rem, 11vw, 6.5rem);
  font-weight: 700;
  letter-spacing: -0.06em;
  line-height: 0.82;
  color: var(--text);
}
.footer__logotype .logo-dot { color: var(--accent); }

.footer__line {
  margin-top: 1.1rem;
  color: var(--text-2);
  font-size: var(--t-sm);
}

.footer__reach {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}
.footer__mail {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--display);
  font-size: clamp(1.15rem, 2.4vw, 1.6rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--text);
  border-bottom: 1px solid var(--line);
  padding-bottom: 4px;
  transition: color 0.3s, border-color 0.3s;
}
.footer__mail svg { width: 0.72em; height: 0.72em; transition: transform 0.4s var(--ease); }
.footer__mail:hover { color: var(--accent); border-color: var(--accent); }
.footer__mail:hover svg { transform: translate(3px, -3px); }

.footer__clock {
  color: var(--text-3);
  letter-spacing: 0.12em;
  text-wrap: balance;
}
.footer__clock span {
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}

/* Link columns ------------------------------------------------------------ */

.footer__cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.2rem 1.5rem;
  padding-block: clamp(2.5rem, 5vw, 3.5rem);
}
.footer__col h3 { margin-bottom: 1rem; }
.footer__col ul { list-style: none; padding: 0; display: grid; gap: 0.6rem; }
.footer__col a {
  font-size: var(--t-sm);
  color: var(--text-2);
  transition: color 0.3s, padding-left 0.35s var(--ease);
}
.footer__col a:hover { color: var(--accent); padding-left: 0.35rem; }
.footer__col address {
  font-style: normal;
  font-size: var(--t-sm);
  color: var(--text-2);
  line-height: 1.75;
}
.footer__reg {
  margin-top: 0.9rem;
  font-size: var(--t-xs);
  color: var(--text-3);
  line-height: 1.7;
  max-width: 30ch;
}

.footer__bottom {
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.8rem;
  font-size: var(--t-xs);
  color: var(--text-3);
}

@media (min-width: 760px) {
  .footer__cols { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem; }
}

@media (min-width: 900px) {
  .footer__brand {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 3rem;
  }
  .footer__reach { align-items: flex-end; text-align: right; }
}

}

/* --------------------------------------------------------------------------
   15. Motion
   -------------------------------------------------------------------------- */

/* Line-by-line mask reveal for headings */
.line { display: block; overflow: hidden; }
.line > span {
  display: block;
  transform: translateY(105%);
  transition: transform 0.95s var(--ease);
}
.is-in .line > span { transform: translateY(0); }
.is-in .line:nth-child(2) > span { transition-delay: 0.08s; }
.is-in .line:nth-child(3) > span { transition-delay: 0.16s; }
.is-in .line:nth-child(4) > span { transition-delay: 0.24s; }

/* Generic reveal, used sparingly */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
[data-reveal].is-in { opacity: 1; transform: none; }
[data-reveal][data-delay="1"] { transition-delay: 0.09s; }
[data-reveal][data-delay="2"] { transition-delay: 0.18s; }
[data-reveal][data-delay="3"] { transition-delay: 0.27s; }
[data-reveal][data-delay="4"] { transition-delay: 0.36s; }

/* A rule that draws itself as it enters view */
[data-draw] {
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1s var(--ease);
}
[data-draw].is-in { transform: scaleX(1); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  [data-reveal],
  .line > span { opacity: 1 !important; transform: none !important; }
  .marquee { animation: none; }
}

/* --------------------------------------------------------------------------
   16. Utilities
   -------------------------------------------------------------------------- */

.stack-sm > * + * { margin-top: 0.75rem; }
.stack > * + * { margin-top: 1.5rem; }
.center { text-align: center; }
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.figure-note {
  margin-top: 0.7rem;
  font-family: var(--mono);
  font-size: var(--t-xs);
  color: var(--text-3);
  max-width: 60ch;
}

/* --------------------------------------------------------------------------
   17. Extra polish
   -------------------------------------------------------------------------- */

/* Reading progress — a hairline that fills across the top of the masthead.
   Genuinely useful on the long case study, invisible until you start moving. */
.progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 2px;
  z-index: 901;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  will-change: transform;
}

/* Pointer spotlight. Each card tracks the cursor in --mx/--my and lifts a
   faint wash of the accent under it. Barely there, but the surface stops
   feeling like flat paint. */
.cap,
.form,
.browser,
.step,
.slot {
  position: relative;
}
.cap::before,
.form::before,
.browser::before,
.step::before,
.slot::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s var(--ease);
  background: radial-gradient(
    22rem circle at var(--mx, 50%) var(--my, 50%),
    var(--accent-soft),
    transparent 62%
  );
}
.cap:hover::before,
.form:hover::before,
.browser:hover::before,
.step:hover::before,
.slot:hover::before { opacity: 1; }
.cap > *,
.form > *,
.step > *,
.slot > * { position: relative; z-index: 1; }
.browser > * { position: relative; z-index: 1; }

/* Scramble: mono eyebrows resolve out of noise the first time you reach them.
   One pass, ~450ms, then it never fires again. */
[data-scramble] { white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
  .progress { display: none; }
  .cap::before,
  .form::before,
  .browser::before,
  .step::before,
  .slot::before { display: none; }
}

/* --------------------------------------------------------------------------
   18. Page transition
   -------------------------------------------------------------------------- */

/* The page fades in on arrival and out on the way to the next one, so an
   internal link stops feeling like a hard cut. Anything without JS, or with
   reduced motion on, just navigates normally. */
/* IMPORTANT: never animate `transform` on <body>. An animation that applies a
   transform — even an identity one, even after it has finished, when the fill
   mode keeps it in effect — makes <body> the containing block for every
   `position: fixed` child, which silently breaks the masthead, the progress
   bar, the cursor and the link peek. Body fades; <main> does the movement. */

body.is-leaving {
  opacity: 0;
  transition: opacity 0.26s var(--ease-in-out);
}

html.is-arriving main {
  /* `backwards`, not `both`: the start value applies before the animation runs
     and nothing is left in effect once it has. */
  animation: arrive 0.55s var(--ease) backwards;
}
@keyframes arrive {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   19. Sticky case-study headings
   -------------------------------------------------------------------------- */

.case-sec { margin-top: clamp(2.5rem, 5vw, 3.5rem); }
.case-sec:first-of-type { margin-top: 0; }

.case-sec__h {
  position: sticky;
  top: 72px;
  z-index: 2;
  display: flex;
  align-items: baseline;
  gap: 0.85rem;
  margin: 0 0 0.6rem;
  /* The solid part has to be taller than the text, or the paragraph scrolling
     underneath shows through the heading. */
  padding: 1rem 0 1.35rem;
  font-size: var(--t-xl);
  letter-spacing: -0.035em;
  background: linear-gradient(
    to bottom,
    var(--bg) 0%,
    var(--bg) 84%,
    transparent 100%
  );
}
.case-sec__no {
  flex: none;
  font-family: var(--mono);
  font-size: var(--t-mono);
  letter-spacing: 0.14em;
  color: var(--accent);
  transform: translateY(-0.35em);
}
/* The sticky heading must not swallow the paragraph that follows it. */
.case-sec > p:first-of-type { margin-top: 0; }

@media (max-width: 700px) {
  .case-sec__h { top: 60px; font-size: var(--t-lg); }
}

/* --------------------------------------------------------------------------
   20. Link peek — hover a live link, see where it goes
   -------------------------------------------------------------------------- */

.peek {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 950;
  width: 260px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--surface);
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.55);
  overflow: hidden;
  opacity: 0;
  transform: translate3d(0, 0, 0) scale(0.94);
  transform-origin: top left;
  pointer-events: none;
  transition: opacity 0.28s var(--ease), transform 0.38s var(--ease);
}
.peek.is-on { opacity: 1; }
.peek__bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.55rem;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  color: var(--text-3);
}
.peek__bar i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #35d07f;
  flex: none;
}
.peek__crop {
  height: 168px;
  overflow: hidden;
}
.peek__crop img {
  width: 100%;
  display: block;
}

/* --------------------------------------------------------------------------
   21. Cursor
   -------------------------------------------------------------------------- */

/* A ring that trails the pointer and a dot that does not. Desktop only, and
   only when the visitor has not asked for reduced motion.
   To switch it off entirely: delete the `cursorRing()` call in assets/js/app.js. */

html.has-cursor,
html.has-cursor body,
html.has-cursor a,
html.has-cursor button { cursor: none; }

/* Text entry and the draggable frame keep their real cursors — you need them. */
html.has-cursor input,
html.has-cursor select,
html.has-cursor textarea { cursor: auto; }
html.has-cursor .browser__view { cursor: grab; }
html.has-cursor .browser__view.is-grabbing { cursor: grabbing; }

.cursor-ring,
.cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9998;
  pointer-events: none;
  border-radius: 50%;
  will-change: transform;
}
.cursor-ring {
  width: 30px;
  height: 30px;
  margin: -15px 0 0 -15px;
  border: 1px solid var(--line-strong);
  transition: width 0.32s var(--ease), height 0.32s var(--ease),
              margin 0.32s var(--ease), border-color 0.32s, background-color 0.32s;
}
.cursor-dot {
  width: 5px;
  height: 5px;
  margin: -2.5px 0 0 -2.5px;
  background: var(--accent);
  transition: opacity 0.25s;
}
.cursor-ring.is-hot {
  width: 52px;
  height: 52px;
  margin: -26px 0 0 -26px;
  border-color: var(--accent);
  background: var(--accent-soft);
}
.cursor-ring.is-hot ~ .cursor-dot { opacity: 0; }
.cursor-ring.is-down { transform-origin: center; }

@media (prefers-reduced-motion: reduce) {
  body.is-leaving { opacity: 1; transition: none; }
  html.js-ready.is-arriving body { animation: none; }
  .case-sec__h { position: static; background: none; }
  .peek { display: none; }
  .cursor-ring, .cursor-dot { display: none; }
}
