/* ==========================================================
   MERAKI — SITE STYLES
   Design system, layout primitives, component styles
   ========================================================== */

:root {
  /* palette */
  --ink: #0A0A0A;
  --graphite: #2C2C2C;
  --steel: #5C5C5C;
  --smoke: #8A8A8A;
  --fog: #B5B5B5;
  --bone: #EAE6DD;
  --paper: #F5F2EC;
  --white: #FFFFFF;
  --accent: #9C7B4A;
  --accent-deep: #7D6038;

  /* typography */
  --serif: 'Fraunces', 'Georgia', serif;
  --sans: 'Inter Tight', 'Helvetica Neue', sans-serif;
  --mono: 'JetBrains Mono', 'Menlo', monospace;

  /* spacing scale */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 1rem;
  --s-4: 1.5rem;
  --s-5: 2rem;
  --s-6: 3rem;
  --s-7: 4.5rem;
  --s-8: 6rem;
  --s-9: 8rem;

  /* container */
  --max: 1320px;
  --gutter: clamp(1.25rem, 4vw, 3rem);

  /* motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ----------------------- reset ----------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  font-weight: 400;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
p { margin: 0; }
h1, h2, h3, h4, h5 { margin: 0; font-weight: 400; }

/* ----------------------- type ----------------------- */
.display {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 0.98;
}
.display-xl { font-size: clamp(3.5rem, 9vw, 8.5rem); }
.display-lg { font-size: clamp(2.75rem, 6.5vw, 5.5rem); }
.display-md { font-size: clamp(2rem, 4vw, 3.25rem); line-height: 1.05; }
.display-sm { font-size: clamp(1.5rem, 2.5vw, 2.25rem); line-height: 1.1; }

.italic { font-style: italic; }
.serif { font-family: var(--serif); }

.kicker {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}
.mono {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
}
.muted { color: var(--steel); }
.fine { font-size: 0.95rem; line-height: 1.65; color: var(--graphite); }

/* ----------------------- layout ----------------------- */
.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding-inline: var(--gutter);
}
section { padding-block: var(--s-9); }
@media (max-width: 720px) { section { padding-block: var(--s-7); } }

.rule { height: 1px; background: var(--ink); }
.rule-fade { height: 1px; background: var(--fog); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-6); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-5); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-4); }
@media (max-width: 920px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ----------------------- nav ----------------------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(245, 242, 236, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease);
}
.nav.scrolled { border-bottom-color: rgba(10, 10, 10, 0.08); }
.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.1rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.brand .dot { color: var(--accent); }

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--s-5);
  font-family: var(--sans);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}
.nav-links a {
  position: relative;
  padding: 0.4rem 0;
  color: var(--graphite);
  transition: color 0.2s var(--ease);
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width 0.3s var(--ease);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }
.nav-links a.active { color: var(--ink); }

.nav-cta {
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  padding: 0.6rem 1.1rem;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.nav-cta:hover { background: transparent; color: var(--ink); }

/* dropdown */
.has-dropdown { position: relative; }
.dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  min-width: 260px;
  background: var(--paper);
  border: 1px solid rgba(10, 10, 10, 0.08);
  padding: 0.7rem 0;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s var(--ease);
  pointer-events: none;
  box-shadow: 0 30px 60px -20px rgba(10,10,10,0.18);
}
.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown {
  opacity: 1; visibility: visible;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}
.dropdown a {
  display: block;
  padding: 0.7rem 1.2rem;
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--graphite);
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.dropdown a::after { display: none; }
.dropdown a:hover { color: var(--accent); background: rgba(156,123,74,0.05); }

/* hamburger */
.menu-toggle { display: none; }
.mobile-nav { display: none; }
@media (max-width: 880px) {
  .nav-cta { display: none; }
  .nav-links { display: none; }
  .menu-toggle {
    display: block;
    width: 32px; height: 32px;
    position: relative;
  }
  .menu-toggle span {
    position: absolute;
    left: 4px; right: 4px;
    height: 1px;
    background: var(--ink);
    transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
  }
  .menu-toggle span:nth-child(1) { top: 11px; }
  .menu-toggle span:nth-child(2) { top: 16px; }
  .menu-toggle span:nth-child(3) { top: 21px; }
  .menu-toggle.open span:nth-child(1) { top: 16px; transform: rotate(45deg); }
  .menu-toggle.open span:nth-child(2) { opacity: 0; }
  .menu-toggle.open span:nth-child(3) { top: 16px; transform: rotate(-45deg); }
  .mobile-nav {
    display: block;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--paper);
    z-index: 99;
    padding: 7rem var(--gutter) 3rem;
    transform: translateY(-100%);
    transition: transform 0.4s var(--ease);
    overflow-y: auto;
  }
  .mobile-nav.open { transform: translateY(0); }
  .mobile-nav a {
    display: block;
    font-family: var(--serif);
    font-size: 1.8rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(10,10,10,0.08);
    color: var(--ink);
  }
  .mobile-nav .sub { padding-left: 1rem; font-size: 1.1rem; color: var(--steel); }
}

/* ----------------------- buttons ----------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.95rem 1.6rem;
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
  transition: all 0.25s var(--ease);
}
.btn:hover { background: transparent; color: var(--ink); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--paper); }
.btn .arrow { transition: transform 0.25s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

/* link arrow */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 0.2rem;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.link-arrow:hover { color: var(--accent); border-bottom-color: var(--accent); }
.link-arrow .arrow { transition: transform 0.25s var(--ease); }
.link-arrow:hover .arrow { transform: translateX(3px); }

/* ----------------------- section header ----------------------- */
.sec-head {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--s-6);
  align-items: end;
  margin-bottom: var(--s-7);
}
.sec-head .label { display: flex; flex-direction: column; gap: 0.8rem; }
.sec-head .num {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: var(--smoke);
}
@media (max-width: 720px) {
  .sec-head { grid-template-columns: 1fr; gap: var(--s-4); }
}

/* ----------------------- page hero ----------------------- */
.page-hero {
  padding-top: 11rem;
  padding-bottom: var(--s-7);
}
.page-hero .crumb {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: var(--smoke);
  margin-bottom: var(--s-4);
}
.page-hero .crumb span { color: var(--ink); }

/* ----------------------- footer ----------------------- */
.footer {
  background: var(--ink);
  color: var(--bone);
  padding-block: var(--s-8) var(--s-5);
  margin-top: var(--s-9);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--s-6);
  margin-bottom: var(--s-7);
}
@media (max-width: 920px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.footer h4 {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--s-4);
}
.footer-brand {
  font-family: var(--serif);
  font-size: 2.5rem;
  margin-bottom: 1rem;
}
.footer-brand .dot { color: var(--accent); }
.footer p, .footer a {
  font-size: 0.92rem;
  color: var(--fog);
  line-height: 1.7;
}
.footer a { display: block; transition: color 0.2s var(--ease); padding: 0.15rem 0; }
.footer a:hover { color: var(--paper); }
.footer-bottom {
  border-top: 1px solid rgba(234, 230, 221, 0.12);
  padding-top: var(--s-4);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: var(--smoke);
}

/* ----------------------- reveal animation ----------------------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}
.reveal-stagger > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal-stagger.in > * {
  opacity: 1;
  transform: translateY(0);
}
.reveal-stagger.in > *:nth-child(1) { transition-delay: 0.05s; }
.reveal-stagger.in > *:nth-child(2) { transition-delay: 0.12s; }
.reveal-stagger.in > *:nth-child(3) { transition-delay: 0.19s; }
.reveal-stagger.in > *:nth-child(4) { transition-delay: 0.26s; }
.reveal-stagger.in > *:nth-child(5) { transition-delay: 0.33s; }
.reveal-stagger.in > *:nth-child(6) { transition-delay: 0.40s; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-stagger > * { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ----------------------- accent line ----------------------- */
.accent-line {
  display: inline-block;
  width: 2.5rem;
  height: 1px;
  background: var(--accent);
  vertical-align: middle;
  margin-right: 0.75rem;
}

/* ----------------------- card patterns ----------------------- */
.num-card {
  padding: var(--s-4) 0;
  border-top: 1px solid var(--fog);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--s-4);
  align-items: start;
}
.num-card .n {
  font-family: var(--serif);
  font-size: 2rem;
  color: var(--accent);
  line-height: 1;
  min-width: 3rem;
}
.num-card h3 {
  font-family: var(--serif);
  font-size: 1.4rem;
  margin-bottom: 0.4rem;
  line-height: 1.2;
}
.num-card p {
  color: var(--graphite);
  font-size: 0.95rem;
}

/* ----------------------- hover image swap (used on cards) ----------------------- */
.card-link {
  display: block;
  padding: var(--s-5) 0;
  border-top: 1px solid var(--ink);
  position: relative;
  transition: padding 0.3s var(--ease);
}
.card-link:hover { padding-left: 0.6rem; }
.card-link .arrow {
  position: absolute;
  right: 0; top: var(--s-5);
  transition: transform 0.3s var(--ease);
}
.card-link:hover .arrow { transform: translateX(6px); }

/* ----------------------- dark inversion ----------------------- */
.dark {
  background: var(--ink);
  color: var(--paper);
}
.dark p, .dark .fine { color: var(--bone); }
.dark .muted { color: var(--fog); }
.dark .rule-fade { background: rgba(234, 230, 221, 0.15); }
.dark .num-card { border-top-color: rgba(234, 230, 221, 0.15); }
.dark .link-arrow { color: var(--paper); border-bottom-color: var(--paper); }
.dark .link-arrow:hover { color: var(--accent); border-bottom-color: var(--accent); }
.dark .btn.ghost { color: var(--paper); border-color: var(--paper); }
.dark .btn.ghost:hover { background: var(--paper); color: var(--ink); }

/* ----------------------- ticker (manifesto strip) ----------------------- */
.ticker {
  overflow: hidden;
  border-block: 1px solid var(--ink);
  padding-block: 1.5rem;
}
.ticker-track {
  display: flex;
  gap: 4rem;
  width: max-content;
  animation: ticker 40s linear infinite;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  color: var(--ink);
  white-space: nowrap;
}
.ticker-track span:nth-child(even) { color: var(--accent); }
@keyframes ticker {
  to { transform: translateX(-50%); }
}

/* ----------------------- giant stat ----------------------- */
.stat-block {
  background: var(--ink);
  color: var(--paper);
  padding: var(--s-7) var(--s-6);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-6);
  align-items: center;
}
.stat-block .figure {
  font-family: var(--serif);
  font-size: clamp(4rem, 12vw, 10rem);
  line-height: 0.9;
  letter-spacing: -0.03em;
}
.stat-block .figure .small { font-size: 0.4em; color: var(--accent); }
.stat-block p { color: var(--bone); font-size: 1.05rem; line-height: 1.55; }
.stat-block .kicker { color: var(--accent); margin-bottom: 1rem; display: block; }
@media (max-width: 720px) {
  .stat-block { grid-template-columns: 1fr; padding: var(--s-5); }
}

/* ----------------------- noise overlay (page texture) ----------------------- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.04 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  opacity: 0.7;
  z-index: 1;
  mix-blend-mode: multiply;
}
.nav, main, .footer { position: relative; z-index: 2; }

/* ==========================================================
   IMAGERY — always grayscale, with reveal & parallax patterns
   ========================================================== */
.img-frame {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(135deg, var(--bone) 0%, var(--fog) 100%);
}
.img-frame::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(
      45deg,
      transparent 0,
      transparent 12px,
      rgba(10,10,10,0.04) 12px,
      rgba(10,10,10,0.04) 13px
    );
  pointer-events: none;
}
.img-frame img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05);
  transition: transform 1.4s var(--ease), filter 0.6s var(--ease);
  display: block;
  z-index: 1;
}
.img-frame:hover img { transform: scale(1.04); }

/* hero image — large editorial */
.img-hero {
  aspect-ratio: 16 / 10;
}
.img-square { aspect-ratio: 1 / 1; }
.img-portrait { aspect-ratio: 3 / 4; }
.img-tall { aspect-ratio: 4 / 5; }
.img-wide { aspect-ratio: 21 / 9; }

/* mask reveal — slides up to expose image */
.img-mask {
  position: relative;
  overflow: hidden;
}
.img-mask::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--paper);
  transform: translateY(0);
  transition: transform 1.2s cubic-bezier(0.65, 0, 0.35, 1);
  z-index: 2;
}
.dark .img-mask::after { background: var(--ink); }
.img-mask.in::after { transform: translateY(-101%); }

/* parallax data-hook */
.parallax { will-change: transform; }

/* photo caption */
.photo-caption {
  display: flex;
  justify-content: space-between;
  margin-top: 0.8rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  color: var(--smoke);
  text-transform: uppercase;
}
.photo-caption .num { color: var(--accent); }

/* ==========================================================
   ICONS — inline SVG, consistent sizing
   ========================================================== */
.icon-sm { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.5; flex-shrink: 0; }
.icon-md { width: 28px; height: 28px; stroke: currentColor; fill: none; stroke-width: 1.5; flex-shrink: 0; }
.icon-lg { width: 44px; height: 44px; stroke: currentColor; fill: none; stroke-width: 1.25; flex-shrink: 0; }

.icon-box {
  width: 56px;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ink);
  border-radius: 50%;
  color: var(--ink);
  transition: background 0.3s var(--ease), color 0.3s var(--ease), transform 0.4s var(--ease);
}
.dark .icon-box { border-color: var(--bone); color: var(--bone); }
.icon-box:hover { background: var(--accent); border-color: var(--accent); color: var(--paper); transform: rotate(-8deg); }

/* ==========================================================
   ANIMATIONS — keyframes
   ========================================================== */

/* shimmer on big numbers */
@keyframes shimmer {
  0%, 100% { background-position: 200% 50%; }
  50% { background-position: -200% 50%; }
}
.shimmer-text {
  background: linear-gradient(
    100deg,
    var(--ink) 0%,
    var(--ink) 40%,
    var(--accent) 50%,
    var(--ink) 60%,
    var(--ink) 100%
  );
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 6s ease-in-out infinite;
}
.dark .shimmer-text {
  background: linear-gradient(
    100deg,
    var(--paper) 0%,
    var(--paper) 40%,
    var(--accent) 50%,
    var(--paper) 60%,
    var(--paper) 100%
  );
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* slow drift for hero image */
@keyframes drift {
  0%, 100% { transform: scale(1.06) translate(0, 0); }
  50% { transform: scale(1.08) translate(-1%, -0.5%); }
}
.img-drift img { animation: drift 16s ease-in-out infinite; }

/* pulse for accent dot */
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}
.dot-pulse {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse-dot 2.4s ease-in-out infinite;
}

/* letter-by-letter reveal */
.word-reveal {
  display: inline-block;
  overflow: hidden;
}
.word-reveal .w {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 0.9s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.word-reveal.in .w { transform: translateY(0); }
.word-reveal.in .w:nth-child(1) { transition-delay: 0.05s; }
.word-reveal.in .w:nth-child(2) { transition-delay: 0.13s; }
.word-reveal.in .w:nth-child(3) { transition-delay: 0.21s; }
.word-reveal.in .w:nth-child(4) { transition-delay: 0.29s; }
.word-reveal.in .w:nth-child(5) { transition-delay: 0.37s; }
.word-reveal.in .w:nth-child(6) { transition-delay: 0.45s; }
.word-reveal.in .w:nth-child(7) { transition-delay: 0.53s; }
.word-reveal.in .w:nth-child(8) { transition-delay: 0.61s; }

/* magnetic CTA shadow */
.btn { position: relative; overflow: hidden; }
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent);
  transform: translateY(101%);
  transition: transform 0.4s var(--ease);
  z-index: -1;
}
.btn:hover::before { transform: translateY(0); }
.btn:hover { background: transparent; color: var(--paper); border-color: var(--accent); }
.btn.ghost::before { background: var(--accent); }
.btn.ghost:hover { background: transparent; color: var(--paper); border-color: var(--accent); }

/* arrow continuous nudge inside cards */
@keyframes arrow-nudge {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(3px); }
}
.arrow-loop { animation: arrow-nudge 2.4s ease-in-out infinite; }

/* hover lift for tiles */
.lift {
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.lift:hover {
  transform: translateY(-3px);
}

/* underline grow */
.u-grow {
  position: relative;
  display: inline-block;
}
.u-grow::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s var(--ease);
}
.u-grow:hover::after { transform: scaleX(1); }

@media (prefers-reduced-motion: reduce) {
  .img-drift img, .shimmer-text, .dot-pulse, .arrow-loop { animation: none !important; }
  .word-reveal .w { transform: none; transition: none; }
}

/* ==========================================================
   IMAGES — frames, fallbacks, B&W treatment
   ========================================================== */
.img-frame {
  position: relative;
  margin: 0;
  overflow: hidden;
  background: linear-gradient(135deg, #1a1a1a 0%, #3a3a3a 50%, #1a1a1a 100%);
  background-size: 200% 200%;
  animation: img-shimmer 6s ease-in-out infinite;
}
.img-frame::after {
  content: 'M';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: clamp(3rem, 10vw, 7rem);
  font-style: italic;
  color: rgba(156, 123, 74, 0.18);
  z-index: 2;
  pointer-events: none;
}
.img-frame img[src].loaded ~ ::after,
.img-frame:has(img.loaded)::after { opacity: 0; }
@keyframes img-shimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.img-frame::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='80' height='80'><filter id='n'><feTurbulence baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.12 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  opacity: 0.5;
  z-index: 1;
}
.img-frame img {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(100%) contrast(1.05) brightness(0.96);
  opacity: 0;
  transition: opacity 1.2s var(--ease), transform 1.5s var(--ease);
}
.img-frame img.loaded,
.img-frame img[src]:not([src=""]) { opacity: 1; }
.img-frame.tall { aspect-ratio: 3/4; }
.img-frame.wide { aspect-ratio: 16/9; }
.img-frame.square { aspect-ratio: 1/1; }
.img-frame.banner { aspect-ratio: 21/9; }
.img-frame.portrait { aspect-ratio: 4/5; }

/* hover zoom on linked image frames */
a:hover .img-frame img,
.img-frame.zoom-on-hover:hover img {
  transform: scale(1.04);
}

/* image with caption */
.img-cap {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.img-cap .cap {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--smoke);
}
.dark .img-cap .cap { color: var(--fog); }

/* duotone overlay for atmosphere */
.img-frame.duotone::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 3;
  background: linear-gradient(180deg, rgba(10,10,10,0.05) 0%, rgba(10,10,10,0.45) 100%);
  pointer-events: none;
}
.img-frame.bronze-tint img {
  filter: grayscale(100%) sepia(20%) hue-rotate(345deg) saturate(1.2) brightness(0.92);
}
.img-frame.fade-edge {
  mask-image: linear-gradient(180deg, black 0%, black 70%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, black 0%, black 70%, transparent 100%);
}

/* ==========================================================
   ICONS
   ========================================================== */
.icon {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  color: currentColor;
}
.icon-bronze { color: var(--accent); }
.icon-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border: 1px solid currentColor;
  border-radius: 50%;
  color: var(--ink);
  transition: background 0.4s var(--ease), color 0.4s var(--ease), transform 0.4s var(--ease);
}
.dark .icon-circle { color: var(--paper); }
.icon-circle:hover { background: var(--accent); border-color: var(--accent); color: var(--paper); transform: rotate(45deg); }
.icon-square {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border: 1px solid currentColor;
  color: var(--ink);
}
.dark .icon-square { color: var(--paper); }

/* icon hover micro-animations */
@keyframes icon-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}
.icon-pulse { animation: icon-pulse 3s ease-in-out infinite; }

/* ==========================================================
   ENHANCED ANIMATIONS
   ========================================================== */

/* word-by-word reveal for big headlines */
.split-words .word {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
}
.split-words .word .w-inner {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 0.9s var(--ease);
}
.split-words.in .word .w-inner {
  transform: translateY(0);
}
.split-words .word:nth-child(1) .w-inner { transition-delay: 0.05s; }
.split-words .word:nth-child(2) .w-inner { transition-delay: 0.12s; }
.split-words .word:nth-child(3) .w-inner { transition-delay: 0.19s; }
.split-words .word:nth-child(4) .w-inner { transition-delay: 0.26s; }
.split-words .word:nth-child(5) .w-inner { transition-delay: 0.33s; }
.split-words .word:nth-child(6) .w-inner { transition-delay: 0.40s; }
.split-words .word:nth-child(7) .w-inner { transition-delay: 0.47s; }
.split-words .word:nth-child(8) .w-inner { transition-delay: 0.54s; }
.split-words .word:nth-child(9) .w-inner { transition-delay: 0.61s; }

/* draw-in underline */
.underline-draw {
  position: relative;
  display: inline-block;
}
.underline-draw::after {
  content: '';
  position: absolute;
  bottom: -0.1em;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.9s var(--ease);
  transition-delay: 0.4s;
}
.underline-draw.in::after,
.in .underline-draw::after { transform: scaleX(1); }

/* magnetic cursor effect (subtle) */
.magnetic { transition: transform 0.3s var(--ease); }

/* number tick reveal */
.tick-in {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
}
.tick-in > span {
  display: inline-block;
  transform: translateY(100%);
  transition: transform 1s var(--ease);
}
.in .tick-in > span,
.tick-in.in > span { transform: translateY(0); }

/* line scribble (used as rule animation) */
.line-grow {
  display: block;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.2s var(--ease);
}
.in .line-grow,
.line-grow.in { transform: scaleX(1); }

/* parallax shifts (CSS only via scroll-driven if available) */
@supports (animation-timeline: scroll()) {
  .parallax-slow {
    animation: parallax-up linear;
    animation-timeline: view();
    animation-range: cover;
  }
  @keyframes parallax-up {
    from { transform: translateY(40px); }
    to   { transform: translateY(-40px); }
  }
  .parallax-img {
    animation: parallax-img linear;
    animation-timeline: view();
    animation-range: cover;
  }
  @keyframes parallax-img {
    from { transform: scale(1.15) translateY(-3%); }
    to   { transform: scale(1.15) translateY(3%); }
  }
}

/* marquee for client / value strip */
.marquee {
  overflow: hidden;
  border-block: 1px solid var(--ink);
  padding-block: 1.2rem;
  background: var(--paper);
}
.dark .marquee { border-color: rgba(234,230,221,0.2); }
.marquee-track {
  display: flex;
  gap: 3rem;
  width: max-content;
  animation: marquee 50s linear infinite;
  align-items: center;
}
.marquee-track > * { flex-shrink: 0; }
@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* dot indicator */
.dot-live {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 0.5rem;
  vertical-align: middle;
  position: relative;
}
.dot-live::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  animation: dot-pulse 2s ease-out infinite;
}
@keyframes dot-pulse {
  0% { transform: scale(0.8); opacity: 1; }
  100% { transform: scale(2.5); opacity: 0; }
}

/* hover-list rows lift on hover */
.hover-lift {
  transition: transform 0.4s var(--ease), background 0.4s var(--ease);
}
.hover-lift:hover {
  transform: translateY(-2px);
  background: rgba(10,10,10,0.02);
}
.dark .hover-lift:hover { background: rgba(234,230,221,0.04); }

/* image clip-path reveal */
.clip-reveal {
  clip-path: inset(0 100% 0 0);
  transition: clip-path 1.4s var(--ease);
}
.in .clip-reveal,
.clip-reveal.in { clip-path: inset(0 0 0 0); }
.clip-reveal-up {
  clip-path: inset(100% 0 0 0);
  transition: clip-path 1.4s var(--ease);
}
.in .clip-reveal-up,
.clip-reveal-up.in { clip-path: inset(0 0 0 0); }

/* fade card grid stagger */
.cards-cascade > * {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.cards-cascade.in > *:nth-child(1) { transition-delay: 0.0s; }
.cards-cascade.in > *:nth-child(2) { transition-delay: 0.08s; }
.cards-cascade.in > *:nth-child(3) { transition-delay: 0.16s; }
.cards-cascade.in > *:nth-child(4) { transition-delay: 0.24s; }
.cards-cascade.in > *:nth-child(5) { transition-delay: 0.32s; }
.cards-cascade.in > *:nth-child(6) { transition-delay: 0.40s; }
.cards-cascade.in > * { opacity: 1; transform: translateY(0); }

/* tilt-on-hover (subtle) */
.tilt {
  transition: transform 0.5s var(--ease);
}
.tilt:hover {
  transform: perspective(1000px) rotateY(-1.5deg) rotateX(1deg) scale(1.01);
}

/* fade-in nav on load */
.nav { animation: nav-in 0.7s var(--ease) both; }
@keyframes nav-in {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .split-words .word .w-inner,
  .underline-draw::after,
  .tick-in > span,
  .line-grow,
  .clip-reveal,
  .clip-reveal-up,
  .cards-cascade > *,
  .tilt,
  .nav { animation: none !important; transition: none !important; transform: none !important; opacity: 1 !important; clip-path: none !important; }
  .img-frame { animation: none !important; }
  .img-frame img { opacity: 1 !important; transition: none !important; }
  .dot-live::after { animation: none !important; }
  .marquee-track { animation: none !important; }
}

/* ==========================================================
   HERO WITH BACKGROUND IMAGE
   ========================================================== */
.hero-bg {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-top: 10rem;
  padding-bottom: 6rem;
  min-height: clamp(540px, 80vh, 820px);
  display: flex;
  align-items: center;
  color: var(--paper);
}
.hero-bg .wrap { position: relative; z-index: 2; width: 100%; }

.hero-bg-img {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(135deg, #0e0e0e 0%, #2c2c2c 50%, #0e0e0e 100%);
  background-size: 200% 200%;
  animation: img-shimmer 8s ease-in-out infinite;
  overflow: hidden;
}
.hero-bg-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%) contrast(1.08) brightness(0.7);
  opacity: 0;
  transition: opacity 1.6s var(--ease), transform 1.6s var(--ease);
  transform: scale(1.06);
}
.hero-bg-img img.loaded {
  opacity: 1;
  transform: scale(1);
}

/* dark overlay for legibility — gradient bottom-heavy */
.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(180deg, rgba(10,10,10,0.55) 0%, rgba(10,10,10,0.35) 40%, rgba(10,10,10,0.78) 100%),
    radial-gradient(ellipse at top left, rgba(10,10,10,0.45), transparent 60%);
  pointer-events: none;
}

/* subtle grain over the hero */
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.18 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  opacity: 0.5;
  mix-blend-mode: overlay;
  pointer-events: none;
}

/* tweak children inside hero-bg */
.hero-bg .crumb { color: var(--fog); }
.hero-bg .crumb span,
.hero-bg .crumb a { color: var(--paper); }
.hero-bg .kicker { color: var(--accent); }
.hero-bg .accent-line { background: var(--accent); }
.hero-bg h1,
.hero-bg h1 em { color: var(--paper); }
.hero-bg h1 em.italic[style*="accent"] { color: var(--accent) !important; }
.hero-bg .serif { color: var(--bone); }
.hero-bg .btn { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.hero-bg .btn:hover { background: transparent; color: var(--paper); }
.hero-bg .link-arrow { color: var(--paper); border-bottom-color: var(--paper); }
.hero-bg .link-arrow:hover { color: var(--accent); border-bottom-color: var(--accent); }
.hero-bg .icon-square { color: var(--accent); border-color: var(--accent); }

/* NDA pill inside hero-bg */
.hero-bg .nda-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.45rem 0.95rem;
  border: 1px solid var(--accent);
  background: rgba(10,10,10,0.4);
  backdrop-filter: blur(6px);
}

/* hero parallax */
@supports (animation-timeline: scroll()) {
  .hero-bg-img img {
    animation: hero-parallax linear;
    animation-timeline: view();
    animation-range: 0% 100%;
  }
  @keyframes hero-parallax {
    from { transform: scale(1.06) translateY(0); }
    to   { transform: scale(1.06) translateY(8%); }
  }
}

@media (max-width: 720px) {
  .hero-bg {
    padding-top: 8rem;
    padding-bottom: 4rem;
    min-height: 60vh;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-bg-img { animation: none !important; }
  .hero-bg-img img { transform: none !important; transition: none !important; opacity: 1 !important; }
}
