/* =========================================================================
   SHARDLAB — Design 2
   Light, editorial, architectural-grid direction adapted from the
   CURA Climate reference (hairline vertical rails, thin large type,
   corner-bracket buttons, counting loader, sticky text crossfade,
   marquee, fade carousel, partner hover grid, news grid, giant footer).
   ShardLab brand colours (purple / lime) + ShardLab content.
   Self-contained: no external CSS/JS/CDN.
   ========================================================================= */

:root {
  --paper:   #f4f2ec;   /* warm paper base */
  --paper-2: #eceae2;
  --ink:     #17151f;   /* near-black with a faint purple bias */
  --muted:   #6b6875;
  --muted-2: #96929e;
  --line:    rgba(23,21,31,.12);
  --line-2:  rgba(23,21,31,.07);
  --accent:  #7b68fc;   /* ShardLab purple */
  --accent-ink: #4f3ccf;/* darker purple for text on light */
  --lime:    #a2e435;   /* ShardLab lime */
  --card:    #fbfaf7;

  --maxw: 1360px;
  --pad: clamp(1.1rem, 4vw, 4rem);
  --ease: cubic-bezier(.5,.05,0,1);
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  /* ShardLab symbol (two-triangle shard mark) as a mask, so it can be tinted */
  --shard-symbol: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 17 18'%3E%3Cpath d='M1.997 13.794L0.084 17.961L17.034 17.961L10.85 14.411ZM15.835 15.55L8.359 0.003L3.555 10.331L10.85 14.411Z' fill='%23000'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-snap-type: y proximity; }
body {
  background: var(--paper); color: var(--ink); font-family: var(--font);
  font-weight: 400; line-height: 1.45; -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale; overflow-x: hidden;
}
html.preloader-init body > *:not(.loader):not(.intro):not(.rails) { opacity: 0; }
html.preloader-init { overflow: hidden; }   /* no page scroll while the intro gate is up */
html.intro-leaving { overflow: hidden; scroll-behavior: auto; }   /* stay pinned to top while the intro curtain slides */
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
sub { font-size: .7em; }

/* ------------------------------------------------------------------ shared */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); position: relative; }
.wrap { position: relative; z-index: 1; }
.page { position: relative; z-index: 1; }  /* sits above the fixed rails; opaque sections mask the rails */

.h1 { font-size: clamp(2.6rem, 7.2vw, 7rem); line-height: .98; font-weight: 500; letter-spacing: -.03em; text-wrap: balance; }
.h2 { font-size: clamp(1.9rem, 4.6vw, 4rem); line-height: 1.03; font-weight: 500; letter-spacing: -.025em; text-wrap: balance; }
.h3 { font-size: clamp(1.3rem, 2.4vw, 2rem); line-height: 1.1; font-weight: 500; letter-spacing: -.015em; }
.big { font-size: clamp(1.5rem, 3.4vw, 2.9rem); line-height: 1.18; font-weight: 500; letter-spacing: -.02em; }
.body { font-size: clamp(1rem, 1.25vw, 1.15rem); color: var(--muted); line-height: 1.55; }

/* Highlighter-style label — highlight hugs the text only (never a full-width bar) */
.pill {
  display: inline-block; align-self: flex-start; width: fit-content; max-width: 100%;
  padding: .1em .32em; border-radius: 6px;
  font-size: clamp(1.2rem, 2vw, 1.55rem); font-weight: 600; letter-spacing: -.01em; text-transform: none;
  color: var(--ink); background: rgba(123, 104, 252, .30); line-height: 1.28;
  box-decoration-break: clone; -webkit-box-decoration-break: clone;
}
.pill::before { content: none; }
.pill.is-lime { background: rgba(162, 228, 53, .5); }

.eyebrow { font-size: .74rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted-2); }

/* ------------------------------------------------------------------ vertical rails (fixed, shared across all sections) */
.rails {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  max-width: var(--maxw); margin: 0 auto; left: 0; right: 0;
  padding: 0 var(--pad); display: flex; justify-content: space-between;
}
.rails span { width: 1px; height: 100%; background: var(--line-2); }
.rails span:first-child, .rails span:last-child { background: var(--line); }
@media (max-width: 767px) { .rails span:nth-child(2), .rails span:nth-child(4) { display: none; } }

/* ------------------------------------------------------------------ button (shard + sweep-fill)
   Distinct from Ledger's static corner-bracket frame: a squared hairline button
   with a leading shard (triangle) marker and a purple fill that wipes in on hover. */
.btn2 {
  position: relative; display: inline-flex; align-items: center; gap: .7rem;
  padding: .9rem 1.5rem; color: var(--ink); font-weight: 500; font-size: .95rem;
  background: transparent; cursor: pointer; border: 1px solid var(--line); border-radius: 3px;
  overflow: hidden; isolation: isolate;
  transition: color .45s var(--ease), border-color .45s var(--ease), transform .45s var(--ease);
}
.btn2::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--accent);
  transform: translateX(-101%); transition: transform .55s var(--ease); }
.btn2:hover { color: #fff; border-color: var(--accent); }
.btn2:hover::before { transform: translateX(0); }
.btn2:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
/* leading marker — the ShardLab symbol (two-triangle shard mark) */
.btn2 .dot { width: 13px; height: 15px; flex: none; background: var(--lime); border: 0; border-radius: 0;
  -webkit-mask: var(--shard-symbol) center / contain no-repeat; mask: var(--shard-symbol) center / contain no-repeat;
  transition: transform .45s var(--ease); }
.btn2:hover .dot { transform: translateX(4px); }
.btn2 .c { display: none; }   /* retire the corner-bracket frame */

.btn2--solid { background: var(--accent); color: #fff; padding: .85rem 1.4rem; border-color: var(--accent); }
.btn2--solid::before { background: var(--accent-ink); }
.btn2--solid .dot { background: #fff; }

/* Shared CTA style (Get in touch, card Back, View all press):
   solid purple by default, flips to white on hover */
.btn2--cta { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn2--cta::before { display: none; }
.btn2--cta .dot { background: #fff; }
.btn2--cta:hover { background: #fff; color: var(--accent-ink); border-color: var(--accent); transform: translateY(-2px); }
.btn2--cta:hover .dot { background: var(--accent); }

/* Floating "TOP" button — always docked bottom-right */
.totop {
  position: fixed; right: clamp(1rem, 3vw, 2.2rem); bottom: clamp(1rem, 3vw, 2.2rem); z-index: 45;
  width: 54px; height: 54px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: #fff; font-size: .68rem; font-weight: 600; letter-spacing: .12em;
  border: 1px solid var(--accent); box-shadow: 0 8px 24px rgba(79, 60, 207, .34);
  transition: background .35s var(--ease), color .35s var(--ease), transform .35s var(--ease); }
.totop:hover { background: #fff; color: var(--accent-ink); transform: translateY(-3px); }
.totop:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.btn2--solid:hover { color: #fff; transform: translateY(-2px); }

/* ================================================================== LOADER */
.loader { position: fixed; inset: 0; z-index: 1000; background: var(--paper);
  display: flex; align-items: center; justify-content: center; transition: opacity .8s var(--ease), visibility .8s var(--ease); }
.loader.is--done { opacity: 0; visibility: hidden; pointer-events: none; }
.loader__inner { display: flex; flex-direction: column; align-items: center; gap: 1.4rem; }
.loader__mark { width: 40px; color: var(--accent); }
.loader__count { font-variant-numeric: tabular-nums; font-size: clamp(3rem,11vw,6rem); font-weight: 500; letter-spacing: -.03em; line-height: 1; }
.loader__count i { color: var(--muted-2); font-style: normal; font-size: .32em; vertical-align: super; margin-left: .1em; }
.loader__bar { width: min(260px,64vw); height: 2px; background: var(--line); overflow: hidden; }
.loader__bar span { display: block; height: 100%; width: 0; background: var(--accent); }

/* ================================================================== INTRO GATE (homepage)
   Full-screen motion piece: the black shard symbol assembles as a true 3D
   object (stacked-layer extrusion, slow oscillating rotation, floating over
   its own shadow), the wordmark rises, then a hint invites scroll/click.
   Dismissing slides the curtain up to reveal the landing page. */
.intro { position: fixed; inset: 0; z-index: 1000; background: var(--paper); color: var(--ink); overflow: hidden;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  border-bottom: 1px solid var(--line); box-shadow: 0 24px 60px rgba(23,21,31,.18);
  transition: transform 1s cubic-bezier(.76,0,.24,1), visibility 1s; }
.intro.is--done { transform: translateY(-101%); visibility: hidden; pointer-events: none; }
.intro__grid { position: absolute; inset: 0;
  background-image: linear-gradient(rgba(23,21,31,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23,21,31,.05) 1px, transparent 1px);
  background-size: 72px 72px; }
.intro__glow { position: absolute; inset: 0;
  background: radial-gradient(44% 40% at 50% 44%, rgba(123,104,252,.16), transparent 70%); }

.intro__center { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; padding: 0 var(--pad); }

/* --- 3D object: perspective stage > oscillating spinner > extrusion layers */
.intro__obj { position: relative; width: clamp(120px, 17vw, 190px); aspect-ratio: 17/18;
  perspective: 900px; }
.intro__tilt { position: absolute; inset: 0; transform-style: preserve-3d; will-change: transform; }
.intro__spin { position: absolute; inset: 0; transform-style: preserve-3d;
  transform: rotateX(14deg) rotateY(-26deg); }
.intro.is-play .intro__spin { animation: obj-float 7s ease-in-out .2s infinite; }
@keyframes obj-float {
  0%, 100% { transform: rotateX(14deg) rotateY(-26deg) translateY(0); }
  50%      { transform: rotateX(9deg)  rotateY(26deg)  translateY(-12px); }
}
.intro__layer { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible;
  transform: translateZ(calc(var(--z) * -2.4px)); }
.intro__layer path { transform-box: fill-box; transform-origin: center; opacity: 0;
  fill: var(--accent-ink); }   /* extrusion body: deep purple core */
.intro__layer--face path { fill: var(--ink); }   /* front face: black symbol */
.intro.is-play .intro__p2 { animation: shard-in-a 1.15s cubic-bezier(.22,1,.36,1) .2s forwards; }
.intro.is-play .intro__p1 { animation: shard-in-b 1.15s cubic-bezier(.22,1,.36,1) .38s forwards; }
@keyframes shard-in-a { 0% { opacity: 0; transform: translate(9px,-12px) rotate(26deg) scale(.6); } 55% { opacity: 1; } 100% { opacity: 1; transform: none; } }
@keyframes shard-in-b { 0% { opacity: 0; transform: translate(-9px,8px) rotate(-30deg) scale(.6); } 55% { opacity: 1; } 100% { opacity: 1; transform: none; } }
/* floating ground shadow under the object */
.intro__shadow { position: absolute; left: 50%; bottom: -17%; width: 74%; height: 16px;
  transform: translateX(-50%); border-radius: 50%;
  background: radial-gradient(closest-side, rgba(23,21,31,.3), transparent 70%);
  filter: blur(3px); opacity: 0; }
.intro.is-play .intro__shadow { animation: shadow-float 7s ease-in-out .2s infinite; }
@keyframes shadow-float {
  0%, 100% { opacity: .8; transform: translateX(-50%) scale(1); }
  50%      { opacity: .45; transform: translateX(-50%) scale(.82); }
}

.intro__word { width: clamp(230px, 34vw, 430px); margin-top: clamp(2rem,4.5vh,3.2rem); fill: var(--ink); opacity: 0; transform: translateY(16px); }
.intro.is-play .intro__word { animation: intro-rise .9s var(--ease) 1.25s forwards; }
.intro__hint { display: flex; flex-direction: column; align-items: center; gap: 1rem; margin-top: clamp(2rem,6vh,3.4rem);
  font-size: .74rem; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); opacity: 0; }
.intro.is-play .intro__hint { animation: intro-rise .9s var(--ease) 1.9s forwards; }
@keyframes intro-rise { to { opacity: 1; transform: none; } }
.intro__hint-line { width: 1px; height: 36px; background: rgba(23,21,31,.14); position: relative; overflow: hidden; }
.intro__hint-line::after { content: ""; position: absolute; left: 0; top: -100%; width: 100%; height: 100%;
  background: var(--accent); animation: hint-drop 1.7s ease-in-out 2.4s infinite; }
@keyframes hint-drop { 0% { top: -100%; } 60% { top: 100%; } 100% { top: 100%; } }

/* faint drifting shard fragments around the mark */
.intro__shards { position: absolute; inset: 0; pointer-events: none; }
.intro__shards svg { position: absolute; opacity: 0; fill: currentColor; }
.intro.is-play .intro__shards svg { animation: ghost-float 7s ease-in-out infinite; }
.intro__shards svg:nth-child(1) { width: 30px; top: 18%; left: 14%; color: var(--ink); animation-delay: .6s; }
.intro__shards svg:nth-child(2) { width: 20px; top: 68%; left: 22%; color: var(--accent); animation-delay: 1.4s; transform: rotate(18deg); }
.intro__shards svg:nth-child(3) { width: 42px; top: 24%; right: 16%; color: var(--accent); animation-delay: 1s; transform: rotate(-14deg); }
.intro__shards svg:nth-child(4) { width: 18px; top: 74%; right: 24%; color: var(--lime); animation-delay: 1.9s; }
.intro__shards svg:nth-child(5) { width: 24px; top: 46%; left: 7%; color: var(--lime); animation-delay: 2.4s; transform: rotate(30deg); }
.intro__shards svg:nth-child(6) { width: 26px; top: 56%; right: 8%; color: var(--ink); animation-delay: .2s; transform: rotate(-24deg); }
@keyframes ghost-float { 0%, 100% { opacity: .07; translate: 0 0; } 50% { opacity: .16; translate: 0 -18px; } }

/* ================================================================== NAV */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 900; padding: 1.5rem var(--pad); transition: opacity .5s var(--ease); }
html.preloader-init .nav { opacity: 0; }
.nav__bar { position: relative; z-index: 810;   /* keep logo + close button above the open menu overlay */
  max-width: var(--maxw); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  padding: 1.05rem 1.1rem 1.05rem 1.3rem; background: rgba(244,242,236,.72); backdrop-filter: blur(12px);
  border: 1px solid var(--line); border-radius: 4px; }
.nav__logo { display: inline-flex; align-items: center; color: var(--ink); }
.nav__logo-full { height: 40px; width: auto; display: block; fill: currentColor; }
.nav__right { display: flex; align-items: center; gap: clamp(1.5rem,2.5vw,2.4rem); }
.nav__links { display: flex; gap: 1.9rem; }   /* desktop: horizontal links */
.nav__links a { display: inline-block; font-size: 1rem; font-weight: 500; color: var(--ink);
  transition: transform .25s var(--ease), color .25s var(--ease); }
/* readability-first: dark by default, hover scales up (not a faint colour shift) */
.nav__links a:hover, .nav__links a.is-active { color: var(--accent-ink); transform: scale(1.1); }
.nav__hamburger { display: none; width: 40px; height: 40px; border: 0; background: transparent; cursor: pointer; position: relative; }
.nav__hamburger span { position: absolute; left: 9px; right: 9px; height: 1.5px; background: var(--ink); transition: transform .4s var(--ease), opacity .3s; }
.nav__hamburger span:nth-child(1){ top: 15px; } .nav__hamburger span:nth-child(2){ top: 20px; } .nav__hamburger span:nth-child(3){ top: 25px; }

.nav__overlay { position: fixed; inset: 0; z-index: -1; background: var(--paper); clip-path: inset(0 0 100% 0);
  transition: clip-path .8s var(--ease); display: flex; flex-direction: column; justify-content: center; padding: var(--pad); }
.nav__overlay a { display: inline-block; font-size: clamp(2rem,9vw,4.5rem); font-weight: 500; letter-spacing: -.02em; padding: .08em 0; }
.nav[data-nav="open"] .nav__overlay { clip-path: inset(0 0 0 0); z-index: 800; }
.nav[data-nav="open"] .nav__hamburger span:nth-child(1){ top: 20px; transform: rotate(45deg); }
.nav[data-nav="open"] .nav__hamburger span:nth-child(2){ opacity: 0; }
.nav[data-nav="open"] .nav__hamburger span:nth-child(3){ top: 20px; transform: rotate(-45deg); }

/* ================================================================== HERO */
.hero { position: relative; padding: clamp(9rem,16vh,12rem) 0 0; }
.hero__title { padding-bottom: clamp(2rem,5vw,4rem); }
.hero__title .h1 { max-width: 15ch; }
.hero__title .h1 em { font-style: normal; color: var(--accent-ink); }
.hero__sub { margin-top: clamp(1rem,2.4vw,1.6rem); font-size: clamp(1.1rem,2vw,1.7rem); font-weight: 500;
  letter-spacing: -.01em; color: var(--muted); }
.hero__rule { height: 1px; background: var(--line); }
.hero__bottom { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem,5vw,4rem); align-items: end; padding: clamp(2rem,4vw,3rem) 0 clamp(3rem,6vw,5rem); }
.hero__lead { max-width: 46ch; }
.hero__lead .body { font-size: clamp(1.05rem,1.5vw,1.35rem); color: var(--ink); }
.hero__cta { margin-top: 1.8rem; display: flex; gap: 1rem; flex-wrap: wrap; }
.hero__decor { position: relative; aspect-ratio: 4/3; border: 1px solid var(--line); border-radius: 6px; overflow: hidden;
  background:
    radial-gradient(90% 90% at 70% 20%, rgba(123,104,252,.35), transparent 60%),
    radial-gradient(80% 80% at 20% 90%, rgba(162,228,53,.28), transparent 60%),
    #ecebe4; }
.hero__decor .grid { position: absolute; inset: 0;
  background-image: linear-gradient(var(--line-2) 1px, transparent 1px), linear-gradient(90deg, var(--line-2) 1px, transparent 1px);
  background-size: 34px 34px; mask-image: radial-gradient(120% 120% at 60% 30%, #000 40%, transparent 80%); }
.hero__decor .glyph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: rgba(23,21,31,.14); }
.hero__decor .glyph svg { width: 44%; }

/* ================================================================== ABOUT (sticky crossfade) */
.about { position: relative; }
.about__pin { height: 400vh; position: relative; }   /* 3 blocks + lead-in/out hold */
/* snap stops (one per block) so a fast scroll lands on a block instead of blowing past */
.about__snap { position: absolute; left: 0; width: 1px; height: 1px; pointer-events: none; scroll-snap-align: start; scroll-snap-stop: always; }
.about__sticky { position: sticky; top: 0; height: 100vh; display: flex; align-items: center; }
.about__inner { position: relative; width: 100%; }
.about__label { margin-bottom: clamp(1.5rem,4vw,2.5rem); }
/* three blocks crossfade sequentially on scroll; a single-cell grid stacks
   them so the cell auto-reserves the height of the tallest block */
.about__stack { display: grid; }
.about__block { grid-area: 1 / 1; align-self: start; will-change: opacity, transform; }
.about__eyebrow { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 500;
  color: var(--accent-ink); margin-bottom: clamp(.8rem,1.6vw,1.1rem); }
.about__p { max-width: 30ch; }
.about__p strong { font-weight: 500; color: var(--accent-ink); }
.about__stat { display: flex; gap: 2.5rem; margin-top: clamp(2.5rem,5vw,4rem); flex-wrap: wrap; }
.about__stat b { display: block; font-size: clamp(2rem,4vw,3.2rem); font-weight: 500; letter-spacing: -.02em; }
.about__stat span { font-size: .85rem; color: var(--muted); }

/* ================================================================== MARQUEE band */
.band { position: relative; padding: clamp(3rem,6vw,5rem) 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow: hidden; }
/* spacing lives on the separators (not flex gap) so each duplicated set is a
   self-contained tile and the -50% loop is perfectly seamless */
.band__loop { display: inline-flex; align-items: center; white-space: nowrap; animation: loop 34s linear infinite; will-change: transform; }
.band__loop span { font-size: clamp(1.8rem,4.5vw,3.6rem); font-weight: 500; letter-spacing: -.02em; }
.band__loop i { display: inline-block; margin: 0 clamp(1.1rem,2.4vw,2.2rem); background: var(--accent);
  width: clamp(1rem,1.9vw,1.6rem); height: clamp(1rem,1.9vw,1.6rem);
  -webkit-mask: var(--shard-symbol) center / contain no-repeat; mask: var(--shard-symbol) center / contain no-repeat; }
@keyframes loop { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ================================================================== FEATURE carousel */
.feature { padding: clamp(4rem,9vw,8rem) 0; position: relative; }
.feature__head { display: flex; flex-direction: column; gap: 1.2rem; margin-bottom: clamp(2.5rem,5vw,4rem); }
.feature__head .h2 { max-width: 18ch; }
/* wider breathing room between the section pill and its heading */
.feature__head .pill,
.work__head-main .pill { margin-bottom: clamp(.6rem, 1.8vw, 1.3rem); }
.feature__stage { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem,4vw,3.5rem); align-items: center; }
/* fixed autoplaying video on the left */
.feature__media { aspect-ratio: 5/4; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; position: relative;
  background: radial-gradient(90% 90% at 40% 30%, rgba(123,104,252,.28), transparent 60%), #ecebe4; }
.feature__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
/* right column: the cycling text slides fade over one another */
.feature__slides { position: relative; }
.fcard { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .6s var(--ease); }
.fcard.is-active { opacity: 1; visibility: visible; position: relative; }
.fcard__inner { max-width: 44ch; }
.fcard__ic { width: 40px; height: 40px; border: 1px solid var(--line); border-radius: 6px; display: flex; align-items: center; justify-content: center; color: var(--accent); font-size: 1.1rem; margin-bottom: 1.4rem; }
.fcard__h { overflow: hidden; }
.fcard__h .h3 { transition: transform .5s var(--ease), opacity .5s var(--ease); }
.fcard:not(.is-active) .fcard__h .h3 { transform: translateY(100%); opacity: 0; }
.fcard p { margin-top: 1rem; }
.feature__foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 2.5rem; }
.dots { display: flex; gap: .5rem; }
.dots b { width: 8px; height: 8px; border-radius: 50%; background: var(--line); cursor: pointer; transition: background .3s, transform .3s; }
.dots b.is-active { background: var(--accent); transform: scale(1.25); }
.arrows { display: flex; gap: .6rem; }
.arrows button { width: 46px; height: 46px; border: 1px solid var(--line); background: transparent; border-radius: 50%; cursor: pointer; color: var(--ink);
  display: flex; align-items: center; justify-content: center; transition: border-color .3s, color .3s, background .3s; }
.arrows button:hover { border-color: var(--accent); color: var(--accent-ink); }
.arrows svg { width: 18px; }

/* ================================================================== PARTNERS hover grid */
.partners { padding: clamp(4rem,9vw,8rem) 0; position: relative; }
.partners__grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(2rem,5vw,4rem); align-items: stretch; }
.partners__head { display: flex; flex-direction: column; gap: clamp(1.1rem,2.2vw,1.6rem); }
.partners__head .body { max-width: 42ch; margin-top: clamp(.8rem, 2.5vw, 2rem); }
/* desktop: pin the eyebrow pill to the cards' top edge, centre the heading+body */
@media (min-width: 992px) {
  .partners__head { position: relative; justify-content: center; }
  .partners__head .pill { position: absolute; top: 0; left: 0; }
}
/* 6-col grid: two lead partners span half the row on top, the rest span thirds */
.partners__cards { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.pcard2 { position: relative; grid-column: span 2; background: var(--card); aspect-ratio: 3/2; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.pcard2--lead { grid-column: span 3; aspect-ratio: 12/5; }   /* top-tier: wider, banner-like */
.pcard2 .ekraf-logo { width: 62%; max-width: 196px; }
.pcard2 .name { position: relative; z-index: 2; font-weight: 500; letter-spacing: .02em; transition: color .4s var(--ease); }
.pcard2 .plogo { position: relative; z-index: 2; width: 58%; max-width: 148px; height: auto; transition: filter .4s var(--ease); }
.pcard2 .plogo--wide { width: 66%; max-width: 172px; }
.plogo--mono { filter: brightness(0); }   /* render a coloured raster logo as a black silhouette to match the others */
.pcard2:hover .plogo { filter: brightness(0) invert(1); }   /* dark logo → white silhouette over the hover fill */
.pcard2:hover .plogo--keep { filter: none; }   /* two-tone logos (own white parts) stay as-is on hover */
/* KCD: swap to its own white logo on hover instead of inverting (invert broke the symbol) */
.pcard2--swap .plogo { filter: none !important; }
.pcard2--swap .plogo--white { display: none; }
.pcard2--swap:hover .plogo--dark { display: none; }
.pcard2--swap:hover .plogo--white { display: inline-block; }
.pcard2 .fill { position: absolute; inset: 0; z-index: 1; opacity: 0; transition: opacity .5s var(--ease); }
.pcard2:hover .fill { opacity: 1; }
.pcard2:hover .name { color: #fff; }
.fill--a { background: radial-gradient(120% 120% at 30% 20%, #7b68fc, #4f3ccf); }
.fill--b { background: radial-gradient(120% 120% at 70% 30%, #9e8fff, #4f3ccf); }
.fill--c { background: radial-gradient(120% 120% at 40% 80%, #a2e435, #4f8f14); }
/* per-cell hover colour (checkerboard) — dark enough for white content */
.pcard2.hov-purple .fill { background: radial-gradient(120% 120% at 30% 20%, #7b68fc, #4f3ccf); }
.pcard2.hov-green .fill  { background: radial-gradient(120% 120% at 30% 20%, #6bbf3a, #256e25); }

/* ================================================================== DIVIDER plus */
.divider { display: flex; justify-content: center; align-items: center; height: 1px; background: var(--line); margin: 0 var(--pad); position: relative; }
.divider span { position: absolute; width: 34px; height: 34px; background: var(--paper); display: flex; align-items: center; justify-content: center; color: var(--muted-2); }

/* ================================================================== WORK (Venture + Ecosystem) */
.work { padding: clamp(4rem,9vw,8rem) 0; position: relative; }
.work__head { margin-bottom: clamp(2rem,4vw,3.2rem); }   /* stacked eyebrow + heading, left-aligned like other sections */
.work__index { font-variant-numeric: tabular-nums; font-size: .82rem; letter-spacing: .18em; color: var(--muted-2); padding-top: .55rem; }
.work__head-main { display: flex; flex-direction: column; gap: 1rem; }
.work__head-main .h2 { max-width: 18ch; }
.work__head-main .body { max-width: 52ch; }
.work__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.2rem,2.2vw,1.8rem); }
.work__rule { height: 1px; background: var(--line); margin: clamp(3rem,6vw,5rem) 0; }
.ncard { border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--card); display: flex; flex-direction: column;
  transition: transform .5s var(--ease), border-color .5s var(--ease); }
.ncard:hover { transform: translateY(-4px); border-color: var(--accent); }
.ncard__img { display: block; aspect-ratio: 16/9; position: relative; overflow: hidden; }
.ncard__body { padding: 1.5rem; display: flex; flex-direction: column; gap: .9rem; flex: 1; }
.ncard__title { font-size: clamp(1.05rem,1.6vw,1.35rem); font-weight: 500; letter-spacing: -.01em; line-height: 1.2; }
.ncard__excerpt { color: var(--muted); font-size: .92rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ncard__more { margin-top: auto; padding: .58rem 1.1rem; font-size: .86rem; }
.ncard__more.btn2--solid { border: 0; }   /* <button> Learn more: drop the default UA border to match the <a> ones */

/* Ecosystem Building cards: Learn more + Back buttons in lime */
.work__group--eco .ncard__more.btn2--solid { background: var(--lime); border-color: var(--lime); color: var(--ink); }
.work__group--eco .ncard__more.btn2--solid::before { background: #8ccf2a; }
.work__group--eco .ncard__more.btn2--solid .dot { background: var(--ink); }
.work__group--eco .ncard__more.btn2--solid:hover { color: var(--ink); }
.work__group--eco .ncard__more.btn2--cta { background: var(--lime); border-color: var(--lime); color: var(--ink); }
.work__group--eco .ncard__more.btn2--cta .dot { background: var(--ink); }
.work__group--eco .ncard__more.btn2--cta:hover { background: #fff; color: #4d6d1a; border-color: var(--lime); }
.work__group--eco .ncard__more.btn2--cta:hover .dot { background: var(--lime); }

/* ---- flip card (a-set): front + back on a 3D flip ---- */
.ncard--flip { border: 0; background: transparent; overflow: visible; perspective: 1600px; }
.ncard--flip:hover { transform: none; border-color: transparent; }
.ncard__flip { position: relative; height: 100%; transform-style: preserve-3d; transition: transform .75s var(--ease); }
.ncard--flip.is-flipped .ncard__flip { transform: rotateY(180deg); }
.ncard__face { position: absolute; inset: 0; -webkit-backface-visibility: hidden; backface-visibility: hidden;
  border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--card); display: flex; flex-direction: column; }
.ncard__front { position: relative; height: 100%; }  /* in flow + fill → matches sibling cards' height */
.ncard__back { transform: rotateY(180deg); }
.ncard__back .ncard__body { justify-content: flex-start; gap: 1rem; }
/* long copy fills the space and scrolls inside the card when it's too tall */
.ncard__long { color: var(--muted); font-size: .8rem; line-height: 1.5; flex: 1; min-height: 0; overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: var(--line) transparent; -webkit-overflow-scrolling: touch; }
.ncard__long::-webkit-scrollbar { width: 5px; }
.ncard__long::-webkit-scrollbar-thumb { background: var(--line); border-radius: 4px; }
.ncard__long p + p { margin-top: .55em; }
.ncard__long em { font-style: normal; font-weight: 500; color: var(--accent-ink); }
.ncard--flip .ncard__excerpt { -webkit-line-clamp: unset; display: block; overflow: visible; line-height: 1.5; min-height: 6em; }  /* show full front copy; uniform block height across cards */
/* card category/tag line: understated uppercase text (same on every card,
   incl. Ecosystem — the .is-lime selector here beats the base highlight) */
.pill--tags, .pill--tags.is-lime {
  display: inline-block; align-self: flex-start; width: auto; max-width: 100%;
  background: transparent; padding: 0; border-radius: 0; font-size: .7rem; font-weight: 500;
  letter-spacing: .07em; text-transform: uppercase; color: var(--muted); white-space: nowrap; line-height: 1.4; }
/* card back title pill stays compact (not the large section-label size) */
.ncard__back-head .pill { font-size: 1.02rem; }
/* a-set logo sits centred inside the media/background tile */
.aset-tile { display: flex; align-items: center; justify-content: center; }
.aset-tile .aset-logo { position: relative; z-index: 1; width: 46%; max-width: 190px; height: auto; color: var(--ink); }
.maroo-logo { position: relative; z-index: 1; width: 60%; max-width: 224px; height: auto; }
.makan-logo { position: relative; z-index: 1; width: 62%; max-width: 250px; height: auto; }
.hack-logo { position: relative; z-index: 1; width: 66%; max-width: 258px; height: auto; }
/* "Coming Soon" speech bubble on a not-yet-live Learn more button */
.soon-wrap { position: relative; display: inline-flex; margin-top: auto; }
.soon-bubble { position: absolute; left: 50%; bottom: calc(100% + 10px); transform: translate(-50%, 6px);
  background: var(--ink); color: #fff; font-size: .78rem; font-weight: 500; letter-spacing: .02em;
  padding: .42rem .72rem; border-radius: 7px; white-space: nowrap; opacity: 0; visibility: hidden;
  pointer-events: none; box-shadow: 0 6px 18px rgba(23,21,31,.22); z-index: 7;
  transition: opacity .25s var(--ease), transform .25s var(--ease), visibility .25s; }
.soon-bubble::after { content: ""; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  border: 6px solid transparent; border-top-color: var(--ink); }
.soon-wrap.is-open .soon-bubble { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
/* folded-corner affordance signalling the card flips to reveal details */
.ncard__fold { position: absolute; bottom: 0; right: 0; z-index: 6; width: 46px; height: 46px; border: 0; background: transparent; cursor: pointer; padding: 0; }
.ncard__fold::before { content: ""; position: absolute; bottom: 0; right: 0; width: 0; height: 0;
  border-style: solid; border-width: 0 0 46px 46px; border-color: transparent transparent var(--accent) transparent; transition: border-width .3s var(--ease); }
.ncard__fold-ic { position: absolute; bottom: 4px; right: 6px; z-index: 1; color: #fff; font-size: 1rem; line-height: 1; transition: transform .35s var(--ease); }
/* Ecosystem cards: lime fold corner to match their lime buttons */
.work__group--eco .ncard__fold::before { border-color: transparent transparent var(--lime) transparent; }
.work__group--eco .ncard__fold-ic { color: var(--ink); }
.ncard--flip:hover .ncard__fold::before { border-width: 0 0 56px 56px; }
.ncard--flip:hover .ncard__fold-ic { transform: rotate(-45deg); }
.seabw-logo { position: relative; z-index: 1; width: 66%; max-width: 250px; height: auto; }
.pcamp-logo { position: relative; z-index: 1; width: 68%; max-width: 260px; height: auto; }
.ncard__img--link { cursor: pointer; }
.ncard__img--link .maroo-logo, .ncard__img--link .seabw-logo, .ncard__img--link .pcamp-logo, .ncard__img--link .makan-logo { transition: transform .45s var(--ease); }
.ncard__img--link:hover .maroo-logo, .ncard__img--link:hover .seabw-logo, .ncard__img--link:hover .pcamp-logo, .ncard__img--link:hover .makan-logo { transform: scale(1.04); }

/* ---- CMS-rendered project cards (initProjects) ----
   The per-card tile tints from the original hand-written markup, now picked
   from the CMS via projects[].tile. Empty = the default .hero__decor gradient
   (Maroo). Declared after .hero__decor so the modifier wins on source order. */
.ptile--purple-br { background: radial-gradient(90% 90% at 70% 70%, rgba(123,104,252,.4), transparent 60%), #ecebe4; }
.ptile--purple-tl { background: radial-gradient(90% 90% at 40% 30%, rgba(123,104,252,.5), transparent 60%), #ecebe4; }
.ptile--lime-tr   { background: radial-gradient(90% 90% at 60% 30%, rgba(162,228,53,.32), transparent 60%), #ecebe4; }
.ptile--lime-bl   { background: radial-gradient(90% 90% at 30% 70%, rgba(162,228,53,.28), transparent 60%), #ecebe4; }
.ptile--lime-c    { background: radial-gradient(90% 90% at 50% 40%, rgba(162,228,53,.4), transparent 62%), #ecebe4; }
/* project logo inside a card tile — width/max-width are supplied by the CMS */
.pcard-logo { position: relative; z-index: 1; height: auto; }
.ncard__img--link .pcard-logo { transition: transform .45s var(--ease); }
.ncard__img--link:hover .pcard-logo { transform: scale(1.04); }

/* ================================================================== PRESS / MEDIA */
.press { padding: clamp(3rem,7vw,6rem) 0 clamp(4rem,9vw,7rem); position: relative; }
.press__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; margin-bottom: clamp(2rem,4vw,3rem); }
.press__head-main { display: flex; flex-direction: column; gap: 1rem; align-items: flex-start; }
.press__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(0, 1fr)); gap: clamp(1.2rem,2.2vw,1.8rem); }
.press__grid--feature { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.press__grid--all { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.acard { display: flex; flex-direction: column; gap: .9rem; padding: clamp(1.4rem,2.4vw,1.9rem); background: var(--card); border: 1px solid var(--line); border-radius: 6px; position: relative; overflow: hidden; transition: transform .5s var(--ease), border-color .5s var(--ease); }
.acard::after { content: ""; position: absolute; left: 0; top: 0; height: 3px; width: 0; background: var(--accent); transition: width .5s var(--ease); }
.acard:hover { transform: translateY(-4px); border-color: var(--accent); }
.acard:hover::after { width: 100%; }
.acard__top { display: flex; align-items: center; gap: .6rem; font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-2); }
.acard__outlet { color: var(--accent-ink); font-weight: 500; }
.acard__top i { width: 4px; height: 4px; border-radius: 50%; background: var(--line); flex: 0 0 auto; }
.acard__title { font-size: clamp(1.05rem,1.5vw,1.3rem); font-weight: 500; letter-spacing: -.015em; line-height: 1.24; }
.acard__excerpt { color: var(--muted); font-size: .92rem; line-height: 1.55; }
/* pin the Read article + tag row to the bottom of every card (uniform) */
.acard__foot { margin-top: auto; padding-top: 1rem; display: flex; align-items: center; justify-content: space-between; gap: .8rem; }
.acard__cta { font-size: .82rem; font-weight: 500; color: var(--ink); display: inline-flex; align-items: center; gap: .4rem; }
.acard__cta i { transition: transform .35s var(--ease); font-style: normal; }
.acard:hover .acard__cta i { transform: translate(2px,-2px); }
.acard__tag { font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); border: 1px solid var(--line); border-radius: 100px; padding: .25rem .6rem; white-space: nowrap; }
.press__empty { color: var(--muted); font-size: .95rem; }

/* Press page hero (compact, reuses hero rhythm) */
.subhero { padding: clamp(7rem,12vw,10rem) 0 clamp(2rem,4vw,3rem); position: relative; }
.subhero .h1 { max-width: 16ch; }
.subhero__sub { margin-top: 1.2rem; max-width: 52ch; }
.subhero__rule { height: 1px; background: var(--line); margin: clamp(2rem,4vw,3rem) 0 0; }

/* ================================================================== 404 */
.notfound { min-height: 80vh; display: flex; align-items: center; position: relative;
  padding: clamp(8rem,15vw,12rem) 0 clamp(4rem,8vw,7rem); }
.notfound__inner { display: flex; flex-direction: column; align-items: flex-start; gap: clamp(1.1rem,2.4vw,1.7rem); position: relative; z-index: 1; }
.notfound__glyph { width: clamp(60px,7vw,96px); color: var(--accent); }
.notfound__glyph svg { width: 100%; height: auto; display: block; }
.notfound .h1 { max-width: 15ch; }
.notfound .h1 em { font-style: normal; color: var(--accent-ink); }
.notfound .body { max-width: 46ch; }
.notfound__cta { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: .6rem; }
/* faint oversized 404 watermark behind the content */
.notfound__ghost { position: absolute; top: 50%; right: var(--pad); transform: translateY(-50%);
  font-size: clamp(9rem,26vw,22rem); font-weight: 600; letter-spacing: -.04em; line-height: .8;
  color: var(--ink); opacity: .04; pointer-events: none; user-select: none; z-index: 0; }
@media (max-width: 767px) { .notfound__ghost { display: none; } }

/* ================================================================== CTA */
.cta { padding: clamp(5rem,11vw,10rem) 0; position: relative; text-align: center; }
.cta__inner { margin: 0 auto; }
.cta .h2 { max-width: 15ch; margin: 0 auto; }   /* ch measured on the heading itself → ~3 lines */
.cta .body { margin: 1.4rem auto 2.4rem; max-width: 46ch; }
.cta__btns { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ================================================================== FOOTER */
.footer { position: relative; background: var(--ink); color: #fff; overflow: hidden; padding: clamp(3.5rem,7vw,6rem) 0 2rem; }
/* footer rails: 4 lines (edges + thirds) aligned to a 3-column content grid */
.footer .rails-in { position: absolute; inset: 0; max-width: var(--maxw); margin: 0 auto; left: 0; right: 0; padding: 0 var(--pad); display: flex; justify-content: space-between; pointer-events: none; }
.footer .rails-in span { width: 1px; background: rgba(255,255,255,.07); }
.footer .rails-in span:first-child, .footer .rails-in span:last-child { background: rgba(255,255,255,.14); }

/* content sits inside the cells; cell padding keeps text clear of the rail lines */
.footer__top { display: grid; grid-template-columns: repeat(3,1fr); gap: 0; padding-bottom: 3rem; position: relative; z-index: 1; }
.footer__lead { font-size: clamp(1.1rem,1.8vw,1.65rem); font-weight: 500; letter-spacing: -.02em; line-height: 1.16; }
/* every cell (incl. the first) is inset from its rail line on both sides */
.footer__top > *, .footer__offices > * { padding-left: clamp(1.1rem,2.2vw,2rem); padding-right: clamp(1rem,2vw,1.9rem); }
.footer__col h5 { font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.5); margin-bottom: 1rem; }
.footer__col a { display: block; color: rgba(255,255,255,.8); padding: .35rem 0; transition: color .3s; }
.footer__col a:hover { color: #fff; }
.footer__offices { display: grid; grid-template-columns: repeat(3,1fr); gap: 0; padding: 2.5rem 0; border-top: 1px solid rgba(255,255,255,.12); position: relative; z-index: 1; }
.footer__offices .city { font-weight: 500; margin-bottom: .5rem; }
.footer__offices .city em { color: var(--lime); font-style: normal; font-size: .8em; }
.footer__offices p { color: rgba(255,255,255,.6); font-size: .88rem; line-height: 1.55; }
.footer__giant { padding: clamp(1.5rem,4vw,3rem) 0; position: relative; z-index: 1; }
.footer__wordmark-svg { display: block; width: 100%; height: auto; fill: rgba(255,255,255,.06); }
.footer__bottom { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; color: rgba(255,255,255,.5); font-size: .82rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,.12); position: relative; z-index: 1; }

/* ================================================================== TEAM (team.html)
   Card grid built purely from existing tokens + the .ncard hover grammar.
   Photos are optional: an empty photo falls back to a branded shard tile. */
.team { padding: clamp(2rem,4vw,3rem) 0 clamp(4rem,9vw,7rem); position: relative; }
.team__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.2rem,2.2vw,1.8rem); }
.team__empty { color: var(--muted); font-size: .95rem; }

.tcard { border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: var(--card);
  display: flex; flex-direction: column; transition: transform .5s var(--ease), border-color .5s var(--ease); }
.tcard:hover { transform: translateY(-4px); border-color: var(--accent); }
.tcard__photo { position: relative; aspect-ratio: 4/5; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(90% 90% at 60% 25%, rgba(123,104,252,.28), transparent 60%), #ecebe4; }
.tcard__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(1); transition: filter .5s var(--ease); }
.tcard:hover .tcard__photo img { filter: none; }
/* fallback mark when a member has no photo yet */
.tcard__glyph { position: relative; z-index: 1; width: 26%; aspect-ratio: 17/18; background: rgba(23,21,31,.14);
  -webkit-mask: var(--shard-symbol) center / contain no-repeat; mask: var(--shard-symbol) center / contain no-repeat; }
.tcard__body { padding: 1.4rem; display: flex; flex-direction: column; gap: .55rem; flex: 1; }
.tcard__name { font-size: clamp(1.05rem,1.6vw,1.35rem); font-weight: 500; letter-spacing: -.01em; line-height: 1.2; }
.tcard__role { font-size: .7rem; font-weight: 500; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.tcard__bio { color: var(--muted); font-size: .9rem; line-height: 1.55; margin-top: .25rem; }
.tcard__social { margin-top: auto; padding-top: 1rem; display: flex; gap: .5rem; }
.tcard__social a { width: 44px; height: 44px; flex: none; border: 1px solid var(--line); border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; color: var(--ink);
  transition: border-color .3s var(--ease), color .3s var(--ease), transform .3s var(--ease); }
.tcard__social a:hover { border-color: var(--accent); color: var(--accent-ink); transform: translateY(-2px); }
.tcard__social a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.tcard__social svg { width: 16px; height: 16px; fill: currentColor; }

/* ================================================================== PROJECT DETAIL (projects.html)
   The long copy that lives on the flip-card backs on the homepage, opened up
   into alternating full-width blocks. Same tiles, rails and buttons. */
.pdetails { display: flex; flex-direction: column; }
.pdetail { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem,4vw,3.5rem);
  align-items: center; padding: clamp(2.2rem,4.5vw,3.6rem) 0; scroll-margin-top: 120px; }
.pdetail + .pdetail { border-top: 1px solid var(--line); }
.pdetail__media { aspect-ratio: 16/9; border: 1px solid var(--line); border-radius: 6px;
  position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.pdetail__media img { position: relative; z-index: 1; width: 58%; max-width: 260px; height: auto; }
.pdetail__media a { position: absolute; inset: 0; z-index: 2; }
/* zigzag: every second block flips the media to the right */
.pdetail:nth-child(even) .pdetail__media { order: 2; }
.pdetail__body { display: flex; flex-direction: column; align-items: flex-start; gap: .9rem; }
.pdetail__long { color: var(--muted); font-size: clamp(.92rem,1.1vw,1rem); line-height: 1.62; }
.pdetail__long p + p { margin-top: .7em; }
.pdetail__long em { font-style: normal; font-weight: 500; color: var(--accent-ink); }

/* ================================================================== reveal */
[data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
[data-reveal].in { opacity: 1; transform: none; }
/* NOTE: scroll/reveal effects intentionally still run under reduced-motion
   (product decision) — we only drop smooth-scroll here. */
@media (prefers-reduced-motion: reduce) { * { scroll-behavior:auto!important; } }

/* ================================================================== responsive */
@media (max-width: 991px) {
  .nav__right { display: none; }        /* mobile: collapse to the hamburger menu */
  .nav__hamburger { display: block; }
  .h1 { font-size: clamp(2rem, 8.6vw, 4.4rem); }   /* keep long words off the right edge */
  .hero__bottom { grid-template-columns: 1fr; }
  .about__pin { height: 400vh; }   /* keep lead-in/out hold so snap steps line up */
  .feature__stage { grid-template-columns: 1fr; }
  .partners__grid { grid-template-columns: 1fr; }
  .work__grid { grid-template-columns: repeat(2, 1fr); }
  .work__head { grid-template-columns: 1fr; gap: .6rem; }
  .work__index { padding-top: 0; }
  .press__grid--all { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .team__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pdetail { grid-template-columns: 1fr; }
  .pdetail:nth-child(even) .pdetail__media { order: 0; }   /* stacked: media always on top */
  .footer__top { grid-template-columns: 1fr 1fr; gap: 1.8rem; }   /* Company + Connect side by side */
  .footer__lead { grid-column: 1 / -1; }   /* tagline stays full-width above them */
  .footer__top > * { padding-left: 0; }
}
@media (max-width: 767px) {
  .nav__logo-full { height: 32px; }   /* slightly smaller logo on phones */
  /* bigger hero headline on phones — same weight/letterforms as the rest of the site */
  .hero__title .h1 { font-size: clamp(2.6rem, 12.5vw, 4.2rem); line-height: .96; }
  /* break the subhead onto two clean lines when it would wrap anyway */
  .hero__sub { line-height: 1.32; }
  .hero__sub span { display: block; }
  .partners__cards { grid-template-columns: repeat(2, 1fr); }
  .pcard2 { grid-column: span 1; }
  .pcard2--lead { grid-column: span 2; aspect-ratio: 12/5; }   /* leads full-width on phones */
  .press__grid--feature, .press__grid--all { grid-template-columns: 1fr; }
  /* project cards pin & stack as you scroll — pure sticky, so it works with
     reduced-motion on. Each card sticks a little lower than the last, so the
     earlier cards peek out above the one folding over them. */
  .work__grid { grid-template-columns: 1fr; row-gap: clamp(1rem,3vw,1.4rem); }
  .work__grid > article { position: sticky; background: var(--card); border-radius: 6px; isolation: isolate;
    box-shadow: 0 -6px 34px rgba(23,21,31,.14); }   /* opaque so a stacked card hides the one below */
  .work__grid > article:nth-child(1) { top: 82px; }
  .work__grid > article:nth-child(2) { top: 96px; }
  .work__grid > article:nth-child(3) { top: 110px; }
  /* Flip via a flat opacity crossfade on mobile — 3D preserve-3d makes stacked
     sticky cards composite translucently, so the card below would show through. */
  .ncard--flip { perspective: none; }
  .ncard__flip { transform: none !important; transform-style: flat; height: 100%; }
  .ncard__face { background: var(--card); transition: opacity .45s var(--ease); backface-visibility: visible; }
  .ncard__back { transform: none; opacity: 0; pointer-events: none; }
  .ncard--flip.is-flipped .ncard__front { opacity: 0; pointer-events: none; }
  .ncard--flip.is-flipped .ncard__back { opacity: 1; pointer-events: auto; }
  .footer__offices { grid-template-columns: 1fr; gap: 1.4rem; }
  .footer__offices > * { padding-left: 0; }
  .fcard__h .h3, .fcard:not(.is-active) .fcard__h .h3 { transform: none; opacity: 1; }
}
/* team cards need real width for name + bio before dropping to one column */
@media (max-width: 560px) {
  .team__grid { grid-template-columns: 1fr; }
}
