/* Treyson Peirce portfolio. Design system distilled from the pixel-name hero cover. */

:root {
  --canvas: #EBEEF2;
  --canvas-alt: #F4F6F9;
  --text: #14161A;
  --muted: #7A7D82;
  --body: #4A4D52;
  --statement-tail: #8B8E93;
  --accent: #E77740;
  --accent-deep: #DB5F24;
  --lav: #9295AB;
  --lav-tint: #C7C8D1;
  --hero-field: #CBCED3;
  --surface: #FFFFFF;
  --hairline: #D5D9E0;
  --dark: #14161A;
  --dark-text: #EBEEF2;
  --font: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--canvas);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
  position: relative;
}

.section { padding: 120px 0; }
.section-alt { background: var(--canvas-alt); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--text);
  color: var(--dark-text);
  padding: 10px 16px;
  z-index: 100;
}
.skip-link:focus { left: 0; }

/* ---------- Nav ---------- */

.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 68px;
  z-index: 50;
  transition: background 200ms ease, box-shadow 200ms ease;
}
.nav.scrolled {
  background: rgba(235, 238, 242, 0.82);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--hairline);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
  height: 68px;
  display: flex;
  align-items: center;
  gap: 32px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
  margin-right: auto;
}
.monogram { width: 32px; height: 20px; fill: currentColor; display: block; }
.wordmark { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }

.nav-links { display: flex; gap: 28px; }
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.005em;
  color: var(--text);
  text-decoration: none;
  position: relative;
}
.nav-links a::after,
.footer-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: -3px;
  width: 100%; height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 220ms ease;
}
.nav-links a:hover::after,
.footer-link:hover::after { transform: scaleX(1); }

.btn-cta {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 20px;
  background: var(--text);
  color: var(--dark-text);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  border-radius: 2px;
  transition: background 160ms ease;
}
.btn-cta:hover { background: var(--accent-deep); }


/* ---------- Hero ---------- */

.hero {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
  max-height: 100vh;
  min-height: 560px;
  background: var(--hero-field);
  overflow: hidden;
}
.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 45%;
}
.hero-overlay {
  position: relative;
  height: 100%;
  z-index: 2;
}
.hero-intro {
  position: absolute;
  bottom: 6%;
  right: 40px;
  max-width: 320px;
  animation: fadeUp 400ms cubic-bezier(.22,.61,.36,1) both;
  animation-delay: calc(var(--i, 0) * 80ms + 150ms);
}
.hero-greeting {
  font-size: 20px;
  font-weight: 600;
  font-style: italic;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}
.hero-blurb {
  font-size: 13px;
  line-height: 1.5;
  color: var(--body);
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Eyebrow ---------- */

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 40px;
}
.eyebrow::before {
  content: "";
  width: 6px; height: 6px;
  background: var(--accent);
  flex: none;
}

/* ---------- About ---------- */

.about-grid {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 56px;
  align-items: start;
}
.about-hi {
  font-size: 18px;
  font-weight: 600;
  font-style: italic;
  letter-spacing: -0.01em;
  color: var(--muted);
  margin-bottom: 14px;
}
.about-head {
  font-size: clamp(28px, 3.6vw, 44px);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  margin: 0;
}
.about-copy p {
  font-size: 18px;
  line-height: 1.65;
  color: var(--body);
  margin-bottom: 18px;
  max-width: 62ch;
}
.about-copy p:last-child { margin-bottom: 0; }
.about-copy strong { color: var(--text); font-weight: 600; }

.corner-stair {
  position: absolute;
  top: -60px;
  right: 48px;
  width: 8px; height: 8px;
  background: var(--lav-tint);
  box-shadow: 8px 0 0 var(--lav-tint), 16px 0 0 var(--lav-tint),
              16px 8px 0 var(--lav-tint), 24px 8px 0 var(--lav-tint),
              24px 16px 0 var(--lav-tint);
  pointer-events: none;
}

/* ---------- Stats ---------- */

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--hairline);
  margin-top: 72px;
}
.stat { padding: 32px 32px 8px 0; }
.stat + .stat { border-left: 1px solid var(--hairline); padding-left: 32px; }
.stat-num {
  font-size: clamp(30px, 4vw, 40px);
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  margin-bottom: 6px;
}
.stat-label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--muted);
}

/* ---------- Experience ---------- */

.xp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 40px;
}
.xp-head .eyebrow { margin-bottom: 0; }
.xp-resume {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 2px;
  white-space: nowrap;
  transition: color 160ms ease, border-color 160ms ease;
}
.xp-resume:hover { color: var(--accent-deep); border-color: var(--accent-deep); }
.xp-resume .ext { font-size: 12px; color: var(--accent); }

/* Timeline scale: proportional segments, pins under the nav while the section scrolls */
.tl-track-wrap {
  position: sticky;
  top: 68px;
  z-index: 3;
  padding: 14px 0 10px;
  margin-bottom: 28px;
  background: rgba(244, 246, 249, 0.92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--hairline);
}
.tl-orgs { position: relative; height: 16px; margin-bottom: 10px; }
.tl-orgs span {
  position: absolute; top: 0;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.tl-orgs b { font-weight: 600; }
.tl-short { display: none; }
.tl-track { display: flex; gap: 3px; height: 10px; }
.tl-seg {
  border: 0; padding: 0; margin: 0;
  height: 100%;
  border-radius: 1px;
  cursor: pointer;
  background: var(--hairline);
  opacity: 0.5;
  transition: opacity 180ms ease, transform 180ms ease;
}
/* Compressed span: four undergraduate years drawn short so the career keeps its true scale */
.tl-seg-comp { background: repeating-linear-gradient(90deg, var(--lav-tint) 0 5px, transparent 5px 9px); margin-right: 4px; }
.tl-seg-efsj { background: var(--lav); }
.tl-seg-at { background: var(--accent); }
.tl-seg:hover, .tl-seg.is-active { opacity: 1; transform: scaleY(1.6); }
.tl-seg:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.tl-years { position: relative; height: 16px; margin-top: 10px; }
.tl-years span {
  position: absolute; top: 0;
  transform: translateX(-50%);
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.tl-live {
  position: absolute;
  right: 0; top: 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  transition: opacity 160ms ease;
}
.tl-live-when { color: var(--muted); }
.tl-live-org {
  color: var(--accent-deep);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-right: 10px;
  vertical-align: 1px;
}

/* Timeline body: dates, spine, content */
.tl-body { position: relative; }
.tl-spine {
  position: absolute;
  left: 243px; top: 0; bottom: 0;
  width: 2px;
  background: var(--hairline);
}
.tl-fill { position: absolute; left: 0; top: 0; width: 100%; height: 0; background: var(--accent); transition: height 120ms linear; }
.tl-list { list-style: none; }
.tl-ghead {
  display: grid;
  grid-template-columns: 200px 40px 1fr;
  gap: 0 24px;
  padding: 72px 0 4px;
}
.tl-list > .tl-ghead:first-child { padding-top: 12px; }
.tl-gmark {
  grid-column: 2;
  justify-self: center;
  width: 12px; height: 12px;
  margin-top: 9px;
  background: var(--accent);
  outline: 4px solid var(--canvas-alt);
}
.tl-gbody { grid-column: 3; display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; }
.tl-gname {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--accent-deep);
  margin: 0;
}
.tl-gspan { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.tl-node {
  display: grid;
  grid-template-columns: 200px 40px 1fr;
  gap: 0 24px;
  padding: 44px 0;
}
.tl-when {
  grid-column: 1;
  text-align: right;
  font-size: 14px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  padding-top: 6px;
  transition: color 180ms ease;
}
.tl-mark {
  grid-column: 2;
  justify-self: center;
  width: 10px; height: 10px;
  margin-top: 8px;
  background: var(--lav-tint);
  outline: 4px solid var(--canvas-alt);
  transition: background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}
.tl-node.is-active .tl-mark { background: var(--accent); transform: scale(1.2); box-shadow: 0 0 0 5px rgba(231, 119, 64, 0.16); }
.tl-node.is-active .tl-when { color: var(--text); }
.tl-content { grid-column: 3; max-width: 66ch; }
.tl-role { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
.tl-org { font-size: 15px; color: var(--muted); margin: 6px 0 18px; }
.tl-summary { font-size: 16px; line-height: 1.65; color: var(--body); margin-bottom: 18px; }
.tl-points { list-style: none; }
.tl-points li {
  font-size: 15px;
  line-height: 1.65;
  color: var(--body);
  padding-left: 18px;
  position: relative;
  margin-bottom: 12px;
}
.tl-points li::before {
  content: "";
  position: absolute;
  left: 0; top: 10px;
  width: 4px; height: 4px;
  background: var(--accent);
}
.tl-points strong { color: var(--text); font-weight: 600; }
.tl-node-edu .tl-summary { margin-bottom: 0; }

/* ---------- Divider glyph ---------- */

.divider-glyph {
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 56px 0 0;
  background: var(--canvas);
}
.divider-glyph span { width: 6px; height: 6px; background: var(--hairline); }
.divider-glyph .accent { background: var(--accent); }

/* ---------- Selected Work ---------- */

.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: 2px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}
.card:hover {
  transform: translateY(-3px);
  border-color: var(--text);
  box-shadow: 0 6px 18px rgba(20, 22, 26, 0.07);
}
.card-index {
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  margin-bottom: 14px;
  transition: color 180ms ease;
}
.card:hover .card-index { color: var(--accent-deep); }
.card h3 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}
.card h3 a { color: inherit; text-decoration: none; transition: color 160ms ease; }
.card h3 a:hover { color: var(--accent-deep); }
.card .ext { font-size: 15px; color: var(--accent); font-style: normal; }

/* Case study card: the whole card is the link */
.card-link { position: relative; }
.card-link .card-primary::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.card-link:hover { border-color: var(--accent); }
.card-index { display: flex; align-items: center; }
.card-flag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-deep);
}
.card-flag i { width: 6px; height: 6px; background: var(--accent); }
.card-more {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--hairline);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.card-more a { color: var(--text); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; transition: color 160ms ease; }
.card-more .arrow { color: var(--accent); transition: transform 180ms ease; }
.card-link:hover .card-more a { color: var(--accent-deep); }
.card-link:hover .card-more .arrow { transform: translateX(4px); }
.card-desc {
  font-size: 15px;
  line-height: 1.55;
  color: var(--body);
  margin-bottom: 22px;
}
.tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}
.tags li {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--hairline);
  border-radius: 2px;
  padding: 5px 10px;
}

/* ---------- Capabilities ---------- */

.cap-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 48px;
  max-width: 900px;
}
.cap-heading {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 12px;
}
.cap-col ul { list-style: none; }
.cap-col li {
  font-size: 16px;
  font-weight: 500;
  padding: 14px 0 14px 18px;
  border-bottom: 1px solid var(--hairline);
  position: relative;
}
.cap-col li::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  margin-top: -2px;
  width: 4px; height: 4px;
  background: var(--accent);
}
.cap-note {
  margin-top: 40px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  padding-left: 18px;
  position: relative;
}
.cap-note::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  margin-top: -3px;
  width: 6px; height: 6px;
  background: var(--accent-deep);
}

/* ---------- Contact / Footer ---------- */

.contact {
  background: var(--dark);
  color: var(--dark-text);
  padding: 120px 0 40px;
}
.eyebrow-dark { color: var(--lav); }
.footer-cta {
  font-size: clamp(30px, 6vw, 44px);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.03em;
  max-width: 18ch;
  margin-bottom: 20px;
}
.cta-soft { color: var(--lav); }
.footer-support {
  font-size: 16px;
  line-height: 1.6;
  color: #B9BCC4;
  max-width: 560px;
  margin-bottom: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(260px, 32%, 440px);
  gap: 48px;
  align-items: end;
}
.footer-figure { width: 100%; aspect-ratio: 880 / 761; pointer-events: none; }
.footer-links { display: flex; gap: 36px; flex-wrap: wrap; }
.footer-link {
  color: var(--dark-text);
  font-size: 20px;
  font-weight: 500;
  text-decoration: none;
  position: relative;
}
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid rgba(235, 238, 242, 0.14);
  padding-top: 24px;
  margin-top: 72px;
}
.small-print { font-size: 12px; color: var(--lav); }
.monogram-footer { opacity: 0.4; width: 40px; height: 24px; fill: var(--dark-text); }
.stair-dark { box-shadow: 8px 0 0 #2A2D33, 16px 0 0 #2A2D33, 16px 8px 0 #2A2D33, 24px 8px 0 #2A2D33, 24px 16px 0 #2A2D33; background: #2A2D33; }

/* ---------- Reveal on scroll ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(16px);
}
.js .reveal.in {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 520ms cubic-bezier(.22,.61,.36,1), transform 520ms cubic-bezier(.22,.61,.36,1);
  transition-delay: calc(var(--i, 0) * 60ms);
}

/* ---------- Responsive ---------- */


@media (max-width: 1024px) {
  .about-grid { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 768px) {
  .container, .nav-inner { padding: 0 20px; }
  .section { padding: 72px 0; }
  .nav-links { display: none; }
  .btn-cta { height: 36px; font-size: 13px; padding: 0 16px; }
  .hero { aspect-ratio: auto; height: 82vh; min-height: 520px; }
  .hero-img { object-position: 50% 32%; }
  .hero-intro {
    bottom: 5%;
    left: 20px;
    right: 20px;
    max-width: none;
  }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat + .stat { border-left: none; padding-left: 0; }
  .stat:nth-child(even) { border-left: 1px solid var(--hairline); padding-left: 24px; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--hairline); }
  .tl-long { display: none; }
  .tl-short { display: inline; }
  .tl-years span:nth-child(3), .tl-years span:nth-child(5) { display: none; }
  .tl-spine { left: 11px; }
  .tl-node { grid-template-columns: 24px 1fr; gap: 0 16px; padding: 36px 0; }
  .tl-ghead { grid-template-columns: 24px 1fr; gap: 0 16px; padding: 56px 0 0; }
  .tl-gmark { grid-column: 1; margin-top: 6px; }
  .tl-gbody { grid-column: 2; }
  .tl-gname { font-size: 21px; }
  .tl-mark { grid-column: 1; grid-row: 1; margin-top: 5px; }
  .tl-when { grid-column: 2; grid-row: 1; text-align: left; padding-top: 0; margin-bottom: 8px; }
  .tl-content { grid-column: 2; grid-row: 2; }
  .tl-role { font-size: 20px; }
  .tl-live { position: static; margin-top: 10px; font-size: 12px; white-space: normal; }
  .footer-grid { grid-template-columns: 1fr; gap: 40px; }
  .footer-figure { width: 70vw; justify-self: end; }
  .footer-bottom { margin-top: 48px; }
  .cards, .cap-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; gap: 24px; }
  .corner-stair { right: 24px; }
}

@media (max-width: 380px) {
  .stats { grid-template-columns: 1fr; }
  .stat:nth-child(even) { border-left: none; padding-left: 0; }
  .stat + .stat { border-top: 1px solid var(--hairline); }
}

/* ---------- Reduced motion ---------- */

@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;
  }
  .js .reveal { opacity: 1; transform: none; }
}

/* Guard: nothing should ever widen the page past the viewport */
html, body { overflow-x: clip; }

/* ---------- Hero: pixel resolve / explode ---------- */

.heron {
  position: sticky;
  top: 0;
  z-index: 0;
  height: 100vh;
  height: 100svh;
  min-height: 600px;
  max-height: 1000px;
  aspect-ratio: auto;
  overflow: hidden;
  background: var(--canvas);
}
.heron-glow { position: absolute; inset: 0; overflow: hidden; }
.hblob { position: absolute; border-radius: 50%; will-change: transform; }
.hblob-a {
  right: -6%; bottom: -18%;
  width: 52vmax; height: 44vmax;
  background: radial-gradient(closest-side, rgba(244, 150, 102, 0.62), rgba(244, 150, 102, 0));
  animation: hDriftA 18s ease-in-out infinite alternate;
}
.hblob-b {
  right: 16%; bottom: -32%;
  width: 46vmax; height: 40vmax;
  background: radial-gradient(closest-side, rgba(238, 122, 86, 0.3), rgba(238, 122, 86, 0));
  animation: hDriftB 24s ease-in-out infinite alternate;
}
@keyframes hDriftA {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(-5%, -7%, 0) scale(1.12); }
}
@keyframes hDriftB {
  from { transform: translate3d(0, 0, 0) scale(1.06); }
  to { transform: translate3d(7%, 4%, 0) scale(0.94); }
}
.heron-grid { position: relative; height: 100%; z-index: 1; }
.heron-text {
  position: absolute;
  left: 40px; top: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-bottom: 6vh;
  max-width: 62%;
  will-change: transform, opacity;
}
.heron-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 22px;
  animation: fadeUp 600ms cubic-bezier(.22,.61,.36,1) both;
  animation-delay: 120ms;
}
.heron-eyebrow i { font-style: normal; color: var(--lav-tint); margin: 0 4px; }
.heron-sq { width: 6px; height: 6px; background: var(--accent); flex: none; }
.heron-name {
  font-size: clamp(64px, 10.5vw, 160px);
  font-weight: 700;
  line-height: 0.92;
  letter-spacing: -0.045em;
  margin: 0;
}
/* With JS the name is drawn on the canvas by the same pixel engine as the portrait; the HTML stays for readers and search */
.js .heron-name { opacity: 0; }
.heron-line { display: block; }
.heron-last { color: var(--statement-tail); }
.heron-dot {
  display: inline-block;
  width: 0.14em; height: 0.14em;
  background: var(--accent);
  margin-left: 0.08em;
}
.heron-figure {
  position: absolute;
  right: 40px; bottom: 0;
  width: clamp(280px, 34vw, 480px);
  aspect-ratio: 880 / 761;
}
.heron-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 2;
  pointer-events: none;
}
.heron-scroll {
  position: absolute;
  left: 40px; bottom: 28px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  animation: fadeUp 600ms cubic-bezier(.22,.61,.36,1) both;
  animation-delay: 1400ms;
}
.heron-scroll-sq { width: 6px; height: 6px; background: var(--accent); animation: hBob 1.6s ease-in-out infinite; }
@keyframes hBob {
  0%, 100% { transform: translateY(-3px); }
  50% { transform: translateY(3px); }
}

/* ---------- Page body slides over the pinned hero; a pixel stream swims behind the sections ---------- */

.page-body { position: relative; z-index: 1; background: var(--canvas); }
.flow-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  image-rendering: pixelated;
}
.page-body > *:not(.flow-canvas) { position: relative; z-index: 1; }
.page-body .section { background: transparent; }
.page-body .section-alt { background: rgba(255, 255, 255, 0.5); }
.page-body .divider-glyph { background: transparent; }

/* ---------- Footer: the stream gathers into a pixel portrait ---------- */

footer.contact {
  position: relative;
  z-index: 2;
  overflow: hidden;
}
.footer-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}
.contact > *:not(canvas) { position: relative; z-index: 1; }

@media (max-width: 1024px) {
  .heron-eyebrow { display: none; }
}
@media (max-width: 768px) {
  .heron { min-height: 560px; }
  .heron-text {
    left: 20px; right: 20px; top: 0; bottom: auto;
    padding-top: 15vh; padding-bottom: 0;
    max-width: none;
    justify-content: flex-start;
  }
  .heron-name { font-size: clamp(56px, 16.5vw, 96px); }
  .heron-figure { right: 0; width: 76vw; }
  .heron-scroll { left: 20px; bottom: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .heron { position: relative !important; top: 0 !important; }
  .hblob, .heron-scroll-sq { animation: none !important; }
  .flow-canvas { display: none; }
  .js .heron-name { opacity: 1; }
}
