/* ==========================================================================
   Promezio — AI Service Provider
   Typography-first. Open Sans (variable: wght 300–800, wdth 75–100) vs Poiret One.
   ========================================================================== */

@font-face {
  font-family: "Open Sans";
  src: url("/assets/fonts/opensans-var.woff2") format("woff2-variations"),
       url("/assets/fonts/opensans-var.woff2") format("woff2");
  font-weight: 300 800;
  font-stretch: 75% 100%;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Poiret One";
  src: url("/assets/fonts/poiretone.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Animatable theme tokens: the whole page morphs colour from scene to scene */
@property --bg     { syntax: "<color>"; inherits: true; initial-value: #eeeeee; }
@property --fg     { syntax: "<color>"; inherits: true; initial-value: #323232; }
@property --accent { syntax: "<color>"; inherits: true; initial-value: #15688c; }

:root {
  /* Promezio palette */
  --blue: #15688c;
  --yellow: #c8b145;
  --red: #bd5b47;
  --paper: hsl(0, 0%, 93%);
  --gray: #a6a6a6;
  --ink: #323232;

  --bg: var(--paper);
  --fg: var(--ink);
  --accent: var(--blue);

  --sans: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Poiret One", "Open Sans", system-ui, sans-serif;

  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
  --ease-back: cubic-bezier(.34, 1.56, .64, 1);

  --gutter: clamp(1rem, 4vw, 3.5rem);
  --header-h: 4.25rem;
  --header-h-solid: 3.5rem;

  transition: --bg .9s var(--ease-io), --fg .9s var(--ease-io), --accent .9s var(--ease-io);
}

/* Scenes — set on <html> by JS, on sections when JS is off */
:root[data-scene="paper"],     .no-js [data-scene="paper"]     { --bg: var(--paper); --fg: var(--ink);   --accent: var(--blue); }
:root[data-scene="paper-red"], .no-js [data-scene="paper-red"] { --bg: var(--paper); --fg: var(--ink);   --accent: var(--red); }
:root[data-scene="ink"],       .no-js [data-scene="ink"]       { --bg: var(--ink);   --fg: var(--paper); --accent: var(--yellow); }
:root[data-scene="blue"],      .no-js [data-scene="blue"]      { --bg: var(--blue);  --fg: var(--paper); --accent: var(--yellow); }
:root[data-scene="yellow"],    .no-js [data-scene="yellow"]    { --bg: var(--yellow);--fg: var(--ink);   --accent: var(--paper); }
:root[data-scene="red"],       .no-js [data-scene="red"]       { --bg: var(--red);   --fg: #fff;         --accent: var(--ink); }
.no-js [data-scene] { background: var(--bg); color: var(--fg); }

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--bg);
  color: var(--fg);
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  font-family: var(--sans);
  font-size: clamp(1rem, .96rem + .2vw, 1.125rem);
  line-height: 1.55;
  font-weight: 400;
  background: var(--bg);
  color: var(--fg);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
}

a { color: inherit; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }
b, strong { font-weight: 800; }

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

:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 2px; }

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

.skip {
  position: fixed; left: 1rem; top: 1rem; z-index: 300;
  padding: .6rem 1rem; background: var(--fg); color: var(--bg);
  transform: translateY(-200%); transition: transform .3s var(--ease);
}
.skip:focus { transform: none; }

/* ---------- Type system ---------- */
.t-display { font-family: var(--display); font-weight: 400; }
.t-black   { font-weight: 800; font-stretch: 75%; }
.t-outline { color: transparent; -webkit-text-stroke: max(1px, .018em) var(--fg); }
.t-accent  { color: var(--accent); }

.label {
  display: inline-flex; align-items: center; gap: .7em;
  font-size: .72rem; line-height: 1;
  letter-spacing: .26em; text-transform: uppercase;
  font-weight: 600;
}
.label .br { color: var(--accent); font-family: var(--display); font-size: 1.5em; font-weight: 400; letter-spacing: 0; }

/* Animated strike-through */
.strike { position: relative; display: inline-block; text-decoration: none; }
.strike::after {
  content: ""; position: absolute; left: -.06em; right: -.06em; top: 54%;
  height: max(2px, .07em); background: var(--accent);
  transform: scaleX(0); transform-origin: left center;
  transition: transform .9s var(--ease-io) var(--strike-delay, .6s);
}
.no-js .strike::after, .in .strike::after, .strike.in::after { transform: scaleX(1); }

/* Roll-over text: regular slides away, condensed black slides in */
.roll { position: relative; display: inline-block; overflow: hidden; vertical-align: top; line-height: 1.25; }
.roll > span { display: inline-block; transition: transform .55s var(--ease-io); }
.roll > span::after {
  content: attr(data-text); position: absolute; left: 0; top: 100%;
  font-weight: 800; font-stretch: 75%; white-space: nowrap;
}
a:hover .roll > span, a:focus-visible .roll > span, .roll:hover > span { transform: translateY(-100%); }

/* ---------- Split text primitives ---------- */
.split .w { display: inline-block; white-space: nowrap; }
.split .c { display: inline-block; }
.js [data-split]:not(.is-split) { visibility: hidden; }

/* rise: chars come up, slightly rotated */
.js [data-anim="rise"] .c {
  opacity: 0; transform: translateY(.5em) rotate(8deg);
  transition: opacity .7s var(--ease), transform 1s var(--ease);
  transition-delay: calc(var(--i) * 24ms + var(--d, 0ms));
}
.js [data-anim="rise"].in .c { opacity: 1; transform: none; }

/* words: blur up, word by word */
.js [data-anim="words"] .w {
  opacity: 0; transform: translateY(.45em); filter: blur(6px);
  transition: opacity .8s var(--ease), transform 1s var(--ease), filter .8s var(--ease);
  transition-delay: calc(var(--wi) * 42ms + var(--d, 0ms));
}
.js [data-anim="words"].in .w { opacity: 1; transform: none; filter: none; }

/* assemble: letters fly home from everywhere (Local AI) */
.js [data-anim="assemble"] .c {
  opacity: 0;
  transform: translate(var(--dx, 0), var(--dy, 0)) rotate(var(--r, 0)) scale(.5);
  filter: blur(12px);
  transition: transform 1.6s var(--ease), opacity 1.1s var(--ease), filter 1.3s var(--ease);
  transition-delay: calc(var(--i) * 55ms);
}
.js [data-anim="assemble"].in .c { opacity: 1; transform: none; filter: none; }

/* pipeline: letters enter in sequence, then a weight wave runs through (Infrastructure) */
.js [data-anim="pipeline"] .c {
  opacity: 0; transform: translateX(-.8em);
  transition: opacity .5s var(--ease), transform .9s var(--ease);
  transition-delay: calc(var(--i) * 60ms);
}
.js [data-anim="pipeline"].in .c {
  opacity: 1; transform: none;
  animation: pipe 2.8s var(--ease-io) infinite;
  animation-delay: calc(1.4s + var(--i) * .11s);
}
@keyframes pipe {
  0%, 100% { font-variation-settings: "wght" 800, "wdth" 75; }
  50%      { font-variation-settings: "wght" 300, "wdth" 75; }
}

/* decrypt: chars appear, JS scrambles them into place (CyberSec) */
.js [data-anim="decrypt"] .c { opacity: 0; transition: opacity .2s linear; transition-delay: calc(var(--i) * 25ms); }
.js [data-anim="decrypt"].in .c { opacity: 1; }

/* drop: letters fall with a bounce */
.js [data-anim="drop"] .c {
  opacity: 0; transform: translateY(-.7em) rotate(-10deg);
  transition: transform 1s var(--ease-back), opacity .5s var(--ease);
  transition-delay: calc(var(--i) * 50ms);
}
.js [data-anim="drop"].in .c { opacity: 1; transform: none; }
.js .contact-big[data-anim="drop"] .c { transition: transform 1s var(--ease-back), opacity .5s var(--ease), font-variation-settings .6s var(--ease), color .4s; transition-delay: calc(var(--i) * 50ms); }

/* once the entrance is over, interactions respond instantly */
.js .settled .c, .js .settled .w { transition-delay: 0s !important; }

/* generic block reveal */
.js [data-reveal] {
  opacity: 0; transform: translateY(1.5rem);
  transition: opacity 1s var(--ease), transform 1.1s var(--ease);
  transition-delay: var(--d, 0ms);
}
.js [data-reveal].in { opacity: 1; transform: none; }

/* used while measuring titles: freeze every char at its widest state */
.fitting .c { font-variation-settings: "wght" 800, "wdth" 75 !important; animation: none !important; }

/* ---------- Chrome: grain, progress, cursor ---------- */
.grain {
  position: fixed; inset: -50%; width: 200%; height: 200%;
  pointer-events: none; z-index: 90; opacity: .07;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain {
  0%   { transform: translate(0, 0); }
  20%  { transform: translate(-3%, 2%); }
  40%  { transform: translate(2%, -4%); }
  60%  { transform: translate(-4%, -2%); }
  80%  { transform: translate(3%, 4%); }
  100% { transform: translate(0, 0); }
}

.progress {
  position: fixed; left: 0; top: 0; z-index: 60;
  width: 100%; height: 2px; background: var(--accent);
  transform-origin: left; transform: scaleX(0);
  pointer-events: none;
}


.cursor { display: none; }
.has-cursor, .has-cursor * { cursor: none !important; }
.has-cursor input[type="range"] { cursor: none !important; }
.has-cursor .cursor {
  display: block; position: fixed; left: 0; top: 0; z-index: 100;
  pointer-events: none; mix-blend-mode: difference;
  will-change: transform;
}
.cursor-dot {
  position: absolute; left: -6px; top: -6px;
  width: 12px; height: 12px; border-radius: 50%; background: #fff;
  transition: transform .45s var(--ease), opacity .3s;
}
.cursor-label {
  position: absolute; left: 0; top: 0; transform: translate(-50%, -50%);
  font-size: .62rem; letter-spacing: .2em; text-transform: uppercase; font-weight: 700;
  color: #fff; white-space: nowrap; opacity: 0; transition: opacity .3s;
}
.cursor.is-link .cursor-dot { transform: scale(4.5); }
.cursor.is-text .cursor-dot { transform: scale(7); }
.cursor.is-drag .cursor-dot { transform: scale(7.5); }
.cursor.is-drag .cursor-label { opacity: 1; mix-blend-mode: normal; color: #000; }
.cursor.is-hidden .cursor-dot { opacity: 0; }

/* ---------- Intro ---------- */
.intro {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center; gap: .25em;
  background: var(--ink); color: var(--paper);
  font-family: var(--display); font-size: clamp(2.4rem, 9vw, 7rem); line-height: 1;
  pointer-events: none;
  animation: intro-out 1s var(--ease-io) 1.55s forwards;
}
.intro .br { color: var(--yellow); display: inline-block; }
.intro .br:first-child { animation: br-l 1.1s var(--ease-io) .1s both; }
.intro .br:last-child  { animation: br-r 1.1s var(--ease-io) .1s both; }
.intro-word { display: inline-block; overflow: hidden; max-width: 0; white-space: nowrap; animation: word-open 1.1s var(--ease-io) .1s forwards; }
@keyframes br-l { from { transform: translateX(.25em); } to { transform: none; } }
@keyframes br-r { from { transform: translateX(-.25em); } to { transform: none; } }
@keyframes word-open { to { max-width: 6em; } }
@keyframes intro-out { to { clip-path: inset(0 0 100% 0); } }
.intro { clip-path: inset(0 0 0 0); }
.no-intro .intro, .no-js .intro { display: none; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--header-h);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem;
  padding: 0 var(--gutter);
  color: var(--fg);
  transition: height .5s var(--ease), color .4s;
}
.site-header > .brand { justify-self: start; }
.site-header > .nav, .site-header > .menu-btn, .site-header > .lang { grid-column: 3; justify-self: end; }
/* Glass bar: appears as soon as content scrolls under it, takes the scene colour */
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  backdrop-filter: blur(16px) saturate(1.3);
  border-bottom: 1px solid color-mix(in srgb, var(--fg) 14%, transparent);
  opacity: 0; transition: opacity .5s var(--ease);
}
.site-header.is-solid { height: var(--header-h-solid); }
.site-header.is-solid::before { opacity: 1; }
.menu-open .site-header::before { opacity: 0; }

/* Where am I: current section, centred in the bar */
.header-now {
  justify-self: center;
  font-size: .68rem; letter-spacing: .24em; text-transform: uppercase; font-weight: 600;
  white-space: nowrap; pointer-events: none;
  opacity: 0; transform: translateY(.4rem);
  transition: opacity .5s var(--ease), transform .5s var(--ease);
}
.header-now .br { color: var(--accent); font-family: var(--display); font-size: 1.4em; font-weight: 400; letter-spacing: 0; }
.is-solid .header-now { opacity: 1; transform: none; }

.brand {
  display: inline-flex; align-items: center; gap: .3em;
  font-family: var(--display); font-size: 1.4rem; line-height: 1;
  text-decoration: none; white-space: nowrap;
}
.brand .br { color: var(--accent); display: inline-block; transition: transform .55s var(--ease); }
.brand:hover .br:first-child { transform: translateX(-.3em); }
.brand:hover .br:last-child  { transform: translateX(.3em); }

.nav { display: flex; align-items: center; gap: clamp(1.25rem, 2.6vw, 2.5rem); }
.nav a {
  position: relative;
  text-decoration: none;
  font-size: .74rem; letter-spacing: .18em; text-transform: uppercase; font-weight: 600;
  display: inline-block;
}
.nav a:not(.lang a)::after {
  content: ""; position: absolute; left: 0; right: .18em; bottom: -.45rem; height: 2px;
  background: var(--accent); transform: scaleX(0); transform-origin: right;
  transition: transform .5s var(--ease-io);
}
.nav a.is-active:not(.lang a)::after { transform: scaleX(1); transform-origin: left; }

.lang { display: inline-flex; align-items: center; gap: .5em; font-size: .74rem; letter-spacing: .14em; font-weight: 600; }
.lang a { text-decoration: none; opacity: .45; transition: opacity .3s; }
.lang a:hover { opacity: 1; }
.lang a[aria-current] { opacity: 1; font-weight: 800; font-stretch: 75%; font-size: 1.1em; }
.lang .sep { font-family: var(--display); color: var(--accent); }

.menu-btn {
  display: none; align-items: center; gap: .6em;
  font-size: .74rem; letter-spacing: .2em; text-transform: uppercase; font-weight: 700;
  padding: .75rem 0 .75rem .75rem; min-height: 44px;
}
.menu-btn i { display: inline-block; width: .5rem; height: .5rem; border-radius: 50%; background: var(--accent); transition: transform .5s var(--ease); }
.menu-open .menu-btn i { transform: scale(1.6); }

/* Mobile menu */
.menu {
  position: fixed; inset: 0; z-index: 45;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 2.5rem;
  padding: calc(var(--header-h) + 2rem) var(--gutter) max(2rem, env(safe-area-inset-bottom));
  background: var(--fg); color: var(--bg);
  clip-path: inset(0 0 100% 0); visibility: hidden;
  transition: clip-path .8s var(--ease-io), visibility 0s linear .8s;
}
.menu-open .menu { clip-path: inset(0 0 0 0); visibility: visible; transition: clip-path .8s var(--ease-io), visibility 0s; }
.menu-open .site-header { color: var(--bg); }
.menu-open .brand .br, .menu-open .lang .sep { color: var(--accent); }
.menu-open, .menu-open body { overflow: hidden; }

.menu-links li { overflow: hidden; }
.menu-links a {
  display: flex; align-items: baseline; gap: .8rem;
  text-decoration: none; padding: .15rem 0;
  font-size: clamp(2.8rem, 14vw, 5.5rem); line-height: 1.02; font-weight: 800; font-stretch: 75%; letter-spacing: -.02em;
  transform: translateY(105%); transition: transform .8s var(--ease);
}
.menu-links a small { font-family: var(--display); font-size: 1rem; font-weight: 400; letter-spacing: 0; color: var(--accent); }
.menu-links li:nth-child(even) a { font-family: var(--display); font-weight: 400; letter-spacing: 0; }
.menu-open .menu-links a { transform: none; }
.menu-open .menu-links li:nth-child(1) a { transition-delay: .25s; }
.menu-open .menu-links li:nth-child(2) a { transition-delay: .31s; }
.menu-open .menu-links li:nth-child(3) a { transition-delay: .37s; }
.menu-open .menu-links li:nth-child(4) a { transition-delay: .43s; }
.menu-open .menu-links li:nth-child(5) a { transition-delay: .49s; }
.menu-foot { display: flex; justify-content: space-between; align-items: center; font-size: .78rem; letter-spacing: .12em; }
.menu-foot a { text-decoration: none; }

/* ---------- Layout ---------- */
.section { position: relative; padding: clamp(6rem, 16vh, 11rem) var(--gutter); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: clamp(2.5rem, 7vh, 5rem); }

/* ---------- Hero ---------- */
.hero {
  min-height: 100svh;
  display: grid; grid-template-rows: auto 1fr auto;
  padding: calc(var(--header-h) + clamp(1.5rem, 5vh, 3rem)) var(--gutter) clamp(1.5rem, 4vh, 2.5rem);
  gap: clamp(1rem, 3vh, 2rem);
}
.kicker {
  display: flex; align-items: center; gap: 1.1rem;
  font-size: .74rem; letter-spacing: .3em; text-transform: uppercase; font-weight: 600;
  min-height: 1em;
}
.kicker::before { content: ""; width: .55rem; height: .55rem; background: var(--accent); transform: rotate(45deg); flex: none; }
.kicker::after { content: ""; height: 1px; width: clamp(2.5rem, 10vw, 9rem); background: currentColor; opacity: .35; }

.hero-title { align-self: center; display: flex; flex-direction: column; font-weight: 400; line-height: .84; }
/* mask only vertically: the wave widens glyphs sideways and they must never be cut */
.hero-title .line { display: block; clip-path: inset(0 -100vw 0 -100vw); padding: .07em 0 .05em; margin: -.07em 0 -.05em; }
.hero-title .line > span { display: inline-block; }
.js .hero-title .line > span { transform: translateY(110%); }
.js .hero.in .hero-title .line > span { transform: none; transition: transform 1.3s var(--ease); }
.js .hero.in .hero-title .line:nth-child(2) > span { transition-delay: .12s; }
.js .hero.in .hero-title .line:nth-child(3) > span { transition-delay: .24s; }

.hl-1 { font-family: var(--display); font-size: clamp(2.6rem, 9vw, 9.5rem); line-height: 1; }
.hl-2 {
  font-size: clamp(7rem, 27vw, 27rem); font-weight: 800; font-stretch: 75%;
  letter-spacing: -.035em; color: var(--accent); line-height: .78;
  margin-left: -.04em;
}
.hl-3 { font-size: clamp(2.6rem, 9vw, 9.5rem); font-weight: 800; font-stretch: 75%; letter-spacing: -.02em; }
.hero-title .line:nth-child(3) { align-self: flex-end; text-align: right; }

.hero-foot {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end;
  gap: 1.5rem 3rem;
}
.rotator {
  font-family: var(--display); font-size: clamp(1.5rem, 3.3vw, 3rem); line-height: 1.1;
  min-height: 1.15em; display: flex; align-items: baseline; gap: .5em; flex-wrap: wrap;
}
.rotator .arrow { color: var(--accent); font-family: var(--sans); font-weight: 300; }
.rotator b { font-family: var(--sans); font-weight: 800; font-stretch: 75%; }
.js .rotator [data-phrase] { display: none; }
.js .rotator [data-phrase].on { display: inline; }
.js .rotator [data-phrase] .c { visibility: hidden; }
.js .rotator [data-phrase] .c.on { visibility: visible; }
.rotator .caret {
  display: inline-block; width: .08em; min-width: 2px; height: .9em; margin-left: .06em;
  background: var(--accent); vertical-align: -.08em;
  animation: blink 1s steps(2) infinite;
}
.no-js .rotator .caret { display: none; }
.no-js .rotator [data-phrase] + [data-phrase]::before { content: " · "; }
@keyframes blink { 50% { opacity: 0; } }

.hero-side { display: flex; align-items: flex-end; gap: clamp(1.25rem, 3vw, 2.5rem); }
.hero-intro { max-width: 30ch; font-size: .92rem; line-height: 1.5; }
.hero-intro b { font-stretch: 75%; }

.badge {
  position: relative; flex: none;
  width: clamp(5.5rem, 8vw, 7.5rem); aspect-ratio: 1;
  display: grid; place-items: center; text-decoration: none;
}
.badge svg { position: absolute; inset: 0; width: 100%; height: 100%; animation: spin 14s linear infinite; overflow: visible; }
.badge text { font-family: var(--sans); font-size: 9.5px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; fill: currentColor; }
.badge-arrow { font-size: 1.5rem; font-weight: 300; transition: transform .5s var(--ease); }
.badge:hover .badge-arrow { transform: translateY(.3rem); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Marquee ---------- */
.marquee { overflow: hidden; padding: clamp(1.5rem, 4vh, 3rem) 0; white-space: nowrap; user-select: none; }
.marquee-row { display: flex; width: max-content; will-change: transform; }
.marquee-row > span { display: inline-flex; align-items: baseline; flex: none; }
.mq-1 { font-size: clamp(3.2rem, 10vw, 9.5rem); line-height: 1; }
.mq-2 { font-size: clamp(1.4rem, 3.4vw, 3rem); line-height: 1.2; margin-top: .4rem; }
.mq-1 .i { padding: 0 .18em; }
.mq-1 .a { font-weight: 800; font-stretch: 75%; letter-spacing: -.02em; }
.mq-1 .b { font-family: var(--display); }
.mq-1 .o { font-weight: 800; font-stretch: 75%; letter-spacing: -.02em; color: transparent; -webkit-text-stroke: max(1px, .016em) var(--fg); }
.mq-1 .x { font-weight: 800; font-stretch: 75%; letter-spacing: -.02em; color: var(--accent); }
.mq-1 .s, .mq-2 .s { font-family: var(--display); color: var(--accent); padding: 0 .35em; }
.mq-2 .i { font-family: var(--display); }
.mq-2 .i:nth-child(4n+1) { font-family: var(--sans); font-weight: 300; }

/* ---------- Manifesto ---------- */
.manifesto { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; }
.manifesto-lead { font-size: clamp(2.2rem, 6.6vw, 6.8rem); line-height: 1.02; letter-spacing: -.02em; max-width: 16ch; }
.manifesto-lead .t-display { letter-spacing: 0; }
.manifesto-lead strong { font-stretch: 75%; color: var(--accent); }
.manifesto-body {
  margin-top: clamp(2rem, 6vh, 4rem); margin-left: auto;
  max-width: 34ch; font-size: clamp(1.25rem, 2.4vw, 2.2rem); line-height: 1.25; font-weight: 300;
}
.manifesto-body b { font-stretch: 75%; }
.manifesto-end { margin-top: clamp(3rem, 10vh, 7rem); font-size: clamp(3rem, 11vw, 11.5rem); line-height: .9; letter-spacing: -.03em; }
.manifesto-end .t-display { letter-spacing: 0; }
.manifesto-end strong { font-stretch: 75%; display: inline-block; }
.scrub .w { transition: opacity .2s linear; }

/* ---------- Services intro ---------- */
.mega { font-size: clamp(3.2rem, 11.5vw, 12rem); line-height: .9; letter-spacing: -.03em; font-weight: 400; }
.mega .t-display { letter-spacing: 0; }
.mega .t-black { display: block; text-align: right; }

.index { margin-top: clamp(3rem, 9vh, 6rem); border-bottom: 1px solid color-mix(in srgb, var(--fg) 25%, transparent); }
.index li { border-top: 1px solid color-mix(in srgb, var(--fg) 25%, transparent); }
.index a {
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-columns: 4rem minmax(0, 1.1fr) minmax(0, 1fr) 2rem; align-items: center; gap: 1rem;
  padding: clamp(1.1rem, 2.6vh, 1.7rem) .25rem; text-decoration: none;
  transition: color .45s var(--ease-io), padding .45s var(--ease-io);
}
.index a::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--fg);
  transform: scaleY(0); transform-origin: bottom; transition: transform .5s var(--ease-io);
}
.index a:hover, .index a:focus-visible { color: var(--bg); padding-left: 1rem; padding-right: 1rem; }
.index a:hover::before, .index a:focus-visible::before { transform: scaleY(1); transform-origin: top; }
.ix-n { font-family: var(--display); font-size: 1.4rem; }
.ix-t { font-size: clamp(1.6rem, 3.6vw, 3.3rem); font-weight: 800; font-stretch: 75%; line-height: 1.1; letter-spacing: -.01em; }
.ix-d { font-size: .92rem; opacity: .8; }
.ix-a { font-size: 1.4rem; font-weight: 300; justify-self: end; transition: transform .5s var(--ease); }
.index a:hover .ix-a { transform: rotate(-45deg); }

/* ---------- Services ---------- */
.service {
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  gap: clamp(1.75rem, 5vh, 3.5rem);
  overflow: clip;
}
.svc-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; }
.svc-num { font-family: var(--display); font-size: clamp(3rem, 7vw, 6.5rem); line-height: .8; }
.svc-num small { font-size: .35em; opacity: .55; margin-left: .2em; }

.svc-title {
  font-size: clamp(3rem, 13vw, 16rem);
  font-weight: 800; font-stretch: 75%;
  line-height: .8; letter-spacing: -.025em;
  white-space: nowrap;
  margin-left: -.03em;
}
.svc-title .fl { display: inline; }

.svc-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 7rem); align-items: end; }
.svc-claim { font-family: var(--display); font-size: clamp(2rem, 4.6vw, 4.6rem); line-height: 1.04; }
.svc-claim b { font-family: var(--sans); font-weight: 800; font-stretch: 75%; letter-spacing: -.015em; }
.svc-claim em { font-style: normal; font-family: var(--sans); font-weight: 800; font-stretch: 75%; letter-spacing: -.015em; color: transparent; -webkit-text-stroke: max(1px, .02em) var(--fg); }
.svc-body { max-width: 40ch; }
.svc-body p + p { margin-top: 1rem; }
.svc-tags {
  display: flex; flex-wrap: wrap; gap: .5rem 1.1rem; margin-top: 1.6rem;
  font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 600;
}
.svc-tags li { display: inline-flex; align-items: center; gap: .55rem; }
.svc-tags li::before { content: "["; font-family: var(--display); color: var(--accent); font-size: 1.3em; font-weight: 400; }
.svc-tags li::after  { content: "]"; font-family: var(--display); color: var(--accent); font-size: 1.3em; font-weight: 400; }

/* Custom Tuning: weights console */
.tune { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 600; }
.tune-title { touch-action: pan-y; cursor: ew-resize; user-select: none; -webkit-user-select: none; }
.tune label { display: inline-flex; align-items: center; gap: 1rem; flex: 1 1 18rem; max-width: 34rem; }
.tune-readout { font-variant-numeric: tabular-nums; white-space: nowrap; }
.tune-readout b { font-stretch: 75%; color: var(--accent); font-size: 1.15em; }

input[type="range"] {
  -webkit-appearance: none; appearance: none;
  flex: 1; height: 44px; background: transparent; cursor: ew-resize;
}
input[type="range"]::-webkit-slider-runnable-track { height: 2px; background: currentColor; opacity: .9; }
input[type="range"]::-moz-range-track { height: 2px; background: currentColor; }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 22px; height: 22px; margin-top: -10px; border-radius: 50%;
  background: var(--accent); border: 2px solid var(--bg);
  transition: transform .3s var(--ease);
}
input[type="range"]::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: var(--accent); border: 2px solid var(--bg); }
input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.35); }

/* CyberSec: redaction bars */
.redact { position: relative; display: inline; white-space: nowrap; }
.redact::after {
  content: ""; position: absolute; left: -.1em; right: -.1em; top: .05em; bottom: -.02em;
  background: var(--ink);
  transform-origin: right center;
  transition: transform .7s var(--ease-io);
  transition-delay: calc(.9s + var(--r, 0) * .22s);
}
.no-js .redact::after, .in .redact::after { transform: scaleX(0); }

/* ---------- Open models. Closed doors. ---------- */
.doors { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; gap: clamp(2rem, 6vh, 4rem); }
.doors-title { font-size: clamp(2.8rem, 9.6vw, 10.5rem); line-height: 1; font-weight: 400; letter-spacing: -.01em; }
.doors-title > span { display: block; white-space: nowrap; }
.doors-title > span:last-child { text-align: right; }
.doors-title .t-display { letter-spacing: 0; }
.door { display: inline-block; font-weight: 800; font-stretch: 75%; will-change: letter-spacing; }
.door-open { color: var(--accent); }
.doors-note { max-width: 36ch; font-size: clamp(1.05rem, 1.6vw, 1.35rem); line-height: 1.45; font-weight: 300; }
.doors-note b { font-stretch: 75%; }

/* ---------- Method ---------- */
.method-list { margin-top: clamp(2rem, 6vh, 4rem); }
.step {
  display: grid; grid-template-columns: 4.5rem minmax(0, auto) minmax(0, 1fr); align-items: baseline; gap: 1rem 2rem;
  padding: clamp(1.2rem, 5vh, 3.2rem) 0;
}
.step-n { font-family: var(--display); font-size: 1.4rem; color: var(--accent); }
.step-t {
  font-size: clamp(3rem, 10.5vw, 10.5rem); line-height: .9; letter-spacing: -.02em;
  font-weight: 800; font-stretch: 75%;
  white-space: nowrap;
}
.step-d { font-size: clamp(1rem, 1.5vw, 1.3rem); max-width: 26ch; line-height: 1.35; }
.js .step-t { font-variation-settings: "wght" 300, "wdth" 100; opacity: .28; }
.js .step-d { opacity: 0; }

/* ---------- Contact ---------- */
.contact { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; gap: clamp(2rem, 5vh, 3.5rem); }
.contact-q { font-family: var(--display); font-size: clamp(1.5rem, 3.2vw, 3rem); line-height: 1.2; max-width: 26ch; }
.contact-q span { display: block; }
.contact-q b { font-family: var(--sans); font-stretch: 75%; letter-spacing: -.01em; }
.contact-big {
  font-size: clamp(4rem, 19vw, 22rem); line-height: .8; letter-spacing: -.035em;
  font-weight: 800; font-stretch: 75%; white-space: nowrap;
  margin-left: -.03em;
}
.contact-big .c { transition: font-variation-settings .6s var(--ease), color .4s; }
.contact-big .c.hot { font-variation-settings: "wght" 300, "wdth" 75 !important; color: var(--accent); }
.contact-big .c.cool { color: var(--accent); }
.mail-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap; }
.mail {
  position: relative; display: inline-block; text-decoration: none;
  font-size: clamp(1.3rem, 4.2vw, 3.6rem); font-weight: 300; letter-spacing: -.01em; line-height: 1.2;
  overflow-wrap: anywhere;
}
.mail::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -.08em; height: 2px; background: var(--accent);
  transform-origin: right; transform: scaleX(.12); transition: transform .7s var(--ease-io);
}
.mail:hover::after, .mail:focus-visible::after { transform: scaleX(1); transform-origin: left; }
.mail b { font-stretch: 75%; }
.copy {
  font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; font-weight: 700;
  padding: .9rem 1.3rem; min-height: 44px; border: 1px solid currentColor; border-radius: 999px;
  transition: background .35s, color .35s;
}
.copy:hover { background: var(--fg); color: var(--bg); }

/* ---------- Footer ---------- */
.site-footer { padding: clamp(3rem, 8vh, 5rem) var(--gutter) max(1.5rem, env(safe-area-inset-bottom)); overflow: clip; }
.footer-mark {
  font-family: var(--display); font-size: clamp(4rem, 20vw, 24rem); line-height: .9;
  white-space: nowrap; display: flex; justify-content: space-between; align-items: center;
  margin: 0 -.02em;
}
.footer-mark .br { color: var(--accent); display: inline-block; transition: transform 1.4s var(--ease); }
.js .footer-mark .br:first-child { transform: translateX(-60%); }
.js .footer-mark .br:last-child  { transform: translateX(60%); }
.js .footer-mark.in .br { transform: none; }
.footer-row {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem 2rem; flex-wrap: wrap;
  margin-top: clamp(1.5rem, 4vh, 2.5rem); padding-top: 1.25rem;
  border-top: 1px solid color-mix(in srgb, var(--fg) 25%, transparent);
  font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 600;
}
.footer-row a { text-decoration: none; }
.footer-row .top { display: inline-flex; gap: .5em; align-items: center; }

/* ---------- 404 ---------- */
.nf { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; gap: 2rem; padding: var(--header-h) var(--gutter) 3rem; }
.nf-code { font-size: clamp(8rem, min(34vw, 55vh), 30rem); line-height: .8; font-weight: 800; font-stretch: 75%; letter-spacing: -.04em; }
.nf-code .t-display { font-weight: 400; color: var(--accent); }
.nf-text { font-family: var(--display); font-size: clamp(1.6rem, 4vw, 3.4rem); line-height: 1.1; }
.nf-links { display: flex; gap: 2rem; font-size: .8rem; letter-spacing: .18em; text-transform: uppercase; font-weight: 700; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
  .header-now { display: none; }
  .site-header { display: flex; justify-content: space-between; }
  .svc-grid { grid-template-columns: 1fr; align-items: start; }
  .svc-body { max-width: 52ch; }
  .index a { grid-template-columns: 3rem minmax(0, 1fr) 2rem; }
  .ix-d { grid-column: 2 / 3; grid-row: 2; margin-top: -.4rem; }
  .ix-a { grid-column: 3; grid-row: 1; }
  .step { grid-template-columns: 3.5rem minmax(0, 1fr); }
  .step-d { grid-column: 2; }
}

@media (max-width: 760px) {
  :root { --header-h: 3.75rem; --header-h-solid: 3.5rem; }
  .nav { display: none; }
  .menu-btn { display: inline-flex; }

  .hero { grid-template-rows: auto 1fr auto; }
  .hl-1 { font-size: 12.5vw; }
  .hl-2 { font-size: 45vw; }
  .hl-3 { font-size: 15.5vw; }
  .hero-foot { grid-template-columns: 1fr; }
  .rotator { font-size: 7vw; min-height: 2.3em; align-content: flex-end; }
  .hero-side { justify-content: space-between; }
  .hero-intro { font-size: .86rem; }
  .badge { width: 5.25rem; }

  .manifesto-lead { font-size: 11vw; }
  .manifesto-body { font-size: 1.3rem; margin-left: 0; }
  .manifesto-end { font-size: 16vw; }

  .mega { font-size: 15vw; }
  .ix-d { font-size: .82rem; }

  .svc-title .fl { display: block; }
  .svc-claim { font-size: 9.4vw; }
  .svc-tags { font-size: .64rem; gap: .5rem .9rem; }

  .doors-title { font-size: 12.5vw; }
  .doors-title > span { white-space: normal; }

  .step { grid-template-columns: 1fr; gap: .6rem; padding: 2.4rem 0; }
  .step-n { font-size: 1.1rem; }
  .step-d { grid-column: 1; }
  .step-t { font-size: 17vw; }

  .contact-q { font-size: 7vw; }
  .mail { font-size: 6.4vw; }
  .mail-row { align-items: flex-start; flex-direction: column; }

}

@media (hover: none) {
  .index a:hover { color: inherit; padding-left: .25rem; padding-right: .25rem; }
  .index a:hover::before { transform: scaleY(0); }
}

/* ==========================================================================
   Reduced motion: content first, still typographic
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; transition-delay: 0s !important;
  }
  .grain, .intro { display: none; }
}
