/* VarFlux.ca — shared styles (brand: VarFlux L2) */
:root {
  --paper: #F5F1EA;
  --white: #FFFDF9;
  --ink: #1D1B19;
  --coral-light: #F2A68C;
  --coral: #E2552D;
  --coral-deep: #C9452A;
  --cream: #FFF7F0;
  --gray: #6B655E;
  --line: #E4DDD2;

  /* product colours */
  --p-merge: #1F7A7A;
  --p-tasks: #C98A12;
  --p-hr: #7A4E9C;

  --radius: 16px;
  --max: 1160px;
  --shadow: 0 1px 2px rgba(29,27,25,.05), 0 8px 24px rgba(29,27,25,.07);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Sora", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
main { overflow-x: clip; } /* sliding elements never cause sideways scrolling */
a { color: inherit; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -0.03em; margin: 0 0 .5em; font-weight: 600; }
h1 { font-size: clamp(2.2rem, 5.4vw, 4rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.2rem; letter-spacing: -0.02em; }
p { margin: 0 0 1em; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; z-index: 100; background: var(--ink); color: var(--paper); padding: 8px 12px; border-radius: 8px; }

/* ---------- Header ---------- */
/* Frozen plain logo on the left + centred floating glass bar. Once you scroll, a soft
   paper-coloured fade sits behind the header so page text never collides with the logo. */
.site-header { position: sticky; top: 0; z-index: 50; padding: 14px 16px 0; pointer-events: none; }
.site-header::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: calc(100% + 28px); z-index: -1;
  background: linear-gradient(to bottom, #F5F1EA 0%, #F5F1EA 70%, rgba(245,241,234,0) 100%);
  opacity: 0; transition: opacity .35s, background .35s;
}
.site-header.scrolled::before { opacity: 1; }
.site-header.on-dark::before { background: linear-gradient(to bottom, #1D1B19 0%, #1D1B19 70%, rgba(29,27,25,0) 100%); }
.header-inner {
  max-width: var(--max); margin: 0 auto; padding: 0 8px;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
}
.brand { pointer-events: auto; justify-self: start; position: relative; display: flex; align-items: center; height: 64px; transition: transform .3s cubic-bezier(.2,.8,.2,1); }
.brand:hover { transform: translateY(-1px); }
.brand img { height: 30px; width: auto; display: block; transition: opacity .3s; }
.brand .logo-dark { position: absolute; left: 0; top: 50%; translate: 0 -50%; opacity: 0; }
.site-header.on-dark .logo-light { opacity: 0; }
.site-header.on-dark .logo-dark { opacity: 1; }
.nav {
  grid-column: 2; pointer-events: auto; position: relative; height: 64px;
  padding: 0 10px 0 14px; display: flex; align-items: center; gap: 20px;
  background: rgba(255,253,249,.62);
  -webkit-backdrop-filter: blur(18px) saturate(1.6); backdrop-filter: blur(18px) saturate(1.6);
  border: 1px solid rgba(255,255,255,.75); border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(29,27,25,.06), 0 8px 30px rgba(29,27,25,.07), inset 0 1px 0 rgba(255,255,255,.9);
  transition: height .35s cubic-bezier(.2,.8,.2,1), background .35s, box-shadow .35s;
}
.site-header.scrolled .nav, .site-header.scrolled .brand { height: 58px; }
.site-header.scrolled .nav {
  background: rgba(255,253,249,.8);
  box-shadow: 0 0 0 1px rgba(29,27,25,.07), 0 16px 40px rgba(29,27,25,.13), inset 0 1px 0 rgba(255,255,255,.9);
}

.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links > li { position: relative; }
.nav-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 10px 14px; border-radius: 10px;
  font: inherit; font-size: .95rem; color: var(--ink); text-decoration: none;
  background: none; border: 0; cursor: pointer;
}
.nav-link { position: relative; transition: background .2s, color .2s; }
.nav-link::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 5px; height: 2px; border-radius: 2px;
  background: var(--coral); transform: scaleX(0); transform-origin: left; transition: transform .3s cubic-bezier(.2,.8,.2,1);
}
.nav-link:hover::after, .nav-link[aria-current="page"]::after { transform: scaleX(1); }
.nav-link[aria-expanded="true"] { background: rgba(29,27,25,.06); }
.nav-link[aria-expanded="true"]::after { transform: scaleX(0); }
.nav-link[aria-current="page"] { color: var(--coral-deep); font-weight: 600; }
.nav-link .chev { width: 10px; height: 10px; transition: transform .2s; }
.nav-link[aria-expanded="true"] .chev { transform: rotate(180deg); }
.soon-tag {
  font-size: .62rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  background: var(--cream); color: var(--coral-deep); border: 1px solid var(--coral-light);
  padding: 1px 6px; border-radius: 999px;
}
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }

.lang { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; background: var(--white); }
.lang a, .lang span {
  font-size: .78rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; text-decoration: none; color: var(--gray);
}
.lang span { background: var(--ink); color: var(--paper); }
.lang a:hover { color: var(--ink); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 600; font-size: .95rem;
  padding: 12px 22px; border-radius: 999px; text-decoration: none;
  border: 1.5px solid transparent; cursor: pointer;
  transition: transform .25s cubic-bezier(.2,.8,.2,1), background .2s, color .2s, box-shadow .25s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.97); transition-duration: .08s; }
.btn-primary:hover { box-shadow: 0 10px 24px rgba(201,69,42,.28); }
.btn .arr { width: 16px; height: 16px; transition: transform .3s cubic-bezier(.2,.8,.2,1); }
.btn:hover .arr { transform: translateX(4px); }
.lang a { transition: color .2s, background .2s; }
.lang a:hover { background: rgba(29,27,25,.06); }
.btn-primary { background: var(--coral); color: var(--cream); }
.btn-primary:hover { background: var(--coral-deep); }
.btn-ghost { border-color: var(--ink); color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn-sm { padding: 9px 16px; font-size: .88rem; }

/* Mega menu */
.mega {
  position: absolute; top: calc(100% + 10px); left: -16px;
  width: 440px; padding: 10px;
  background: rgba(255,253,249,.86);
  -webkit-backdrop-filter: blur(18px) saturate(1.6); backdrop-filter: blur(18px) saturate(1.6);
  border: 1px solid rgba(255,255,255,.8); border-radius: 20px;
  box-shadow: 0 0 0 1px rgba(29,27,25,.06), 0 20px 50px rgba(29,27,25,.14);
  opacity: 0; visibility: hidden; transform: translateY(-8px) scale(.98); transform-origin: top left;
  transition: opacity .22s, transform .3s cubic-bezier(.2,.8,.2,1), visibility .22s;
}
.mega.open { opacity: 1; visibility: visible; transform: none; }
.mega .mega-item { opacity: 0; transform: translateY(6px); transition: opacity .3s, transform .35s cubic-bezier(.2,.8,.2,1), background .2s; }
.mega.open .mega-item { opacity: 1; transform: none; }
.mega.open .mega-item:nth-child(2) { transition-delay: .05s; }
.mega.open .mega-item:nth-child(3) { transition-delay: .1s; }
.mega-item .p-icon { transition: transform .35s cubic-bezier(.3,1.6,.5,1); }
.mega-item:hover .p-icon { transform: scale(1.08) rotate(-5deg); }
.mega-item {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 12px; border-radius: 12px; text-decoration: none;
}
.mega-item { cursor: default; }
.foot-soon { color: #8C857C; font-size: .8rem; }

/* Company sections */
.mission { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.mission-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 56px; align-items: end; }
.mission h2 { font-size: clamp(1.9rem, 3.8vw, 2.9rem); margin: 0; }
.mission p { font-size: 1.1rem; font-weight: 300; color: #4A453F; margin: 0; }
.values.values-4 { grid-template-columns: repeat(4, 1fr); gap: 32px; }
.values-4 .value { border-top: 1px solid #D8CFC2; padding-top: 22px; }
.name-band { padding-top: 0; }
.name-grid {
  display: grid; grid-template-columns: auto 1fr; gap: 48px; align-items: center;
  background: var(--white); border: 1px solid var(--line); border-radius: 24px; padding: 48px;
}
.name-grid img { width: 200px; height: auto; }
.name-grid h2 { margin-bottom: 12px; }
.name-grid p { color: #4A453F; font-weight: 300; font-size: 1.05rem; margin: 0; max-width: 640px; }
.w-icon {
  flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  background: #EDE6DB; color: var(--ink);
}
.w-icon svg { width: 18px; height: 18px; }
.mega-item strong { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.mega-item small { display: block; color: var(--gray); font-size: .84rem; line-height: 1.45; margin-top: 2px; }

.p-icon {
  flex: none; width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center; color: #fff;
}
.p-icon svg { width: 22px; height: 22px; }
.p-merge { background: var(--p-merge); }
.p-tasks { background: var(--p-tasks); }
.p-hr { background: var(--p-hr); }


/* ---------- Hero ---------- */
.hero { padding: 88px 0 72px; position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; }
.eyebrow {
  display: block; word-spacing: .32em;
  font-size: .9rem; color: var(--gray); margin-bottom: 22px; letter-spacing: -0.01em;
}
.eyebrow b { color: var(--coral); font-weight: 600; }
.hero h1 .accent { color: var(--coral-deep); font-weight: 300; }
.hero .lead { font-size: 1.15rem; color: var(--gray); max-width: 560px; margin: 18px 0 32px; font-weight: 300; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
@keyframes float { 50% { transform: translateY(-6px); } }

/* Hero flow visual (Flowmapp-style connected cards, 520x480 grid in %) */
.flow {
  position: relative; width: 100%; max-width: 520px; aspect-ratio: 520 / 480; justify-self: end;
  transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .5s cubic-bezier(.2,.8,.2,1);
  animation: fade-in 1.8s .5s both;
}
@keyframes fade-in { from { opacity: 0; } }
.flow-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.flow-lines path {
  fill: none; stroke: var(--coral); stroke-width: 2.5; stroke-linecap: round;
  stroke-dasharray: 7 9; animation: flow-dash 2.6s linear infinite;
  vector-effect: non-scaling-stroke;
}
.flow-lines circle { fill: var(--white); stroke: var(--coral); stroke-width: 2.5; vector-effect: non-scaling-stroke; }
@keyframes flow-dash { to { stroke-dashoffset: -32; } }
.flow-card, .flow-done {
  position: absolute; display: flex; align-items: center; gap: 12px;
  background: var(--white); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 1px 2px rgba(29,27,25,.05), 0 10px 28px rgba(29,27,25,.08);
  padding: 0 14px; box-sizing: border-box; height: 15%;
  animation: float 9s ease-in-out infinite;
}
.flow-card { left: 0; width: 40.4%; }
.flow-card-1 { top: 4.17%; }
.flow-card-2 { top: 42.5%; animation-delay: -2s; }
.flow-card-3 { top: 80.83%; animation-delay: -4s; }
.flow-card .p-icon { width: 36px; height: 36px; border-radius: 10px; }
.flow-card .p-icon svg { width: 18px; height: 18px; }
.flow-card strong, .flow-done strong { display: block; font-size: .9rem; font-weight: 600; line-height: 1.25; letter-spacing: -0.01em; }
.flow-card small, .flow-done small { display: block; font-size: .74rem; color: var(--gray); line-height: 1.3; }
.flow-mark { position: absolute; left: 57.7%; top: 35.4%; width: 28.8%; height: auto; }
.flow-done { left: 52.9%; top: 81.25%; width: 38.5%; height: 12.5%; border-color: var(--coral-light); background: var(--cream); animation-delay: -3s; }
.flow-check { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--coral-deep); color: var(--cream); display: grid; place-items: center; }
.flow-check svg { width: 16px; height: 16px; }
.flow-check path { stroke-dasharray: 24; stroke-dashoffset: 24; animation: draw 1s 2s cubic-bezier(.2,.8,.2,1) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.flow-mark { animation: breathe 5s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.045); } }
.flow-card, .flow-done { transition: box-shadow .3s, border-color .3s; }
.flow-card:hover, .flow-done:hover { border-color: var(--coral-light); box-shadow: 0 1px 2px rgba(29,27,25,.05), 0 16px 36px rgba(201,69,42,.16); }

/* Hero entrance */
.hero-grid > div:first-child > * { animation: rise 1.3s cubic-bezier(.16,.84,.3,1) both; }
.hero-grid > div:first-child > :nth-child(2) { animation-delay: .15s; }
.hero-grid > div:first-child > :nth-child(3) { animation-delay: .3s; }
.hero-grid > div:first-child > :nth-child(4) { animation-delay: .45s; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }

/* Scroll reveal (only when JS runs; content stays visible without it) */
.js [data-reveal] {
  opacity: 0; transform: translateY(30px);
  transition: opacity 1.4s cubic-bezier(.16,.84,.3,1), transform 1.4s cubic-bezier(.16,.84,.3,1);
  transition-delay: calc(var(--d, 0) * 180ms);
}
.js [data-reveal].in { opacity: 1; transform: none; }
/* Approach line is drawn by the scroll position (--sp, 0 to 1) */
.steps::before { transform-origin: left; transform: scaleX(var(--sp, 1)); }
.step-badge { transition: box-shadow .8s, background .8s; }
.step.on .step-badge { box-shadow: 0 0 0 5px rgba(226,85,45,.14); }
.step.on h3 { color: var(--coral-deep); transition: color .8s; }
.js .step .step-badge { transform: scale(.8); transition: transform .9s cubic-bezier(.3,1.5,.5,1); transition-delay: calc(var(--d, 0) * 220ms + .4s); }
.js .step.in .step-badge { transform: none; }

/* Values: coral line fills on hover */
.values-4 .value { position: relative; }
.values-4 .value::before {
  content: ""; position: absolute; left: 0; top: -1px; width: 100%; height: 2px; background: var(--coral);
  transform: scaleX(0); transform-origin: left; transition: transform .45s cubic-bezier(.2,.8,.2,1);
}
.values-4 .value:hover::before { transform: scaleX(1); }
.value .num { display: inline-block; transition: transform .3s cubic-bezier(.2,.8,.2,1); }
.value:hover .num { transform: translateX(6px); }
/* ---------- Scroll-linked motion (values set by main.js) ---------- */
.scroll-progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 70; pointer-events: none;
  background: linear-gradient(90deg, var(--coral-light), var(--coral));
  transform-origin: left; transform: scaleX(var(--progress, 0));
}
/* hero: copy sinks and fades, flow drifts up as you scroll away */
.hero-copy { transform: translateY(calc(var(--hp, 0) * 70px)); opacity: calc(1 - var(--hp, 0) * .75); }
.flow { transform: perspective(1000px) translateY(calc(var(--hp, 0) * -60px)) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); }
/* mission: words light up one by one */
.js .mission h2 .w { color: #CFC6B9; transition: color .9s ease; }
.js .mission h2 .w.lit { color: var(--ink); }
/* name: the mark turns as it passes */
.name-grid img { rotate: calc((var(--np, .5) - .5) * -36deg); transition: scale .6s cubic-bezier(.3,1.4,.5,1); }
.name-grid:hover img { scale: 1.06; }
/* contact banner grows into place */
.cta-band { scale: calc(.93 + var(--cp, 1) * .07); }
/* values: alternate columns travel a little further */
@media (min-width: 941px) {
  .values-4 .value:nth-child(even) { translate: 0 calc((1 - var(--vp, 1)) * 48px); }
}
.cta-band .btn-primary:hover { box-shadow: 0 10px 30px rgba(255,106,69,.35); }
.site-footer a { transition: color .2s; }

/* How it works: step badges joined by a coral line */
.how { padding-bottom: 40px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; position: relative; }
.steps::before {
  content: ""; position: absolute; left: 8%; right: 8%; top: 17px; height: 0;
  border-top: 2.5px dashed var(--coral); opacity: .7;
}
.step { position: relative; }
.step-badge {
  position: relative; display: inline-block; font-size: .72rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  padding: 8px 14px; border-radius: 999px; color: var(--ink); border: 1px solid rgba(29,27,25,.08); margin-bottom: 20px;
}
.step-badge b { color: var(--coral-deep); }
.step-1 { background: #DDF0EC; }
.step-2 { background: #FBE9C8; }
.step-3 { background: #FAD9CC; }
.step h3 { margin-bottom: 6px; }
.step p { color: var(--gray); font-weight: 300; margin: 0; }

/* ---------- Sections ---------- */
section { padding: 80px 0; }
.section-head { max-width: 640px; margin-bottom: 44px; }
.section-head p { color: var(--gray); font-size: 1.05rem; font-weight: 300; }
.kicker { font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--coral-deep); margin-bottom: 10px; display: block; }

.products { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; display: flex; flex-direction: column; gap: 14px;
  transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; border-radius: var(--radius) var(--radius) 0 0; background: var(--c); }
.card .p-icon { width: 52px; height: 52px; border-radius: 14px; }
.card .p-icon svg { width: 26px; height: 26px; }
.card h3 { margin: 4px 0 0; }
.card p { color: var(--gray); margin: 0; font-size: .95rem; }
.card ul { margin: 0; padding: 0; list-style: none; font-size: .9rem; }
.card li { padding-left: 22px; position: relative; margin: 6px 0; }
.card li::before { content: ""; position: absolute; left: 0; top: .55em; width: 10px; height: 2px; background: var(--c); }
.card .badge { align-self: flex-start; margin-top: auto; }
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .75rem; font-weight: 600; padding: 5px 12px; border-radius: 999px;
  background: var(--cream); color: var(--coral-deep); border: 1px solid var(--coral-light);
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--coral); animation: pulse 1.8s infinite; }
@keyframes pulse { 50% { opacity: .3; } }

.values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; }
.value .num { font-size: .85rem; font-weight: 600; color: var(--coral); margin-bottom: 10px; display: block; }
.value p { color: var(--gray); font-weight: 300; }

.cta-band {
  background: var(--ink); color: var(--paper); border-radius: 24px;
  padding: 56px; display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center;
}
.cta-band h2 { margin-bottom: 8px; }
.cta-band p { color: #BDB5AA; margin: 0; font-weight: 300; }
.cta-band .btn-primary { background: #FF6A45; color: var(--ink); }
.cta-band .btn-primary:hover { background: var(--coral-light); }

/* ---------- Simple pages ---------- */
.page-hero { padding: 80px 0 40px; }
.page-hero p { font-size: 1.1rem; color: var(--gray); max-width: 640px; font-weight: 300; }
.soon-panel {
  background: var(--white); border: 1px solid var(--line); border-radius: 24px;
  padding: 48px; text-align: center; max-width: 760px; margin: 0 auto;
}
.soon-panel img { width: 96px; margin: 0 auto 20px; }
.soon-panel p { color: var(--gray); }
.soon-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 28px 0; text-align: left; }
.soon-list div { background: var(--paper); border-radius: 12px; padding: 14px 16px; font-size: .95rem; }
.soon-list div b { display: block; font-weight: 600; }
.soon-list div span { color: var(--gray); font-size: .85rem; }
.prose { max-width: 720px; }
.prose p { font-size: 1.05rem; color: #3A3632; font-weight: 300; }
.prose h2 { margin-top: 1.4em; font-size: 1.6rem; }
.contact-box { margin-top: 32px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.contact-box a { color: var(--coral-deep); font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #BDB5AA; padding: 64px 0 28px; margin-top: 40px; }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 32px; }
.foot-brand img { height: 26px; width: auto; margin-bottom: 16px; }
.foot-brand p { font-size: .9rem; max-width: 280px; font-weight: 300; }
.site-footer h4 { color: var(--paper); font-size: .85rem; font-weight: 600; margin: 0 0 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; font-size: .9rem; }
.site-footer li { margin: 8px 0; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: #FF8A6B; }
.foot-bottom { border-top: 1px solid #34302C; margin-top: 48px; padding-top: 22px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; font-size: .82rem; }
.tagline-dots b { color: #FF6A45; }

/* Mid-size screens: logo and bar stay on one row; the bar moves right and gets compact */
@media (max-width: 1120px) {
  .header-inner { grid-template-columns: auto 1fr; }
  .nav { justify-self: end; gap: 10px; }
  .nav-link { padding: 10px 10px; }
}
@media (max-width: 960px) {
  .site-header { padding: 10px 12px 0; }
  .brand img { height: 26px; }
  .nav, .site-header.scrolled .nav { height: 54px; gap: 6px; padding: 0 6px 0 8px; }
  .nav-links { gap: 0; }
  .nav-links .soon-tag { display: none; }
  .nav-link { padding: 8px 9px; font-size: .9rem; }
  .nav-link::after { left: 9px; right: 9px; }
  .nav-right { gap: 8px; }
  .nav-right .btn-sm { padding: 8px 14px; font-size: .86rem; }
  .lang a, .lang span { padding: 4px 9px; }
}
/* Phones: logo + language/contact plain at the top; the glass link bar floats at the bottom */
@media (max-width: 720px) {
  .header-inner { grid-template-columns: auto 1fr; padding: 0 4px; }
  .brand, .site-header.scrolled .brand { height: 48px; }
  .brand img { height: 24px; }
  .nav { display: contents; }
  .nav-right { justify-self: end; pointer-events: auto; }
  .nav-links {
    position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 60;
    pointer-events: auto; justify-content: space-around; gap: 0; padding: 5px 6px; border-radius: 999px;
    background: rgba(255,253,249,.72);
    -webkit-backdrop-filter: blur(18px) saturate(1.6); backdrop-filter: blur(18px) saturate(1.6);
    border: 1px solid rgba(255,255,255,.8);
    box-shadow: 0 0 0 1px rgba(29,27,25,.07), 0 12px 36px rgba(29,27,25,.16), inset 0 1px 0 rgba(255,255,255,.9);
  }
  .nav-links > li { position: static; flex: none; }
  .nav-link { padding: 8px 8px; font-size: .86rem; white-space: nowrap; min-height: 44px; }
  .nav-link::after { left: 8px; right: 8px; bottom: 7px; }
  /* the Products menu opens upward from the bottom bar */
  .mega { left: 0; right: 0; width: auto; top: auto; bottom: calc(100% + 10px); transform-origin: bottom center; transform: translateY(8px) scale(.98); }
  .mega.open { transform: none; }
  .site-footer { padding-bottom: 104px; }
}
@media (max-width: 380px) {
  .brand img { height: 22px; }
  .lang a, .lang span { padding: 4px 7px; }
  .nav-right .btn-sm { padding: 8px 12px; font-size: .8rem; }
  .nav-link { padding: 8px 5px; font-size: .8rem; }
}
.btn { white-space: nowrap; }

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
  .hero-grid, .cards, .values, .foot-grid { grid-template-columns: 1fr; }
  .flow { justify-self: center; max-width: 440px; margin-top: 8px; }
  /* small screens: cards grow to fit their text, centred on the line ends */
  .flow-card, .flow-done { height: auto; min-height: 15%; padding: 8px 10px; gap: 8px; animation: none; transform: translateY(-50%); }
  .flow-done { min-height: 12.5%; }
  .flow-card-1 { top: 11.67%; } .flow-card-2 { top: 50%; } .flow-card-3 { top: 88.33%; }
  .flow-done { top: 87.5%; }
  .flow-card .w-icon { width: 28px; height: 28px; border-radius: 8px; }
  .flow-card .w-icon svg { width: 15px; height: 15px; }
  .mission-grid, .values.values-4 { grid-template-columns: 1fr; gap: 24px; }
  .name-grid { grid-template-columns: 1fr; padding: 32px 24px; gap: 24px; }
  .name-grid img { width: 120px; }
  .flow-card strong, .flow-done strong { font-size: .76rem; }
  .flow-card small, .flow-done small { font-size: .68rem; }
  .flow-check { width: 24px; height: 24px; }
  .steps { grid-template-columns: 1fr; gap: 32px; }
  .steps::before { left: 22px; right: auto; top: 18px; bottom: 18px; height: auto; border-top: 0; border-left: 2.5px dashed var(--coral); transform-origin: top; }
  .steps::before { transform: scaleY(var(--sp, 1)); }
  .step { padding-left: 52px; }
  .step-badge { margin-left: -52px; }
  .step h3, .step p { position: relative; background: var(--paper); }

  /* ---- Phone/tablet scroll motion: driven by each element's own --ep (0 entering, 1 settled) ---- */
  .section-head h2, .mission-grid h2 { translate: calc((1 - var(--ep, 1)) * -36px) 0; }
  .flow-card { translate: calc((1 - var(--ep, 1)) * -90px) 0; opacity: calc(.25 + var(--ep, 1) * .75); }
  .flow-card-2 { translate: calc((1 - var(--ep, 1)) * -130px) 0; }
  .flow-card-3 { translate: calc((1 - var(--ep, 1)) * -170px) 0; }
  .flow-done { translate: calc((1 - var(--ep, 1)) * 110px) 0; opacity: calc(.25 + var(--ep, 1) * .75); }
  .flow-mark { rotate: calc((1 - var(--ep, 1)) * -40deg); }
  .step { translate: calc((1 - var(--ep, 1)) * 60px) 0; }
  .value:nth-child(odd) { translate: calc((1 - var(--ep, 1)) * -70px) 0; rotate: calc((1 - var(--ep, 1)) * -3deg); }
  .value:nth-child(even) { translate: calc((1 - var(--ep, 1)) * 70px) 0; rotate: calc((1 - var(--ep, 1)) * 3deg); }
  .name-grid img { rotate: calc((var(--np, .5) - .5) * -70deg); }
  .cta-band { scale: calc(.86 + var(--cp, 1) * .14); }
  .hero { padding: 56px 0 48px; }
  .cta-band { grid-template-columns: 1fr; padding: 36px 28px; }
  .soon-list { grid-template-columns: 1fr; }
  .soon-panel { padding: 32px 22px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js [data-reveal], .js .step .step-badge, .js .steps::before { opacity: 1 !important; transform: none !important; }
  .flow-check path { stroke-dashoffset: 0 !important; }
  .hero-copy { transform: none !important; opacity: 1 !important; }
  .name-grid img { rotate: none !important; }
  .cta-band { scale: none !important; }
  .section-head h2, .mission-grid h2, .flow-card, .flow-done, .flow-mark, .step, .value { translate: none !important; rotate: none !important; opacity: 1 !important; }
}
