/* =========================================================
   PAMIMA — Premium design system
   ========================================================= */

:root {
  /* Deepened, more refined palette */
  --bg: #0A1931;
  /* deep navy base */
  --bg-2: #081428;
  /* deepest */
  --surface: #112D4E;
  /* rich card */
  --surface-2: #18365C;
  /* hover */
  --line: rgba(219, 226, 239, 0.12);
  --line-strong: rgba(219, 226, 239, 0.22);

  --fg: #F2F0EB;
  /* bone */
  --fg-muted: #B7C3D6;
  /* dusty blue */
  --fg-dim: #6F82A1;
  /* quieter */

  --accent: #6FA8DC;
  /* refined steel blue, more luminous */
  --accent-deep: #3F72AF;
  /* original brand blue */
  --accent-soft: rgba(111, 168, 220, 0.12);

  --pale: #DBE2EF;

  /* Type */
  --f-display: "Instrument Serif", "Cormorant Garamond", Georgia, serif;
  --f-ui: "Geist", "Inter", system-ui, -apple-system, sans-serif;
  --f-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Rhythm */
  --gutter: clamp(20px, 4vw, 48px);
  --max: 1440px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html,
body {
  background: var(--bg);
  color: var(--fg);
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  /* fixes iOS scroll jitter / url bar pump */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--f-ui);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.55;
  min-height: 100vh;
  overflow-x: hidden;
  overscroll-behavior-y: none;
}

/* Custom cursor only activates after JS confirms fine pointer */
body.has-custom-cursor,
body.has-custom-cursor button {
  cursor: none;
}

@media (pointer: coarse),
(hover: none) {

  .cursor,
  .cursor-dot {
    display: none !important;
  }
}

/* Respect reduced-motion everywhere */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  html {
    scroll-behavior: auto;
  }
}

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

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

/* Keyboard focus — visible, accessible */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

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

/* Utilities */
.serif {
  font-family: var(--f-display);
  font-weight: 400;
  letter-spacing: -0.01em;
}

.mono {
  font-family: var(--f-mono);
}

.eyebrow {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-muted);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--accent);
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section {
  padding: clamp(96px, 12vw, 180px) 0;
  position: relative;
}

/* Film grain overlay — no mix-blend-mode (huge repaint cost on scroll) */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 80;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  /* Promote to own layer so the background behind it doesn't repaint on scroll */
  will-change: opacity;
  transform: translateZ(0);
}

/* Skip grain on mobile — pure paint cost for tiny visual */
@media (max-width: 768px) {
  .grain {
    display: none;
  }
}

/* Vignette */
.vignette::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 70;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, 0.35) 100%);
}

@media (max-width: 768px) {
  .vignette::after {
    background: radial-gradient(ellipse at center, transparent 65%, rgba(0, 0, 0, 0.2) 100%);
  }
}

/* =========================================================
   Cursor
   ========================================================= */
.cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 40px;
  height: 40px;
  pointer-events: none;
  z-index: 1000;
  transition: width 0.35s var(--ease), height 0.35s var(--ease),
    filter 0.35s var(--ease), opacity 0.35s var(--ease);
  will-change: transform;
  color: var(--accent);
}

.cursor svg {
  width: 100%;
  height: 100%;
  display: block;
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 0 6px rgba(111, 168, 220, 0.4));
  transition: transform 0.6s var(--ease);
  transform-origin: center;
}

.cursor.spin svg {
  animation: cursorSpin 6s linear infinite;
}

@keyframes cursorSpin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

.cursor-dot {
  position: fixed;
  top: 0;
  left: 0;
  width: 5px;
  height: 5px;
  background: var(--fg);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 1001;
  mix-blend-mode: difference;
  will-change: transform;
}

.cursor.hover {
  width: 72px;
  height: 72px;
}

.cursor.hover svg {
  filter: drop-shadow(0 0 18px rgba(111, 168, 220, 0.8));
}

.cursor.text {
  width: 4px;
  height: 28px;
}

.cursor.text svg {
  display: none;
}

.cursor.text::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--fg);
  border-radius: 2px;
  mix-blend-mode: difference;
}

/* =========================================================
   Navigation
   ========================================================= */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 90;
  padding: 24px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* mix-blend-mode removed — it forced a full-page repaint on every scroll frame */
  background: rgba(10, 25, 49, 0);
  border-bottom: 1px solid transparent;
  transition: padding 0.35s var(--ease), background 0.35s var(--ease), border-color 0.35s var(--ease);
  /* Own layer — isolates nav paint from the scrolling page */
  transform: translateZ(0);
  will-change: background-color;
  contain: layout paint;
}

.nav.scrolled {
  background: rgba(10, 25, 49, 0.82);
  backdrop-filter: blur(14px) saturate(1.15);
  -webkit-backdrop-filter: blur(14px) saturate(1.15);
  border-bottom-color: var(--line);
  padding: 14px var(--gutter);
}

/* Phones: skip backdrop-filter — expensive + occasionally janky on iOS */
@media (max-width: 768px) {
  .nav.scrolled {
    background: rgba(10, 25, 49, 0.94);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--fg);
}

.brand img {
  height: 30px;
  width: 30px;
  object-fit: cover;
}

.brand-name {
  font-family: var(--f-display);
  font-size: 22px;
  letter-spacing: -0.01em;
  font-style: italic;
}

.brand-sup {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--fg-muted);
  text-transform: uppercase;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-time {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--fg-muted);
  text-transform: uppercase;
}

.menu-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg);
  padding: 10px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}

.menu-btn:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.menu-btn .bars {
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
}

.menu-btn .bars span {
  width: 14px;
  height: 1px;
  background: currentColor;
  transition: transform 0.3s var(--ease);
}

.menu-btn.open .bars span:nth-child(1) {
  transform: translateY(2.5px) rotate(45deg);
}

.menu-btn.open .bars span:nth-child(2) {
  transform: translateY(-2.5px) rotate(-45deg);
}

/* Full-screen overlay menu */
.menu-overlay {
  position: fixed;
  inset: 0;
  z-index: 85;
  background: var(--bg-2);
  clip-path: circle(0% at calc(100% - 80px) 48px);
  transition: clip-path 0.9s cubic-bezier(0.86, 0, 0.07, 1);
  overflow: hidden;
  pointer-events: none;
}

.menu-overlay.open {
  clip-path: circle(150% at calc(100% - 80px) 48px);
  pointer-events: auto;
}

.menu-inner {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  padding: 100px var(--gutter) 60px;
  gap: 60px;
}

@media (max-width: 900px) {
  .menu-inner {
    grid-template-columns: 1fr;
    padding-top: 120px;
  }
}

.menu-links {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.menu-link {
  font-family: var(--f-display);
  font-size: clamp(40px, 6vw, 80px);
  line-height: 1;
  letter-spacing: -0.02em;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  color: var(--fg);
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(40px);
  transition: color 0.4s var(--ease);
}

.menu-overlay.open .menu-link {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.menu-overlay.open .menu-link:nth-child(1) {
  transition-delay: 0.25s;
}

.menu-overlay.open .menu-link:nth-child(2) {
  transition-delay: 0.32s;
}

.menu-overlay.open .menu-link:nth-child(3) {
  transition-delay: 0.39s;
}

.menu-overlay.open .menu-link:nth-child(4) {
  transition-delay: 0.46s;
}

.menu-overlay.open .menu-link:nth-child(5) {
  transition-delay: 0.53s;
}

.menu-overlay.open .menu-link:nth-child(6) {
  transition-delay: 0.60s;
}

.menu-link:hover {
  color: var(--accent);
  font-style: italic;
}

.menu-link .idx {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--fg-muted);
}

.menu-link .arrow {
  font-family: var(--f-display);
  font-size: 0.5em;
  transition: transform 0.4s var(--ease);
}

.menu-link:hover .arrow {
  transform: translateX(12px);
}

.menu-side {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px 0;
}

.menu-meta-title {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 16px;
}

.menu-contact {
  font-family: var(--f-display);
  font-size: 28px;
  font-style: italic;
  color: var(--fg);
}

.menu-contact a {
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 3px;
}

.menu-socials {
  display: flex;
  gap: 24px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.menu-socials a:hover {
  color: var(--accent);
}

/* =========================================================
   Buttons / chips
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 18px 28px;
  border-radius: 999px;
  font-family: var(--f-ui);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  border: 1px solid var(--line-strong);
  color: var(--fg);
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease), transform 0.3s var(--ease);
  position: relative;
  overflow: hidden;
}

.btn:hover {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.btn-ghost {
  border-color: var(--line);
}

.btn .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.btn:hover .dot {
  background: var(--bg);
}

.chip {
  display: inline-flex;
  padding: 6px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

/* =========================================================
   Hero
   ========================================================= */
.hero {
  padding-top: 140px;
  padding-bottom: 80px;
  position: relative;
}

.hero-kicker {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: clamp(40px, 8vw, 100px);
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.hero-kicker .live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--fg);
}

.hero-kicker .live::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 var(--accent);
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(111, 168, 220, 0.6);
  }

  70% {
    box-shadow: 0 0 0 12px rgba(111, 168, 220, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(111, 168, 220, 0);
  }
}

.hero h1 {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(48px, 11vw, 200px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--fg);
  word-break: break-word;
  /* Prevent mobile overflow from long words */
  overflow-wrap: break-word;
}

.hero h1 em {
  font-style: italic;
  color: var(--accent);
}

.hero-lines .line {
  display: block;
  overflow: hidden;
}

.hero-lines .line>span {
  display: inline-block;
  transform: translateY(110%);
  will-change: transform;
}

.hero-lines.ready .line>span {
  transform: translateY(0);
  transition: transform 1.1s var(--ease);
}

.hero-lines.ready .line:nth-child(1)>span {
  transition-delay: 0.1s;
}

.hero-lines.ready .line:nth-child(2)>span {
  transition-delay: 0.22s;
}

.hero-lines.ready .line:nth-child(3)>span {
  transition-delay: 0.34s;
}

.hero-lines.ready .line:nth-child(4)>span {
  transition-delay: 0.46s;
}

.hero-bottom {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 40px;
  margin-top: clamp(60px, 10vw, 120px);
}

@media (max-width: 900px) {
  .hero-bottom {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

.hero-desc {
  max-width: 440px;
  color: var(--fg-muted);
  font-size: 17px;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

@media (max-width: 900px) {
  .hero-actions {
    justify-content: flex-start;
  }
}

/* Hero image col */
.hero-visual {
  position: relative;
  aspect-ratio: 4/5;
  width: 100%;
  border-radius: 2px;
  overflow: hidden;
  border: 1px solid var(--line);
  max-width: 560px;
}

.hero-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.15);
  transition: transform 1.6s var(--ease);
  will-change: transform;
}

.hero-visual.in img {
  transform: scale(1);
  will-change: auto;
}

@media (max-width: 900px) {
  .hero-visual {
    aspect-ratio: 4/3;
    margin: 0 auto;
  }
}

/* =========================================================
   Marquee (scroll-velocity driven)
   ========================================================= */
.marquee {
  overflow: hidden;
  padding: 32px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.marquee-track {
  display: inline-flex;
  gap: 60px;
  align-items: center;
  font-family: var(--f-display);
  font-size: clamp(32px, 6vw, 88px);
  letter-spacing: -0.02em;
  will-change: transform;
}

.marquee-track span {
  display: inline-flex;
  align-items: center;
  gap: 60px;
}

.marquee-track .sep {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
}

.marquee-track em {
  font-style: italic;
  color: var(--accent);
}

/* =========================================================
   Numbered service list
   ========================================================= */
.service-row {
  display: grid;
  grid-template-columns: 80px 1fr 1fr 140px;
  align-items: center;
  gap: 40px;
  padding: 40px 0;
  border-top: 1px solid var(--line);
  transition: color 0.4s var(--ease), background-color 0.4s var(--ease);
  position: relative;
}

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

/* Hover only on true pointer devices — avoids sticky-active on mobile */
@media (hover: hover) and (pointer: fine) {
  .service-row:hover {
    background-color: rgba(111, 168, 220, 0.04);
  }
}

.service-row:hover .service-title {
  color: var(--accent);
  letter-spacing: -0.04em;
}

.service-row::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 0;
  background: var(--accent-soft);
  z-index: -1;
  transition: height 0.5s var(--ease);
}

.service-num {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--fg-muted);
}

.service-title {
  font-family: var(--f-display);
  font-size: clamp(32px, 4.5vw, 68px);
  line-height: 1;
  letter-spacing: -0.02em;
  transition: color 0.4s var(--ease), letter-spacing 0.4s var(--ease);
}

.service-desc {
  color: var(--fg-muted);
  font-size: 15px;
  line-height: 1.6;
  max-width: 360px;
}

.service-meta {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-muted);
  text-align: right;
}

@media (max-width: 900px) {
  .service-row {
    grid-template-columns: 40px 1fr;
    gap: 16px;
  }

  .service-row .service-desc,
  .service-row .service-meta {
    grid-column: 2;
  }
}

/* Preview image that follows cursor on service hover */
.service-preview {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  height: 360px;
  border-radius: 4px;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.9);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
  z-index: 50;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  will-change: transform, left, top, opacity;
  contain: layout paint;
}

.service-preview.active {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.service-preview>div {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
}

/* =========================================================
   Sticky image + scrolling text
   ========================================================= */
.sticky-scene {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

@media (max-width: 900px) {
  .sticky-scene {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

.sticky-visual {
  position: sticky;
  top: 120px;
  aspect-ratio: 4/5;
  overflow: hidden;
  border: 1px solid var(--line);
}

.sticky-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sticky-text {
  display: flex;
  flex-direction: column;
  gap: 80px;
}

.sticky-block h3 {
  font-family: var(--f-display);
  font-size: clamp(32px, 4vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}

.sticky-block p {
  color: var(--fg-muted);
  font-size: 17px;
  line-height: 1.7;
  max-width: 480px;
}

.sticky-block .stat {
  font-family: var(--f-display);
  font-size: 80px;
  line-height: 1;
  color: var(--accent);
  letter-spacing: -0.03em;
  margin-top: 20px;
}

/* =========================================================
   Horizontal scroll work
   ========================================================= */
.hscroll {
  position: relative;
  height: 100vh;
  /* dvh/svh keeps iOS url-bar from breaking the layout on scroll */
  height: 100dvh;
  overflow: hidden;
}

.hscroll-track {
  display: flex;
  height: 100%;
  align-items: center;
  gap: 32px;
  padding: 0 var(--gutter);
  will-change: transform;
  /* Keep kids off-layout so transform stays cheap */
  transform: translate3d(0, 0, 0);
}

.hscroll-card {
  flex: 0 0 70vw;
  max-width: 720px;
  height: 78dvh;
  border-radius: 2px;
  overflow: hidden;
  position: relative;
  border: 1px solid var(--line);
  background: var(--surface);
}

/* Tablet: more cards visible at once */
@media (min-width: 901px) and (max-width: 1200px) {
  .hscroll-card {
    flex-basis: 58vw;
    max-width: 600px;
  }
}

/* Mobile: disable horizontal pin — swap to a native horizontal swipe so scrolling
   the page feels normal instead of hijacked. Much smoother on touch. */
@media (max-width: 900px) {
  .hscroll {
    height: auto;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 24px;
  }

  .hscroll-track {
    height: auto;
    transform: none !important;
    padding: 0 var(--gutter);
  }

  .hscroll-card {
    flex-basis: 82vw;
    height: 72svh;
    max-width: 540px;
    scroll-snap-align: center;
  }

  .hscroll-progress,
  .hscroll-count {
    display: none;
  }
}

.hscroll-card .hs-img {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hscroll-card .hs-img>div {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  transition: transform 0.8s var(--ease);
}

.hscroll-card:hover .hs-img>div {
  transform: scale(1.05);
}

.hscroll-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(8, 20, 40, 0.85) 0%, rgba(8, 20, 40, 0.1) 45%, transparent 100%);
}

.hscroll-card .meta {
  position: absolute;
  inset: auto 0 0 0;
  padding: 40px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  z-index: 2;
  color: var(--fg);
}

.hscroll-card .meta h3 {
  font-family: var(--f-display);
  font-size: clamp(32px, 3.5vw, 56px);
  line-height: 1;
  letter-spacing: -0.02em;
}

.hscroll-card .meta .tag {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-bottom: 12px;
}

.hscroll-card .meta .num {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--fg-muted);
}

.hscroll-progress {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: 40px;
  height: 1px;
  background: var(--line);
  z-index: 3;
}

.hscroll-progress>span {
  display: block;
  height: 1px;
  background: var(--accent);
  width: 0%;
}

.hscroll-count {
  position: absolute;
  left: var(--gutter);
  bottom: 60px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-muted);
  z-index: 3;
}

/* Abstract placeholder pattern */
.abstract {
  position: relative;
  background: var(--surface);
  overflow: hidden;
}

.abstract::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(135deg, rgba(111, 168, 220, 0.07) 0, rgba(111, 168, 220, 0.07) 1px, transparent 1px, transparent 14px),
    radial-gradient(circle at 30% 40%, rgba(111, 168, 220, 0.25), transparent 55%),
    radial-gradient(circle at 70% 60%, rgba(17, 45, 78, 0.6), transparent 60%);
}

.abstract .label {
  position: absolute;
  top: 20px;
  left: 20px;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

/* =========================================================
   Footer
   ========================================================= */
.footer {
  border-top: 1px solid var(--line);
  padding: clamp(80px, 10vw, 160px) 0 40px;
  background: var(--bg-2);
  position: relative;
  overflow: hidden;
}

.footer-huge {
  font-family: var(--f-display);
  font-size: clamp(56px, 14vw, 240px);
  line-height: 0.92;
  letter-spacing: -0.04em;
  color: var(--fg);
  text-align: center;
  overflow-wrap: break-word;
}

.footer-huge em {
  font-style: italic;
  color: var(--accent);
}

.footer-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-top: 120px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

@media (max-width: 900px) {
  .footer-meta {
    grid-template-columns: 1fr 1fr;
  }
}

.footer-meta h5 {
  color: var(--fg);
  margin-bottom: 16px;
  font-weight: 500;
}

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

.footer-bottom {
  display: flex;
  justify-content: space-between;
  margin-top: 60px;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--fg-dim);
  text-transform: uppercase;
  flex-wrap: wrap;
  gap: 16px;
}

/* =========================================================
   Reveal helpers (driven by IntersectionObserver via scripts.js)
   ========================================================= */
[data-reveal] {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  will-change: opacity, transform;
}

[data-reveal].in {
  opacity: 1;
  transform: translateY(0);
  will-change: auto;
}

[data-mask] {
  overflow: hidden;
  display: inline-block;
}

[data-mask]>span {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 1.1s var(--ease);
}

[data-mask].in>span {
  transform: translateY(0);
}

[data-parallax] {
  will-change: transform;
}

[data-scale-in] img {
  transform: scale(1.2);
  transition: transform 1.6s var(--ease);
}

[data-scale-in].in img {
  transform: scale(1);
}

/* Sticky figure that gets scaled — uses transform (GPU) instead of width/height (layout) */
.scale-figure {
  height: 200vh;
  position: relative;
}

.scale-figure .sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.scale-figure .sticky>.frame {
  /* Final / max size — the JS scales this *down* for the start state via CSS var */
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  border: 1px solid var(--line);
  transform: scale(var(--fig-scale, 0.4));
  transform-origin: center;
  will-change: transform;
  /* Reduce subpixel jitter */
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.scale-figure .sticky>.frame>div {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
}

.scale-figure .caption {
  position: absolute;
  bottom: 8vh;
  left: var(--gutter);
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-muted);
  z-index: 2;
}

/* Tablet + mobile: shorter pin, gentler scale range to avoid iOS 100vh pump */
@media (max-width: 900px) {
  .scale-figure {
    height: 150vh;
  }

  .scale-figure .sticky {
    height: 100svh;
  }
}

/* =========================================================
   Page header (for sub pages)
   ========================================================= */
.page-head {
  padding: clamp(120px, 18vw, 200px) var(--gutter) clamp(48px, 8vw, 100px);
  border-bottom: 1px solid var(--line);
}

.page-head .eyebrow {
  margin-bottom: 32px;
}

.page-head h1 {
  font-family: var(--f-display);
  font-size: clamp(44px, 9.5vw, 180px);
  line-height: 0.95;
  letter-spacing: -0.03em;
  overflow-wrap: break-word;
}

.page-head h1 em {
  font-style: italic;
  color: var(--accent);
}

.page-head .row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  margin-top: 32px;
  align-items: end;
}

@media (max-width: 900px) {
  .page-head .row {
    grid-template-columns: 1fr;
  }
}

.page-head .intro {
  max-width: 560px;
  color: var(--fg-muted);
  font-size: 18px;
  line-height: 1.6;
}

/* Generic text block */
.rich {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 40px;
}

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

.rich h3 {
  font-family: var(--f-display);
  font-size: clamp(28px, 3vw, 42px);
  line-height: 1.1;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.rich p {
  color: var(--fg-muted);
  max-width: 620px;
  font-size: 17px;
  line-height: 1.75;
}

.rich .lead {
  color: var(--fg);
  font-size: 22px;
  line-height: 1.55;
  font-family: var(--f-display);
  max-width: 720px;
}

/* Process steps */
.process-row {
  display: grid;
  grid-template-columns: 80px 200px 1fr 1fr;
  gap: 32px;
  padding: 40px 0;
  border-top: 1px solid var(--line);
}

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

.process-row .step {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--fg-muted);
  padding-top: 8px;
}

.process-row h4 {
  font-family: var(--f-display);
  font-size: clamp(28px, 2.8vw, 40px);
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.process-row p {
  color: var(--fg-muted);
  line-height: 1.65;
  font-size: 15px;
}

.process-row .time {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--fg-muted);
  text-align: right;
  padding-top: 8px;
  text-transform: uppercase;
}

@media (max-width: 900px) {
  .process-row {
    grid-template-columns: 60px 1fr;
  }

  .process-row p,
  .process-row .time {
    grid-column: 2;
    text-align: left;
  }
}

/* Testimonial block */
.quote {
  font-family: var(--f-display);
  font-size: clamp(32px, 3.5vw, 56px);
  line-height: 1.15;
  letter-spacing: -0.015em;
  max-width: 1100px;
}

.quote em {
  font-style: italic;
  color: var(--accent);
}

.quote-attr {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-top: 40px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.quote-attr .avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
}

/* Journal grid */
.journal-list {
  display: flex;
  flex-direction: column;
}

.journal-row {
  display: grid;
  grid-template-columns: 80px 1.3fr 1fr 200px 120px;
  gap: 32px;
  align-items: center;
  padding: 32px 0;
  border-top: 1px solid var(--line);
  transition: background-color 0.35s var(--ease);
  position: relative;
}

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

@media (hover: hover) and (pointer: fine) {
  .journal-row:hover {
    background-color: rgba(111, 168, 220, 0.04);
  }
}

@media (hover: hover) and (pointer: fine) {
  .journal-row:hover h4 {
    color: var(--accent);
    font-style: italic;
  }
}

.journal-row .date {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--fg-muted);
}

.journal-row h4 {
  font-family: var(--f-display);
  font-size: clamp(24px, 2.4vw, 36px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  transition: color 0.3s var(--ease), font-style 0.3s var(--ease);
}

.journal-row .cat {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.journal-row .author {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--fg-muted);
  text-transform: uppercase;
}

.journal-row .arrow {
  font-family: var(--f-display);
  font-size: 32px;
  text-align: right;
  color: var(--fg-muted);
  transition: transform 0.3s var(--ease), color 0.3s var(--ease);
}

.journal-row:hover .arrow {
  color: var(--accent);
  transform: translateX(10px);
}

@media (max-width: 900px) {
  .journal-row {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 24px 0;
  }

  .journal-row .arrow,
  .journal-row .author,
  .journal-row .cat {
    display: none;
  }
}

/* Contact form */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

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

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 16px;
  transition: border-color 0.3s var(--ease);
}

.field.full {
  grid-column: 1 / -1;
}

.field:focus-within {
  border-color: var(--accent);
}

.field label {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

.field input,
.field textarea {
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--fg);
  font-family: var(--f-display);
  font-size: clamp(20px, 2vw, 28px);
  line-height: 1.3;
  resize: none;
}

.field textarea {
  min-height: 100px;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip-btn {
  padding: 10px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-muted);
  transition: all 0.3s var(--ease);
}

.chip-btn:hover,
.chip-btn.active {
  color: var(--bg);
  background: var(--accent);
  border-color: var(--accent);
}

/* Floating decorative text */
.float-text {
  position: absolute;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--fg-dim);
  text-transform: uppercase;
}

/* Helper columns */
.cols-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

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

.contact-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 80px;
}

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

@media (max-width: 900px) {

  .cols-2,
  .cols-3,
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-time {
    display: none;
  }
}

/* =========================================================
   Tablet + mobile refinements (consolidated, end-of-file wins)
   ========================================================= */

/* Any inline `grid-template-columns: 1fr 1fr` in HTML stacks < 900px */
@media (max-width: 900px) {

  [style*="grid-template-columns: 1fr 1fr"],
  [style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }

  .hero {
    padding-top: 110px;
    padding-bottom: 40px;
  }

  .hero-kicker {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .section {
    padding: clamp(64px, 14vw, 120px) 0;
  }

  .sticky-visual {
    position: relative;
    top: auto;
    aspect-ratio: 4/5;
  }

  .sticky-text {
    gap: 48px;
  }

  .menu-inner {
    padding: 100px var(--gutter) 40px;
    gap: 40px;
  }

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

  .menu-contact {
    font-size: 20px;
  }

  .menu-socials {
    flex-wrap: wrap;
    gap: 16px;
  }

  .service-row {
    padding: 28px 0;
  }

  .service-title {
    font-size: clamp(26px, 8vw, 42px);
  }

  .btn {
    padding: 14px 22px;
    font-size: 13px;
  }

  .footer-meta {
    margin-top: 60px;
  }

  .process-row {
    padding: 28px 0;
    gap: 12px 20px;
  }
}

/* Tablet (901 – 1200) — things get airy but shouldn't overflow */
@media (min-width: 901px) and (max-width: 1200px) {
  .hero h1 {
    font-size: clamp(72px, 10vw, 160px);
  }

  .menu-inner {
    grid-template-columns: 1.2fr 1fr;
    gap: 40px;
  }

  .service-row {
    grid-template-columns: 60px 1fr 1fr 100px;
    gap: 24px;
  }
}

/* Narrow phones — stop nav from wrapping */
@media (max-width: 480px) {
  .brand-sup {
    display: none;
  }

  .brand img {
    height: 26px;
    width: 26px;
  }

  .brand-name {
    font-size: 19px;
  }

  .menu-btn {
    padding: 8px 14px;
    font-size: 11px;
    gap: 10px;
  }

  .hero-visual {
    aspect-ratio: 1/1;
  }

  .footer-huge {
    font-size: clamp(44px, 14vw, 96px);
  }

  .page-head h1 {
    font-size: clamp(40px, 13vw, 96px);
  }

  .hero-bottom {
    margin-top: 40px;
  }

  .section {
    padding: clamp(56px, 14vw, 96px) 0;
  }
}

/* Heavy sections: let the browser skip offscreen rendering */
.hscroll,
.scale-figure,
.sticky-scene,
.marquee,
.footer {
  content-visibility: auto;
  contain-intrinsic-size: 800px;
}

.section {
  content-visibility: auto;
  contain-intrinsic-size: 700px;
}

/* Screen reader only — keeps content available without visual clutter */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Skip-link: hidden until keyboard-focused */
.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--accent);
  color: var(--bg);
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border-radius: 4px;
  transform: translateY(-200%);
  transition: transform 0.25s var(--ease);
}

.skip-link:focus {
  transform: translateY(0);
  outline: 2px solid var(--fg);
  outline-offset: 3px;
}