/* ==========================================================================
   Yellow: cream paper, ink-brown type, highlighter yellow.
   Standalone homepage theme (no Bootstrap / legacy theme dependencies).
   ========================================================================== */

:root {
  --paper: #f7f5ef;
  --paper-deep: #f4efe1;
  --ink: #140c0a;
  --ink-soft: #5f564a;
  --line: rgba(20, 12, 10, .12);
  --yellow: #ffe435;
  --orange: #f97815;
  --card: #ffffff;

  --font-display: "Mouse Memoirs", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;

  --radius: 22px;
  --radius-sm: 14px;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1200px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

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

html { -webkit-text-size-adjust: 100%; }

/* Lenis owns scrolling when it is running */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; }

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

:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 12px;
  z-index: 100;
  padding: .6rem 1rem;
  background: var(--ink);
  color: var(--paper);
  border-radius: 999px;
}
.skip-link:focus { left: 12px; }

.wrap {
  width: 100%;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* --- Type -------------------------------------------------------------- */

.display {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: .005em;
  line-height: .92;
  margin: 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin: 0 0 1.25rem;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--orange);
}

.section-title {
  font-size: clamp(3.2rem, 8.5vw, 7rem);
  max-width: 16ch;
}

/* A full-sentence heading: smaller than a title so it reads as a statement */
.section-title.statement {
  max-width: 20ch;
  font-size: clamp(2.4rem, 4.4vw, 3.9rem);
  line-height: 1;
}

.lede {
  max-width: 58ch;
  margin: 1.5rem 0 0;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--ink-soft);
}

/* Highlighter swipe: the yellow fills in when its parent is revealed */
.mark {
  font-style: normal;
  background-image: linear-gradient(var(--yellow), var(--yellow));
  background-repeat: no-repeat;
  background-position: 0 88%;
  background-size: 0% 42%;
  padding: 0 .06em;
  margin: 0 -.06em;
  transition: background-size .9s var(--ease);
}
.is-in .mark,
.mark.is-in { background-size: 100% 42%; }
.mark:nth-of-type(2) { transition-delay: .25s; }
.mark:nth-of-type(3) { transition-delay: .5s; }
.mark:nth-of-type(4) { transition-delay: .75s; }

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .85rem 1.4rem;
  border-radius: 999px;
  border: 1.5px solid var(--ink);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  transition: transform .25s var(--ease), background-color .2s ease, box-shadow .25s var(--ease);
}
.btn:hover { transform: translateY(-2px); }

.btn-yellow {
  background: var(--yellow);
  color: var(--ink);
  box-shadow: 0 3px 0 var(--ink);
}
.btn-yellow:hover { box-shadow: 0 5px 0 var(--ink); }

.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--card); }

.btn .arrow { transition: transform .25s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }

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

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease;
}
.site-nav.is-scrolled { border-bottom-color: var(--line); }

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 72px;
}

.logo {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 2.35rem;
  line-height: 1;
  letter-spacing: -.02em;
  text-decoration: none;
}
/* Yellow on cream needs an ink outline to read. */
.logo span {
  color: var(--yellow);
  -webkit-text-stroke: .06em var(--ink);
  paint-order: stroke fill;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav-links a:not(.btn) {
  font-weight: 500;
  text-decoration: none;
  color: var(--ink-soft);
  transition: color .2s ease;
}
.nav-links a:not(.btn):hover { color: var(--ink); }
.nav-links .btn { padding: .65rem 1.15rem; font-size: .95rem; }

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 16px;
  height: 1.5px;
  background: currentColor;
  transition: transform .3s var(--ease), opacity .2s ease;
}
.nav-toggle span { position: relative; }
.nav-toggle span::before,
.nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -5px; }
.nav-toggle span::after { top: 5px; }
.nav-open .nav-toggle span { background: transparent; }
.nav-open .nav-toggle span::before { transform: translateY(5px) rotate(45deg); }
.nav-open .nav-toggle span::after { transform: translateY(-5px) rotate(-45deg); }

@media (max-width: 760px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 1.5rem var(--gutter) 2rem;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, transform .3s var(--ease), visibility 0s .3s;
  }
  .nav-links a:not(.btn) { font-size: 1.35rem; color: var(--ink); }
  .nav-open .nav-links {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity .25s ease, transform .3s var(--ease);
  }
}

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

.hero {
  display: flex;
  align-items: center;
  /* Fills the screen below the 72px nav */
  min-height: calc(100vh - 72px);
  min-height: calc(100svh - 72px);
  padding: clamp(1.5rem, 4vh, 3rem) 0;
  background: var(--yellow);
}
.hero .lede,
.hero-top p { color: rgba(20, 12, 10, .78); }
.hero .mark { background-image: linear-gradient(#fff, #fff); }
.hero .btn-yellow { background: var(--ink); color: var(--paper); box-shadow: none; }
.hero .btn-yellow:hover { box-shadow: 0 5px 0 rgba(20, 12, 10, .3); }
.hero .btn-ghost:hover { background: rgba(255, 255, 255, .5); }

/* Nav blends into the yellow hero until the page scrolls */
.site-nav:not(.is-scrolled) { background: var(--yellow); }
.site-nav:not(.is-scrolled) .logo span { color: var(--ink); }
.site-nav:not(.is-scrolled) .nav-links a:not(.btn) { color: rgba(20, 12, 10, .75); }
.site-nav:not(.is-scrolled) .nav-links .btn-yellow { background: var(--ink); color: var(--paper); box-shadow: none; }
.site-nav { transition: border-color .3s ease, background-color .3s ease; }

.hero-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1.75rem;
}
.hero-avatar {
  /* Transparent PNG: round photo with a halo above it, keep its proportions */
  width: 72px;
  height: auto;
}
.hero-top p { margin: 0; font-size: .98rem; color: var(--ink-soft); line-height: 1.4; }
.hero-top strong { display: block; color: var(--ink); font-weight: 600; }

.hero h1 {
  /* Three lines, 100px max; scales down with the screen width or height */
  font-size: clamp(2.8rem, min(9.4vw, 15vh), 100px);
  /* Mouse Memoirs has a single weight: a same-colour stroke thickens it */
  -webkit-text-stroke: .045em currentColor;
  paint-order: stroke fill;
  letter-spacing: .03em;
}
.hero-line { display: block; }

/* Centred hero, wider than the rest of the page */
.hero .wrap { max-width: none; text-align: center; }
.hero-top { justify-content: center; }
.hero-top p { text-align: center; }
.hero .lede { margin-left: auto; margin-right: auto; }
.hero .hero-actions { justify-content: center; }
@media (min-width: 761px) {
  .hero-line { white-space: nowrap; }
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .85rem;
  margin-top: 2.25rem;
}

/* --- Sections ---------------------------------------------------------- */

.section { padding: clamp(4.5rem, 10vw, 8rem) 0; }
.section-head { margin-bottom: clamp(2.5rem, 5vw, 4rem); }

/* --- Work cards -------------------------------------------------------- */

.work-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 2.5vw, 1.75rem);
}
.work-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  background: var(--card);
  overflow: hidden;
  text-decoration: none;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
a.work-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 0 var(--ink);
}

.work-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--paper-deep);
  border-bottom: 1.5px solid var(--ink);
}
.work-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .8s var(--ease);
}
a.work-card:hover .work-media img { transform: scale(1.04); }

.work-body {
  display: flex;
  flex-direction: column;
  gap: .6rem;
  flex: 1;
  padding: 1.4rem 1.5rem 1.6rem;
}
.work-tag {
  align-self: flex-start;
  padding: .3rem .75rem;
  border-radius: 999px;
  background: var(--yellow);
  font-size: .8rem;
  font-weight: 600;
}
.work-body h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.7rem, 2.8vw, 2.2rem);
  letter-spacing: 0;
  line-height: 1.15;
}
.work-meta { margin: 0; font-size: .92rem; color: var(--ink-soft); }
.work-cta {
  margin-top: auto;
  padding-top: .5rem;
  font-weight: 600;
}

.work-card.is-locked { border-style: dashed; background: transparent; }
.work-card.is-locked .work-media { border-bottom-style: dashed; }
.work-card.is-locked .work-media img { filter: grayscale(1) contrast(.9); opacity: .55; }
.work-card.is-locked .work-tag { background: var(--paper-deep); border: 1px solid var(--line); }
.work-lock {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .35rem .7rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-size: .78rem;
  font-weight: 600;
}
.work-lock svg { width: 14px; height: 14px; }

@media (max-width: 700px) {
  .work-grid { grid-template-columns: 1fr; }
}

/* --- Numbered steps ---------------------------------------------------- */

.steps-section { background: var(--ink); color: var(--paper); }
.steps-section .eyebrow { color: rgba(247, 245, 239, .65); }
.steps-section .lede { color: rgba(247, 245, 239, .72); }
.steps-section .mark { color: var(--ink); background-position: 0 50%; padding: 0 .12em; margin: 0; }
.steps-section .is-in .mark { background-size: 100% 100%; }

.steps-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}
.steps-layout .section-head { margin-bottom: 0; }

/* Deck: every card shares one grid cell, so the deck is as tall as the
   tallest card. data-pos 0 is the top card; the rest fan out behind it. */
.deck {
  display: grid;
  margin: 0 0 0 0;
  padding: 0 1.5rem 2rem 0;
  list-style: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
}
.deck:focus-visible { outline: none; }
.deck:focus-visible .step[data-pos="0"] { outline: 3px solid var(--paper); outline-offset: 4px; }

.step {
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-height: 22rem;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  background: var(--yellow);
  color: var(--ink);
  box-shadow: 0 1px 0 rgba(20, 12, 10, .4), 0 18px 40px rgba(0, 0, 0, .35);
  transform-origin: 50% 100%;
  transition: transform .55s var(--ease), filter .55s var(--ease);
}
/* Each card has its own colour; the number badge picks it up */
.step:nth-child(1) { --card-bg: var(--yellow); }
.step:nth-child(2) { --card-bg: #9fd4ff; }
.step:nth-child(3) { --card-bg: #ffb199; }
.step { background: var(--card-bg, var(--yellow)); }

.step[data-pos="0"] { z-index: 3; transform: none; }
.step[data-pos="1"] { z-index: 2; transform: translate(14px, 16px) rotate(2.5deg) scale(.97); filter: brightness(.88); }
.step[data-pos="2"] { z-index: 1; transform: translate(28px, 32px) rotate(5deg) scale(.94); filter: brightness(.76); }
.step[data-pos="1"] > *,
.step[data-pos="2"] > * { visibility: hidden; }
.step.is-leaving > * { visibility: visible; }

.deck:hover .step[data-pos="0"] { transform: translateY(-4px) rotate(-1deg); }

/* The top card flicks off to the right, then tucks in at the back */
.step.is-leaving { animation: deck-leave .7s var(--ease) forwards; }
@keyframes deck-leave {
  0%   { z-index: 4; transform: none; filter: none; }
  45%  { z-index: 4; transform: translate(70%, -6%) rotate(14deg); filter: none; }
  46%  { z-index: 0; }
  100% { z-index: 0; transform: translate(28px, 32px) rotate(5deg) scale(.94); filter: brightness(.76); }
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  background: var(--ink);
  color: var(--card-bg, var(--yellow));
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.4rem;
}
.step h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2rem, 3.4vw, 2.75rem);
  letter-spacing: .01em;
  line-height: 1;
}
.step p { margin: 0; font-size: 1.08rem; color: rgba(20, 12, 10, .78); }

.chips { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: auto; padding-top: .5rem; }
.chip {
  padding: .3rem .75rem;
  border-radius: 999px;
  border: 1px solid rgba(20, 12, 10, .35);
  font-size: .82rem;
  font-weight: 500;
  color: var(--ink);
}

@media (max-width: 900px) {
  .steps-layout { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .step { min-height: 24rem; }
  .step[data-pos="1"] { transform: translate(8px, 12px) rotate(2deg) scale(.97); }
  .step[data-pos="2"] { transform: translate(16px, 24px) rotate(4deg) scale(.94); }
  .deck { padding-right: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .step { transition: none; }
  .deck:hover .step[data-pos="0"] { transform: none; }
}

/* --- About + experience ----------------------------------------------- */

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}
.about-copy p { margin: 0 0 1.1rem; font-size: 1.12rem; color: var(--ink-soft); }
.about-copy p:first-child { color: var(--ink); font-size: 1.3rem; font-weight: 500; line-height: 1.45; }

.xp {
  margin: clamp(3rem, 6vw, 4.5rem) 0 0;
  padding: 0;
  list-style: none;
  border-top: 1.5px solid var(--ink);
}
.xp li {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr) auto;
  gap: 1.5rem;
  align-items: baseline;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--line);
  transition: background-color .25s ease, padding .35s var(--ease);
}
.xp li:hover { background: var(--paper-deep); padding-left: .75rem; padding-right: .75rem; }
.xp-year {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.2rem, 4vw, 2.75rem);
  line-height: 1;
  letter-spacing: .01em;
  font-variant-numeric: tabular-nums;
  color: var(--orange);
}
.xp-role {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.65rem;
  letter-spacing: 0;
  line-height: 1.25;
}
.xp-note {
  display: inline-block;
  margin-top: .4rem;
  padding: .2rem .6rem;
  border-radius: 999px;
  background: var(--yellow);
  font-size: .8rem;
  font-weight: 600;
}
.xp-org { margin: 0; color: var(--ink-soft); text-align: right; }
.xp-org a { font-weight: 600; color: var(--ink); text-decoration-color: var(--yellow); text-decoration-thickness: 3px; text-underline-offset: 4px; }

@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .xp li { grid-template-columns: 1fr; gap: .35rem; }
  .xp-org { text-align: left; }
}

/* --- Closing CTA ------------------------------------------------------- */

.cta {
  margin: 0 var(--gutter);
  padding: clamp(3.5rem, 8vw, 6.5rem) clamp(1.5rem, 5vw, 4.5rem);
  border: 1.5px solid var(--ink);
  border-radius: calc(var(--radius) * 1.5);
  background: var(--yellow);
  text-align: center;
}
.cta .display { font-size: clamp(3.2rem, 9.5vw, 8rem); max-width: 18ch; margin: 0 auto; }
.cta .lede { margin: 1.5rem auto 0; color: var(--ink); }
.cta .hero-actions { justify-content: center; }
.cta .btn-yellow { background: var(--ink); color: var(--paper); box-shadow: none; }
.cta .btn-yellow:hover { box-shadow: 0 5px 0 rgba(20, 12, 10, .3); }

.contact-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem 2rem;
  margin: 2.5rem 0 0;
  padding: 0;
  list-style: none;
  font-weight: 500;
}
.contact-row a { text-underline-offset: 4px; }

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

.site-footer { padding: 3rem 0 2.5rem; }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--ink-soft);
  font-size: .92rem;
}
.footer-inner a { color: var(--ink); text-underline-offset: 4px; }

/* --- Scroll reveals ---------------------------------------------------- */

.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s var(--ease), transform .9s var(--ease);
  transition-delay: var(--d, 0ms);
}
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .mark { background-size: 100% 42%; transition: none; }
  .btn, .work-card, .work-media img { transition: none; }
}

/* --- Ambient cursor grid ------------------------------------------------
   A faint ink grid behind the hero copy. A darker copy is masked to a soft
   circle that follows the pointer, so the grid firms up under the cursor. */

.hero { position: relative; overflow: hidden; }

.ambient-grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero .wrap {
  position: relative;
  z-index: 1;
}

.ambient-grid-base,
.ambient-grid-grain,
.ambient-grid-dots,
.ambient-grid-glow {
  position: absolute;
  inset: -2px;
  background-image:
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px);
  background-size: var(--grid-size) var(--grid-size);
}

/* Rules fade out toward the centre of the screen so the copy stays quiet */
.ambient-grid-base {
  --grid-line: rgba(20, 12, 10, .07);
  --grid-size: 54px;
  -webkit-mask-image: radial-gradient(ellipse 72% 66% at 50% 45%,
    transparent 0%, rgba(0, 0, 0, .3) 52%, rgba(0, 0, 0, .9) 100%);
  mask-image: radial-gradient(ellipse 72% 66% at 50% 45%,
    transparent 0%, rgba(0, 0, 0, .3) 52%, rgba(0, 0, 0, .9) 100%);
}

/* A dot at every intersection */
.ambient-grid-dots {
  --grid-size: 54px;
  background-image:
    radial-gradient(circle at 0 0, rgba(20, 12, 10, .14) 0 2.1px, transparent 2.3px),
    radial-gradient(circle at 100% 0, rgba(20, 12, 10, .14) 0 2.1px, transparent 2.3px),
    radial-gradient(circle at 0 100%, rgba(20, 12, 10, .14) 0 2.1px, transparent 2.3px),
    radial-gradient(circle at 100% 100%, rgba(20, 12, 10, .14) 0 2.1px, transparent 2.3px);
  background-size: var(--grid-size) var(--grid-size);
  -webkit-mask-image: radial-gradient(ellipse 72% 66% at 50% 45%,
    transparent 8%, rgba(0, 0, 0, .35) 55%, rgba(0, 0, 0, .9) 100%);
  mask-image: radial-gradient(ellipse 72% 66% at 50% 45%,
    transparent 8%, rgba(0, 0, 0, .35) 55%, rgba(0, 0, 0, .9) 100%);
}

/* Grain that clings to the lines, faded toward the edges like a vignette */
.ambient-grid-grain {
  --grid-size: 54px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='0.55'/%3E%3C/svg%3E");
  background-size: 140px 140px;
  opacity: .12;
  mix-blend-mode: multiply;
  -webkit-mask-image:
    linear-gradient(to bottom, #000 0 3px, transparent 3px),
    linear-gradient(to right, #000 0 3px, transparent 3px),
    radial-gradient(ellipse 72% 66% at 50% 45%, transparent 14%, rgba(0, 0, 0, .8) 100%);
  mask-image:
    linear-gradient(to bottom, #000 0 3px, transparent 3px),
    linear-gradient(to right, #000 0 3px, transparent 3px),
    radial-gradient(ellipse 72% 66% at 50% 45%, transparent 14%, rgba(0, 0, 0, .8) 100%);
  -webkit-mask-size: var(--grid-size) var(--grid-size), var(--grid-size) var(--grid-size), 100% 100%;
  mask-size: var(--grid-size) var(--grid-size), var(--grid-size) var(--grid-size), 100% 100%;
  -webkit-mask-composite: source-over, source-over, source-in;
  mask-composite: add, add, intersect;
}

.ambient-grid-glow {
  --grid-line: rgba(20, 12, 10, .2);
  --grid-size: 54px;
  opacity: 0;
  transition: opacity .45s ease;
  -webkit-mask-image: radial-gradient(circle var(--glow-r, 300px) at var(--mx, 50%) var(--my, 50%),
    #000 0%, rgba(0, 0, 0, .6) 45%, transparent 75%);
  mask-image: radial-gradient(circle var(--glow-r, 300px) at var(--mx, 50%) var(--my, 50%),
    #000 0%, rgba(0, 0, 0, .6) 45%, transparent 75%);
}

.ambient-grid-glow::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle var(--glow-r, 300px) at var(--mx, 50%) var(--my, 50%),
    rgba(249, 120, 21, .07) 0%, transparent 70%);
}

.ambient-grid.is-live .ambient-grid-glow { opacity: 1; }

/* Toronto skyline: faint ink silhouette, fading out toward the top.
   Anchored bottom-right so the CN Tower stays in view on narrow screens. */
.hero-skyline {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  fill: var(--ink);
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to top, #000 0%, rgba(0, 0, 0, .75) 45%, rgba(0, 0, 0, .25) 100%);
  mask-image: linear-gradient(to top, #000 0%, rgba(0, 0, 0, .75) 45%, rgba(0, 0, 0, .25) 100%);
}
.skyline-city { opacity: .06; }
.skyline-tower { opacity: .1; }

/* --- Floating hero mockups ----------------------------------------------
   Real project shots, cropped into framed cards in the hero's margins. Side
   cards are sized to the space left beside the 100px headline; all of them
   only show on screens big enough to keep them clear of the text. */

.hero-mocks { display: none; }

@media (min-width: 1420px) and (min-height: 760px) {
  .hero-mocks {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
  }
}

.mock {
  position: absolute;
  margin: 0;
  overflow: hidden;
  aspect-ratio: var(--ratio, 3 / 4);
  border: 1.5px solid var(--ink);
  border-radius: 18px;
  box-shadow: 0 6px 0 var(--ink);
  transform: rotate(var(--r, 0deg));
  animation: mock-float 7s ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}
.mock img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--focus, center);
  transform: scale(var(--zoom, 1));
  transform-origin: var(--focus, center);
}
@keyframes mock-float {
  0%, 100% { translate: 0 0; }
  50%      { translate: 0 -10px; }
}

.mock-left         { --r: -7deg; --delay: 0s;    --focus: 68% 40%; left: max(28px, calc(50% - 820px));  top: 20%; width: min(200px, calc((100vw - 1000px) / 2 - 56px)); }
.mock-right        { --r: 6deg;  --delay: -2s;   --focus: 62% 55%; right: max(28px, calc(50% - 820px)); top: 16%; width: min(210px, calc((100vw - 1000px) / 2 - 56px)); }
.mock-bottom-left  { --r: 4deg;  --delay: -4s;   --ratio: 3 / 2; --focus: 50% 55%; --zoom: 1.45; left: calc(50% - 620px); bottom: -24px; width: 270px; }
.mock-bottom-right { --r: -5deg; --delay: -5.5s; --ratio: 3 / 2; --focus: 70% 70%; --zoom: 1.5; right: calc(50% - 620px); bottom: -20px; width: 270px; }

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

@media (prefers-reduced-motion: reduce) {
  .ambient-grid-glow { display: none; }
}
