/* ==========================================================
   MySmyle - main stylesheet
   Brand: blue #0D578D, green #86B140
   ========================================================== */

:root {
  --blue: #0D578D;
  --blue-d: #083F63;
  --blue-l: #1B78BA;
  --green: #86B140;
  --green-d: #63912A;
  --green-text: #4F7A1C;   /* green for small text: meets WCAG AA contrast on white and --soft */
  --ink: #0B1B2B;
  --muted: #536476;
  --line: #E3EAF1;
  --soft: #F4F8FB;
  --bg: #FFFFFF;
  --radius: 5.25px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --shadow: 0 4px 12px rgba(13, 87, 141, .08);
  --shadow-lg: 0 8px 20px rgba(13, 87, 141, .10);
  --font: sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
html.is-loading body { overflow: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.02em; }
b, strong { font-weight: 700; }
button { font: inherit; }
h1 { font-size: clamp(2.4rem, 5vw, 4.2rem); font-weight: 700; }
h2 { font-size: clamp(2rem, 3.6vw, 3rem); font-weight: 700; }
h3 { font-size: 1.4rem; font-weight: 700; }
p { margin: 0 0 1em; }

.container { width: min(100% - 32px, max(80%, 1160px)); margin-inline: auto; }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 200;
  background: var(--blue); color: #fff; padding: 10px 16px; border-radius: var(--radius);
}
.skip:focus { top: 16px; }

:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; border-radius: var(--radius); }

/* ---------- Loader: the MySmyle "journey" ---------- */
/* Hidden by default; main.js adds html.js, so visitors without JavaScript never get a stuck loader */
.loader {
  position: fixed; inset: 0; z-index: 999;
  display: none; place-items: center;
  background: radial-gradient(circle at 50% 45%, #fff 0%, #F2F7FB 70%, #E8F1F8 100%);
  transition: opacity .7s ease, visibility .7s ease;
}
.loader__inner { display: grid; justify-items: center; gap: 22px; }
.loader__mark { width: min(240px, 56vw); height: auto; overflow: visible; }

/* Dots travel in from far away and lock into place */
.loader .dt {
  transform-box: fill-box;
  transform-origin: center;
  opacity: 0;
  animation: dot-travel .75s cubic-bezier(.22, .9, .25, 1.15) var(--d) forwards;
}
.loader .dt.g { fill: var(--green); }
.loader .dt.b { fill: var(--blue); }

/* Start time (--d) and starting offset (--x, --y) for each piece, in document order */
.loader .ln:nth-of-type(1) { --d: .65s; }
.loader .ln:nth-of-type(2) { --d: 1.65s; }
.loader .dt:nth-of-type(1) { --d: 0s;    --x: -320px; --y: -220px; }
.loader .dt:nth-of-type(2) { --d: .3s;   --x: -180px; --y: 260px; }
.loader .dt:nth-of-type(3) { --d: .85s;  --x: -300px; --y: 180px; }
.loader .dt:nth-of-type(4) { --d: 1.05s; --x: -340px; --y: -20px; }
.loader .dt:nth-of-type(5) { --d: 1.2s;  --x: 60px;   --y: 320px; }
.loader .dt:nth-of-type(6) { --d: 1.4s;  --x: 320px;  --y: 240px; }
.loader .dt:nth-of-type(7) { --d: 1.85s; --x: 220px;  --y: -280px; }
.loader .dt:nth-of-type(8) { --d: 2.05s; --x: 340px;  --y: -200px; }

@keyframes dot-travel {
  0%   { opacity: 0; transform: translate(var(--x), var(--y)) scale(.25); }
  55%  { opacity: 1; }
  100% { opacity: 1; transform: translate(0, 0) scale(1); }
}

/* Lines connect the dots once both ends have arrived */
.loader .ln {
  stroke-width: 16;
  stroke-linecap: round;
  stroke-dasharray: 300;
  stroke-dashoffset: 300;
  animation: line-draw .5s ease-out var(--d) forwards;
}
.loader .ln.g { stroke: var(--green); }
.loader .ln.b { stroke: var(--blue); }
@keyframes line-draw { to { stroke-dashoffset: 0; } }

/* Finished logo gives a small "click" when complete */
.loader__mark { animation: mark-settle .6s ease 2.6s both; }
@keyframes mark-settle {
  0%, 100% { transform: scale(1); }
  45% { transform: scale(1.07); }
}

/* The real MySmyle wordmark (cut from the logo file), revealed left to right */
.loader__word {
  width: min(190px, 46vw); height: auto;
  clip-path: inset(0 100% 0 0);
  animation: word-reveal .8s var(--ease) 2.4s forwards;
}
@keyframes word-reveal { to { clip-path: inset(0 0 0 0); } }

.loader__bar {
  width: 160px; height: 4px; border-radius: 4px;
  background: var(--line); overflow: hidden;
}
.loader__bar i {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--green), var(--blue));
  animation: bar 3s cubic-bezier(.4, .1, .3, 1) forwards;
}
@keyframes bar { to { width: 100%; } }

html.js .loader { display: grid; }
html.is-ready .loader { opacity: 0; visibility: hidden; }
html.is-ready .loader__inner { transform: scale(1.06); transition: transform .8s var(--ease); }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .97);
  border-bottom: 1px solid transparent;
  transition: border-color .4s var(--ease), box-shadow .4s var(--ease);
}
.header.is-scrolled { border-color: var(--line); box-shadow: 0 6px 24px rgba(11, 27, 43, .05); }
.header__row { display: flex; align-items: center; justify-content: space-between; height: 88px; }
.brand img { width: 220px; }

.nav { display: flex; gap: 6px; }
.nav a {
  position: relative;
  color: var(--ink); font-weight: 600; font-size: 1.125rem;
  padding: 8px 14px; border-radius: var(--radius);
  transition: color .2s, background .2s;
}
.nav a:hover { color: var(--blue); background: var(--soft); }
.nav a.is-active { color: var(--blue); }
.nav a.is-active::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px;
  height: 3px; border-radius: 3px; background: var(--green);
}

.nav-toggle {
  display: none;
  width: 44px; height: 44px; border: 0; border-radius: var(--radius);
  background: var(--soft); cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.nav-toggle span { width: 20px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .3s, opacity .3s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Buttons & small parts ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 4px 12px; border-radius: var(--radius);
  font-weight: 700; font-size: 1.6rem;
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), background-color .25s ease, border-color .25s ease;
}
.btn--primary { background: var(--blue); color: #fff; box-shadow: 0 4px 10px rgba(13, 87, 141, .22); }
.btn--primary:hover { background: var(--blue-d); transform: translateY(-2px); }
.btn--ghost { color: var(--blue); border: 2px solid var(--line); background: #fff; }
.btn--ghost:hover { border-color: var(--blue); transform: translateY(-2px); }

.eyebrow {
  display: inline-block;
  font-size: 1.05rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--green-text); margin-bottom: 12px;
}
.lead { font-size: 1.3rem; color: var(--muted); max-width: 620px; }
.hl { color: var(--blue); position: relative; white-space: nowrap; }
.hl::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: .08em;
  height: .22em; background: rgba(134, 177, 64, .35); z-index: -1; border-radius: 4px;
}
/* Highlight under "Healthcare" draws in after the heading appears */
html.js .hl::after { transform: scaleX(0); transform-origin: left; transition: transform 1s var(--ease) .45s; }
html.js .in .hl::after { transform: scaleX(1); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  display: flex; align-items: center;
  min-height: calc(100vh - 88px);
  min-height: calc(100svh - 88px);
  padding: clamp(56px, 7vw, 96px) 0;
  background:
    radial-gradient(600px 400px at 85% 20%, rgba(134, 177, 64, .13), transparent 70%),
    radial-gradient(700px 500px at 10% 90%, rgba(13, 87, 141, .08), transparent 70%);
}
.hero__grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 8px; }

/* Product showcase: three cards joined by a line, like the dots in the logo */
.hero__art { display: grid; place-items: center; }
.showcase {
  position: relative;
  width: min(460px, 100%);
  display: grid; gap: 26px;
  text-align: left;
}
.showcase::before {
  content: ""; position: absolute;
  left: 52px; top: 48px; bottom: 48px; width: 3px; border-radius: 3px;
  background: linear-gradient(var(--green), var(--blue));
  opacity: .35;
}
.show-card {
  position: relative;
  display: flex; align-items: center; gap: 18px;
  padding: 20px 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  color: var(--ink);
}
/* Cards slide in one after another once the loader is done (no 3D, so text stays sharp) */
html.js .show-card { opacity: 0; }
html.is-ready .show-card { animation: card-in .9s var(--ease) calc(var(--i) * 140ms + 150ms) both; }
@keyframes card-in {
  from { opacity: 0; translate: 0 24px; }
  to { opacity: 1; translate: none; }
}
.show-card:nth-of-type(1) { --i: 0; }
.show-card:nth-of-type(2) { --i: 1; }
.show-card:nth-of-type(3) { --i: 2; }
.show-card:nth-of-type(2) { margin-left: 40px; margin-right: -40px; }
.show-card img { width: 60px; height: 60px; border-radius: var(--radius); flex: none; }
.show-card strong { display: block; font-size: 1.3rem; }
.show-card__sub { display: block; color: var(--muted); font-size: 1.1rem; }
.show-card:hover { border-color: var(--green); }

/* Logo-style dots drifting at different depths behind the hero */
.hero__dots { position: absolute; inset: 0; pointer-events: none; }
.hero__dots i {
  position: absolute; width: var(--s); height: var(--s); border-radius: 50%;
  background: var(--green); opacity: .22;
  transform: translate3d(0, calc(var(--hs, 0) * var(--d) * -1px), 0);
}
.hero__dots i.b { background: var(--blue); opacity: .16; }
/* Depth (--d), size (--s) and position of each dot */
.hero__dots i:nth-of-type(1) { --d: .15; --s: 44px; left: 6%;  top: 18%; }
.hero__dots i:nth-of-type(2) { --d: .35; --s: 18px; left: 44%; top: 12%; }
.hero__dots i:nth-of-type(3) { --d: .55; --s: 12px; left: 52%; top: 78%; }
.hero__dots i:nth-of-type(4) { --d: .25; --s: 56px; left: 88%; top: 70%; }
.hero__dots i:nth-of-type(5) { --d: .45; --s: 22px; left: 92%; top: 22%; }
.hero__dots i:nth-of-type(6) { --d: .6;  --s: 10px; left: 24%; top: 86%; }
.hero .container { position: relative; }

/* 3D logo that travels with the scroll (built by main.js) */
.logo3d {
  position: fixed; left: 0; top: 0; z-index: 40;
  width: 200px; height: 200px;
  pointer-events: none;
}
/* Loading intro: the 3D logo forms in the centre of the loading screen, above it */
.logo3d--intro { z-index: 1000; }
html.has-logo3d .loader__mark { visibility: hidden; } /* keeps its space; the 3D logo sits there */
.logo3d--intro .logo3d__dot {
  animation: dot3d-in 1s cubic-bezier(.2, .85, .25, 1.12) var(--delay) both;
}
.logo3d--intro .logo3d__rod { animation: rod3d-in .55s cubic-bezier(.3, .7, .3, 1) var(--delay) both; }
@keyframes dot3d-in {
  0%   { translate: var(--fx) var(--fy) var(--fz); scale: .15; opacity: 0; }
  55%  { opacity: 1; }
  100% { translate: 0 0 0; scale: 1; opacity: 1; }
}
@keyframes rod3d-in { from { width: 0; } }
.logo3d__fade { position: absolute; inset: 0; perspective: 800px; }
.logo3d__float { position: absolute; inset: 0; transform-style: preserve-3d; animation: logo3d-bob 8s ease-in-out infinite; }
.logo3d__obj {
  position: absolute; inset: 0;
  transform-style: preserve-3d;
  transform: rotateY(var(--ay, 0deg)) rotateX(var(--ax, 0deg));
}
.logo3d__dot, .logo3d__rod { position: absolute; left: 50%; top: 50%; }
/* Dots always face the viewer, so they read as spheres from every angle */
.logo3d__dot {
  width: var(--d); height: var(--d);
  margin: calc(var(--d) / -2) 0 0 calc(var(--d) / -2);
  border-radius: 50%;
  transform: translate3d(var(--x), var(--y), var(--z)) rotateX(calc(var(--ax, 0deg) * -1)) rotateY(calc(var(--ay, 0deg) * -1));
  background: radial-gradient(circle at 34% 30%, #C9E394 0%, #86B140 48%, #557F1F 100%);
}
.logo3d__dot.b { background: radial-gradient(circle at 34% 30%, #5FA3D6 0%, #0D578D 52%, #06355A 100%); }
.logo3d__rod {
  height: 7px; margin-top: -3.5px; border-radius: 4px;
  transform-origin: 0 50%; transform-style: preserve-3d;
  background: linear-gradient(#A4CB62, #6E9A2E);
}
.logo3d__rod.b { background: linear-gradient(#2D7DB8, #0A4774); }
.logo3d__rod::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: inherit; transform: rotateX(90deg); }
@keyframes logo3d-bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }


/* ---------- Sections ---------- */
.section { padding: clamp(64px, 9vw, 110px) 0; }

/* About: deep blue band with a slowly drifting network of dots and lines */
.about {
  position: relative; overflow: hidden;
  background: linear-gradient(170deg, #0A355A 0%, #0D578D 55%, #2F70AB 100%);
  color: #fff;
}
.about .container { position: relative; z-index: 1; }
.net { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; display: block; }
.about .eyebrow { color: #B9DB7E; }
.about h2 { color: #fff; }
.about__intro { font-size: 1.3rem; color: rgba(255, 255, 255, .82); max-width: 780px; }
.about__intro strong { color: #fff; }
.about .vm__card { color: var(--ink); border-color: rgba(255, 255, 255, .5); box-shadow: 0 8px 20px rgba(4, 30, 54, .25); }
.vm { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 32px; }
.vm__card {
  background: #fff; border-radius: var(--radius); padding: 30px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--green);
}
.vm__card:nth-child(2) { border-top-color: var(--blue); }
.vm__card p { color: var(--muted); margin: 0; }

/* Products */
.product {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 16px;
  position: relative;
}
/* Hover: lift with transform and fade in a pre-rendered shadow (no shadow repaints) */
.product::after, a.contact__card::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none;
  transition: opacity .45s var(--ease);
}
.product:hover, a.contact__card:hover { transform: translateY(-4px); }
.product:hover::after, a.contact__card:hover::after { opacity: 1; }
.product__head { display: flex; align-items: center; gap: 16px; width: 100%; }
.product__head img { width: 60px; height: 60px; border-radius: var(--radius); flex: none; box-shadow: var(--shadow); }
.product__head h3 { margin: 0 0 2px; }
.product__head p { margin: 0; color: var(--muted); font-size: 1.15rem; }
.product--wide { margin: 32px 0 20px; }
.product--wide .product__head { flex-wrap: wrap; }
.product--wide .product__head > div { flex: 1; min-width: 200px; }

.modules {
  list-style: none; padding: 0; margin: 4px 0 0; width: 100%;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
}
.modules li {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: var(--radius);
  background: var(--soft); font-weight: 600; font-size: 1.1rem;
}
.modules li::before, .points li::before {
  content: ""; flex: none; width: 18px; height: 18px; border-radius: 50%;
  background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 12px no-repeat;
}

.modules__dots { display: none; justify-content: center; gap: 4px; width: 100%; }
.modules__dots[hidden] { display: none !important; }
.modules__dots button {
  width: 32px; height: 32px; padding: 0; border: 0; background: none; cursor: pointer;
  display: grid; place-items: center;
}
.modules__dots button::before {
  content: ""; width: 10px; height: 10px; border-radius: 10px;
  background: var(--line); transition: width .3s, background .3s;
}
.modules__dots button[aria-current="true"]::before { width: 26px; background: var(--green); }

.product-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.points { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.points li { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); font-size: 1.1rem; }
.points li::before { margin-top: 4px; }
.link { margin-top: auto; font-weight: 700; display: inline-flex; gap: 6px; }
.link span { transition: transform .2s; }
.link:hover span { transform: translateX(4px); }

/* FAQ */
.faq { background: var(--soft); }
.faq details {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  margin-top: 12px; padding: 0 22px;
}
.faq summary {
  cursor: pointer; list-style: none;
  padding: 18px 0; font-weight: 700;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; flex: none;
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--soft); color: var(--blue); font-size: 1.2rem; font-weight: 600;
  transition: transform .45s var(--ease);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { color: var(--muted); padding-bottom: 18px; margin: 0; }
.faq details[open] p { animation: faq-in .5s var(--ease) both; }
@keyframes faq-in { from { opacity: 0; transform: translate3d(0, -8px, 0); } }

/* Contact */
.contact__grid {
  font-style: normal;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 32px;
}
.contact__card {
  display: flex; flex-direction: column; gap: 6px;
  padding: 28px; border-radius: var(--radius);
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  position: relative;
}
.contact__icon {
  width: 52px; height: 52px; border-radius: var(--radius); margin-bottom: 10px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--blue-l), var(--blue-d));
}
.contact__icon svg { width: 24px; height: 24px; fill: none; stroke: #fff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.contact__card:nth-child(2) .contact__icon { background: linear-gradient(135deg, #9CC757, var(--green-d)); }
.contact__label { font-size: 1.05rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.contact__value { font-size: 1.3rem; font-weight: 700; }

/* Footer */
.footer { background: var(--soft); color: var(--muted); border-top: 1px solid var(--line); padding: 40px 0 24px; }
.footer .brand img { width: 280px; }
.footer__row { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer__nav { display: flex; gap: 22px; flex-wrap: wrap; }
.footer__nav a { color: var(--ink); font-weight: 600; transition: color .2s; }
.footer__nav a:hover { color: var(--blue); }
.footer__legal {
  border-top: 1px solid var(--line); margin-top: 28px; padding-top: 20px; font-size: 1.05rem;
  display: flex; justify-content: space-between; align-items: center; gap: 12px 24px; flex-wrap: wrap;
}
.footer__legal p { margin: 0; }
.footer__links { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.footer__links a { color: var(--ink); font-weight: 600; transition: color .2s; }
.footer__links a:hover { color: var(--blue); }

/* Scroll reveal (only when JS is running) */
/* Uses the separate `translate` property so hover effects (transform) never conflict */
html.js .reveal {
  opacity: 0; translate: 0 32px;
  transition: opacity .9s var(--ease), translate .9s var(--ease), transform .45s var(--ease);
}
html.js .reveal.in { opacity: 1; translate: none; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero__grid { grid-template-columns: 1fr; text-align: center; }
  .hero__text { display: grid; justify-items: center; }
  .lead { margin-inline: auto; }
  .hero__cta { justify-content: center; }
  .hero { min-height: 0; }
  .footer .brand img { width: 240px; }
  .modules { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: 1fr 1fr; }
  .product-grid > .product:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  body { font-size: 1.0625rem; }
  .nav-toggle { display: flex; }
  .brand img { width: 180px; }
  .btn { font-size: 1.125rem; padding: 8px 16px; }
  .footer .brand img { width: 220px; }
  .show-card:nth-of-type(2) { margin: 0; }
  .show-card { padding: 16px 18px; gap: 14px; }
  .show-card img { width: 52px; height: 52px; }
  .showcase::before { left: 43px; }
  .nav {
    position: absolute; top: 88px; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: 8px 16px 16px;
    box-shadow: 0 16px 30px rgba(11, 27, 43, .08);
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: transform .25s, opacity .25s, visibility .25s;
  }
  .nav.is-open { transform: none; opacity: 1; visibility: visible; }
  .nav a { padding: 14px; }
  .nav a.is-active::after { display: none; }
  .vm, .product-grid, .contact__grid { grid-template-columns: 1fr; }
  /* ERP modules become a swipeable carousel: 4 per page */
  .modules {
    grid-template-columns: none;
    grid-template-rows: repeat(4, auto);
    grid-auto-flow: column;
    grid-auto-columns: 100%;
    column-gap: 16px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .modules::-webkit-scrollbar { display: none; }
  .modules li { scroll-snap-align: start; }
  .modules__dots { display: flex; }
  .product, .vm__card, .contact__card { padding: 22px; }
  .footer__row { flex-direction: column; text-align: center; }
  .footer__nav { justify-content: center; }
  .footer__legal { text-align: center; justify-content: center; }
  .footer__links { justify-content: center; }
}

/* Respect users who prefer less motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

/* "Coming soon" chip at the bottom of a product card */
.soon {
  margin: auto 0 0;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 12px; border-radius: var(--radius);
  border: 1px solid var(--line);
  color: var(--muted); font-weight: 600; font-size: 1rem;
}
.soon__dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); opacity: .6; }

/* Back-to-top button: appears after scrolling, ring shows reading progress */
.to-top {
  position: fixed; right: 24px; bottom: 24px; z-index: 45;
  width: 56px; height: 56px; padding: 0; border: 0; border-radius: 50%;
  background: #fff; color: var(--blue); cursor: pointer;
  box-shadow: 0 4px 12px rgba(13, 87, 141, .18);
  display: grid; place-items: center;
  opacity: 0; visibility: hidden; translate: 0 16px;
  transition: opacity .4s var(--ease), translate .4s var(--ease), visibility .4s, background-color .25s ease, color .25s ease;
}
.to-top.is-visible { opacity: 1; visibility: visible; translate: none; }
.to-top:hover { background: var(--blue); color: #fff; }
.to-top:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; }
.to-top__ring { position: absolute; inset: 0; width: 100%; height: 100%; rotate: -90deg; }
.to-top__ring circle { fill: none; stroke-width: 3; }
.to-top__track { stroke: var(--line); }
.to-top__progress {
  stroke: var(--green); stroke-linecap: round;
  stroke-dasharray: 100; stroke-dashoffset: calc(100 - var(--progress, 0));
}
.to-top__arrow {
  width: 22px; height: 22px; fill: none; stroke: currentColor;
  stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round;
}
.to-top.is-visible .to-top__arrow { animation: to-top-nudge 2.4s var(--ease) 1s infinite; }
.to-top:hover .to-top__arrow { animation: none; }
@keyframes to-top-nudge {
  0%, 60%, 100% { translate: 0 0; }
  30% { translate: 0 -4px; }
}
@media (max-width: 760px) {
  .to-top { right: 16px; bottom: 16px; width: 50px; height: 50px; }
}

/* Use the ☰ menu below 1000px so the longer menu labels never crowd the logo */
@media (max-width: 1000px) {
  .nav-toggle { display: flex; }
  .nav {
    position: absolute; top: 88px; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: 8px 16px 16px;
    box-shadow: 0 8px 16px rgba(11, 27, 43, .08);
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: transform .25s, opacity .25s, visibility .25s;
  }
  .nav.is-open { transform: none; opacity: 1; visibility: visible; }
  .nav a { padding: 14px; }
  .nav a.is-active::after { display: none; }
  .header .brand img { flex: none; }
}

/* ---------- Hero product cards: live, modern motion (text never moves, so it stays sharp) ---------- */
/* A light pulse travels down the connecting line, like data flowing between products */
.showcase::after {
  content: ""; position: absolute;
  left: 52px; top: 48px; bottom: 48px; width: 3px; border-radius: 3px;
  background: linear-gradient(transparent, var(--green), var(--blue), transparent) no-repeat;
  background-size: 100% 35%;
  animation: line-pulse 2.8s ease-in-out infinite;
}
@keyframes line-pulse {
  from { background-position: 0 -60%; }
  to { background-position: 0 160%; }
}
.show-card { overflow: hidden; transition: border-color .4s var(--ease), box-shadow .4s var(--ease); }
/* Accent bar that grows down the left edge of the highlighted card */
.show-card::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: linear-gradient(var(--green), var(--blue));
  transform: scaleY(0); transform-origin: top;
  transition: transform .5s var(--ease);
}
/* Arrow that slides in on the highlighted card */
.show-card::after {
  content: ""; position: absolute; right: 22px; top: 50%;
  width: 10px; height: 10px; margin-top: -5px;
  border-top: 2.5px solid var(--green); border-right: 2.5px solid var(--green);
  rotate: 45deg; translate: -8px 0; opacity: 0;
  transition: translate .45s var(--ease), opacity .45s var(--ease);
}
.show-card img { transition: translate .45s var(--ease), box-shadow .45s var(--ease); }
.show-card.is-active, .show-card:hover, .show-card:focus-visible {
  border-color: var(--green);
  box-shadow: 0 6px 16px rgba(13, 87, 141, .12);
}
.show-card.is-active::before, .show-card:hover::before, .show-card:focus-visible::before { transform: scaleY(1); }
.show-card.is-active::after, .show-card:hover::after, .show-card:focus-visible::after { translate: 0 0; opacity: 1; }
.show-card.is-active img, .show-card:hover img { translate: 0 -3px; animation: icon-ring 1.6s ease-out; }
@keyframes icon-ring {
  from { box-shadow: 0 0 0 0 rgba(134, 177, 64, .5); }
  to { box-shadow: 0 0 0 12px rgba(134, 177, 64, 0); }
}

/* Keep the connecting line and its pulse behind the cards: it starts below the ERP
   card and flows down through the gaps between cards */
.showcase::before, .showcase::after { z-index: 0; top: 80px; bottom: 80px; }
.show-card { z-index: 1; }

/* Without JavaScript the menu button cannot work: hide it and show the menu as plain links */
@media (max-width: 1000px) {
  html:not(.js) .nav-toggle { display: none; }
  html:not(.js) .header__row { height: auto; min-height: 88px; flex-wrap: wrap; gap: 4px 16px; padding: 12px 0; }
  html:not(.js) .nav {
    position: static; flex-direction: row; flex-wrap: wrap;
    transform: none; opacity: 1; visibility: visible;
    background: none; border: 0; box-shadow: none; padding: 0;
  }
  html:not(.js) .nav a { padding: 6px 10px; }
}

/* ---------- Text pages (Privacy, Terms, Support) ---------- */
.page { padding: clamp(48px, 7vw, 88px) 0; }
.prose { max-width: 820px; }
.prose h1 { font-size: clamp(2.1rem, 4vw, 3rem); }
.prose h2 { font-size: 1.5rem; margin-top: 1.9em; }
.prose h3 { font-size: 1.2rem; margin-top: 1.4em; }
.prose ul { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin-bottom: .4em; }
.prose a { text-decoration: underline; text-underline-offset: 2px; }
.prose a:hover { color: var(--blue-d); }
.prose .meta { color: var(--muted); }
.prose address { font-style: normal; margin: 0 0 1em; }
.prose .note {
  background: var(--soft); border: 1px solid var(--line); border-left: 4px solid var(--green);
  border-radius: var(--radius); padding: 16px 20px; margin: 0 0 1em;
}
