/* ═══════════════════════════════════════════════════════════════
   DIRIGO — page sections below the hero.
   Depends on the tokens declared in site.css.
   ═══════════════════════════════════════════════════════════════ */

/* ═══ CLIENTS — the logo wall ════════════════════════════════════
   Two rails running against each other. The drift is JS-driven so it can
   take on the reader scroll velocity: a flick of the wheel shoves the
   marquee and it eases back to base speed. A CSS marquee cannot do that. */
.clients{padding:9rem 0 8rem;overflow:hidden;border-block-start:1px solid var(--line)}
.marquee{position:relative;display:flex;overflow:hidden;direction:ltr;-webkit-user-select:none;user-select:none}
.marquee + .marquee{margin-top:1.1rem}
.marquee-row{display:flex;flex:none;will-change:transform}
.logo-tile{
  flex:none;width:clamp(150px,15vw,215px);aspect-ratio:44/18;
  display:grid;place-items:center;margin-inline:.55rem;padding:.5rem;
  border:1px solid var(--line);border-radius:3px;background:var(--paper);
  transition:border-color .45s var(--ease),transform .45s var(--ease);
}
.logo-tile img{
  width:100%;height:100%;object-fit:contain;
  /* --c is written per frame by the wave: 0 is grey at rest, 1 is full colour. */
  filter:grayscale(calc((1 - var(--c,0)) * 100%))
         contrast(calc(90% + var(--c,0) * 12%))
         opacity(calc(72% + var(--c,0) * 28%));
  transition:filter .25s linear;
}
.logo-tile{--c:0}
.logo-tile:hover{border-color:var(--cyan);transform:translateY(-3px)}
.logo-tile:hover img{filter:none;transition:filter .35s var(--ease)}
/* Feather the rails into the page instead of cutting them at the edge. */
.marquee::before,.marquee::after{
  content:"";position:absolute;inset-block:0;z-index:2;pointer-events:none;
  width:clamp(60px,10vw,180px);
}
.marquee::before{inset-inline-start:0;background:linear-gradient(to left,transparent,var(--paper))}
.marquee::after{inset-inline-end:0;background:linear-gradient(to right,transparent,var(--paper))}

/* ═══ MANIFESTO — kinetic statement ══════════════════════════════
   Words resolve one at a time as the block crosses the viewport, so the
   sentence is read at the pace it is revealed. */
/* ── manifesto ───────────────────────────────────────────────────
   Was a pale panel with a quote on it. Now it carries the same graded
   full-bleed treatment as the hero, so the one line the company lives by
   is the loudest thing on the page rather than the quietest. */
.manifesto{
  position:relative;isolation:isolate;overflow:hidden;
  background:#07080a;color:#fff;
  padding:clamp(6rem,14vh,11rem) 0 clamp(4rem,8vh,7rem);
}
.mf-bg{position:absolute;inset:0;z-index:0}
.mf-bg img{width:100%;height:100%;object-fit:cover;transform:scale(1.08)}
/* Three darkening layers stacked on one photograph left almost nothing of it
   showing. The blue is a tint now rather than a hue replacement, and the
   multiply is roughly halved; the wash below still carries the legibility. */
.mf-bg i{position:absolute;inset:0;background:var(--blue);opacity:.24;mix-blend-mode:color}
.mf-bg u{position:absolute;inset:0;background:#08121a;opacity:.26;mix-blend-mode:multiply}
.mf-bg img{filter:saturate(1.1) contrast(1.03)}
.mf-wash{
  position:absolute;inset:0;z-index:1;pointer-events:none;
  background:linear-gradient(to bottom,rgba(4,8,12,.7) 0%,rgba(4,8,12,.38) 32%,rgba(4,8,12,.62) 62%,rgba(4,8,12,.82) 100%);
}
.mf-grain{
  position:absolute;inset:0;z-index:1;pointer-events:none;opacity:.2;mix-blend-mode:overlay;
  background-size:180px 180px;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.mf-label{
  position:relative;z-index:3;margin:0 0 clamp(1.4rem,3vh,2.2rem);
  display:flex;align-items:center;gap:.7rem;
  font-size:clamp(.7rem,1.5vw,.82rem);letter-spacing:.28em;text-transform:uppercase;
  /* The backdrop is a daylight frame now, so the label needs its own weight
     against a bright sky rather than against near-black. */
  color:rgba(255,255,255,.92);text-shadow:0 1px 14px rgba(0,0,0,.55);
}
.mf-label b{color:var(--cyan)}
.manifesto-inner{position:relative;z-index:3;width:var(--shell);margin-inline:auto}
.manifesto blockquote{
  margin:0;font-weight:800;letter-spacing:-.035em;line-height:1.05;
  font-size:clamp(2rem,6.6vw,5.4rem);max-width:19ch;color:#fff;
}
.manifesto .w{
  display:inline-block;opacity:.22;transform:translateY(.14em);
  transition:opacity .5s var(--ease),transform .5s var(--ease);
}
.manifesto .w.on{opacity:1;transform:none}
.manifesto .w.hot{
  background:linear-gradient(to left,#8fd8f5 0%,var(--cyan) 100%);
  -webkit-background-clip:text;background-clip:text;color:transparent;
}
.manifesto cite{
  display:block;margin-top:3rem;font-style:normal;
  font-size:.78rem;letter-spacing:.26em;color:var(--ink-faint);
}
/* Unpositioned, this row painted *under* the wash and the grain — the .82
   black at the foot of the gradient was falling across white numerals and
   turning them grey. It belongs on the copy layer with the quote. */
.facts{
  position:relative;z-index:3;
  width:var(--shell);margin:clamp(4rem,8vw,7rem) auto 0;
  display:grid;grid-template-columns:repeat(3,1fr);
  gap:clamp(1.5rem,4vw,4rem);
}
.fact{position:relative;padding-block-start:1.6rem}
/* The rule is the frame now — it draws itself as the strip arrives. */
.fact::before{
  content:"";position:absolute;inset-block-start:0;inset-inline:0;height:1px;
  background:var(--line);
}
.fact::after{
  content:"";position:absolute;inset-block-start:0;inset-inline-start:0;height:1px;width:100%;
  background:#fff;transform:scaleX(0);transform-origin:inline-start;
  transition:transform 1.1s var(--ease);
}
.facts.in .fact::after{transform:scaleX(1)}
.facts.in .fact:nth-child(2)::after{transition-delay:.14s}
.facts.in .fact:nth-child(3)::after{transition-delay:.28s}
.fact b{
  display:block;font-size:clamp(2.8rem,7vw,5.6rem);font-weight:800;
  letter-spacing:-.05em;line-height:.92;direction:ltr;text-align:right;
  color:#fff;text-shadow:0 2px 24px rgba(0,0,0,.45);
  font-variant-numeric:tabular-nums;
}
.fact span{
  display:block;margin-top:1rem;font-size:clamp(.92rem,1.15vw,1.02rem);
  line-height:1.7;color:rgba(255,255,255,.8);max-width:26ch;
  text-shadow:0 1px 12px rgba(0,0,0,.5);
}
@media(max-width:760px){.facts{grid-template-columns:1fr;gap:2.2rem}}

/* ═══ CASES — work they actually pulled off ══════════════════════ */
.cases{padding:10rem 0 8rem}
.case-list{width:var(--shell);margin-inline:auto;display:grid;gap:6rem}
.case{display:grid;grid-template-columns:1fr 1fr;align-items:center;gap:clamp(2rem,5vw,6rem)}
/* Alternate which side the photograph lands on so the column never marches. */
.case:nth-child(even) .case-media{order:-1}
.case-media{position:relative;overflow:hidden;border-radius:3px;aspect-ratio:4/3}
.case-media img{
  width:100%;height:100%;object-fit:cover;
  transform:scale(1.06);transition:transform 1.2s var(--ease);
}
.case:hover .case-media img{transform:scale(1)}
.case-num{
  direction:ltr;text-align:right;margin:0 0 1.1rem;
  font-size:.76rem;letter-spacing:.3em;color:var(--cyan);
}
.case h3{font-weight:700;font-size:clamp(1.4rem,2.6vw,2.1rem);letter-spacing:-.02em;line-height:1.2}
.case p{margin:1.3rem 0 0;color:var(--ink-soft);line-height:1.9;max-width:44ch}

/* ═══ LEAD — the form ════════════════════════════════════════════ */
.lead{position:relative;padding:clamp(7rem,11vw,11rem) 0;background:#1786b8;color:#fff;overflow:hidden}
.lead-inner{
  position:relative;z-index:2;width:var(--shell);margin-inline:auto;
  display:grid;grid-template-columns:1fr 1fr;gap:clamp(2.5rem,6vw,7rem);align-items:start;
}
.lead h2{
  font-weight:800;font-size:clamp(2rem,5.2vw,4.2rem);letter-spacing:-.035em;line-height:1.02;
  color:#fff;
}
.lead-aside p{color:rgba(255,255,255,.88);line-height:1.9;margin:1.6rem 0 0;max-width:36ch}
.lead-direct{margin-top:3rem;display:grid;gap:1.1rem}
.lead-direct a{
  display:flex;align-items:center;gap:.8rem;width:max-content;
  font-size:1.05rem;color:#fff;border-bottom:1px solid rgba(255,255,255,.45);
  padding-bottom:.35rem;transition:border-color .4s,color .4s;
}
.lead-direct a:hover{border-color:#fff;color:#0b3c52}

.form{display:grid;gap:1.6rem}
.field{position:relative;display:grid}
.field label{
  font-size:.74rem;letter-spacing:.2em;text-transform:uppercase;
  color:rgba(255,255,255,.45);margin-bottom:.7rem;
}
.field input,.field select,.field textarea{
  font:inherit;font-size:1rem;color:#fff;background:transparent;
  border:0;border-bottom:1px solid rgba(255,255,255,.22);
  padding:.7rem 0;border-radius:0;
  transition:border-color .4s var(--ease);
}
.field textarea{resize:vertical;min-height:3.2rem}
.field select option{background:#111;color:#fff}
.field input:focus,.field select:focus,.field textarea:focus{outline:none;border-color:var(--cyan)}
.field .err{
  font-size:.78rem;color:#ff8f7a;margin-top:.5rem;min-height:1em;
  opacity:0;transition:opacity .3s;
}
.field.invalid input,.field.invalid select,.field.invalid textarea{border-color:#ff8f7a}
.field.invalid .err{opacity:1}
.form-row{display:grid;grid-template-columns:1fr 1fr;gap:1.6rem}
.form-submit{
  margin-top:.6rem;justify-self:start;
  background:var(--paper);color:var(--ink);border-color:var(--paper);
}
.form-submit:hover{background:var(--cyan);border-color:var(--cyan);color:var(--ink)}
.form-note{font-size:.8rem;color:rgba(255,255,255,.4);margin:0;line-height:1.7}
.form-done{display:none;padding:2rem 0;font-size:1.15rem;line-height:1.7}
.form.sent .form-done{display:block}
.form.sent .form-body{display:none}

/* ═══ FOOTER ═════════════════════════════════════════════════════ */
.foot{padding:5rem 0 3rem;border-block-start:1px solid var(--line)}
.foot-inner{
  width:var(--shell);margin-inline:auto;
  display:flex;flex-wrap:wrap;gap:2.5rem;align-items:flex-start;justify-content:space-between;
}
.foot img{width:132px;height:auto}
.foot-nav{display:flex;flex-wrap:wrap;gap:1.6rem;font-size:.92rem;color:var(--ink-soft)}
.foot-nav a:hover{color:var(--cyan)}
.foot-meta{
  width:var(--shell);margin:3.5rem auto 0;padding-top:1.6rem;
  border-block-start:1px solid var(--line);
  display:flex;flex-wrap:wrap;gap:1rem;justify-content:space-between;
  font-size:.8rem;color:var(--ink-faint);
}

/* ═══ INNER PAGE HEADER (contact and friends) ════════════════════ */
.page-head{
  padding:12rem 0 5rem;width:var(--shell);margin-inline:auto;
}
.page-head .eyebrow{text-align:start}
.page-head h1{
  font-weight:800;font-size:clamp(2.4rem,7vw,5.6rem);line-height:.98;letter-spacing:-.04em;
  background:var(--brand-grad);
  -webkit-background-clip:text;background-clip:text;color:transparent;
  max-width:16ch;
}
.page-head p{margin:2rem 0 0;max-width:48ch;color:var(--ink-soft);line-height:1.9;font-size:1.08rem}

@media(max-width:900px){
  .clients{padding:6rem 0 5rem}
  .manifesto,.cases,.lead{padding:6rem 0}
  .case{grid-template-columns:1fr;gap:1.8rem}
  .case:nth-child(even) .case-media{order:0}
  .case-list{gap:4rem}
  .lead-inner{grid-template-columns:1fr}
  .form-row{grid-template-columns:1fr}
  .page-head{padding:9rem 0 3rem}
}

@media(prefers-reduced-motion:reduce){
  .manifesto .w{opacity:1;transform:none}
  .marquee-row{transform:none!important}
  .case-media img{transform:none}
}


/* ── rotating word, reusable ─────────────────────────────────────
   Same device as the hero: two copies on one vertical move, inside a
   slot already locked to the widest word. */
.roll{display:inline-block;position:relative;vertical-align:top;height:1.16em;line-height:1.16;overflow:hidden}
.roll b{
  display:block;font-weight:inherit;line-height:1.16;white-space:nowrap;
  background:var(--brand-grad);
  -webkit-background-clip:text;background-clip:text;color:transparent;
  transition:transform .66s cubic-bezier(.16,1,.3,1);
}
@supports not ((-webkit-background-clip:text) or (background-clip:text)){.roll b{color:var(--blue)}}
@media(prefers-reduced-motion:reduce){.roll b{transition:none}}