/* ==========================================================================
   iDesign Media — Work in Motion
   Dark editorial chrome layered over a scroll-driven 3D reel.
   ========================================================================== */

:root {
  --ink:        #08090b;
  --ink-2:      #0d0f12;
  --paper:      #f4f5f4;
  --muted:      rgba(244, 245, 244, 0.62);
  --faint:      rgba(244, 245, 244, 0.34);
  --accent:     #14a99b;
  --accent-2:   #7fe3d8;
  --hair:       rgba(244, 245, 244, 0.13);

  --gutter:     clamp(20px, 5vw, 88px);
  --max:        1240px;
  --ease:       cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { box-sizing: border-box; }

html {
  background: var(--ink);
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: "Poppins", "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: -0.01em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

/* --------------------------------------------------------------------------
   Stage
   -------------------------------------------------------------------------- */

#stage {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
  transition: opacity 0.8s var(--ease), filter 0.8s var(--ease);
}

body.past-reel #stage {
  opacity: 0.34;
  filter: blur(1.5px) saturate(0.9);
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 45%, transparent 36%, rgba(4, 5, 6, 0.5) 76%, rgba(4, 5, 6, 0.88) 100%),
    linear-gradient(to bottom, rgba(4, 5, 6, 0.5) 0%, transparent 16%, transparent 84%, rgba(4, 5, 6, 0.68) 100%);
}

/* --------------------------------------------------------------------------
   Bar + nav
   -------------------------------------------------------------------------- */

.bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: clamp(14px, 2vw, 24px) var(--gutter);
  pointer-events: none;
  transition: background 0.5s var(--ease), border-color 0.5s var(--ease), backdrop-filter 0.5s var(--ease);
  border-bottom: 1px solid transparent;
}

.bar > * { pointer-events: auto; }

body.scrolled .bar {
  background: rgba(8, 9, 11, 0.72);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border-bottom-color: var(--hair);
}

.brand img {
  display: block;
  height: clamp(32px, 3.2vw, 44px);
  width: auto;
  opacity: 0.95;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 1.8vw, 30px);
}

.nav a {
  position: relative;
  color: var(--muted);
  text-decoration: none;
  font-size: 11.5px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: color 0.25s var(--ease);
}

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

.nav a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -7px;
  height: 1px;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

.nav a.enquiry {
  color: var(--ink);
  background: var(--paper);
  padding: 9px 16px;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.1em;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.nav a.enquiry:hover {
  background: var(--accent);
  color: var(--ink);
  box-shadow: 0 10px 30px -12px rgba(20, 169, 155, 0.8);
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */

.section { position: relative; }

.hero {
  z-index: 10;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: var(--max);
  margin: 0 auto;
  padding: 120px var(--gutter) 90px;
  pointer-events: none;
}

.hero > * { pointer-events: auto; }

/* the studio's own backdrop photograph, hung as a faint watermark behind the opening copy */
.hero::before {
  content: "";
  position: absolute;
  inset: 0 calc(50% - 50vw);
  z-index: -1;
  background-image: url("/assets/img/slider-idesignmedia2.jpg");
  background-size: cover;
  background-position: 76% 42%;
  filter: grayscale(1) contrast(1.08) brightness(0.86);
  opacity: 0.26;
  -webkit-mask-image: radial-gradient(78% 96% at 80% 44%, #000 0%, rgba(0, 0, 0, 0.6) 42%, transparent 76%);
  mask-image: radial-gradient(78% 96% at 80% 44%, #000 0%, rgba(0, 0, 0, 0.6) 42%, transparent 76%);
  pointer-events: none;
  animation: heroMarkDrift 38s ease-in-out infinite alternate;
  will-change: transform;
}

@keyframes heroMarkDrift {
  from { transform: scale(1.02) translate3d(0, 0, 0); }
  to   { transform: scale(1.11) translate3d(-1.6%, -1.2%, 0); }
}

.hero .lede { max-width: 44ch; }

.pullquote {
  margin: clamp(22px, 3vw, 34px) 0 0;
  padding-left: 16px;
  border-left: 1px solid var(--accent);
  max-width: 36ch;
  font-size: clamp(13px, 1.05vw, 15px);
  color: var(--muted);
  font-style: italic;
}

/* the tall scroll runway that plays the reel */
.reel {
  height: 360vh;
  z-index: 5;
  pointer-events: none;
}

.reel-note {
  position: sticky;
  top: clamp(76px, 9vh, 100px);
  margin: 0 var(--gutter);
  font-size: 10px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--faint);
  opacity: 0.85;
}

/* content sheets sit above the stage */
.sheet {
  z-index: 10;
  background:
    linear-gradient(180deg, rgba(8, 9, 11, 0) 0%, rgba(8, 9, 11, 0.82) 10%, var(--ink) 20%, var(--ink) 100%);
  padding: clamp(80px, 10vw, 150px) var(--gutter) clamp(70px, 9vw, 130px);
}

.section-head {
  max-width: var(--max);
  margin: 0 auto clamp(44px, 6vw, 84px);
}

.section-head .lede { max-width: 56ch; }

.sheet > .service-grid,
.sheet > .expect,
.sheet > .project,
.sheet > .testimonials,
.sheet > .contact-grid {
  max-width: var(--max);
  margin-left: auto;
  margin-right: auto;
}

/* --------------------------------------------------------------------------
   Typography
   -------------------------------------------------------------------------- */

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 clamp(14px, 1.8vw, 22px);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}

.eyebrow.small { margin-top: 8px; }

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  flex: none;
}

h1 {
  margin: 0 0 clamp(18px, 2.2vw, 28px);
  font-size: clamp(38px, 6.6vw, 94px);
  line-height: 0.96;
  letter-spacing: -0.042em;
  font-weight: 600;
}

h1 .line { display: block; }

h2 {
  margin: 0 0 clamp(16px, 2vw, 24px);
  font-size: clamp(30px, 4.6vw, 58px);
  line-height: 1.02;
  letter-spacing: -0.038em;
  font-weight: 600;
}

h3 {
  margin: 0 0 12px;
  font-size: clamp(19px, 1.7vw, 23px);
  letter-spacing: -0.025em;
  font-weight: 600;
  line-height: 1.2;
}

h4 {
  margin: 0 0 8px;
  font-size: 14px;
  letter-spacing: 0.01em;
  font-weight: 600;
}

.accent {
  background: linear-gradient(96deg, var(--accent) 6%, var(--accent-2) 92%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  /* Gradient text is only painted inside the element's own box, so a tight
     line-height crops descenders (the tail of "g"). Extend the paint box
     downward and pull the layout back up by the same amount. */
  padding-bottom: 0.22em;
  margin-bottom: -0.22em;
}

.lede {
  margin: 0;
  font-size: clamp(14px, 1.12vw, 16.5px);
  line-height: 1.72;
  color: var(--muted);
  font-weight: 300;
}

.hint {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: clamp(28px, 3.4vw, 46px) 0 0;
  font-size: 10px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--faint);
}

.rail {
  width: 54px;
  height: 1px;
  background: linear-gradient(to right, var(--accent), transparent);
  animation: railPulse 2.6s var(--ease) infinite;
  transform-origin: left center;
}

@keyframes railPulse {
  0%, 100% { transform: scaleX(0.35); opacity: 0.45; }
  50%      { transform: scaleX(1);    opacity: 1; }
}

/* --------------------------------------------------------------------------
   Reel HUD
   -------------------------------------------------------------------------- */

.reel-hud {
  position: fixed;
  left: var(--gutter);
  bottom: clamp(26px, 4vh, 54px);
  z-index: 30;
  width: min(430px, calc(100vw - 2 * var(--gutter)));
  pointer-events: none;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}

/* soft scrim so the caption stays readable over bright artwork */
.reel-hud::before {
  content: "";
  position: absolute;
  inset: -30px -34px -30px -34px;
  z-index: -1;
  background: radial-gradient(120% 110% at 0% 100%, rgba(6, 7, 8, 0.88) 0%, rgba(6, 7, 8, 0.55) 45%, rgba(6, 7, 8, 0) 78%);
  pointer-events: none;
}

.reel-hud.on {
  opacity: 1;
  transform: translateY(0);
}

.hud-top {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 6px;
}

.reel-hud .count {
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.reel-hud .total {
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--faint);
}

.reel-hud h2 {
  margin: 0;
  font-size: clamp(21px, 2.2vw, 30px);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.reel-hud .meta {
  margin: 6px 0 0;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}

.reel-hud .meta .sep { opacity: 0.5; }

.reel-hud .note {
  margin: 12px 0 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: rgba(244, 245, 244, 0.82);
  max-width: 40ch;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
}

.tags li {
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--hair);
  border-radius: 999px;
  padding: 5px 10px;
  white-space: nowrap;
}

.progress {
  margin-top: 16px;
  width: 100%;
  height: 1px;
  background: var(--hair);
  overflow: hidden;
}

.progress span {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 10px rgba(20, 169, 155, 0.8);
}

/* --------------------------------------------------------------------------
   Services
   -------------------------------------------------------------------------- */

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: clamp(26px, 3vw, 46px);
}

.service-card {
  border-top: 1px solid var(--hair);
  padding-top: 22px;
  position: relative;
}

.service-card .num,
.project-copy .num {
  display: block;
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--accent);
  margin-bottom: 14px;
}

.service-card p {
  margin: 0 0 18px;
  font-size: 13.5px;
  line-height: 1.72;
  color: var(--muted);
  font-weight: 300;
}

.ticks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 7px;
}

.ticks li {
  position: relative;
  padding-left: 18px;
  font-size: 12.5px;
  color: rgba(244, 245, 244, 0.78);
}

.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  border: 1px solid var(--accent);
}

.expect {
  margin-top: clamp(56px, 7vw, 100px);
  border-top: 1px solid var(--hair);
  padding-top: clamp(30px, 4vw, 46px);
}

.expect > h3 { margin-bottom: clamp(24px, 3vw, 36px); }

.expect-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: clamp(20px, 3vw, 40px);
}

.expect-grid p {
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
  font-weight: 300;
}

.expect-grid h4 { color: var(--paper); }

/* --------------------------------------------------------------------------
   Projects
   -------------------------------------------------------------------------- */

.project {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(300px, 1.15fr);
  gap: clamp(26px, 4vw, 64px);
  align-items: center;
  padding: clamp(36px, 5vw, 64px) 0;
  border-top: 1px solid var(--hair);
}

.project:last-of-type { border-bottom: 1px solid var(--hair); }

.project-copy p {
  margin: 0 0 12px;
  font-size: 13.5px;
  line-height: 1.72;
  color: var(--muted);
  font-weight: 300;
  max-width: 46ch;
}

.project-copy .client {
  margin: 0 0 16px;
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

.project-media {
  display: grid;
  gap: 14px;
}

.project-media.two { grid-template-columns: 1fr 1fr; }

.project-media figure {
  margin: 0;
  overflow: hidden;
  border-radius: 4px;
  background: var(--ink-2);
  border: 1px solid var(--hair);
  aspect-ratio: 4 / 3;
}

.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  will-change: transform;
  transition: filter 0.5s var(--ease);
}

/* Flyers are portrait (and one square) — a 4/3 window decapitates them. */
.project-media.flyers figure { aspect-ratio: 4 / 5; }

.project-media figure:hover img { filter: brightness(1.06); }

/* --------------------------------------------------------------------------
   Testimonials
   -------------------------------------------------------------------------- */

.testimonials {
  margin-top: clamp(60px, 8vw, 110px);
}

.testimonials > h3 {
  font-size: clamp(23px, 2.6vw, 34px);
  letter-spacing: -0.03em;
  max-width: 18ch;
  margin-bottom: 6px;
}

.quote-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: clamp(18px, 2.4vw, 30px);
  margin-top: clamp(26px, 3.4vw, 40px);
}

blockquote {
  margin: 0;
  padding: clamp(22px, 2.4vw, 30px);
  background: rgba(255, 255, 255, 0.028);
  border: 1px solid var(--hair);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 22px;
}

blockquote p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.7;
  color: rgba(244, 245, 244, 0.85);
  font-weight: 300;
}

blockquote footer {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

blockquote strong {
  font-size: 13px;
  font-weight: 600;
}

blockquote footer span {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
}

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(28px, 4vw, 60px);
  align-items: start;
}

.contact-block h3 { margin-bottom: 22px; }

dl {
  margin: 0;
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 14px 20px;
  align-items: baseline;
}

dt {
  font-size: 9.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--faint);
}

dd {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: rgba(244, 245, 244, 0.88);
}

dd a { text-decoration: none; border-bottom: 1px solid transparent; transition: border-color 0.25s var(--ease); }
dd a:hover { border-bottom-color: var(--accent); }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: clamp(26px, 3vw, 36px);
}

.btn {
  display: inline-block;
  padding: 13px 22px;
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  text-decoration: none;
  font-size: 11.5px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s var(--ease);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 40px -14px rgba(20, 169, 155, 0.75);
}

.btn.ghost {
  background: transparent;
  color: var(--paper);
  border-color: var(--hair);
}

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

.contact-card {
  padding: clamp(24px, 3vw, 36px);
  border: 1px solid var(--hair);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.028);
}

.contact-card p {
  margin: 0 0 18px;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--muted);
  font-weight: 300;
}

.mail-link {
  display: inline-block;
  font-size: clamp(15px, 1.5vw, 19px);
  font-weight: 500;
  text-decoration: none;
  color: var(--accent-2);
  border-bottom: 1px solid rgba(127, 227, 216, 0.35);
  padding-bottom: 2px;
}

.fineprint {
  margin: 18px 0 0;
  font-size: 11px;
  letter-spacing: 0.03em;
  color: var(--faint);
  line-height: 1.7;
}

.fineprint a { text-decoration: none; }
.fineprint a:hover { color: var(--paper); }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  position: relative;
  z-index: 10;
  background: var(--ink);
  border-top: 1px solid var(--hair);
  padding: clamp(46px, 6vw, 76px) var(--gutter) 34px;
}

.footer-grid {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 0.8fr 1fr;
  gap: clamp(28px, 4vw, 60px);
}

.footer-logo { height: 28px; width: auto; margin-bottom: 16px; opacity: 0.9; }

.site-footer h4 {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 16px;
}

.site-footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 9px;
}

.site-footer ul a {
  font-size: 12.5px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.25s var(--ease);
}

.site-footer ul a:hover { color: var(--paper); }

.copyright {
  max-width: var(--max);
  margin: clamp(36px, 4vw, 54px) auto 0;
  padding-top: 22px;
  border-top: 1px solid var(--hair);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  color: var(--faint);
}

/* --------------------------------------------------------------------------
   Loader
   -------------------------------------------------------------------------- */

.loader {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 22px;
  background: var(--ink);
  transition: opacity 0.8s var(--ease), visibility 0.8s;
}

.loader.done { opacity: 0; visibility: hidden; }

.loader-mark {
  width: clamp(70px, 8vw, 104px);
  height: auto;
  opacity: 0.92;
  animation: markBreath 3s var(--ease) infinite;
}

@keyframes markBreath {
  0%, 100% { opacity: 0.55; }
  50%      { opacity: 1; }
}

.loader-bar {
  width: clamp(140px, 18vw, 210px);
  height: 1px;
  background: var(--hair);
  overflow: hidden;
}

.loader-bar span {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.3s var(--ease);
}

.loader-text {
  margin: 0;
  font-size: 10px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--faint);
}

.noscript {
  position: fixed;
  inset: auto 0 40px;
  text-align: center;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1024px) {
  .project { grid-template-columns: 1fr; align-items: start; }
  .project-media { order: -1; max-width: 760px; }
  .project-media.two { max-width: 640px; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .bar { gap: 12px; }
  .brand img { height: 28px; }
  .nav {
    gap: 12px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { font-size: 10px; letter-spacing: 0.1em; }
  .nav a.enquiry { padding: 7px 12px; }
  .reel { height: 300vh; }
  .reel-hud { width: calc(100vw - 2 * var(--gutter)); }
  .reel-hud .note { display: none; }
  .tags { display: none; }
  .project-media.two { grid-template-columns: 1fr 1fr; }
  dl { grid-template-columns: 1fr; gap: 6px 0; }
  dd { margin-bottom: 14px; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero { padding-top: 110px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rail, .loader-mark { animation: none; }
  .btn:hover { transform: none; }
}

/* --------------------------------------------------------------------------
   Motion: hero intro, section reveals, HUD swap, ambient marquee
   -------------------------------------------------------------------------- */

.hero .eyebrow,
.hero h1 .line,
.hero .lede,
.hero .pullquote,
.hero .hint {
  opacity: 0;
  transform: translate3d(0, 26px, 0);
  transition: opacity 1s var(--ease), transform 1s var(--ease);
}

body.ready .hero .eyebrow  { opacity: 1; transform: none; transition-delay: 0.12s; }
body.ready .hero h1 .line:nth-child(1) { opacity: 1; transform: none; transition-delay: 0.22s; }
body.ready .hero h1 .line:nth-child(2) { opacity: 1; transform: none; transition-delay: 0.32s; }
body.ready .hero .lede     { opacity: 1; transform: none; transition-delay: 0.44s; }
body.ready .hero .pullquote{ opacity: 1; transform: none; transition-delay: 0.56s; }
body.ready .hero .hint     { opacity: 1; transform: none; transition-delay: 0.72s; }

[data-reveal] {
  opacity: 0;
  transform: translate3d(0, 30px, 0);
  transition: opacity 0.95s var(--ease), transform 0.95s var(--ease);
  will-change: opacity, transform;
}

[data-reveal].in {
  opacity: 1;
  transform: none;
  will-change: auto;
}

.reel-hud.swap h2 { animation: hudSwap 0.55s var(--ease); }
.reel-hud.swap .note { animation: hudSwap 0.55s var(--ease) 0.04s; }

@keyframes hudSwap {
  from { opacity: 0; transform: translate3d(0, 10px, 0); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal],
  .hero .eyebrow,
  .hero h1 .line,
  .hero .lede,
  .hero .pullquote,
  .hero .hint {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* --------------------------------------------------------------------------
   Marquee band — a capabilities ticker between the hero and the reel
   (two identical tracks, each translating a full width, so the loop is seamless)
   -------------------------------------------------------------------------- */

.marquee {
  position: relative;
  z-index: 10;
  display: flex;
  overflow: hidden;
  border-top: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
  background: rgba(8, 9, 11, 0.55);
  backdrop-filter: blur(10px) saturate(1.1);
  -webkit-backdrop-filter: blur(10px) saturate(1.1);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}

.marquee-track {
  flex: 0 0 auto;
  min-width: 100%;
  display: flex;
  align-items: center;
  animation: marqueeScroll 44s linear infinite;
}

.marquee:hover .marquee-track { animation-play-state: paused; }

.marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  padding: 13px 26px;
  white-space: nowrap;
  font-size: 10px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--muted);
}

.marquee-item i {
  font-style: normal;
  font-size: 8px;
  color: var(--accent);
  transform: translateY(-1px);
}

@keyframes marqueeScroll {
  to { transform: translateX(-100%); }
}

/* --------------------------------------------------------------------------
   Section bars — sticky index strip at the head of each sheet
   -------------------------------------------------------------------------- */

.section-bar {
  position: sticky;
  top: calc(var(--bar-h, 74px) + 2px);
  z-index: 12;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 44px;
  margin: calc(-1 * clamp(80px, 10vw, 150px)) calc(-1 * var(--gutter)) clamp(40px, 5vw, 66px);
  padding: 0 var(--gutter);
  border-top: 1px solid var(--hair);
  border-bottom: 1px solid var(--hair);
  background: rgba(8, 9, 11, 0.62);
  backdrop-filter: blur(12px) saturate(1.15);
  -webkit-backdrop-filter: blur(12px) saturate(1.15);
  transition: background 0.45s var(--ease), border-color 0.45s var(--ease);
}

.section-bar.active {
  background: rgba(11, 14, 17, 0.8);
  border-bottom-color: rgba(20, 169, 155, 0.45);
}

.section-bar p {
  margin: 0;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.section-bar .idx {
  color: var(--accent);
  margin-right: 8px;
  font-variant-numeric: tabular-nums;
}

.section-bar .slash { color: var(--faint); margin-right: 10px; }

.section-bar-note { color: var(--faint); display: none; }

@media (min-width: 720px) {
  .section-bar-note { display: block; }
}

/* --------------------------------------------------------------------------
   Edge dock — scroll rail on the right, with a tab that pulls the menu out
   -------------------------------------------------------------------------- */

html { scrollbar-gutter: stable; }
html.menu-open { overflow: hidden; }

.edge {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 0;
  z-index: 60;
  pointer-events: none;
}

/* --- scroll rail --- */
.edge-rail {
  position: absolute;
  right: 56px;
  top: clamp(96px, 12vh, 132px);
  bottom: clamp(96px, 12vh, 132px);
  width: 1px;
  background: var(--hair);
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.4s var(--ease);
}

html.menu-open .edge-rail { opacity: 0; }

.edge-fill {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 10px rgba(20, 169, 155, 0.85);
}

.edge-ticks {
  position: absolute;
  inset: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}

.edge-ticks li {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 0;
}

.edge-ticks button {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translate(-50%, -50%);
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  pointer-events: auto;
  display: grid;
  place-items: center;
}

.edge-ticks button::before {
  content: "";
  width: 7px;
  height: 1px;
  background: rgba(244, 245, 244, 0.42);
  transition: width 0.3s var(--ease), background 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.edge-ticks button:hover::before,
.edge-ticks button:focus-visible::before,
.edge-ticks button.active::before {
  width: 14px;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.edge-pct {
  position: absolute;
  bottom: -32px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
  letter-spacing: 0.18em;
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}

/* --- drawer --- */
.edge-drawer {
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: min(440px, 88vw);
  display: flex;
  align-items: stretch;
  transform: translateX(calc(100% - 42px));
  transition: transform 0.72s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
  pointer-events: auto;
}

.edge.open .edge-drawer { transform: translateX(0); }

/* closed, hover: the handle offers itself a few millimetres */
.edge:not(.open) .edge-drawer:hover { transform: translateX(calc(100% - 54px)); }

.edge-tab {
  flex: 0 0 42px;
  width: 42px;
  height: 186px;
  align-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 0;
  border: 1px solid var(--hair);
  border-right: 0;
  border-radius: 12px 0 0 12px;
  background: rgba(10, 12, 15, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--muted);
  cursor: pointer;
  transition: color 0.35s var(--ease), background 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.edge-drawer:hover .edge-tab,
.edge.open .edge-tab {
  background: rgba(14, 17, 20, 0.98);
  color: var(--paper);
  box-shadow: -18px 0 42px -26px rgba(20, 169, 155, 0.9);
}

.edge-tab-label {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 9.5px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  text-indent: 0.32em;
}

.edge-tab-arrow {
  font-size: 15px;
  line-height: 1;
  color: var(--accent);
  transition: transform 0.5s var(--ease);
}

.edge.open .edge-tab-arrow { transform: rotate(180deg); }

.edge-tab-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  animation: edgeBlink 2.8s var(--ease) infinite;
}

.edge.open .edge-tab-dot { animation: none; opacity: 0.35; }

@keyframes edgeBlink {
  0%, 100% { opacity: 0.25; transform: scale(0.8); }
  50%      { opacity: 1;    transform: scale(1); }
}

/* --- panel --- */
.edge-panel {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 3vh, 34px);
  padding: clamp(26px, 4vh, 44px) clamp(24px, 3vw, 40px);
  overflow-y: auto;
  border-left: 1px solid var(--hair);
  background:
    radial-gradient(120% 70% at 100% 0%, rgba(20, 169, 155, 0.12), transparent 60%),
    linear-gradient(180deg, rgba(11, 13, 16, 0.98), rgba(7, 8, 10, 0.995));
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.edge-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.edge-kicker {
  margin: 0;
  font-size: 10px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--faint);
}

.edge-close {
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  border-bottom: 1px solid transparent;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease);
}

.edge-close:hover,
.edge-close:focus-visible { color: var(--paper); border-bottom-color: var(--accent); }

.edge-nav {
  display: flex;
  flex-direction: column;
}

.edge-nav a {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid var(--hair);
  text-decoration: none;
  font-size: clamp(23px, 2.6vw, 30px);
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--paper);
  opacity: 0;
  transform: translateX(26px);
  transition: opacity 0.5s var(--ease), transform 0.6s var(--ease), color 0.3s var(--ease);
}

.edge-nav a:last-child { border-bottom: 1px solid var(--hair); }

.edge-nav a .n {
  font-size: 9.5px;
  letter-spacing: 0.2em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.edge-nav a:hover,
.edge-nav a:focus-visible { color: var(--accent-2); }

.edge-nav a.active .t {
  background: linear-gradient(96deg, var(--accent) 6%, var(--accent-2) 92%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

html.menu-open .edge-nav a { opacity: 1; transform: none; }
html.menu-open .edge-nav a:nth-child(1) { transition-delay: 0.10s; }
html.menu-open .edge-nav a:nth-child(2) { transition-delay: 0.16s; }
html.menu-open .edge-nav a:nth-child(3) { transition-delay: 0.22s; }
html.menu-open .edge-nav a:nth-child(4) { transition-delay: 0.28s; }

.edge-body {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.edge-body .fineprint { margin: 0; }

.edge-body .btn { font-size: 10.5px; padding: 11px 20px; }

.edge-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--hair);
  font-size: 9.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--faint);
}

/* --- scrim --- */
.edge-scrim {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: rgba(4, 5, 6, 0.58);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s var(--ease), visibility 0.5s;
}

html.menu-open .edge-scrim { opacity: 1; visibility: visible; }

@media (max-width: 760px) {
  .edge-rail { display: none; }
  .edge-drawer { width: min(360px, 92vw); transform: translateX(calc(100% - 38px)); }
  .edge:not(.open) .edge-drawer:hover { transform: translateX(calc(100% - 46px)); }
  .edge-tab { flex-basis: 38px; width: 38px; height: 156px; }
  .section-bar { height: 40px; }
  .section-bar p { font-size: 9px; letter-spacing: 0.16em; }
  .marquee-item { padding: 11px 20px; gap: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
  .edge-tab-dot { animation: none; }
  .hero::before { animation: none; }
  .edge-drawer,
  .edge-nav a,
  .edge-rail,
  .edge-scrim {
    transition-duration: 0.01ms;
  }
}
/* --------------------------------------------------------------------------
   Mobile — the header keeps the logo; navigation lives in the side drawer
   -------------------------------------------------------------------------- */

@media (max-width: 760px) {
  /* the top links are gone: the right-edge MENU tab is the only navigation */
  .nav { display: none; }

  .bar {
    padding-top: calc(clamp(14px, 2vw, 24px) + env(safe-area-inset-top, 0px));
  }

  .hero {
    padding: 104px var(--gutter) calc(clamp(48px, 20vh, 190px) + env(safe-area-inset-bottom, 0px));
  }

  /* watermark sits upper-right on a phone, well away from the copy */
  .hero::before {
    background-position: 66% 32%;
    opacity: 0.22;
    -webkit-mask-image: radial-gradient(115% 78% at 70% 30%, #000 0%, rgba(0, 0, 0, 0.5) 44%, transparent 78%);
    mask-image: radial-gradient(115% 78% at 70% 30%, #000 0%, rgba(0, 0, 0, 0.5) 44%, transparent 78%);
  }

  .hero h1 { font-size: clamp(31px, 9.6vw, 48px); }

  /* the MENU handle is centred on the right edge — keep the opening copy clear of it */
  .hero .lede,
  .hero .pullquote {
    padding-right: 36px;
  }

  .hero .lede { font-size: 15px; line-height: 1.7; }
  .hero .pullquote { font-size: 13.5px; }

  .eyebrow { font-size: 9.5px; letter-spacing: 0.18em; }

  .service-card p,
  .project-copy p,
  .expect-grid p,
  .contact-card p {
    font-size: 14.5px;
    line-height: 1.7;
  }

  .ticks li { font-size: 13px; }
  .project-copy .client { font-size: 10px; }
  .section-head { margin-bottom: clamp(30px, 8vw, 44px); }

  .btn { padding: 14px 22px; }

  .reel-hud {
    bottom: calc(clamp(26px, 4vh, 54px) + env(safe-area-inset-bottom, 0px));
  }

  .edge {
    /* phones: follow the live viewport, so toolbar chrome can never eat the footer */
    height: 100vh;
    height: 100dvh;
  }

  .edge-close { padding: 10px 2px; font-size: 9.5px; }

  .edge-kicker { font-size: 9.5px; }

  .edge-panel {
    gap: clamp(10px, 1.8vh, 20px);
    padding: calc(14px + env(safe-area-inset-top, 0px)) 20px
             calc(12px + env(safe-area-inset-bottom, 0px));
    overscroll-behavior: contain;
  }

  /* every entry stays on screen: shorter rows, not hidden ones */
  .edge-nav a {
    padding: 10px 0;
    gap: 12px;
    font-size: clamp(20px, 5.6vw, 26px);
  }

  .edge-nav a .n { font-size: 9px; }

  .edge-body { gap: 11px; }
  .edge-body .fineprint { font-size: 11.5px; line-height: 1.6; }
  .edge-body .btn { padding: 10px 18px; font-size: 10px; }
  .edge-foot { padding-top: 10px; font-size: 9px; }

  .site-footer {
    padding-bottom: calc(30px + env(safe-area-inset-bottom, 0px));
  }

  .site-footer ul a {
    display: inline-block;
    padding: 6px 0;
    font-size: 13.5px;
  }

  .marquee-item { font-size: 9.5px; letter-spacing: 0.22em; }
}

@media (max-width: 400px) {
  .actions {
    display: grid;
    gap: 10px;
    justify-items: stretch;
  }

  .actions .btn { text-align: center; }
}