/* ==========================================================================
   ACHITOR — Studio website
   Table of contents:
   1. Custom properties
   2. Reset & base
   3. Layout utilities
   4. Typography utilities
   5. Buttons
   6. Header / navigation
   7. Hero
   8. Logo marquee
   9. Section heading
   10. Work / case studies
   11. Tag marquee
   12. Services grid
   13. Studio / principles
   14. Process timeline
   15. Testimonials
   16. Final CTA
   17. Footer
   18. Contact page
   19. Animations
   20. Reduced motion & accessibility
   21. Grain texture overlay
   22. Custom cursor
   23. Page transition
   24. Marquee pause-on-hover
   25. Scroll-triggered image reveal
   26. Back-to-top button
   27. Small-screen refinements
   ========================================================================== */

/* ----------------------------------------------------------------------
   1. Custom properties
   ---------------------------------------------------------------------- */
:root {
  /* Brand accent (swappable) */
  --accent: #2E5E8E;
  --accent-rgb: 46, 94, 142;
  --accent-teal: #2F7D74;
  --accent-teal-rgb: 47, 125, 116;
  --accent-orange: #B4703C;
  --accent-orange-rgb: 180, 112, 60;
  --accent-orange-dark: #9A5C2C;
  --accent-purple: #5B4C9A;
  --accent-purple-rgb: 91, 76, 154;

  /* Ink scale (all built from one hue via alpha) */
  --ink-rgb: 20, 22, 26;
  --ink: #14161A;
  --ink-70: #3C434B;
  --ink-60: #565D66;
  --ink-55: #666D76;
  --ink-50: #5E656E;
  --ink-45: #6A717A;
  --ink-40: #70777F;

  --bg: #FBFAF8;
  --surface: #FFFFFF;
  --surface-muted: #F6F4F1;
  --surface-frame: #F1EFEB;

  --border: rgba(var(--ink-rgb), 0.08);
  --border-strong: rgba(var(--ink-rgb), 0.16);

  /* Typography */
  --font-sans: 'Schibsted Grotesk', Helvetica, Arial, sans-serif;
  --font-serif: 'Instrument Serif', Georgia, serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;

  /* Spacing */
  --gutter: clamp(20px, 5vw, 32px);
  --container-max: 1320px;
  --section-pad: clamp(88px, 12vw, 140px);

  /* Radius */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --radius-pill: 999px;

  /* Shadow */
  --shadow-float: 0 30px 60px -30px rgba(var(--ink-rgb), 0.22);
  --shadow-card: 0 50px 90px -40px rgba(var(--ink-rgb), 0.2);
  --shadow-card-hover: 0 60px 100px -45px rgba(var(--ink-rgb), 0.3);
  --shadow-phone: 0 30px 55px -25px rgba(var(--ink-rgb), 0.24);
  --shadow-cta: 0 18px 40px -18px rgba(var(--ink-rgb), 0.22);

  /* Motion */
  --ease-out-soft: cubic-bezier(.16, 1, .3, 1);
  --ease-out-quick: cubic-bezier(.2, .7, .3, 1);
}

/* ----------------------------------------------------------------------
   2. Reset & base
   ---------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

ul, dl { margin: 0; padding: 0; list-style: none; }

h1, h2, h3, h4, p, dl, dd, figure, blockquote { margin: 0; }

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

/* Visible keyboard focus, everywhere */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--gutter);
  z-index: 100;
  padding: 12px 20px;
  background: var(--ink);
  color: var(--bg);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  transition: top .3s var(--ease-out-quick);
}

.skip-link:focus {
  top: 12px;
}

/* ----------------------------------------------------------------------
   3. Layout utilities
   ---------------------------------------------------------------------- */
.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding: var(--section-pad) var(--gutter) 40px;
}

.section-top {
  border-top: 1px solid var(--border);
  padding-top: 40px;
}

.section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ----------------------------------------------------------------------
   4. Typography utilities
   ---------------------------------------------------------------------- */
.eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

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

.text-gradient {
  background: linear-gradient(100deg, var(--accent) 0%, var(--accent-teal) 42%, var(--accent-orange) 78%, var(--accent) 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradientShift 14s ease-in-out infinite;
}

.section-title {
  margin-top: 22px;
  font-size: clamp(34px, 4.4vw, 62px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  font-weight: 500;
}

.section-lede {
  max-width: 320px;
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-50);
}

/* ----------------------------------------------------------------------
   5. Buttons
   ---------------------------------------------------------------------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  border-radius: var(--radius-pill);
  font-size: 15px;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: transform .6s var(--ease-out-soft), box-shadow .35s ease, background .35s ease, border-color .35s ease;
  will-change: transform;
  transform: translate3d(var(--mx, 0), var(--my, 0), 0);
}

.btn.is-magnet-active {
  transition: transform .18s var(--ease-out-quick), box-shadow .35s ease, background .35s ease, border-color .35s ease;
}

.btn-arrow {
  font-size: 17px;
  line-height: 1;
}

.btn-primary {
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
  overflow: hidden;
}

.btn-primary:hover,
.btn-primary:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--shadow-cta);
  color: var(--bg);
}

.btn-secondary {
  border-color: var(--border-strong);
  background: rgba(var(--ink-rgb), 0.02);
  color: var(--ink);
  font-weight: 500;
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  background: rgba(var(--ink-rgb), 0.08);
  border-color: rgba(var(--ink-rgb), 0.2);
  transform: translateY(-2px);
  color: var(--ink);
}

.btn-large {
  padding: 17px 32px;
}

/* ----------------------------------------------------------------------
   6. Header / navigation
   ---------------------------------------------------------------------- */
.site-header {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background: rgba(251, 250, 248, 0.7);
  border-bottom: 1px solid rgba(var(--ink-rgb), 0.06);
  transition: background .5s ease, box-shadow .5s ease;
}

.site-header.is-scrolled {
  background: rgba(251, 250, 248, 0.9);
  box-shadow: 0 18px 40px -30px rgba(var(--ink-rgb), 0.13);
}

.site-nav {
  max-width: var(--container-max);
  margin-inline: auto;
  padding: 18px var(--gutter);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  transition: padding .5s var(--ease-out-soft);
}

.site-header.is-scrolled .site-nav {
  padding-block: 12px;
}

.logo {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.34em;
  text-transform: uppercase;
}

.logo:hover,
.logo:focus-visible { color: var(--ink); }

.nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  min-width: 0;
  gap: 10px clamp(16px, 3vw, 34px);
  font-size: 14px;
  color: var(--ink-50);
}

.nav-links a {
  transition: color .3s ease;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--ink);
}

.nav-links a.is-current {
  color: var(--accent);
}

.nav-cta {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: rgba(var(--ink-rgb), 0.04);
  transition: background .3s ease, border-color .3s ease, transform .3s ease;
}

.nav-cta:hover,
.nav-cta:focus-visible {
  background: rgba(var(--ink-rgb), 0.1);
  border-color: rgba(var(--ink-rgb), 0.18);
  color: var(--ink);
}

.nav-links__index {
  display: none;
}

@media (max-width: 880px) {
  .nav-links {
    flex: 1 1 auto;
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: clamp(18px, 5vw, 28px);
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-block: 4px;
    padding-inline: 26px 34px;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 20px, #000 calc(100% - 28px), transparent);
    mask-image: linear-gradient(90deg, transparent, #000 20px, #000 calc(100% - 28px), transparent);
  }

  .nav-links::-webkit-scrollbar {
    display: none;
  }

  .nav-links a {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    flex-shrink: 0;
    scroll-snap-align: start;
    white-space: nowrap;
  }

  .nav-links__index {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.08em;
    color: var(--accent);
  }
}

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

.progress-track {
  position: fixed;
  top: 0;
  inset-inline: 0;
  height: 2px;
  z-index: 70;
  pointer-events: none;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, rgba(var(--accent-rgb), 0.2), var(--accent));
  box-shadow: 0 0 14px rgba(var(--accent-rgb), 0.5);
}

/* ----------------------------------------------------------------------
   7. Hero
   ---------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: clamp(112px, 17vw, 160px) var(--gutter) 100px;
  overflow: hidden;
}

.hero-spotlight {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity .8s ease;
  background: radial-gradient(460px circle at var(--x, 50%) var(--y, 50%), rgba(var(--accent-rgb), 0.1), transparent 70%);
}

.hero-spotlight.is-active {
  opacity: 1;
}

.hero-orbs {
  position: absolute;
  inset: -20% -10%;
  pointer-events: none;
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
}

.hero-orb--a {
  top: -10%;
  left: 8%;
  width: 62vw;
  height: 62vw;
  opacity: 0.5;
  background: radial-gradient(circle at 50% 50%, rgba(var(--accent-rgb), 0.22), rgba(var(--accent-rgb), 0) 65%);
  animation: drift1 26s ease-in-out infinite;
}

.hero-orb--b {
  top: 30%;
  right: 26%;
  width: 32vw;
  height: 32vw;
  opacity: 0.5;
  background: radial-gradient(circle at 50% 50%, rgba(var(--accent-orange-rgb), 0.16), rgba(var(--accent-orange-rgb), 0) 65%);
  animation: drift1 38s ease-in-out infinite;
}

.hero-orb--c {
  bottom: -25%;
  right: 2%;
  width: 55vw;
  height: 55vw;
  opacity: 0.42;
  filter: blur(130px);
  background: radial-gradient(circle at 50% 50%, rgba(96, 124, 168, 0.24), rgba(96, 124, 168, 0) 65%);
  animation: drift2 32s ease-in-out infinite;
}

.hero-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(var(--ink-rgb), 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(var(--ink-rgb), 0.028) 1px, transparent 1px);
  background-size: 96px 96px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000, transparent 100%);
}

/* Small scattered accents that stand in for the hidden desktop mockup on
   mobile — kept subtle and out from under the headline/body copy. */
.hero-floaters {
  display: none;
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

@media (max-width: 900px) {
  .hero-floaters {
    display: block;
  }
}

.hero-floaters__item {
  position: absolute;
  border-radius: 50%;
}

.hero-floaters__item--1 {
  top: 10%;
  left: 6%;
  width: 13px;
  height: 13px;
  background: rgba(var(--accent-rgb), 0.32);
  animation: floatDrift1 8s ease-in-out infinite;
}

.hero-floaters__item--2 {
  top: 20%;
  right: 9%;
  width: 8px;
  height: 8px;
  background: rgba(var(--accent-teal-rgb), 0.4);
  animation: floatY2 7s ease-in-out infinite;
  animation-delay: 0.4s;
}

.hero-floaters__item--3 {
  top: 4%;
  right: 26%;
  width: 22px;
  height: 22px;
  border: 1.5px solid rgba(var(--accent-orange-rgb), 0.35);
  animation: floatDrift2 11s ease-in-out infinite;
  animation-delay: 1.2s;
}

.hero-floaters__item--4 {
  top: 46%;
  left: 3%;
  width: 7px;
  height: 7px;
  background: rgba(var(--accent-purple-rgb), 0.42);
  animation: floatY 9s ease-in-out infinite;
  animation-delay: 0.7s;
}

.hero-floaters__item--5 {
  top: 58%;
  right: 5%;
  width: 16px;
  height: 16px;
  border: 1.5px solid rgba(var(--accent-rgb), 0.28);
  animation: floatDrift1 10.5s ease-in-out infinite;
  animation-delay: 2s;
}

.hero-floaters__item--6 {
  top: 74%;
  left: 16%;
  width: 6px;
  height: 6px;
  background: rgba(var(--accent-teal-rgb), 0.38);
  animation: floatY2 6.5s ease-in-out infinite;
  animation-delay: 0.2s;
}

.hero-floaters__item--7 {
  top: 84%;
  right: 22%;
  width: 10px;
  height: 10px;
  background: rgba(var(--accent-orange-rgb), 0.3);
  animation: floatDrift2 8.5s ease-in-out infinite;
  animation-delay: 1.6s;
}

.hero-inner {
  position: relative;
  max-width: var(--container-max);
  margin-inline: auto;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
  gap: clamp(48px, 6vw, 64px);
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px 7px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: rgba(var(--ink-rgb), 0.03);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-50);
}

.hero-badge__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: blink 2.6s ease-in-out infinite;
}

.hero-title {
  margin-top: 30px;
  font-size: clamp(44px, 6.2vw, 92px);
  line-height: 0.98;
  letter-spacing: -0.035em;
  font-weight: 500;
  text-wrap: balance;
}

.hero-lede {
  margin-top: 32px;
  max-width: 520px;
  font-size: 19px;
  line-height: 1.6;
  color: var(--ink-50);
  text-wrap: pretty;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 44px;
}

.hero-meta {
  margin-top: 64px;
  display: flex;
  align-items: center;
  gap: 26px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-45);
  flex-wrap: wrap;
}

.hero-meta__sep { opacity: .4; }

.hero-visual {
  position: relative;
  height: clamp(360px, 46vw, 460px);
  min-width: 0;
}

/* The floating checkout/metrics mockup only earns its space with room either
   side of the copy; below that it just stacks awkwardly under the text. */
@media (max-width: 900px) {
  .hero-visual {
    display: none;
  }

  .hero-orb--a {
    opacity: 0.62;
  }

  .hero-orb--b {
    opacity: 0.6;
  }

  .hero-orb--c {
    opacity: 0.5;
  }
}

.hero-card {
  position: absolute;
  padding: 20px;
  border-radius: 18px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-float);
}

.hero-card--checkout {
  top: 8%;
  left: 4%;
  width: 74%;
  animation: floatY 9s ease-in-out infinite;
}

.hero-card__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-45);
}

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

.hero-card__bars {
  margin-top: 18px;
  display: grid;
  gap: 10px;
}

.hero-card__bar {
  height: 10px;
  border-radius: 6px;
  background: rgba(var(--ink-rgb), 0.14);
}

.hero-card__bar--2 { background: rgba(var(--ink-rgb), 0.09); width: 58%; }
.hero-card__bar--3 { background: rgba(var(--ink-rgb), 0.06); width: 68%; }
.hero-card__bar--1 { width: 82%; }

.hero-card__action {
  margin-top: 20px;
  height: 38px;
  border-radius: 10px;
  background: rgba(var(--accent-rgb), 0.16);
  border: 1px solid rgba(var(--accent-rgb), 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.hero-card--metrics {
  bottom: 6%;
  right: 2%;
  width: 58%;
  padding: 18px 20px;
  border-radius: 16px;
  animation: floatY2 11s ease-in-out infinite;
}

.hero-card__label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-45);
}

.hero-card__chart {
  margin-top: 14px;
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 56px;
}

.hero-card__chart span {
  flex: 1;
  border-radius: 4px;
  background: rgba(var(--ink-rgb), 0.1);
}

.hero-card__chart span:nth-child(1) { height: 40%; }
.hero-card__chart span:nth-child(2) { height: 62%; background: rgba(var(--ink-rgb), 0.14); }
.hero-card__chart span:nth-child(3) { height: 52%; }
.hero-card__chart span:nth-child(4) { height: 86%; background: rgba(var(--accent-rgb), 0.55); }
.hero-card__chart span:nth-child(5) { height: 100%; background: var(--accent); }

.hero-pill {
  position: absolute;
  top: 52%;
  left: -2%;
  padding: 12px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(var(--ink-rgb), 0.12);
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--ink-70);
  animation: floatY 13s ease-in-out infinite;
}

/* ----------------------------------------------------------------------
   8. Logo marquee
   ---------------------------------------------------------------------- */
.marquee-strip {
  padding: 0 0 8px;
}

.marquee-strip .container {
  display: flex;
  align-items: center;
  gap: clamp(20px, 4vw, 44px);
  flex-wrap: wrap;
}

.marquee-strip__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-45);
  white-space: nowrap;
}

.marquee-viewport {
  flex: 1 1 320px;
  min-width: 0;
  overflow: hidden;
  border-left: 1px solid var(--border);
  padding-left: clamp(20px, 4vw, 44px);
  -webkit-mask-image: linear-gradient(90deg, #000 82%, transparent);
  mask-image: linear-gradient(90deg, #000 82%, transparent);
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 34s linear infinite;
}

.marquee-group {
  display: flex;
  align-items: center;
  gap: clamp(28px, 4vw, 56px);
  padding-right: clamp(28px, 4vw, 56px);
  white-space: nowrap;
  font-size: clamp(17px, 2vw, 22px);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink-70);
}

.marquee-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}
.marquee-dot--teal { background: var(--accent-teal); }
.marquee-dot--orange { background: var(--accent-orange-dark); }
.marquee-dot--purple { background: var(--accent-purple); }

/* Accent colour utilities (reused across service cards, principles) */
.u-text-accent { color: var(--accent); }
.u-text-teal { color: var(--accent-teal); }
.u-text-orange { color: var(--accent-orange); }
.u-text-orange-dark { color: var(--accent-orange-dark); }
.u-text-purple { color: var(--accent-purple); }

.u-bg-accent { background: var(--accent); }
.u-bg-teal { background: var(--accent-teal); }
.u-bg-orange-dark { background: var(--accent-orange-dark); }
.u-bg-purple { background: var(--accent-purple); }

/* ----------------------------------------------------------------------
   10. Work / case studies
   ---------------------------------------------------------------------- */
.work-header {
  padding-top: clamp(80px, 11vw, 120px);
}

.work-header .section-header {
  border-top: 1px solid var(--border);
  padding-top: 40px;
}

.work-header h2 { max-width: 16ch; }

.project {
  max-width: var(--container-max);
  margin-inline: auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr));
  gap: clamp(44px, 6vw, 72px);
  align-items: center;
}

.project + .project {
  margin-top: clamp(88px, 11vw, 140px);
}

.projects-list {
  padding: 60px var(--gutter);
}

.project__index {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
}

.project__index--01 { color: var(--accent); }
.project__index--02 { color: var(--accent-orange-dark); }
.project__index--03 { color: var(--accent-teal); }
.project__index--04 { color: var(--accent-purple); }

.project__title {
  margin-top: 20px;
  font-size: clamp(34px, 4vw, 56px);
  letter-spacing: -0.03em;
  font-weight: 500;
  line-height: 1;
}

.project__title--long {
  font-size: clamp(30px, 3.4vw, 48px);
  line-height: 1.02;
}

.project__desc {
  margin-top: 24px;
  font-size: 18px;
  line-height: 1.65;
  color: var(--ink-60);
  max-width: 42ch;
  text-wrap: pretty;
}

.project__facts {
  margin-top: 34px;
  display: grid;
  gap: 18px;
  border-top: 1px solid var(--border);
  padding-top: 22px;
}

.project__fact {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 18px;
}

.project__fact dt {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-45);
}

.project__fact dd {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-70);
}

.project__media {
  display: block;
  position: relative;
  padding-bottom: 56px;
  perspective: 1400px;
}

.project__media-badge {
  position: absolute;
  top: calc(50% - 28px);
  left: 50%;
  z-index: 5;
  transform: translate(-50%, -50%) translateY(8px);
  padding: 12px 22px;
  border-radius: var(--radius-pill);
  background: rgba(var(--ink-rgb), 0.88);
  color: var(--bg);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s ease, transform .35s var(--ease-out-quick);
}

.project__media:hover .project__media-badge,
.project__media:focus-visible .project__media-badge {
  opacity: 1;
  transform: translate(-50%, -50%) translateY(0);
}

.browser-frame {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  transition: transform .7s var(--ease-out-soft), box-shadow .7s ease;
  transform-style: preserve-3d;
  transform: rotateY(var(--ry, 0deg)) rotateX(var(--rx, 0deg)) scale(var(--tilt-scale, 1));
}

.browser-frame.is-tilting {
  transition: transform .25s ease-out, box-shadow .4s ease;
  box-shadow: var(--shadow-card-hover);
}

.browser-frame__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(var(--ink-rgb), 0.07);
  background: rgba(var(--ink-rgb), 0.03);
}

.browser-frame__dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(var(--ink-rgb), 0.16);
}

.browser-frame__dot:nth-child(2) { background: rgba(var(--ink-rgb), 0.12); }
.browser-frame__dot:nth-child(3) { background: rgba(var(--ink-rgb), 0.09); }

.browser-frame__url {
  margin-left: 14px;
  flex: 1;
  max-width: 260px;
  height: 22px;
  border-radius: var(--radius-pill);
  background: rgba(var(--ink-rgb), 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: var(--ink-45);
  white-space: nowrap;
}

.browser-frame__screen img,
.phone-frame__screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.project__visit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  border-bottom: 1px solid var(--border-strong);
  padding-bottom: 3px;
  transition: color .3s ease, border-color .3s ease;
}

.project__visit:hover,
.project__visit:focus-visible {
  color: var(--accent);
  border-color: var(--accent);
}

.browser-frame__screen {
  position: relative;
  aspect-ratio: 16 / 10;
  background:
    repeating-linear-gradient(135deg, rgba(var(--ink-rgb), 0.05) 0 10px, rgba(255, 255, 255, 0) 10px 20px),
    var(--screen-tint, radial-gradient(ellipse at 30% 20%, rgba(var(--accent-rgb), 0.16), transparent 62%)),
    var(--surface-frame);
  display: flex;
  align-items: center;
  justify-content: center;
}

.project__media--01 .browser-frame__screen { --screen-tint: radial-gradient(ellipse at 30% 20%, rgba(var(--accent-rgb), 0.16), transparent 62%); }
.project__media--02 .browser-frame__screen { --screen-tint: radial-gradient(ellipse at 70% 30%, rgba(var(--accent-orange-rgb), 0.16), transparent 62%); }
.project__media--03 .browser-frame__screen { --screen-tint: radial-gradient(ellipse at 40% 70%, rgba(var(--accent-teal-rgb), 0.16), transparent 62%); }
.project__media--04 .browser-frame__screen { --screen-tint: radial-gradient(ellipse at 60% 40%, rgba(var(--accent-purple-rgb), 0.14), transparent 62%); }

.phone-frame {
  position: absolute;
  bottom: 0;
  width: 148px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid rgba(var(--ink-rgb), 0.12);
  background: var(--surface);
  box-shadow: var(--shadow-phone);
}

.phone-frame--left { left: -28px; }
.phone-frame--right { right: -28px; }

.phone-frame__notch {
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.phone-frame__notch span {
  width: 42px;
  height: 5px;
  border-radius: var(--radius-pill);
  background: rgba(var(--ink-rgb), 0.14);
}

.phone-frame__screen {
  position: relative;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  background:
    repeating-linear-gradient(135deg, rgba(var(--ink-rgb), 0.05) 0 8px, rgba(255, 255, 255, 0) 8px 16px),
    var(--surface-frame);
}

/* ----------------------------------------------------------------------
   11. Tag marquee
   ---------------------------------------------------------------------- */
.tag-marquee {
  padding: 40px 0 0;
}

.tag-marquee__viewport {
  overflow: hidden;
  border-block: 1px solid var(--border);
  padding-block: 22px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}

.tag-marquee__track {
  display: flex;
  width: max-content;
  animation: marquee 42s linear infinite;
}

.tag-marquee__group {
  display: flex;
  align-items: center;
  gap: 40px;
  padding-right: 40px;
  font-size: 15px;
  letter-spacing: -0.01em;
  color: var(--ink-60);
  white-space: nowrap;
}

.tag-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.tag-dot--blue { background: var(--accent); }
.tag-dot--teal { background: var(--accent-teal); }
.tag-dot--orange { background: var(--accent-orange); }
.tag-dot--purple { background: var(--accent-purple); }

/* ----------------------------------------------------------------------
   12. Services grid
   ---------------------------------------------------------------------- */
.services-grid {
  max-width: var(--container-max);
  margin: 56px auto 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.service-card {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  padding: 38px 32px 42px;
  transition: background .4s ease;
}

.service-card:hover,
.service-card:focus-within {
  background: var(--surface-muted);
}

.service-card__glow {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .5s ease;
  pointer-events: none;
  background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 50%), rgba(var(--glow-rgb, var(--accent-rgb)), 0.08), transparent 70%);
}

.service-card:hover .service-card__glow,
.service-card:focus-within .service-card__glow {
  opacity: 1;
}

.service-card__rule {
  position: absolute;
  top: 0;
  inset-inline: 0;
  height: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .6s var(--ease-out-soft);
}

.service-card:hover .service-card__rule,
.service-card:focus-within .service-card__rule {
  transform: scaleX(1);
}

.service-card__glow.u-bg-accent { --glow-rgb: var(--accent-rgb); }
.service-card__glow.u-bg-teal { --glow-rgb: var(--accent-teal-rgb); }
.service-card__glow.u-bg-orange-dark { --glow-rgb: var(--accent-orange-rgb); }
.service-card__glow.u-bg-purple { --glow-rgb: var(--accent-purple-rgb); }

.service-card__index {
  position: relative;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
}

.service-card__title {
  position: relative;
  margin-top: 26px;
  margin-bottom: 10px;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.015em;
}

.service-card__desc {
  position: relative;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-55);
}

/* ----------------------------------------------------------------------
   13. Studio / principles
   ---------------------------------------------------------------------- */
.studio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr));
  gap: clamp(44px, 6vw, 80px);
}

.studio-intro p {
  margin-top: 30px;
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink-50);
  max-width: 42ch;
  text-wrap: pretty;
}

.principles-list {
  display: grid;
  gap: 0;
}

.principle {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 24px;
  padding: 26px 0;
  border-bottom: 1px solid rgba(var(--ink-rgb), 0.07);
}

.principle:last-child { border-bottom: none; }

.principle__index {
  font-family: var(--font-mono);
  font-size: 11px;
  padding-top: 6px;
}

.principle__title {
  margin-bottom: 8px;
  font-size: 21px;
  font-weight: 500;
  letter-spacing: -0.015em;
}

.principle__desc {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-55);
}

/* ----------------------------------------------------------------------
   14. Process timeline
   ---------------------------------------------------------------------- */
.process-wrap {
  position: relative;
  margin-top: 90px;
}

.process-track {
  position: absolute;
  top: 7px;
  inset-inline: 0;
  height: 1px;
  background: rgba(var(--ink-rgb), 0.1);
}

.process-fill {
  position: absolute;
  top: 7px;
  left: 0;
  width: 0%;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), var(--accent-teal) 55%, var(--accent-orange));
  transition: width 2.6s cubic-bezier(.4, 0, .2, 1);
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
  gap: 40px 32px;
}

.process-step__dot {
  display: block;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 1px solid rgba(var(--ink-rgb), 0.14);
  background: var(--bg);
  transition: background .6s ease, border-color .6s ease, box-shadow .6s ease;
}

.process-step:nth-child(1) .process-step__dot { transition-delay: 0.1s; }
.process-step:nth-child(2) .process-step__dot { transition-delay: 0.6s; }
.process-step:nth-child(3) .process-step__dot { transition-delay: 1.1s; }
.process-step:nth-child(4) .process-step__dot { transition-delay: 1.6s; }
.process-step:nth-child(5) .process-step__dot { transition-delay: 2.1s; }

.process-wrap.is-active .process-fill { width: 100%; }

.process-wrap.is-active .process-step:nth-child(1) .process-step__dot {
  background: #2E5E8E; border-color: #2E5E8E; box-shadow: 0 0 0 5px rgba(46, 94, 142, 0.12);
}
.process-wrap.is-active .process-step:nth-child(2) .process-step__dot {
  background: #2A6B85; border-color: #2A6B85; box-shadow: 0 0 0 5px rgba(42, 107, 133, 0.12);
}
.process-wrap.is-active .process-step:nth-child(3) .process-step__dot {
  background: #2F7D74; border-color: #2F7D74; box-shadow: 0 0 0 5px rgba(47, 125, 116, 0.12);
}
.process-wrap.is-active .process-step:nth-child(4) .process-step__dot {
  background: #7A7659; border-color: #7A7659; box-shadow: 0 0 0 5px rgba(122, 118, 89, 0.12);
}
.process-wrap.is-active .process-step:nth-child(5) .process-step__dot {
  background: #B4703C; border-color: #B4703C; box-shadow: 0 0 0 5px rgba(180, 112, 60, 0.12);
}

.process-wrap.is-wrapped .process-track,
.process-wrap.is-wrapped .process-fill {
  display: none;
}

.process-step__title {
  margin: 30px 0 10px;
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.process-step__desc {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-55);
  max-width: 24ch;
}

/* ----------------------------------------------------------------------
   15. Testimonials
   ---------------------------------------------------------------------- */
.testimonials-grid {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 24px;
}

.testimonial {
  padding: 40px 34px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 34px;
  transition: border-color .4s ease, transform .4s var(--ease-out-quick);
}

.testimonial:hover,
.testimonial:focus-within {
  border-color: rgba(var(--ink-rgb), 0.14);
  transform: translateY(-4px);
}

.testimonial__quote {
  font-size: 20px;
  line-height: 1.55;
  letter-spacing: -0.015em;
  color: #1B1E23;
  text-wrap: pretty;
}

.testimonial__author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.testimonial__avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: repeating-linear-gradient(135deg, rgba(var(--ink-rgb), 0.12) 0 4px, rgba(var(--ink-rgb), 0.04) 4px 8px);
  flex-shrink: 0;
}

.testimonial__role {
  font-size: 14px;
  color: var(--ink-50);
}

/* ----------------------------------------------------------------------
   16. Final CTA
   ---------------------------------------------------------------------- */
.cta {
  position: relative;
  padding: clamp(110px, 16vw, 180px) var(--gutter) clamp(80px, 12vw, 120px);
  overflow: hidden;
}

.cta-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.cta-glow::before {
  content: '';
  position: absolute;
  bottom: -40%;
  left: 50%;
  transform: translateX(-50%);
  width: 90vw;
  height: 70vw;
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.4;
  background:
    radial-gradient(circle at 35% 50%, rgba(var(--accent-rgb), 0.22), rgba(var(--accent-rgb), 0) 60%),
    radial-gradient(circle at 65% 45%, rgba(var(--accent-teal-rgb), 0.18), rgba(var(--accent-teal-rgb), 0) 60%),
    radial-gradient(circle at 50% 70%, rgba(var(--accent-orange-rgb), 0.16), rgba(var(--accent-orange-rgb), 0) 60%);
}

.cta-inner {
  position: relative;
  max-width: 1000px;
  margin-inline: auto;
  text-align: center;
}

.cta-title {
  font-size: clamp(42px, 6.6vw, 104px);
  line-height: 0.98;
  letter-spacing: -0.04em;
  font-weight: 500;
}

.cta-title .italic-serif { color: var(--accent); }

.cta-lede {
  margin: 30px auto 0;
  max-width: 50ch;
  font-size: 19px;
  line-height: 1.65;
  color: var(--ink-50);
  text-wrap: pretty;
}

.cta-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 46px;
}

/* ----------------------------------------------------------------------
   17. Footer
   ---------------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 42px var(--gutter);
}

.site-footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--ink-40);
}

.footer-wordmark {
  font-weight: 600;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--ink-50);
}

.footer-tagline {
  font-family: var(--font-mono);
  letter-spacing: 0.1em;
}

/* ----------------------------------------------------------------------
   18. Contact page
   ---------------------------------------------------------------------- */
.contact-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.contact-header {
  position: relative;
  z-index: 20;
  border-bottom: 1px solid var(--border);
  background: rgba(251, 250, 248, 0.7);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.contact-header .site-nav { padding-block: 18px; }

.back-link {
  font-size: 14px;
  color: var(--ink-50);
  transition: color .3s ease;
}

.back-link:hover,
.back-link:focus-visible { color: var(--ink); }

.contact-main {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  padding: clamp(80px, 14vw, 120px) var(--gutter);
}

.contact-orbs {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.contact-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(130px);
}

.contact-orb--a {
  top: -20%;
  left: 10%;
  width: 48vw;
  height: 48vw;
  opacity: 0.55;
  background: radial-gradient(circle at 50% 50%, rgba(var(--accent-rgb), 0.2), rgba(var(--accent-rgb), 0) 65%);
  animation: drift1 30s ease-in-out infinite;
}

.contact-orb--b {
  bottom: -30%;
  right: 6%;
  width: 44vw;
  height: 44vw;
  opacity: 0.5;
  background: radial-gradient(circle at 50% 50%, rgba(var(--accent-teal-rgb), 0.18), rgba(var(--accent-teal-rgb), 0) 65%);
  animation: drift2 36s ease-in-out infinite;
}

.contact-content {
  position: relative;
  max-width: 1000px;
  margin-inline: auto;
  text-align: center;
}

.contact-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px 7px 10px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.7);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-50);
}

.contact-badge__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-teal);
  animation: blink 2.6s ease-in-out infinite;
}

.contact-title {
  margin-top: 34px;
  font-size: clamp(38px, 5.4vw, 78px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 500;
}

.contact-title .italic-serif { color: var(--accent); }

.contact-email {
  display: inline-block;
  margin-top: 44px;
  font-size: clamp(24px, 6.4vw, 62px);
  word-break: break-word;
  letter-spacing: -0.03em;
  font-weight: 500;
  border-bottom: 2px solid rgba(var(--accent-rgb), 0.35);
  padding-bottom: 6px;
  transition: border-color .4s ease, transform .7s var(--ease-out-soft);
  will-change: transform;
  transform: translate3d(var(--mx, 0), var(--my, 0), 0);
}

.contact-email.is-magnet-active {
  transition: border-color .4s ease, transform .2s ease-out;
}

.contact-email:hover,
.contact-email:focus-visible {
  border-color: var(--accent);
}

.contact-note {
  margin: 40px auto 0;
  font-size: 19px;
  line-height: 1.6;
  color: var(--ink-50);
}

.contact-footer {
  position: relative;
  z-index: 10;
  border-top: 1px solid var(--border);
  padding: 30px var(--gutter);
}

.contact-footer .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  font-size: 13px;
  color: var(--ink-40);
}

/* ----------------------------------------------------------------------
   19. Animations
   ---------------------------------------------------------------------- */
@keyframes drift1 {
  0%, 100% { transform: translate3d(-6%, -4%, 0) scale(1); }
  50% { transform: translate3d(6%, 6%, 0) scale(1.15); }
}

@keyframes drift2 {
  0%, 100% { transform: translate3d(8%, 4%, 0) scale(1.1); }
  50% { transform: translate3d(-6%, -6%, 0) scale(0.95); }
}

@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

@keyframes floatY2 {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(12px); }
}

@keyframes floatDrift1 {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(8px, -14px); }
  66% { transform: translate(-6px, 8px); }
}

@keyframes floatDrift2 {
  0%, 100% { transform: translate(0, 0); }
  40% { transform: translate(-10px, -10px); }
  75% { transform: translate(7px, 6px); }
}

@keyframes blink {
  0%, 45% { opacity: 1; }
  55%, 100% { opacity: 0; }
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes marquee {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-50%, 0, 0); }
}

/* Scroll-reveal + stagger hooks (state classes toggled by script.js) */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1s var(--ease-out-quick), transform 1s var(--ease-out-quick);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

[data-hero] {
  opacity: 0;
  transform: translateY(22px);
  filter: blur(6px);
  transition: opacity 1.1s var(--ease-out-soft), transform 1.2s var(--ease-out-soft), filter 1.1s ease;
}

[data-hero].is-visible {
  opacity: 1;
  transform: none;
  filter: none;
}

/* Staggered hero entrance delays (six beats, ~0.11s apart) */
.hero-anim-1 { transition-delay: .12s; }
.hero-anim-2 { transition-delay: .23s; }
.hero-anim-3 { transition-delay: .34s; }
.hero-anim-4 { transition-delay: .45s; }
.hero-anim-5 { transition-delay: .56s; }
.hero-anim-6 {
  transition-delay: .67s;
  transform: translateY(26px) scale(0.985);
}

/* Staggered reveal delays for grid/list groups (nine beats, 0.07s apart) */
[data-stagger] > *:nth-child(1) { transition-delay: 0s; }
[data-stagger] > *:nth-child(2) { transition-delay: .07s; }
[data-stagger] > *:nth-child(3) { transition-delay: .14s; }
[data-stagger] > *:nth-child(4) { transition-delay: .21s; }
[data-stagger] > *:nth-child(5) { transition-delay: .28s; }
[data-stagger] > *:nth-child(6) { transition-delay: .35s; }
[data-stagger] > *:nth-child(7) { transition-delay: .42s; }
[data-stagger] > *:nth-child(8) { transition-delay: .49s; }
[data-stagger] > *:nth-child(9) { transition-delay: .56s; }

[data-stagger] > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .85s var(--ease-out-soft), transform .85s var(--ease-out-soft);
}

[data-stagger].is-visible > * {
  opacity: 1;
  transform: none;
}

.process-step__dot.is-active {
  box-shadow: 0 0 0 5px var(--dot-glow, rgba(var(--accent-rgb), 0.12));
}

/* ----------------------------------------------------------------------
   20. Reduced motion & accessibility
   ---------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

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

  [data-reveal],
  [data-hero],
  [data-stagger] > * {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

@media (prefers-contrast: more) {
  :root {
    --border: rgba(var(--ink-rgb), 0.35);
    --border-strong: rgba(var(--ink-rgb), 0.5);
  }
}

/* ----------------------------------------------------------------------
   21. Grain texture overlay
   ---------------------------------------------------------------------- */
.grain {
  position: fixed;
  inset: 0;
  z-index: 65;
  pointer-events: none;
  opacity: 0.028;
  mix-blend-mode: multiply;
  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.85' numOctaves='3'/></filter><rect width='160' height='160' filter='url(%23n)'/></svg>");
}

/* ----------------------------------------------------------------------
   22. Custom cursor (desktop, fine pointer only)
   ---------------------------------------------------------------------- */
html.has-custom-cursor,
html.has-custom-cursor a,
html.has-custom-cursor button,
html.has-custom-cursor [data-tilt] {
  cursor: none;
}

.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 200;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  transition: opacity .25s ease, background-color .3s ease, border-color .3s ease;
}

.cursor-dot.is-active,
.cursor-ring.is-active {
  opacity: 1;
}

.cursor-dot {
  width: 7px;
  height: 7px;
  background: var(--ink);
  transform: translate3d(calc(var(--x, -100px) - 50%), calc(var(--y, -100px) - 50%), 0);
}

.cursor-ring {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(var(--ink-rgb), 0.3);
  transform: translate3d(calc(var(--x, -100px) - 50%), calc(var(--y, -100px) - 50%), 0) scale(var(--ring-scale, 1));
  transition: opacity .25s ease, background-color .3s ease, border-color .3s ease, transform .5s var(--ease-out-soft);
}

html.cursor-hover .cursor-ring {
  --ring-scale: 1.7;
  border-color: var(--accent);
  background: rgba(var(--accent-rgb), 0.07);
}

html.cursor-hover .cursor-dot {
  background: var(--accent);
}

/* ----------------------------------------------------------------------
   23. Page transition (fade out on internal navigation)
   ---------------------------------------------------------------------- */
body {
  transition: opacity .35s ease;
}

body.is-leaving {
  opacity: 0;
}

/* ----------------------------------------------------------------------
   24. Marquee pause-on-hover
   ---------------------------------------------------------------------- */
.marquee-viewport:hover .marquee-track,
.tag-marquee__viewport:hover .tag-marquee__track {
  animation-play-state: paused;
}

/* ----------------------------------------------------------------------
   25. Scroll-triggered image reveal on project mockups
   ---------------------------------------------------------------------- */
[data-media-reveal] .browser-frame {
  clip-path: inset(0 100% 0 0);
  transition: clip-path 1.1s var(--ease-out-soft), transform .7s var(--ease-out-soft), box-shadow .7s ease;
}

[data-media-reveal].is-visible .browser-frame {
  clip-path: inset(0 0 0 0);
}

[data-media-reveal] .phone-frame {
  clip-path: inset(100% 0 0 0);
  transition: clip-path 1s var(--ease-out-soft) .18s;
}

[data-media-reveal].is-visible .phone-frame {
  clip-path: inset(0 0 0 0);
}

/* ----------------------------------------------------------------------
   26. Back-to-top button
   ---------------------------------------------------------------------- */
.back-to-top {
  position: fixed;
  right: var(--gutter);
  bottom: 24px;
  z-index: 55;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: rgba(251, 250, 248, 0.8);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-float);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity .4s ease, transform .4s var(--ease-out-soft), border-color .3s ease, background .3s ease;
}

.back-to-top.is-visible {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.back-to-top:hover,
.back-to-top:focus-visible {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.92);
}

.back-to-top__ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.back-to-top__ring-bg {
  fill: none;
  stroke: rgba(var(--ink-rgb), 0.08);
  stroke-width: 2;
}

.back-to-top__ring-fill {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 119.4;
  stroke-dashoffset: calc(119.4 * (1 - var(--progress, 0)));
  transition: stroke-dashoffset .1s linear;
}

.back-to-top__arrow {
  position: relative;
  font-size: 17px;
  color: var(--ink);
  transform: translateY(1px);
}

/* ----------------------------------------------------------------------
   27. Small-screen refinements
   ---------------------------------------------------------------------- */
@media (max-width: 640px) {
  .project__fact {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .hero-meta {
    gap: 10px 14px;
  }

  .phone-frame {
    width: 116px;
  }

  .phone-frame--left { left: -14px; }
  .phone-frame--right { right: -14px; }

  .service-card {
    padding: 32px 24px 36px;
  }

  .testimonial {
    padding: 32px 26px;
  }
}
