/* ============================================================
   Mr Web — Ink & Paper Design System
   Adapted from thewebguys.co.nz (31 effects)
   Black/white + coral accent. Editorial serif. Restrained motion.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Plus+Jakarta+Sans:wght@400;500;600&display=swap');

/* ── Custom Properties ─────────────────────────────────────── */
:root {
  --color-bg: #0A0A0A;
  --color-bg-alt: #FFFFFF;
  --color-text: #000000;
  --color-text-light: #FFFFFF;
  --color-heading: #000000;
  --color-heading-light: #FFFFFF;
  --color-accent: #E64833;
  --color-accent-secondary: #E64833;
  --color-muted: #666666;
  --color-border: #E5E5E5;
  --color-border-dark: rgba(255,255,255,0.12);

  --font-heading: 'Instrument Serif', Georgia, serif;
  --font-serif: 'Instrument Serif', Georgia, serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, sans-serif;

  --section-padding: 100px;
  --container-max-width: 1240px;
  --nav-height: 80px;

  --border-radius: 0px;
  --border-radius-pill: 100px;
  --ease-out-expo: cubic-bezier(0.215, 0.61, 0.355, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  --transition: all 0.35s var(--ease-out-expo);

  /* Parallax scroll variable — driven by JS */
  --scroll-y: 0px;
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 14px;
  line-height: 1.6;
  color: var(--color-text);
  background: #FFFFFF;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ── Container ──────────────────────────────────────────────── */
.container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 48px;
}

/* ============================================================
   SCROLL REVEAL SYSTEM — Effect 1, 6
   ============================================================ */

/* Effect 1: fadeIn — base reveal class */
.reveal {
  opacity: 0;
  transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}
.reveal.revealed {
  opacity: 1;
  transform: none !important;
}

/* Effect 6: moveUp — slide up 40px + fade */
.move-up {
  opacity: 0;
  transform: translateY(40px);
}

/* Effect 3: stagger groups */
.stagger-group .reveal:nth-child(1)  { transition-delay: 0s; }
.stagger-group .reveal:nth-child(2)  { transition-delay: 0.12s; }
.stagger-group .reveal:nth-child(3)  { transition-delay: 0.24s; }
.stagger-group .reveal:nth-child(4)  { transition-delay: 0.36s; }
.stagger-group .reveal:nth-child(5)  { transition-delay: 0.48s; }
.stagger-group .reveal:nth-child(6)  { transition-delay: 0.60s; }

/* ============================================================
   Effect 2: scaleRight — horizontal dividers
   ============================================================ */
.scale-right {
  display: block;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 1s var(--ease-out-expo);
}
.scale-right.revealed {
  transform: scaleX(1);
}

/* ============================================================
   Effect 7: splitTextReveal — word-by-word heading reveal
   ============================================================ */
.split-text {
  overflow: hidden;
}
.split-text .split-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(100%);
  transition: opacity 0.7s var(--ease-out-expo), transform 0.7s var(--ease-out-expo);
}
.split-text.revealed .split-word {
  opacity: 1;
  transform: translateY(0);
}
/* Stagger delays for split words — set via JS inline style */

/* ============================================================
   Effect 4: headerTheme — section-based header colour switch
   ============================================================ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  transition: background 0.4s ease, color 0.4s ease;
  background: transparent;
}
.header.theme-dark {
  background: var(--color-bg);
}
.header.theme-light {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
}
.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.header__logo img {
  height: 36px;
  width: auto;
  object-fit: contain;
  display: block;
}
.header__logo--dark { display: none; }
.header__logo--light { display: block; }
.header.theme-light .header__logo--dark { display: block; }
.header.theme-light .header__logo--light { display: none; }

/* Text wordmark: white on dark, black on light */
.header.theme-dark .header__logo,
.header.theme-dark .header__logo span { color: #FFFFFF !important; transition: color 0.4s ease; }
.header.theme-light .header__logo,
.header.theme-light .header__logo span { color: #000000 !important; transition: color 0.4s ease; }
.header__logo span span { color: #E64833 !important; } /* coral dot always */

.header__nav {
  display: flex;
  align-items: center;
  gap: 36px;
}

/* Effect 18: navLinkUnderline — underline scale in from left, scale out to right */
.header__nav a {
  color: var(--color-text-light);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.02em;
  position: relative;
  padding-bottom: 3px;
}
.header.theme-light .header__nav a {
  color: var(--color-text);
}
.header__nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.35s var(--ease-out-expo);
}
.header__nav a:hover::after {
  transform: scaleX(1);
  transform-origin: left center;
}
/* On unhover — scale out to the right */
.header__nav a:not(:hover)::after {
  transform-origin: right center;
}

.header__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  min-height: 44px;
  border: 1px solid var(--color-accent);
  border-radius: var(--border-radius-pill);
  color: var(--color-accent);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  overflow: hidden;
  position: relative;
  z-index: 0;
}
.header__cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease-out-expo);
  z-index: -1;
}
.header__cta:hover::before {
  transform: scaleX(1);
}
.header__cta:hover {
  color: var(--color-bg);
}
.header__cta-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
  transition: background 0.3s ease;
  flex-shrink: 0;
}
.header__cta:hover .header__cta-dot {
  background: var(--color-bg);
}

/* ============================================================
   Effect 19: hamburgerCircleHover
   ============================================================ */
.hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.3);
  flex-direction: column;
  gap: 5px;
  transition: border-color 0.3s ease;
  position: relative;
}
.hamburger:hover {
  border-color: rgba(255,255,255,1);
}
.hamburger span {
  width: 20px;
  height: 1.5px;
  background: var(--color-text-light);
  display: block;
  transition: var(--transition);
}

/* ============================================================
   Effect 27: hamburgerMenuOverlay — full-screen 3-column
   ============================================================ */
.mobile-nav {
  position: fixed;
  inset: 0;
  background: var(--color-bg);
  z-index: 2000;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s var(--ease-out-expo);
}
.mobile-nav.open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav__close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-light);
  font-size: 24px;
  cursor: pointer;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2);
  transition: border-color 0.3s ease;
  z-index: 10;
}
.mobile-nav__close:hover { border-color: var(--color-accent); color: var(--color-accent); }

/* Left column: navigation */
.mobile-nav__links {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px 48px;
  border-right: 1px solid var(--color-border-dark);
}
.mobile-nav__links a {
  color: var(--color-text-light);
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 300;
  line-height: 1.2;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.5s var(--ease-out-expo), transform 0.5s var(--ease-out-expo), color 0.3s ease;
}
.mobile-nav.open .mobile-nav__links a:nth-child(1) { opacity: 1; transform: none; transition-delay: 0.1s; }
.mobile-nav.open .mobile-nav__links a:nth-child(2) { opacity: 1; transform: none; transition-delay: 0.17s; }
.mobile-nav.open .mobile-nav__links a:nth-child(3) { opacity: 1; transform: none; transition-delay: 0.24s; }
.mobile-nav.open .mobile-nav__links a:nth-child(4) { opacity: 1; transform: none; transition-delay: 0.31s; }
.mobile-nav.open .mobile-nav__links a:nth-child(5) { opacity: 1; transform: none; transition-delay: 0.38s; }
.mobile-nav.open .mobile-nav__links a:nth-child(6) { opacity: 1; transform: none; transition-delay: 0.45s; }
.mobile-nav__links a:hover { color: var(--color-accent); }

/* Center column: image */
.mobile-nav__image {
  overflow: hidden;
  position: relative;
}
.mobile-nav__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.05);
  transition: opacity 0.6s 0.2s ease, transform 0.6s 0.2s ease;
}
.mobile-nav.open .mobile-nav__image img {
  opacity: 1;
  transform: scale(1);
}

/* Right column: contact */
.mobile-nav__contact {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px 48px;
  border-left: 1px solid var(--color-border-dark);
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 0.5s 0.3s ease, transform 0.5s 0.3s ease;
}
.mobile-nav.open .mobile-nav__contact {
  opacity: 1;
  transform: none;
}
.mobile-nav__contact-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(255,255,255,0.4);
  margin-bottom: 16px;
}
.mobile-nav__contact a {
  color: var(--color-text-light);
  font-size: 14px;
  display: block;
  padding: 6px 0;
  transition: color 0.3s ease;
}
.mobile-nav__contact a:hover { color: var(--color-accent); }
.mobile-nav__cta {
  margin-top: 32px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: var(--color-accent);
  color: var(--color-bg);
  border-radius: var(--border-radius-pill);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

/* ============================================================
   BUTTONS — Effects 16, 17
   ============================================================ */

/* Effect 16: buttonFillReveal — pseudo fills + text slides */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  min-height: 44px;
  border-radius: var(--border-radius-pill);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
  cursor: pointer;
  z-index: 0;
}
.btn__text {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  overflow: hidden;
  height: 1.2em;
  vertical-align: middle;
}
.btn__text::after {
  content: attr(data-text);
  position: absolute;
  top: 100%;
  left: 0;
  white-space: nowrap;
  transition: top 0.35s var(--ease-out-expo);
}
.btn__text span {
  transition: transform 0.35s var(--ease-out-expo);
  display: block;
}
.btn:hover .btn__text span {
  transform: translateY(-100%);
}
.btn:hover .btn__text::after {
  top: 0;
}

/* Effect 17: buttonScaleHover — fill pseudo */
.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.4s var(--ease-out-expo);
  z-index: -1;
  border-radius: inherit;
}
.btn:hover::before {
  transform: scaleX(1);
}

.btn--primary {
  background: var(--color-accent);
  color: var(--color-bg);
}
.btn--primary::before { background: #c93a28; }
.btn--primary .btn__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-bg);
  flex-shrink: 0;
}

.btn--outline {
  border: 1px solid rgba(255,255,255,0.3);
  color: var(--color-text-light);
  background: transparent;
}
.btn--outline::before { background: rgba(255,255,255,0.08); }
.btn--outline:hover { border-color: rgba(255,255,255,0.6); }

.btn--dark {
  background: var(--color-bg);
  color: var(--color-text-light);
}
.btn--dark::before { background: rgba(255,255,255,0.08); }
.btn--dark .btn__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-text-light);
  flex-shrink: 0;
}

/* Effect 21: filterButtonFill — yellow fill on hover */
.btn--fill-yellow {
  border: 1px solid var(--color-accent);
  color: var(--color-accent);
  background: transparent;
}
.btn--fill-yellow::before { background: var(--color-accent); }
.btn--fill-yellow:hover { color: var(--color-bg); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  min-height: 100vh;
  background: var(--color-bg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 120px 0 80px;
  position: relative;
  overflow: hidden;
}
/* Effect 12: ambientMove — subtle floating shape */
.hero__ambient {
  position: absolute;
  top: -20%;
  right: -10%;
  width: 700px;
  height: 700px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(251,206,4,0.04) 0%, transparent 70%);
  pointer-events: none;
  transform: translateY(calc(var(--scroll-y) * -0.15));
}
.hero__title {
  font-family: var(--font-heading);
  font-size: clamp(2.8rem, 5.5vw, 5rem);
  font-weight: 300;
  line-height: 1.1;
  color: var(--color-heading-light);
  letter-spacing: -0.025em;
  max-width: 960px;
  position: relative;
  z-index: 1;
}
.hero__title em {
  font-family: var(--font-serif);
  font-weight: 400;
  font-style: italic;
  color: var(--color-accent);
}
.hero__subtitle {
  font-size: 15px;
  line-height: 1.7;
  color: rgba(255,255,255,0.55);
  max-width: 480px;
  margin-top: 36px;
  position: relative;
  z-index: 1;
}
.hero__actions {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 48px;
  position: relative;
  z-index: 1;
}
.hero__note {
  font-size: 12px;
  color: rgba(255,255,255,0.3);
  margin-top: 20px;
  position: relative;
  z-index: 1;
}

/* ── Stats Bar ──────────────────────────────────────────────── */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-top: 60px;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 48px;
  position: relative;
  z-index: 1;
}
.stats-bar__item {
  text-align: center;
  color: var(--color-text-light);
  padding: 0 16px;
  border-right: 1px solid rgba(255,255,255,0.08);
}
.stats-bar__item:last-child { border-right: none; }
.stats-bar__value {
  font-size: clamp(1.6rem, 3vw, 2.6rem);
  font-weight: 300;
  letter-spacing: -0.025em;
  line-height: 1;
}
.stats-bar__label {
  font-size: 11px;
  color: rgba(255,255,255,0.4);
  margin-top: 8px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ============================================================
   SECTION LABELS + DIVIDERS
   ============================================================ */
.section-label {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 56px;
}
.section-label__line {
  flex: 1;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.9s 0.2s var(--ease-out-expo);
}
.section-label.revealed .section-label__line {
  transform: scaleX(1);
}
.section-label__text {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  white-space: nowrap;
}
.section-label--dark { color: rgba(255,255,255,0.35); }
.section-label--light { color: var(--color-muted); }
.section-label--dark .section-label__text { color: rgba(255,255,255,0.35); }
.section-label--light .section-label__text { color: var(--color-muted); }

/* ============================================================
   Effect 15: projectListHover — SIGNATURE PORTFOLIO
   ============================================================ */
.portfolio-section {
  padding: var(--section-padding) 0;
  background: #FFFFFF;
  data-theme: light;
}
.portfolio-section__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 64px;
  gap: 40px;
}
.portfolio-section__title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 300;
  line-height: 1.12;
  letter-spacing: -0.025em;
  color: var(--color-heading);
  max-width: 600px;
}

/* Featured projects list */
.featured-projects {
  border-top: 1px solid var(--color-border);
}
.project-item {
  position: relative;
  display: grid;
  grid-template-columns: 80px 1fr 200px 140px;
  align-items: center;
  padding: 32px 0;
  border-bottom: 1px solid var(--color-border);
  cursor: pointer;
  overflow: hidden;
}
/* Background image — hidden by default, reveals on hover */
.project-item__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 0.5s var(--ease-out-expo), transform 0.7s var(--ease-out-expo);
  pointer-events: none;
  overflow: hidden;
}
.project-item__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.project-item:hover .project-item__bg {
  opacity: 0.12;
  transform: scale(1);
}

/* Number */
.project-item__number {
  font-size: 13px;
  color: rgba(0,0,0,0.25);
  font-weight: 400;
  position: relative;
  z-index: 1;
  transition: opacity 0.3s ease, color 0.3s ease;
}
.project-item:hover .project-item__number {
  opacity: 1;
  color: var(--color-bg);
}

/* Name */
.project-item__name {
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, 2.5vw, 2.2rem);
  font-weight: 300;
  color: var(--color-bg);
  letter-spacing: -0.02em;
  position: relative;
  z-index: 1;
  transition: font-family 0.3s ease, font-style 0.3s ease, color 0.35s ease;
}
.project-item:hover .project-item__name {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--color-accent);
}

/* Description — slides up from below */
.project-item__desc {
  font-size: 13px;
  color: var(--color-muted);
  position: relative;
  z-index: 1;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transform: translateY(12px);
  transition: max-height 0.4s var(--ease-out-expo), opacity 0.4s var(--ease-out-expo), transform 0.4s var(--ease-out-expo);
  padding-right: 20px;
}
.project-item:hover .project-item__desc {
  max-height: 60px;
  opacity: 1;
  transform: translateY(0);
}

/* Visit site — slides in from right */
.project-item__link {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-bg);
  position: relative;
  z-index: 1;
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 0.4s 0.1s var(--ease-out-expo), transform 0.4s 0.1s var(--ease-out-expo);
  justify-content: flex-end;
}
.project-item:hover .project-item__link {
  opacity: 1;
  transform: translateX(0);
}
.project-item__link svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

/* Yellow underline bar — scaleX from left */
.project-item::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.5s var(--ease-out-expo);
  z-index: 2;
}
.project-item:hover::after {
  transform: scaleX(1);
}

/* ============================================================
   HOW IT WORKS
   ============================================================ */
.how-it-works {
  padding: var(--section-padding) 0;
  background: #FFFFFF;
  position: relative;
  overflow: hidden;
}
.how-it-works__watermark {
  position: absolute;
  bottom: -40px;
  right: -60px;
  width: 500px;
  opacity: 0.025;
  pointer-events: none;
  user-select: none;
}
.how-it-works__title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 300;
  line-height: 1.12;
  letter-spacing: -0.025em;
  color: var(--color-heading);
  max-width: 600px;
  margin-bottom: 64px;
}
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--color-border);
}
.step {
  padding: 48px 40px 48px 0;
  border-right: 1px solid var(--color-border);
  position: relative;
}
.step:last-child { border-right: none; padding-right: 0; padding-left: 40px; }
.step:nth-child(2) { padding-left: 40px; }
.step__number {
  font-size: 80px;
  font-weight: 300;
  color: var(--color-border);
  line-height: 1;
  margin-bottom: 20px;
  letter-spacing: -0.05em;
}
.step__title {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 12px;
  color: var(--color-heading);
}
.step__text {
  font-size: 14px;
  line-height: 1.75;
  color: var(--color-muted);
}

/* ============================================================
   SERVICES (dark bg, stagger cards)
   ============================================================ */
.services-section {
  padding: var(--section-padding) 0;
  background: var(--color-bg);
  color: var(--color-text-light);
}
.services-section__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 64px;
  gap: 40px;
}
.services-section__title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 300;
  line-height: 1.12;
  letter-spacing: -0.025em;
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(255,255,255,0.06);
}
.service-card {
  background: var(--color-bg);
  padding: 40px 32px;
  position: relative;
  overflow: hidden;
  transition: background 0.35s ease;
}
.service-card::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s var(--ease-out-expo);
}
.service-card:hover { background: rgba(255,255,255,0.04); }
.service-card:hover::before { transform: scaleX(1); }
.service-card__number {
  font-size: 11px;
  color: rgba(255,255,255,0.2);
  font-weight: 400;
  margin-bottom: 20px;
  font-variant-numeric: tabular-nums;
}
.service-card__title {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 500;
  margin-bottom: 14px;
  color: var(--color-heading-light);
}
.service-card__text {
  font-size: 13px;
  line-height: 1.75;
  color: rgba(255,255,255,0.5);
}

/* ============================================================
   FEATURES
   ============================================================ */
.features-section {
  padding: var(--section-padding) 0;
  background: #FFFFFF;
}
.features-section__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 64px;
  gap: 40px;
}
.features-section__title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 300;
  line-height: 1.12;
  letter-spacing: -0.025em;
  color: var(--color-heading);
  max-width: 600px;
}
.features-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
}
.feature-card {
  padding: 48px 40px;
  border: 1px solid var(--color-border);
  transition: box-shadow 0.4s ease, transform 0.4s var(--ease-out-expo);
}
.feature-card:hover {
  box-shadow: 0 12px 40px rgba(0,0,0,0.07);
  transform: translateY(-4px);
}
.feature-card__icon {
  width: 52px;
  height: 52px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.feature-card__icon svg {
  width: 32px;
  height: 32px;
  stroke: var(--color-accent);
  fill: none;
  stroke-width: 1.5;
}
.feature-card__title {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 500;
  margin-bottom: 12px;
  color: var(--color-heading);
}
.feature-card__text {
  font-size: 13px;
  line-height: 1.75;
  color: var(--color-muted);
}

/* ============================================================
   Effect 10: stickySection — Ideas / What We Do
   ============================================================ */
.ideas-section {
  padding: var(--section-padding) 0;
  background: var(--color-bg);
  color: var(--color-text-light);
}
.ideas-section__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}
/* Left column sticky */
.ideas-section__text {
  position: sticky;
  top: 120px;
}
.ideas-section__title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 300;
  line-height: 1.12;
  letter-spacing: -0.025em;
  margin-bottom: 24px;
}
.ideas-section__desc {
  font-size: 14px;
  line-height: 1.75;
  color: rgba(255,255,255,0.55);
  margin-bottom: 40px;
}

/* Effect 8: parallaxSpeed on the image */
.ideas-section__image {
  overflow: hidden;
}
.ideas-section__image img {
  width: 100%;
  height: 480px;
  object-fit: cover;
  will-change: transform;
  transform: translateY(calc(var(--scroll-y) * -0.08));
}

/* ============================================================
   SHOWCASE GRID
   ============================================================ */
.showcase-section {
  padding: 0;
  background: var(--color-bg);
}
.showcase-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}
.showcase-item {
  overflow: hidden;
  position: relative;
}
.showcase-item img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  filter: grayscale(0.4);
  transition: filter 0.5s ease, transform 0.6s var(--ease-out-expo);
  transform: scale(1.02);
}
.showcase-item.revealed img {
  transform: scale(1);
}
.showcase-item:hover img {
  filter: grayscale(0);
  transform: scale(1.04);
}

/* ============================================================
   Effect 9: animateStatistics — Stats Section (Yellow)
   ============================================================ */
.stats-section {
  padding: var(--section-padding) 0;
  background: #FFFFFF;
  color: var(--color-text);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}
.stats-section__inner {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.stats-section__title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -0.025em;
}
.stat-item {
  border-left: 2px solid var(--color-border);
  padding-left: 32px;
}
.stat-item__value {
  font-family: var(--font-heading);
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 300;
  letter-spacing: -0.04em;
  line-height: 1;
  display: block;
}
.stat-item__label {
  font-size: 13px;
  margin-top: 8px;
  opacity: 0.6;
}

/* ============================================================
   COMPARISON TABLE
   ============================================================ */
.comparison-section {
  padding: var(--section-padding) 0;
  background: #FFFFFF;
}
.comparison-section__title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 300;
  line-height: 1.12;
  letter-spacing: -0.025em;
  color: var(--color-heading);
  max-width: 700px;
  margin-bottom: 64px;
}
.comparison-table {
  width: 100%;
  border-collapse: collapse;
}
.comparison-table th,
.comparison-table td {
  padding: 18px 24px;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
  font-size: 13px;
}
.comparison-table th {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 11px;
  color: var(--color-muted);
  border-bottom: 2px solid var(--color-border);
}
.comparison-table td:first-child { color: var(--color-muted); }
.comparison-table td:nth-child(2) {
  font-weight: 600;
  color: var(--color-bg);
}
.comparison-table td:nth-child(3) { color: var(--color-muted); }
.comparison-table tr:hover td { background: rgba(0,0,0,0.015); }

/* ============================================================
   TESTIMONIALS
   ============================================================ */
.testimonials-section {
  padding: var(--section-padding) 0;
  background: var(--color-bg);
  color: var(--color-text-light);
  overflow: hidden;
}
.testimonials-section__title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 400;
  font-style: italic;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 64px;
}
.testimonials-hero {
  position: relative;
  height: 280px;
  margin-bottom: 64px;
  overflow: hidden;
}
.testimonials-hero__bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  /* Effect 8: parallax */
  transform: translateY(calc(var(--scroll-y) * -0.05));
  will-change: transform;
}
.testimonials-hero__overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 40px;
  background: linear-gradient(transparent, rgba(20,21,21,0.85));
}
.testimonials-hero__tagline {
  font-family: var(--font-serif);
  font-size: clamp(1.3rem, 2.5vw, 2rem);
  font-weight: 400;
  color: var(--color-text-light);
  font-style: italic;
}
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.testimonial-card {
  padding: 32px;
  border: 1px solid var(--color-border-dark);
  transition: border-color 0.35s ease, transform 0.35s var(--ease-out-expo);
}
.testimonial-card:hover {
  border-color: rgba(255,255,255,0.25);
  transform: translateY(-4px);
}
.testimonial-card__stars {
  display: flex;
  gap: 3px;
  margin-bottom: 16px;
}
.testimonial-card__star {
  width: 12px;
  height: 12px;
  background: var(--color-accent);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}
.testimonial-card__quote {
  font-size: 14px;
  line-height: 1.75;
  color: rgba(255,255,255,0.75);
  margin-bottom: 24px;
  font-style: italic;
}
.testimonial-card__author {
  font-weight: 600;
  font-size: 13px;
  color: var(--color-text-light);
}
.testimonial-card__role {
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  margin-top: 3px;
}

/* ============================================================
   Effect 29: processAccordion — FAQ
   ============================================================ */
.faq-section {
  padding: var(--section-padding) 0;
  background: #FFFFFF;
}
.faq-section__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 64px;
  gap: 40px;
}
.faq-section__title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 300;
  line-height: 1.12;
  letter-spacing: -0.025em;
  color: var(--color-heading);
}
.accordion-item {
  border-bottom: 1px solid var(--color-border);
}
.accordion-item:first-child { border-top: 1px solid var(--color-border); }
.accordion-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 28px 0;
  cursor: pointer;
  width: 100%;
  text-align: left;
  background: transparent;
  transition: padding 0.3s ease;
}
.accordion-header__title {
  font-family: var(--font-heading);
  font-size: clamp(1.1rem, 2.2vw, 1.7rem);
  font-weight: 400;
  color: var(--color-heading);
  transition: color 0.3s ease;
}
.accordion-item:hover .accordion-header__title { color: var(--color-bg); }

/* Effect 29: + rotates to × on open */
.accordion-header__toggle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-bg);
  color: var(--color-text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  line-height: 1;
  flex-shrink: 0;
  transition: transform 0.4s var(--ease-out-expo), background 0.3s ease;
  font-weight: 300;
}
/* Effect 22: subnavToggleYellow */
.accordion-item:hover .accordion-header__toggle {
  background: var(--color-accent);
  color: var(--color-bg);
}
.accordion-item.active .accordion-header__toggle {
  transform: rotate(45deg);
  background: var(--color-accent);
  color: var(--color-bg);
}

/* Height-animated accordion content */
.accordion-content {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.5s var(--ease-out-expo);
  overflow: hidden;
}
.accordion-item.active .accordion-content {
  grid-template-rows: 1fr;
}
.accordion-content__inner {
  overflow: hidden;
  padding-bottom: 0;
  transition: padding-bottom 0.4s ease, opacity 0.4s ease;
  opacity: 0;
  font-size: 14px;
  line-height: 1.8;
  color: var(--color-muted);
  max-width: 700px;
}
.accordion-item.active .accordion-content__inner {
  padding-bottom: 28px;
  opacity: 1;
}

/* ============================================================
   CTA SECTION
   ============================================================ */
.cta-section {
  padding: var(--section-padding) 0;
  background: var(--color-bg);
  color: var(--color-text-light);
  overflow: hidden;
}
.cta-section__inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 80px;
  align-items: center;
}
.cta-section__title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 300;
  line-height: 1.12;
  letter-spacing: -0.025em;
  margin-bottom: 20px;
}
.cta-section__subtitle {
  font-size: 14px;
  color: rgba(255,255,255,0.55);
  margin-bottom: 36px;
  line-height: 1.7;
}
.cta-section__note {
  font-size: 11px;
  color: rgba(255,255,255,0.3);
  margin-top: 16px;
}
.cta-section__images {
  display: flex;
  align-items: center;
  position: relative;
  gap: 0;
}
.cta-section__images img {
  width: 160px;
  height: 220px;
  object-fit: cover;
  border-radius: 4px;
  transition: transform 0.4s var(--ease-out-expo);
  position: relative;
}
.cta-section__images img:nth-child(1) { z-index: 3; }
.cta-section__images img:nth-child(2) {
  transform: rotate(5deg) translateY(16px);
  margin-left: -24px;
  z-index: 2;
}
.cta-section__images img:nth-child(3) {
  transform: rotate(-3deg) translateY(-8px);
  margin-left: -24px;
  z-index: 1;
}
.cta-section__images:hover img:nth-child(1) { transform: translateY(-8px) rotate(-2deg); }
.cta-section__images:hover img:nth-child(2) { transform: rotate(2deg) translateY(4px); margin-left: -20px; }
.cta-section__images:hover img:nth-child(3) { transform: rotate(-1deg) translateY(8px); margin-left: -20px; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  padding: 80px 0 40px;
  background: var(--color-bg);
  color: var(--color-text-light);
  border-top: 1px solid var(--color-border-dark);
}
.footer__top {
  margin-bottom: 64px;
}
.footer__top-title {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 300;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 40px;
}
.footer__top-title em {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--color-accent);
}
.footer__progress {
  width: 100%;
  height: 3px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
  margin-bottom: 64px;
}
.footer__progress-bar {
  height: 100%;
  background: var(--color-accent);
  width: 0;
  transition: width 1.2s var(--ease-out-expo);
}
.footer__progress-bar.revealed {
  width: 72%;
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 60px;
}
.footer__brand-logo {
  height: 32px;
  width: auto;
  margin-bottom: 16px;
  object-fit: contain;
}
.footer__brand-text {
  font-size: 13px;
  color: rgba(255,255,255,0.45);
  line-height: 1.7;
  max-width: 280px;
}
.footer__heading {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 20px;
  color: rgba(255,255,255,0.35);
}
.footer__links { display: flex; flex-direction: column; gap: 10px; }

/* Effect 25: socialLinkPillHover — underline animation on footer links */
.footer__links a {
  font-size: 13px;
  color: rgba(255,255,255,0.65);
  position: relative;
  display: inline-block;
  padding: 6px 0;
  min-height: 32px;
}
.footer__links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.35s var(--ease-out-expo);
}
.footer__links a:hover { color: var(--color-text-light); }
.footer__links a:hover::after { transform: scaleX(1); }

.footer__badges {
  display: flex;
  gap: 20px;
  margin-bottom: 32px;
  align-items: center;
}
.footer__badge {
  opacity: 0.5;
  transition: opacity 0.3s ease;
  height: 64px;
  width: auto;
}
.footer__badge:hover { opacity: 1; }
.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--color-border-dark);
  font-size: 12px;
  color: rgba(255,255,255,0.35);
}

/* ============================================================
   Effect 5: distortCard — perspective tilt on scroll reveal
   ============================================================ */
.distort-card {
  transform: perspective(1000px) rotateY(-3deg) translateY(20px);
  opacity: 0;
  transition: transform 0.8s var(--ease-out-expo), opacity 0.8s var(--ease-out-expo);
}
.distort-card.revealed {
  transform: perspective(1000px) rotateY(0deg) translateY(0);
  opacity: 1;
}

/* ============================================================
   Effect 24: formFieldHighlight
   ============================================================ */
.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.form-field label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.4);
}
.form-field input,
.form-field textarea {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--color-text-light);
  padding: 14px 16px;
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  transition: background 0.3s ease, border-color 0.3s ease;
  width: 100%;
  border-radius: 2px;
}
.form-field input:hover,
.form-field textarea:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(255,255,255,0.2);
}
.form-field input:focus,
.form-field textarea:focus {
  background: rgba(255,255,255,0.08);
  border-color: var(--color-accent);
}

/* ============================================================
   CONTACT CTA strip (inside footer or standalone)
   ============================================================ */
.contact-strip {
  padding: 80px 0;
  background: var(--color-bg);
  border-top: 1px solid var(--color-border-dark);
}
.contact-strip__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.contact-strip__title {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 3.5vw, 3rem);
  font-weight: 300;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--color-text-light);
  margin-bottom: 8px;
}
.contact-strip__sub {
  font-size: 13px;
  color: rgba(255,255,255,0.4);
}
.contact-strip__action {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .container { padding: 0 28px; }
  .header__nav,
  .header__cta { display: none; }
  .hamburger { display: flex; }
  .mobile-nav { grid-template-columns: 1fr; }
  .mobile-nav__image,
  .mobile-nav__contact { display: none; }
  .mobile-nav__links {
    border-right: none;
    align-items: flex-start;
    padding: 100px 40px 60px;
  }
  .steps { grid-template-columns: 1fr; }
  .step { border-right: none; padding: 40px 0 !important; border-bottom: 1px solid var(--color-border); }
  .step:last-child { border-bottom: none; }
  .services-grid { grid-template-columns: 1fr 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .features-section__header { flex-direction: column; align-items: flex-start; }
  .stats-section__inner { grid-template-columns: 1fr 1fr; }
  .testimonials-grid { grid-template-columns: 1fr 1fr; }
  .cta-section__inner { grid-template-columns: 1fr; }
  .cta-section__images { justify-content: center; }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .faq-section__header { flex-direction: column; align-items: flex-start; gap: 20px; }
  .project-item { grid-template-columns: 60px 1fr 1fr; }
  .project-item__link { grid-column: 3; }
  .project-item__desc { display: none; }
  .ideas-section__inner { grid-template-columns: 1fr; }
  .ideas-section__text { position: static; }
  .showcase-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-strip__inner { grid-template-columns: 1fr; gap: 32px; }
  .contact-strip__action { justify-content: flex-start; }
  .services-section__header { flex-direction: column; align-items: flex-start; gap: 20px; }
}

@media (max-width: 640px) {
  :root { --section-padding: 64px; }
  .container { padding: 0 20px; }
  .hero__title { font-size: clamp(2.2rem, 9vw, 3.2rem); }
  .hero__actions { flex-direction: column; align-items: flex-start; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); gap: 32px; padding-top: 32px; }
  .stats-bar__item { border-right: none; }
  .services-grid { grid-template-columns: 1fr; }
  .comparison-table { font-size: 12px; }
  .comparison-table th,
  .comparison-table td { padding: 12px 10px; }
  .footer__grid { grid-template-columns: 1fr; }
  .cta-section__images img { width: 110px; height: 160px; }
  .project-item { grid-template-columns: 48px 1fr; }
  .project-item__link { display: none; }
  .showcase-grid { grid-template-columns: 1fr 1fr; }
  .showcase-item img { height: 180px; }
  .stats-section__inner { grid-template-columns: 1fr; }
  .testimonials-grid { grid-template-columns: 1fr; }
  .footer__top-title { font-size: clamp(2rem, 8vw, 3rem); }
  .accordion-header__title { font-size: clamp(1rem, 4vw, 1.4rem); }
}

/* ============================================
   PRELOADER / INTRO OVERLAY
   Adapted from thewebguys.co.nz load sequence
   ============================================ */

/* Lock body scroll during preloader */
body.is-loading { overflow: hidden; }

.preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--color-bg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: opacity 0.4s ease;
}
.preloader.done {
  opacity: 0;
  pointer-events: none;
}

/* Word cycling — center of screen */
.preloader__words {
  position: relative;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.preloader__word {
  position: absolute;
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 300;
  color: var(--color-text-light);
  letter-spacing: -0.02em;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.preloader__word.active {
  opacity: 1;
  transform: translateY(0);
}
.preloader__word.exit {
  opacity: 0;
  transform: translateY(-20px);
}
.preloader__word--final {
  font-size: clamp(1.8rem, 4.5vw, 3.5rem);
}

/* Progress bar — bottom of preloader */
.preloader__progress {
  position: absolute;
  bottom: 80px;
  left: 40px;
  right: 40px;
}
.preloader__label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-text-light);
  margin-bottom: 16px;
}
.preloader__bar {
  width: 100%;
  height: 1px;
  background: rgba(255,255,255,0.15);
  position: relative;
}
.preloader__bar-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: var(--color-text-light);
  transition: width 0.3s cubic-bezier(0.215, 0.61, 0.355, 1);
}
.preloader__percent {
  display: block;
  text-align: center;
  margin-top: 12px;
  font-size: 13px;
  font-weight: 400;
  color: var(--color-text-light);
  font-variant-numeric: tabular-nums;
}

/* Yellow curtain wipe — slides up after preloader finishes */
.preloader__curtain {
  position: fixed;
  inset: 0;
  z-index: 9998;
  background: var(--color-accent);
  transform: translateY(100%);
  pointer-events: none;
}
.preloader__curtain.wipe-up {
  animation: curtainWipeUp 0.8s cubic-bezier(0.215, 0.61, 0.355, 1) forwards;
}
.preloader__curtain.wipe-away {
  animation: curtainWipeAway 0.6s cubic-bezier(0.215, 0.61, 0.355, 1) forwards;
  animation-delay: 0.15s;
}

@keyframes curtainWipeUp {
  0% { transform: translateY(100%); }
  100% { transform: translateY(0); }
}
@keyframes curtainWipeAway {
  0% { transform: translateY(0); }
  100% { transform: translateY(-100%); }
}
