/* ——— INTRO REVEAL ——— */
/* Pre-paint: hide hero details so nothing flashes before the curtain opens */
.intro-active .hero-name .line-inner,
.intro-active .hero-tagline,
.intro-active .hero-aside,
.intro-active #main-nav { opacity: 0; }
.intro-active { overflow: hidden; }

.intro {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  background: transparent;
}
.intro-curtain {
  position: absolute;
  left: 0; right: 0;
  height: 51%;
  background: #0a0908;
  will-change: transform;
  transform: translateY(0);
  transition: transform 1.1s cubic-bezier(0.76, 0, 0.24, 1);
}
.intro-curtain-top    { top: 0;    transform-origin: top; }
.intro-curtain-bottom { bottom: 0; transform-origin: bottom; }

.intro-mark {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  opacity: 0;
  transition: opacity 0.6s ease 0.15s;
}
.intro-mark-rules {
  display: flex;
  align-items: center;
  gap: 14px;
}
.intro-rule {
  display: block;
  height: 1px;
  width: 0;
  background: rgba(176, 144, 96, 0.85); /* gold */
  transition: width 0.95s cubic-bezier(0.22, 1, 0.36, 1) 0.1s;
}
.intro-mono {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 8px;
  color: var(--cream);
  text-transform: uppercase;
  padding: 0 4px 0 12px; /* compensate for letter-spacing on the right */
}
.intro-mono span {
  color: rgba(176, 144, 96, 0.95);
  margin: 0 4px;
}
.intro-meta {
  font-family: var(--font-body);
  font-size: 9.5px;
  font-weight: 300;
  letter-spacing: 4.5px;
  text-transform: uppercase;
  color: rgba(245, 243, 239, 0.42); /* --cream at 42% */
  padding-left: 4.5px; /* visual centering */
}

/* GO state — triggered once image is ready */
.intro-go .intro-rule { width: 64px; }
.intro-go .intro-mark { opacity: 1; }
.intro-leave .intro-curtain-top    { transform: translateY(-100%); }
.intro-leave .intro-curtain-bottom { transform: translateY(100%); }
.intro-leave .intro-mark {
  opacity: 0;
  transition: opacity 0.35s ease;
}

/* Reveal hero pieces in sequence after the curtains start moving */
.intro-leave .line-inner {
  animation: lineRise 1.05s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.intro-leave .line-2 .line-inner { animation-delay: 0.18s; }
.intro-leave .hero-tagline {
  animation: softFade 0.9s ease 0.55s forwards;
}
.intro-leave .hero-aside {
  animation: softFade 0.9s ease 0.7s forwards;
}
.intro-leave #main-nav {
  animation: softFade 0.9s ease 0.45s forwards;
}

@keyframes lineRise {
  from { transform: translateY(112%); opacity: 0; }
  60%  { opacity: 1; }
  to   { transform: translateY(0);    opacity: 1; }
}
@keyframes softFade {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Reduced motion / skip intro: just show everything */
.intro-skip .intro { display: none; }
.intro-skip .hero-name .line-inner,
.intro-skip .hero-tagline,
.intro-skip .hero-aside,
.intro-skip #main-nav { opacity: 1 !important; transform: none !important; }

/* ——— HEADER READABILITY (home only) ———
   The nav is transparent over the hero photo on the front page only; every other
   page renders it `.solid` over cream, where a text-shadow would look wrong.
   home.css is front-page-only, so these rules stay off the other templates.
   The nav selectors are additionally guarded with :not(.scrolled) — once the nav
   gains .scrolled it is cream with ink text and must not carry a shadow. */
.hero-tagline,
.hero-name,
.hero-scroll-label,
nav#main-nav:not(.scrolled) .nav-logo,
nav#main-nav:not(.scrolled) .nav-links a {
  text-shadow: 0 2px 18px rgba(10,9,8,0.55); /* warm ink — readability over hero photo */
}
/* Same readability aid for the hamburger bars over the hero photo */
nav#main-nav:not(.scrolled) .nav-toggle-bar { box-shadow: 0 1px 4px rgba(10,9,8,0.4); }

/* Nav scrim over the hero — 0.35 strength; blur = 0.35 * 14px = 4.9px */
nav#main-nav:not(.scrolled) {
  background: rgba(10, 9, 8, 0.35);
  backdrop-filter: blur(4.9px);
  -webkit-backdrop-filter: blur(4.9px);
}

/* ——— HERO ——— */
.hero {
  position: relative;
  height: 100vh;
  min-height: 680px;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
}
.hero-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 25%;
  transform: scale(1.06);
  transition: transform 1.4s cubic-bezier(0.25,0.46,0.45,0.94);
}
.hero-bg img.loaded { transform: scale(1); }
.hero-overlay {
  position: absolute; inset: 0;
  /* Tuned hero readability (design intent: overlay strength 1.5x).
     Base stops 0.10 / 0.05 / 0.30 / 0.64, baked at 1.5x. */
  background: linear-gradient(
    160deg,
    rgba(0,0,0,0.15) 0%,
    rgba(0,0,0,0.075) 35%,
    rgba(0,0,0,0.45) 65%,
    rgba(0,0,0,0.96) 100%
  );
}
.hero-content {
  position: relative; z-index: 2;
  height: 100%;
  display: grid;
  grid-template-rows: 1fr auto;
  padding: 0 64px 60px;
  max-width: 1400px;
  margin: 0 auto;
}
.hero-top {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  padding-top: 116px;
}
.hero-tagline {
  font-size: 10.5px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.82); /* raised from 0.48 for legibility over bright foliage */
  text-align: right;
  line-height: 2.2;
}
.hero-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}
.hero-name {
  font-family: var(--font-display);
  font-size: clamp(80px, 12vw, 172px);
  font-weight: 300;
  line-height: 0.86;
  color: white;
  letter-spacing: -3px;
}
.hero-name .line-wrap {
  display: block;
  overflow: hidden;
  width: fit-content;
  padding: 0 0.14em 0.06em 0; /* breathing room for italic + descender */
}
.hero-name .line-inner {
  display: inline-block;
  transform: translateY(0);
  will-change: transform;
}
.hero-name .line-2 .line-inner {
  font-style: italic;
}

/* ——— HERO GRAIN (atmosphere) ——— */
.hero-grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  opacity: 0.07;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><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.55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
.hero-aside {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding-bottom: 8px;
}
.hero-scroll-line {
  width: 1px;
  height: 72px;
  background: rgba(255,255,255,0.18);
  position: relative;
  overflow: hidden;
}
.hero-scroll-line::after {
  content: '';
  position: absolute; top: -100%; left: 0;
  width: 100%; height: 100%;
  background: rgba(255,255,255,0.7);
  animation: scrollDrop 2.2s ease-in-out infinite;
}
@keyframes scrollDrop {
  0% { top: -100%; }
  100% { top: 200%; }
}
.hero-scroll-label {
  font-size: 9px;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.38);
  writing-mode: vertical-rl;
}

/* ——— TICKER ——— */
.ticker {
  background: var(--ink);
  height: 46px;
  overflow: hidden;
  display: flex;
  align-items: center;
}
.ticker-track {
  display: flex;
  animation: tickerScroll 38s linear infinite;
  white-space: nowrap;
}
.ticker-item {
  font-size: 10px;
  letter-spacing: 3.5px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.28);
  padding: 0 28px;
}
.ticker-dot { color: var(--gold); margin-right: 28px; }
@keyframes tickerScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ——— ABOUT ——— */
.about { background: var(--cream); }
.about-grid {
  display: grid;
  grid-template-columns: 5fr 6fr;
  gap: 88px;
  align-items: center;
}
.about-img-wrap {
  position: relative;
  aspect-ratio: 3/4;
  overflow: hidden;
}
.about-img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.9s cubic-bezier(0.25,0.46,0.45,0.94);
}
.about-img-wrap:hover img { transform: scale(1.04); }
.about-number {
  font-family: var(--font-display);
  font-size: 120px;
  font-weight: 300;
  color: var(--border);
  line-height: 1;
  margin-bottom: -20px;
}
.about-label-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}
.about-rule { flex: 1; height: 1px; background: var(--border); max-width: 48px; }
.about-headline {
  font-family: var(--font-display);
  font-size: clamp(38px, 4vw, 58px);
  font-weight: 400;
  line-height: 1.1;
  margin-bottom: 28px;
}
.about-body {
  font-size: 15px;
  line-height: 1.88;
  color: var(--stone);
  margin-bottom: 44px;
}

/* ——— SERVICES ——— */
.services { background: white; }
.services-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 60px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--border);
}
.services-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 4.5vw, 58px);
  font-weight: 400;
  line-height: 1.08;
  max-width: 420px;
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--border);
}
.service-card {
  padding: 52px 36px;
  border-right: 1px solid var(--border);
}
.service-card:first-child { padding-left: 0; }
.service-card:last-child { border-right: none; padding-right: 0; }
.service-num {
  font-family: var(--font-display);
  font-size: 52px;
  font-weight: 300;
  color: var(--border);
  line-height: 1;
  margin-bottom: 20px;
}
.service-name {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 400;
  margin-bottom: 16px;
}
.service-desc {
  font-size: 14px;
  line-height: 1.82;
  color: var(--stone);
}

/* ——— WORK PREVIEW ——— */
.work { background: var(--cream); }
.work-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 44px;
}
.work-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 4.5vw, 58px);
  font-weight: 400;
  line-height: 1.08;
}
.work-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  grid-template-rows: 380px 270px;
  gap: 12px;
  grid-template-areas:
    "a b c"
    "a d c";
}
.wi-1 { grid-area: a; }
.wi-2 { grid-area: b; }
.wi-3 { grid-area: c; }
.wi-4 { grid-area: d; }
.work-item {
  overflow: hidden;
  position: relative;
  background: var(--border);
}
.work-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.25,0.46,0.45,0.94);
}
.work-item:hover img { transform: scale(1.055); }
.work-item-link {
  position: absolute; inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 20px;
  background: rgba(10,9,8,0); /* warm ink, transparent → 0.18 on hover */
  transition: background 0.4s;
}
.work-item:hover .work-item-link { background: rgba(10,9,8,0.18); }

/* ——— STATS ——— */
.stats {
  background: var(--ink);
  padding: 80px 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.stat {
  text-align: center;
  padding: 0 32px;
  border-right: 1px solid rgba(255,255,255,0.06);
}
.stat:last-child { border-right: none; }
.stat-number {
  font-family: var(--font-display);
  font-size: 72px;
  font-weight: 300;
  color: white;
  line-height: 1;
  margin-bottom: 14px;
  letter-spacing: -2px;
}
.stat-label {
  font-size: 10px;
  letter-spacing: 3.5px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.3);
}

/* ——— QUOTE ——— */
.quote-section {
  background: var(--cream);
  padding: 100px 0;
  text-align: center;
}
.quote-mark {
  font-family: var(--font-display);
  font-size: 140px;
  line-height: 0.6;
  color: var(--border);
  margin-bottom: 8px;
  user-select: none;
}
.quote-text {
  font-family: var(--font-display);
  font-size: clamp(22px, 3.2vw, 42px);
  font-weight: 300;
  font-style: italic;
  line-height: 1.42;
  max-width: 820px;
  margin: 0 auto 28px;
  color: var(--ink);
}
.quote-author {
  font-size: 10.5px;
  letter-spacing: 3.5px;
  text-transform: uppercase;
  color: var(--stone);
}

/* ——— CTA ——— */
.cta-section {
  position: relative;
  height: 72vh;
  min-height: 480px;
  overflow: hidden;
}
.cta-bg {
  position: absolute; inset: 0;
}
.cta-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 30%;
}
.cta-bg::after {
  content: '';
  position: absolute; inset: 0;
  background: rgba(10,9,8,0.52);
}
.cta-content {
  position: relative; z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 64px;
}
.cta-eyebrow {
  font-size: 10px;
  letter-spacing: 5px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.62); /* raised from 0.42 for legibility over the scrim */
  margin-bottom: 28px;
}
.cta-headline {
  font-family: var(--font-display);
  font-size: clamp(52px, 8vw, 112px);
  font-weight: 300;
  line-height: 0.92;
  color: white;
  margin-bottom: 52px;
  letter-spacing: -2px;
}
.cta-headline em { font-style: italic; }
/* Closing CTA — filled by default for prominence at the conversion peak; hovers to
   the confident transparent flip (the ghost state the button used to sit in). */
.cta-btn {
  display: inline-block;
  padding: 18px 56px;
  border: 1px solid white;
  background: white;
  font-size: 10.5px;
  letter-spacing: 3.5px;
  text-transform: uppercase;
  color: var(--ink);
  transition: background 0.32s, border-color 0.32s, color 0.32s;
}
.cta-btn:hover {
  background: transparent;
  border-color: rgba(255,255,255,0.7);
  color: white;
}

/* Slow ken-burns drift on hero after the intro completes */
@keyframes heroDrift {
  0%   { transform: scale(1) translate3d(0, 0, 0); }
  100% { transform: scale(1.08) translate3d(0, -1.2%, 0); }
}
.hero-bg img.loaded.drift {
  animation: heroDrift 22s ease-out forwards;
}

/* ——— RESPONSIVE ——— */
@media (max-width: 960px) {
  .hero-content { padding: 0 28px 44px; }
  .hero-name { font-size: clamp(64px, 16vw, 120px); letter-spacing: -1px; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-number { font-size: 80px; }
  .services-header { flex-direction: column; align-items: flex-start; gap: 24px; }
  .services-grid { grid-template-columns: 1fr; }
  .service-card { border-right: none; border-bottom: 1px solid var(--border); padding: 40px 0; }
  .service-card:last-child { border-bottom: none; }
  .work-header { flex-direction: column; align-items: flex-start; gap: 20px; }
  .work-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
    grid-template-areas: none;
  }
  .wi-1, .wi-2, .wi-3, .wi-4 { grid-area: unset; aspect-ratio: 4/3; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 48px; }
  .stat { border: none; }
  .cta-content { padding: 0 28px; }
}
@media (max-width: 600px) {
  .hero-name { font-size: clamp(56px, 18vw, 90px); letter-spacing: -0.5px; }
  .work-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
}