/* d606k — PHANTOM LOGIC */

:root {
  --bg: #050505;
  --bg-card: #111;
  --text: #e0e0e0;
  --text-muted: #888;
  --accent: #0099ff;
  --accent-glow: rgba(0, 153, 255, 0.21);
  --border: #222;
}

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



body {
  font-family: 'JetBrains Mono', monospace;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.5;
  overflow-x: hidden;
  text-transform: uppercase;
}

/* ====== NOISE UTILITY ====== */
.with-noise {
  position: relative;
  overflow: hidden;
}

.with-noise::after {
  content: "";
  position: absolute;
  inset: -200%;
  width: 500%;
  height: 500%;
  background-image: url("https://framerusercontent.com/images/rR6HYXBrMmX4cRpXfXUOvpvpB0.png");
  background-repeat: repeat;
  background-size: 380px;
  opacity: 0.11;
  animation: framer-noise 0.5s steps(10) infinite;
  will-change: transform;
  pointer-events: none;
  z-index: 10;
}

@keyframes framer-noise {

  0%,
  100% {
    transform: translateX(0%) translateY(0%);
  }

  10% {
    transform: translateX(-12%) translateY(14.5%);
  }

  20% {
    transform: translateX(-1%) translateY(-12.5%);
  }

  30% {
    transform: translateX(-13.5%) translateY(-5.5%);
  }

  40% {
    transform: translateX(4%) translateY(-14.5%);
  }

  50% {
    transform: translateX(-1.5%) translateY(8.5%);
  }

  60% {
    transform: translateX(-10%) translateY(4%);
  }

  70% {
    transform: translateX(-6%) translateY(16%);
  }

  80% {
    transform: translateX(13%) translateY(4.5%);
  }

  90% {
    transform: translateX(3%) translateY(-18.5%);
  }
}



/* ====== NAV — fixed, blend difference ====== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 40px;
  z-index: 100;
  mix-blend-mode: difference;
}



.nav-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--text);
}

.local-time {
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

/* Status dot */
.status-dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
  flex-shrink: 0;
}

.status-dot--lg {
  width: 8px;
  height: 8px;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.4;
  }
}

/* ====== HERO — sticky fullscreen black ====== */
.hero {
  position: relative;
  /* Natural scroll away to reveal parallax */
  width: 100%;
  height: 70vh;
  background: #000;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 2;
  touch-action: pan-y;
  /* Prevent horizontal swipe from locking vertical scroll on mobile */
}

.hero-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.hero-sub {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.2em;
}

.hero-sub-divider {
  color: var(--accent);
}

.hero-title {
  position: relative;
  display: inline-block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(4rem, 12vw, 10rem);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  text-align: center;
}

/* ====== HERO TEXT GLITCH ====== */
.hero-title.is-glitching {
  animation: glitch-panel-flash 0.15s infinite;
}

.hero-title.is-glitching::before,
.hero-title.is-glitching::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.9;
}

.hero-title.is-glitching::before {
  left: 5px;
  text-shadow: -4px 0 var(--accent), 4px 0 rgb(0, 153, 255);
  /* Dual cyan/neon blue */
  background-color: transparent;
  clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
  animation: glitch-anim-1 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) both infinite;
  color: var(--text);
  z-index: 2;
}

.hero-title.is-glitching::after {
  left: -5px;
  text-shadow: 4px 0 rgb(0, 153, 255), -4px 0 var(--accent);
  background-color: transparent;
  clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%);
  animation: glitch-anim-2 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94) both infinite reverse;
  color: var(--text);
  z-index: 1;
}

@keyframes glitch-anim-1 {
  0% {
    clip-path: polygon(0 2%, 100% 2%, 100% 5%, 0 5%);
    transform: translate(-5px, 4px) skew(5deg);
    background-color: rgba(0, 153, 255, 0.2);
  }

  20% {
    clip-path: polygon(0 15%, 100% 15%, 100% 25%, 0 25%);
    transform: translate(6px, -5px) skew(-5deg);
    background-color: transparent;
  }

  40% {
    clip-path: polygon(0 10%, 100% 10%, 100% 20%, 0 20%);
    transform: translate(5px, 6px) skew(10deg);
    background-color: rgba(69, 185, 255, 0.3);
  }

  60% {
    clip-path: polygon(0 40%, 100% 40%, 100% 60%, 0 60%);
    transform: translate(-6px, -4px) skew(-10deg);
    background-color: transparent;
  }

  80% {
    clip-path: polygon(0 80%, 100% 80%, 100% 90%, 0 90%);
    transform: translate(8px, 4px) skew(15deg);
    background-color: rgba(0, 153, 255, 0.4);
  }

  100% {
    clip-path: polygon(0 50%, 100% 50%, 100% 70%, 0 70%);
    transform: translate(-5px, -6px) skew(-5deg);
    background-color: transparent;
  }
}

@keyframes glitch-anim-2 {
  0% {
    clip-path: polygon(0 25%, 100% 25%, 100% 30%, 0 30%);
    transform: translate(6px, -4px) skew(-10deg);
    background-color: transparent;
  }

  20% {
    clip-path: polygon(0 10%, 100% 10%, 100% 20%, 0 20%);
    transform: translate(-6px, 6px) skew(10deg);
    background-color: rgba(0, 153, 255, 0.3);
  }

  40% {
    clip-path: polygon(0 50%, 100% 50%, 100% 60%, 0 60%);
    transform: translate(8px, -6px) skew(-5deg);
    background-color: transparent;
  }

  60% {
    clip-path: polygon(0 75%, 100% 75%, 100% 85%, 0 85%);
    transform: translate(-8px, 4px) skew(5deg);
    background-color: rgba(69, 185, 255, 0.4);
  }

  80% {
    clip-path: polygon(0 15%, 100% 15%, 100% 30%, 0 30%);
    transform: translate(6px, -4px) skew(-15deg);
    background-color: transparent;
  }

  100% {
    clip-path: polygon(0 90%, 100% 90%, 100% 100%, 0 100%);
    transform: translate(-6px, 6px) skew(10deg);
    background-color: rgba(0, 153, 255, 0.2);
  }
}

@keyframes glitch-panel-flash {
  0% {
    background: transparent;
    color: var(--text);
  }

  33% {
    background: rgba(0, 153, 255, 0.8);
    color: rgb(47, 46, 51);
  }

  66% {
    background: transparent;
    color: var(--text);
  }

  100% {
    background: rgba(69, 185, 255, 0.5);
    color: #fff;
    text-shadow: none;
  }
}

.hero-bottom {
  position: absolute;
  bottom: 34px;
  left: 40px;
  right: 40px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.hero-label {
  font-size: 0.65rem;
  color: var(--text-muted);
  letter-spacing: 0.15em;
}

/* ====== IMAGE BLOCK with noise ====== */
.image-block {
  position: relative;
  width: 100%;
  height: 200vh;
  /* Extra height for scroll space */
  z-index: 1;
  background: #000;
  pointer-events: none;
}

.image-block-inner {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100vh;
  overflow: hidden;
  will-change: transform;
  transform-origin: center center;
  background: #000;
  pointer-events: auto;
}

/* Ensure sticky isn't overridden by the .with-noise utility class */
.image-block-inner.with-noise {
  position: sticky;
}

.image-block-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(30%);
}

.image-block-gradient-top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to bottom, #000, transparent);
  pointer-events: none;
}

.image-block-gradient-bottom {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to top, var(--bg), transparent);
  pointer-events: none;
}

/* ====== SVG DIVIDER ====== */
.section-divider {
  position: relative;
  z-index: 4;
  width: 100%;
  height: clamp(30px, 4vw, 66px);
  margin-top: -100vh;
  /* PULL the rest of the page up over the 100vh image block spacer */
  color: var(--bg);
  pointer-events: none;
  transform: translateY(2px);
  /* Fix 1-2px background bleed gap */
}

.section-divider svg {
  display: block;
}

/* ====== SECTIONS (shared) ====== */
h1,
h2,
h3 {
  font-family: 'Space Grotesk', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
}

.section {
  position: relative;
  z-index: 5;
  /* Ensure this is above the divider and image */
  background: var(--bg);
}

.section-inner {
  width: 100%;
  padding: 140px 40px 0;
}

.section-label {
  color: var(--accent);
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  margin-bottom: 16px;
}

.section-heading {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.5rem, 5vw, 50px);
  line-height: 1.05;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  font-weight: 700;
}

.section-row {
  display: flex;
  justify-content: space-between;
  gap: 50px;
}

.section-row--header {
  margin-bottom: 80px;
}

.section-col--left {
  flex: 0 0 40%;
}

.section-col--right {
  flex: 0 0 50%;
}

.section-text {
  color: var(--text-muted);
  font-size: 1.15rem;
  /* Increased size */
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.section-text-sm {
  color: var(--text-muted);
  font-size: 0.8rem;
  line-height: 1.7;
}

.section-accent {
  border-left: 2px solid var(--accent);
  padding-left: 1.5rem;
  font-size: 1rem;
  color: var(--accent);
  line-height: 1.6;
}

/* ====== UNIFIED HERO ROW LAYOUT ====== */
.row-hero {
  display: flex;
  flex-direction: column;
  gap: 80px;
}

.row-hero-bottom {
  width: 50%;
  display: flex;
  flex-direction: column;
  gap: 60px;
}

.row-hero-bottom--right {
  margin-left: auto;
}

.row-hero-bottom--left {
  margin-right: auto;
}

.row-hero-top {
  width: 100%;
  display: flex;
  flex-direction: column;
}

/* ====== UNIFIED TYPOGRAPHY ====== */
.huge-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(4rem, 8vw, 7rem);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  color: var(--text);
}

.content-block {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.block-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #fff;
}

.block-text {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* Metrics row */

.metrics-row {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 60px 0;
}

.metrics-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: center;
}

.metrics-value {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 700;
  color: var(--text);
}

.metrics-label {
  font-size: 0.6rem;
  color: var(--text-muted);
  letter-spacing: 0.2em;
}

/* Archives — grid 2x2 */

.archives-grid {
  display: flex;
  justify-content: space-between;
  gap: 50px;
}

.archive-card {
  flex: 1;
  padding: 40px;
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: background 0.3s ease;
}

/* Cut corners: top-left for first, bottom-right for last */
.archive-card:first-child {
  clip-path: polygon(40px 0, 100% 0, 100% 100%, 0 100%, 0 40px);
}

.archive-card:last-child {
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 40px), calc(100% - 40px) 100%, 0 100%);
}

.archive-card:hover {
  background: rgba(0, 153, 255, 0.05);
}

.archive-tag {
  font-size: 0.6rem;
  color: var(--accent);
  letter-spacing: 0.3em;
}

.archive-name {
  font-size: 1.1rem;
  letter-spacing: 0.02em;
}

.archive-role {
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}

.archive-metrics {
  display: flex;
  gap: 40px;
  margin-top: auto;
}

.archive-metric {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.archive-metric-val {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
}

.archive-metric-lbl {
  font-size: 0.6rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

.archive-card--cta {
  justify-content: center;
}

.archive-cta-text {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 8px;
}

.archive-cta-link {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  margin-top: 12px;
  transition: color 0.3s;
}

.archive-cta-link:hover {
  color: #fff;
}

/* ====== CYBERPUNK BUTTON ====== */
.btn-cyber {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 32px;
  background-color: var(--text);
  /* White/light */
  color: var(--bg);
  /* Black/dark text */
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
  cursor: pointer;
  border: none;
  outline: none;
  /* Cut corners via clip-path */
  clip-path: polygon(8px 0%,
      100% 0%,
      100% calc(100% - 8px),
      calc(100% - 8px) 100%,
      0% 100%,
      0% 8px);
  overflow: hidden;
  transition: color 0.3s ease;
  z-index: 10;
}

/* Small button variant */
.btn-cyber--sm {
  height: 36px;
  padding: 0 20px;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  clip-path: polygon(6px 0%,
      100% 0%,
      100% calc(100% - 6px),
      calc(100% - 6px) 100%,
      0% 100%,
      0% 6px);
}

/* The actual text */
.btn-cyber-text {
  position: relative;
  z-index: 2;
  transition: color 0.3s ease;
}

/* The expanding hover background */
.btn-cyber-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--accent);
  z-index: 1;
  /* Start invisible and offset to the left */
  transform: translateX(-100%);
  transform-origin: left center;
  transition: transform 1.5s cubic-bezier(0.16, 1, 0.3, 1);
  /* Faster at start, very slow finish */
}

.btn-cyber:hover .btn-cyber-bg {
  transform: translateX(0);
}





/* Stack */

.stack-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.stack-category {
  background: var(--bg-card);
  padding: 24px;
  position: relative;
  clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 20px 100%, 0 calc(100% - 20px));
  transition: background 0.3s;
}

/* Specific styling for the middle items in the grid (2nd, 5th, 8th, etc.) */
.stack-category:nth-child(3n+2) {
  clip-path: polygon(20px 0, calc(100% - 20px) 0,
      100% 20px, 100% calc(100% - 20px),
      calc(100% - 20px) 100%, 20px 100%,
      0 calc(100% - 20px), 0 20px);
}

.stack-category:hover {
  background: #1a1a1a;
}

.stack-label {
  font-size: 0.65rem;
  color: var(--accent);
  letter-spacing: 0.2em;
  margin-bottom: 16px;
}

.stack-items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.stack-item {
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 4px 12px;
  border: 1px solid var(--border);
  background: var(--bg);
}

/* Connect */

.connect-content {
  text-align: center;
}

.connect-heading {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.5rem, 5vw, 50px);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.04em;
  margin-bottom: 24px;
  line-height: 1.05;
}

.connect-sub {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 48px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.terminal {
  background: var(--bg-card);
  display: inline-block;
  padding: 32px 48px;
  text-align: left;
  clip-path: polygon(0 0, calc(100% - 30px) 0, 100% 30px, 100% 100%, 30px 100%, 0 calc(100% - 30px));
}

.terminal-line {
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.terminal-prompt {
  color: var(--accent);
}

.terminal-link {
  color: var(--text);
  text-decoration: none;
  transition: color 0.3s;
}

.terminal-link:hover {
  color: var(--accent);
}

.cursor {
  display: inline-block;
  width: 8px;
  height: 1.2em;
  background: var(--accent);
  animation: blink 1s step-end infinite;
  vertical-align: text-bottom;
}

@keyframes blink {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0;
  }
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  margin-top: 100px;
  position: relative;
  z-index: 3;
  background: var(--bg);
}

.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  padding: 0 40px;
}

.footer-copy {
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.1em;
}

.footer-back {
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.15em;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-back:hover {
  color: var(--accent);
}

/* Scroll animations */
[data-animate] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-animate].visible {
  opacity: 1;
  transform: translateY(0);
}

/* ====== MENU OVERLAY ====== */
.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 30vw;
  min-width: 360px;
  max-width: 100%;
  height: 100vh;
  height: 100dvh;
  /* Modern mobile height fix */
  background-color: var(--bg);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.6s cubic-bezier(0.8, 0, 0.2, 1);
  pointer-events: none;
  overflow: hidden;
  border-right: 1px dashed var(--border);
}

body.menu-active .menu-overlay {
  transform: translateX(0);
  pointer-events: auto;
}

.menu-overlay-inner {
  position: relative;
  width: 100%;
  height: 100%;
  border: 10px solid var(--bg);
  /* Spacing around the inner menu box */
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  /* Let it scroll internally if needed */
}

/* Noise in the menu */
.menu-overlay-noise {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: url("https://framerusercontent.com/images/rR6HYXBrMmX4cRpXfXUOvpvpB0.png");
  opacity: 0.08;
  pointer-events: none;
  z-index: 0;
  animation: framer-noise 0.5s steps(10) infinite;
}

/* Menu Header */
.menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  gap: 16px;
  z-index: 2;
}

/* Ticker Box */
.menu-ticker-wrapper {
  flex-grow: 1;
  overflow: hidden;
  border: 1px dashed var(--border);
  height: 40px;
  display: flex;
  align-items: center;
  mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
}

.menu-ticker {
  display: flex;
  width: max-content;
  white-space: nowrap;
  animation: scrollTicker 15s linear infinite;
  font-family: 'Roboto Mono', monospace;
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
}

.menu-ticker-item {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-right: 24px;
}

.menu-ticker-item span.dim {
  color: var(--text-muted);
}

.menu-ticker-icon {
  width: 12px;
  height: 12px;
  background-color: var(--text);
  color: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 8px;
  border-radius: 2px;
}

@keyframes scrollTicker {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

/* Menu Links List (Middle) */
.menu-list-wrapper {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 24px;
  border-top: 1px dashed var(--border);
  border-bottom: 1px dashed var(--border);
  border-left: 1px dashed var(--border);
  border-right: 1px dashed var(--border);
  margin: 0 16px;
  z-index: 2;
}

.menu-link {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--text-muted);
  padding: 24px 0;
  border-bottom: 1px dashed var(--border);
  transition: color 0.4s ease;
  position: relative;
  overflow: hidden;
}

.menu-link:last-child {
  border-bottom: none;
}

.menu-link-content {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  transform: translateY(20px);
  opacity: 0;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.menu-link-plus {
  flex-shrink: 0;
  font-family: 'Roboto Mono', monospace;
  font-size: clamp(0.9rem, 1.5vw, 20px);
  line-height: 1;
  margin-top: 8px;
  /* Tweak vertically align as superscript */
}

.menu-link-text {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.8rem, 3vw, 48px);
  font-weight: 700;
  letter-spacing: -0.8px;
  text-transform: uppercase;
  line-height: 1;
}

.menu-link-num {
  flex-shrink: 0;
  font-family: 'Roboto Mono', monospace;
  font-size: clamp(0.7rem, 1vw, 14px);
  line-height: 1;
  margin-top: 6px;
  margin-left: 2px;
}

body.menu-active .menu-link-content {
  transform: translateY(0);
  opacity: 1;
}

/* Stagger animation based on index */
body.menu-active .menu-link:nth-child(1) .menu-link-content {
  transition-delay: 0.3s;
}

body.menu-active .menu-link:nth-child(2) .menu-link-content {
  transition-delay: 0.4s;
}

body.menu-active .menu-link:nth-child(3) .menu-link-content {
  transition-delay: 0.5s;
}

body.menu-active .menu-link:nth-child(4) .menu-link-content {
  transition-delay: 0.6s;
}

body.menu-active .menu-link:nth-child(5) .menu-link-content {
  transition-delay: 0.7s;
}

.menu-link:hover {
  color: #fff;
}

/* Footer Links */
.menu-footer {
  display: flex;
  padding: 16px;
  gap: 16px;
  z-index: 2;
}

.menu-social-link {
  flex: 1;
  display: flex;
  justify-content: center;
  gap: 6px;
  /* Closer to the text */
  align-items: center;
  padding: 16px 24px;
  border: 1px dashed var(--border);
  text-decoration: none;
  color: var(--text);
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.9rem;
  text-transform: uppercase;
  transition: background 0.3s ease;
}

.menu-social-link:hover {
  background: rgba(255, 255, 255, 0.05);
}

.menu-social-icon {
  width: 1.2em;
  /* Slightly larger than the text */
  height: 1.2em;
  fill: currentColor;
  margin-top: -2px;
  /* Visual tweak so it looks centered with the uppercase text */
}

.menu-social-icon--diagonal {
  transform: rotate(45deg);
}

/* Modal Close Button */
.modal-close-btn {
  font-family: monospace;
  font-size: 14px;
  color: var(--text-muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  transition: color 0.3s ease;
}

.modal-close-btn:hover {
  color: var(--text);
}

/* ====== SERVICES ====== */
.services-list {
  display: flex;
  flex-direction: column;
  margin-top: 60px;
}

.service-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  /* Bottom align */
  padding: 10px 0;
  border-top: 1px solid var(--border);
}

.service-row:last-child {
  border-bottom: 1px solid var(--border);
}

.service-content {
  flex: 0 0 35%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-right: 40px;
}

.service-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.2rem, 3vw, 1.5rem);
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 8px;
  /* Less spacing */
}

.service-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.service-visual {
  flex: 0 0 720px;
  /* 720px width requested by user */
  max-width: 100%;
  height: 174px;
  /* Fixed height requested by user */
  position: relative;
  overflow: hidden;
  /* Prevent scaling image from breaking boundaries */
}

.service-visual-inner {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* Start hidden: all X coordinates collapsed to 0 to wipe Left-to-Right */
  clip-path: polygon(0 0, 0 0, 0 20px, 0 100%, 0 100%, 0 calc(100% - 20px));
  will-change: clip-path;
  transition: clip-path 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-visual-inner.is-revealed {
  /* Revealed: full cut corners */
  clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 20px 100%, 0 calc(100% - 20px));
}

.service-visual-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Image zooms out and slides from right to left as container wipes left to right */
  transform: scale(1.2) translateX(10%);
  will-change: transform;
  transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-visual-inner.is-revealed img {
  transform: scale(1) translateX(0);
}

/* Ensure noise appears matching the revealed container */
.service-visual-inner.with-noise::after {
  content: "";
  position: absolute;
  inset: -200%;
  width: 500%;
  height: 500%;
  background-image: url("https://framerusercontent.com/images/rR6HYXBrMmX4cRpXfXUOvpvpB0.png");
  background-repeat: repeat;
  background-size: 380px;
  opacity: 0.11;
  animation: framer-noise 0.5s steps(10) infinite;
  pointer-events: none;
  z-index: 10;
}

.service-visual:hover img {
  transform: scale(1.05);
}

/* ====== PROCESS ====== */
.process-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 1000px;
  margin: 0 auto;
  gap: 40px;
}

.process-header .section-heading {
  white-space: nowrap;
  /* Single line as requested */
}

.process-cta {
  margin-top: 0;
}

.process-layout {
  display: flex;
  justify-content: space-between;
  margin-top: 80px;
  gap: 40px;
}

.process-step {
  flex: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 60px 20px;
}

/* Base corner styles */
.process-step-corner {
  position: absolute;
  width: 20px;
  height: 20px;
  border-color: #595959;
  border-style: solid;
  border-width: 0;
  opacity: 1;
}

/* Step 1: Left brackets */
.process-step:nth-child(1) .top-left {
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  border-top-width: 1px;
  border-left-width: 1px;
}

.process-step:nth-child(1) .bottom-left {
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  border-bottom-width: 1px;
  border-left-width: 1px;
}

/* Step 2: Top/Bottom T-shapes */
.process-step:nth-child(2) .top-center {
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  border-top-width: 1px;
  width: 40px;
  /* Wider top bar */
}

.process-step:nth-child(2) .top-center::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 1px;
  height: 20px;
  background: #595959;
}

.process-step:nth-child(2) .bottom-center {
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  border-bottom-width: 1px;
  width: 40px;
}

.process-step:nth-child(2) .bottom-center::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 1px;
  height: 20px;
  background: #595959;
}

/* Step 3: Right brackets */
.process-step:nth-child(3) .top-right {
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  border-top-width: 1px;
  border-right-width: 1px;
}

.process-step:nth-child(3) .bottom-right {
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  border-bottom-width: 1px;
  border-right-width: 1px;
}

.process-icon-box {
  width: 50px;
  height: 50px;
  background-color: var(--token-5cc81cc9-589c-412f-a29b-ed02d57aed6e, #ebebeb);
  background: linear-gradient(180deg, rgba(171, 171, 171, 0) 0%, rgba(0, 153, 255, .21) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Roboto Mono', monospace;
  font-size: 1.2rem;
  color: #3b82f6;
  margin-bottom: 30px;
  position: relative;
  z-index: 2;
}

/* Center icon has all 4 edges cut */
.process-step:nth-child(2) .process-icon-box {
  clip-path: polygon(8px 0, calc(100% - 8px) 0, 100% 8px, 100% calc(100% - 8px), calc(100% - 8px) 100%, 8px 100%, 0 calc(100% - 8px), 0 8px);
}

/* Modify existing clip-paths for 1 and 3 if needed, or leave square if user only said "central icon has all 4 edges cut" */
.process-step:nth-child(1) .process-icon-box {
  clip-path: polygon(8px 0, 100% 0, 100% 100%, 0 100%, 0 8px);
}

.process-step:nth-child(3) .process-icon-box {
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%);
}

.process-icon-text {
  position: relative;
  z-index: 3;
}

.process-title {
  display: flex;
  align-items: center;
  gap: 3px;
  /* Equal spacing between slashes and text */
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 300;
  /* Very thin */
  color: var(--text-muted);
  margin-bottom: 24px;
}

.process-slash {
  font-size: 16px;
  /* Much larger than text */
  font-weight: 300;
  line-height: 1;
  color: var(--text-muted);
  margin-top: -2px;
  /* slight visual alignment correction */
}

.process-title-text {
  font-size: 20px;
  line-height: 1;
  letter-spacing: 0.05em;
}

.process-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.process-list li {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 24px;
  /* Updated */
  font-weight: 500;
  letter-spacing: -0.04em;
  /* Tighter */
  text-transform: uppercase;
}

/* ====== IMAGE BREAK ====== */
.section--image-break {
  padding: 0;
}

.image-break-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 80px 40px;
  background: var(--bg);
}

.image-break-left {
  flex: 1;
}

.image-break-sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-transform: uppercase;
  max-width: 300px;
  line-height: 1.7;
}

.image-break-right {
  flex: 1;
  text-align: right;
}

.image-break-heading {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(4rem, 8vw, 7rem);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  color: var(--text);
}

.image-break-scroll {
  width: 100%;
  height: 200vh;
  position: relative;
}

.image-break-visual {
  width: 100%;
  height: 100vh;
  position: sticky;
  top: 0;
  overflow: hidden;
  margin-bottom: 0;
}

.section-divider--image-break {
  position: relative;
  z-index: 4;
  width: 100%;
  display: block;
  margin-top: -100vh;
  color: var(--bg);
  pointer-events: none;
}

.image-break-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg);
  opacity: 0;
  /* Animated by GSAP */
  z-index: 1;
  pointer-events: none;
}

.image-break-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(20%) contrast(1.1);
  transform-origin: center;
  transform: scale(1.1);
  /* Start slightly zoomed in */
  will-change: transform;
}

.with-noise {
  position: relative;
  overflow: hidden;
}

/* Ensure sticky isn't overridden by the .with-noise utility class */
.image-break-visual.with-noise {
  position: sticky;
}

.with-noise::after {
  content: "";
  position: absolute;
  inset: -200%;
  width: 500%;
  height: 500%;
  background-image: url("https://framerusercontent.com/images/rR6HYXBrMmX4cRpXfXUOvpvpB0.png");
  background-repeat: repeat;
  background-size: 380px;
  opacity: 0.11;
  animation: framer-noise 0.5s steps(10) infinite;
  will-change: transform;
  pointer-events: none;
  z-index: 10;
}

/* ====== CYBER SCANNER REVEAL ====== */
.cyber-scanner {
  position: relative;
  display: inline-flex;
  align-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.25rem;
  /* Larger letters */
  letter-spacing: 0.15em;
  padding: 8px 24px;
  /* Restoring previous wider padding proportions */
  background-color: rgb(47, 46, 51);
  color: rgb(137, 137, 141);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  /* Faint top/bottom only */
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 2px;
}

.cyber-scanner-overlay {
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  bottom: -1px;
  display: flex;
  align-items: center;
  padding: 8px 24px;
  background-color: rgb(47, 46, 51);
  /* Exact same background to perfectly hide old text */
  color: #82c8e5;
  /* Exact color from screenshot */
  text-shadow: 0 0 8px rgba(130, 200, 229, 0.4);
  /* Softer glow */
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  /* Slightly brighter top/bottom */
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 2px;
  clip-path: inset(0 100% 0 0);
  animation: scan-reveal 4s ease-in-out infinite;
  white-space: nowrap;
}

.cyber-scanner-line {
  position: absolute;
  top: -10px;
  bottom: -10px;
  left: 0;
  width: 2px;
  background: linear-gradient(to bottom, transparent, rgb(0, 153, 255) 20%, rgb(0, 153, 255) 80%, transparent);
  /* Blurry ends */
  /* Trailing shadow to the left, glowing heavily */
  box-shadow: -4px 0 16px 2px rgba(130, 200, 229, 0.8), -15px 0 30px 5px rgba(130, 200, 229, 0.4), -30px 0 60px rgba(130, 200, 229, 0.2);
  animation: scan-line 4s ease-in-out infinite;
  z-index: 2;
  opacity: 0;
}

@keyframes scan-reveal {

  0%,
  10% {
    clip-path: inset(0 100% 0 0);
    opacity: 1;
  }

  65%,
  85% {
    clip-path: inset(0 0% 0 0);
    opacity: 1;
  }

  95%,
  100% {
    clip-path: inset(0 0% 0 0);
    opacity: 0;
  }
}

@keyframes scan-line {

  0%,
  10% {
    left: 0%;
    opacity: 0;
  }

  12% {
    opacity: 1;
  }

  65% {
    left: 100%;
    opacity: 1;
  }

  75%,
  100% {
    left: 100%;
    opacity: 0;
  }
}

/* ====== RESPONSIVE ====== */
@media (max-width: 768px) {

  /* HARD LOCK MOBILE SCROLL WIDTH */
  html,
  body {
    width: 100vw;
    max-width: 100%;
    position: relative;
  }

  .wrapper {
    width: 100%;
    max-width: 100vw;
    overflow-x: clip;
    /* iOS 16+ support for overflow locking without breaking sticky positioning */
  }

  .nav {
    padding: 20px;
    /* offset from edge */
  }

  .nav-center {
    display: none;
  }

  .hero-bottom {
    left: 20px;
    right: 20px;
    bottom: 24px;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
  }

  .hero-title {
    font-size: clamp(1.5rem, 8vw, 80px) !important;
    white-space: nowrap;
  }

  .hero-sub {
    flex-wrap: wrap;
    gap: 6px;
  }

  .section-inner {
    padding: 100px 24px 0;
  }

  .section-heading {
    font-size: clamp(2rem, 7vw, 48px);
    white-space: pre-wrap;
    word-break: break-word;
  }

  .section-row {
    flex-direction: column;
    gap: 24px;
  }

  .row-hero-bottom {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  .archives-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
  }

  .stack-grid {
    grid-template-columns: 1fr;
  }

  .section--metrics {
    display: none !important;
  }

  .metrics-row {
    flex-wrap: wrap;
    gap: 32px;
    justify-content: center;
  }

  .service-row {
    flex-direction: column;
    gap: 16px;
    padding: 16px 0;
  }

  .service-content {
    flex: none;
    padding-right: 0;
  }

  .service-visual {
    flex: none;
    width: 100%;
    height: 134px !important;
    overflow: hidden;
  }

  .service-visual-inner {
    padding-top: 0 !important;
    height: 134px !important;
  }

  .process-header .section-heading {
    white-space: pre-wrap;
  }

  .process-layout {
    flex-direction: column;
    gap: 0;
    overflow: hidden;
    /* Fix rogue absolute elements causing scroll block */
  }

  .process-step {
    padding: 40px 20px;
  }

  .process-step-corner {
    display: none !important;
  }

  .process-title {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    white-space: nowrap;
  }

  .process-text {
    font-size: 14px;
  }

  .process-list li {
    white-space: nowrap;
    font-size: 13px;
  }

  .image-break-header {
    flex-direction: column;
    gap: 20px;
    padding: 40px 20px;
    text-align: left;
  }

  .image-break-left {
    order: 2;
    width: 100%;
  }

  .image-break-right {
    order: 1;
    text-align: left;
    width: 100%;
  }

  .image-break-title {
    font-size: clamp(1.5rem, 6vw, 32px);
    white-space: pre-wrap;
    word-break: break-word;
  }

  .footer-row {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  /* ====== MENU MOBILE FIXES ====== */
  .menu-overlay {
    width: 100%;
    min-width: auto;
    border-right: none;
  }

  .menu-list-wrapper {
    padding: 0 16px;
    margin: 0 8px;
  }

  .menu-link {
    padding: 16px 0;
  }

  .menu-link-text {
    font-size: clamp(1.8rem, 8vw, 3rem);
  }

  .menu-link-num {
    font-size: 0.7rem;
  }
}

/* ====== MODAL (CONTACT PUSH) ====== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100dvh;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 20px;
}

.modal-overlay.is-active {
  opacity: 1;
  pointer-events: auto;
}

.modal-wrapper {
  width: 100%;
  max-width: 480px;
  transform: translateY(20px);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.is-active .modal-wrapper {
  transform: translateY(0);
}

.modal-tab {
  background: #d4d4d4;
  /* Light gray tab from the reference */
  color: #000;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  text-align: center;
  padding: 16px;
  text-transform: uppercase;
  clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 0 100%);
  position: relative;
  z-index: 2;
}

.modal-close-btn {
  position: absolute;
  right: 15px;
  top: 15px;
  background: transparent;
  border: none;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  line-height: 1;
  cursor: pointer;
  color: rgb(0, 153, 255);
  padding: 6px 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s, color 0.2s;
  z-index: 10;
}

.modal-close-btn:hover {
  opacity: 0.7;
}

.modal-content {
  background: #000;
  border: 1px solid var(--border);
  border-top: none;
  padding: 40px 30px;
  position: relative;
  /* Cut bottom-left corner */
  clip-path: polygon(0 0,
      100% 0,
      100% 100%,
      40px 100%,
      0 calc(100% - 40px));
}

/* Hack to draw the missing border on the clipped edge */
.modal-content::before {
  content: "";
  position: absolute;
  bottom: 18px;
  left: -20px;
  width: 60px;
  height: 1px;
  background-color: var(--border);
  transform: rotate(45deg);
  z-index: 10;
}

/* The noise pattern shifted to top tab as requested */
.modal-tab.with-noise::after {
  opacity: 0.15;
}

.modal-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.modal-link-huge {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2rem, 8vw, 3rem);
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  text-decoration: none;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  display: block;
  transition: opacity 0.2s;
}

.modal-link-huge:hover {
  opacity: 0.7;
}

.modal-subtitle {
  font-family: 'Roboto Mono', monospace;
  font-size: 0.9rem;
  color: #fff;
  opacity: 0.9;
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 40px;
  letter-spacing: 0.05em;
}

.modal-form {
  width: 100%;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-form-heading {
  font-family: 'Roboto Mono', monospace;
  font-size: 1rem;
  color: var(--text);
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 20px;
}

.modal-input {
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
  color: var(--text);
  padding: 12px 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s;
}

.modal-input:focus {
  border-bottom-color: var(--text);
}

.modal-input::placeholder {
  color: #aaa;
}

.modal-submit {
  margin-top: 10px;
}

/* Removed old submit hover */