/* Certralis landing. Editorial platform style: pale rounded panels, near black ink, teal accent.
   Swap the palette block to re-skin the page. */

:root {
  /* spacing (landing-page-design B2) */
  --s-25: 2px;
  --s-50: 4px;
  --s-75: 8px;
  --s-100: 12px;
  --s-200: 16px;
  --s-300: 24px;
  --s-400: 32px;
  --s-500: 40px;
  --s-600: 48px;
  --s-700: 64px;
  --s-800: 80px;
  --s-900: 96px;

  /* Tailwind radii */
  --r-lg: 8px;
  --r-xl: 12px;
  --r-2xl: 16px;
  --r-3xl: 24px;
  --r-full: 9999px;

  /* Palette */
  --bg: #ffffff;
  --pale: #e3f3fe;
  --pale-2: #f3f8fb;
  --ink: #051923;
  --ink-2: #4a6577;
  --line: #cfe0ea;
  --teal: #006494;
  --teal-hover: #003554;
  --teal-soft: #0582ca;
  --teal-bg: #d9f0fe;
  --dark: #051923;
  --dark-2: #003554;
  --on-dark: #ffffff;
  --on-dark-2: #9fb8c8;
  --ok: #12804a;
  --ok-bg: #dcf5e6;
  --warn: #9a6200;
  --warn-bg: #fdf0d3;
  --bad: #b42318;
  --bad-bg: #fde4e1;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: "Manrope", system-ui, sans-serif;
  --font-display: "Poppins", "Manrope", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--s-900); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 24px;
  font-weight: 400;
  font-style: normal;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p, ul, ol, figure, dl, dd, dt { margin: 0; padding: 0; }
ul, ol { list-style: none; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: var(--s-25); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Text styles */
.heading-1 { font-size: 48px; line-height: 48px; font-weight: 600; }
.heading-2 { font-size: 48px; line-height: 48px; font-weight: 600; }
.heading-3 { font-size: 36px; line-height: 40px; font-weight: 600; }
.heading-4 { font-size: 30px; line-height: 36px; font-weight: 600; }
.heading-5 { font-size: 24px; line-height: 32px; font-weight: 600; }
.heading-6 { font-size: 20px; line-height: 28px; font-weight: 600; }
.title-1 { font-size: 20px; line-height: 28px; font-weight: 500; }
.title-2 { font-size: 18px; line-height: 28px; font-weight: 600; }
.title-3 { font-size: 16px; line-height: 24px; font-weight: 600; }
.title-4 { font-size: 14px; line-height: 20px; font-weight: 600; }
.body-1 { font-size: 16px; line-height: 24px; font-weight: 600; }
.body-3 { font-size: 16px; line-height: 24px; font-weight: 400; }
.body-4 { font-size: 14px; line-height: 20px; font-weight: 600; }
.body-5 { font-size: 14px; line-height: 20px; font-weight: 500; }
.body-6 { font-size: 14px; line-height: 20px; font-weight: 400; }
.button-md { font-size: 16px; line-height: 24px; font-weight: 600; }
.button-sm { font-size: 14px; line-height: 20px; font-weight: 600; }
.caption-2 { font-size: 14px; line-height: 20px; font-weight: 400; }
.caption-3 { font-size: 12px; line-height: 16px; font-weight: 600; }
.caption-4 { font-size: 12px; line-height: 16px; font-weight: 500; }
.caption-5 { font-size: 12px; line-height: 16px; font-weight: 400; }

.heading-1, .heading-2, .heading-3, .heading-4, .heading-5, .heading-6 {
  font-family: var(--font-display);
  letter-spacing: -0.03em;
}

h1, h2, h3, h4 { text-wrap: balance; }
p, li, dd { text-wrap: pretty; }
.muted { color: var(--ink-2); }

.eyebrow { text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-2); margin-bottom: var(--s-200); }

/* Layout */
.container { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 var(--s-200); }
.wrap { width: 100%; max-width: 1280px; margin: 0 auto var(--s-200); padding: 0 var(--s-200); }
.section { padding: var(--s-700) 0; }

.panel { padding: var(--s-300); border-radius: var(--r-3xl); }
.panel--pale { background: var(--pale); }
.panel--dark { background: var(--dark); color: var(--on-dark); }

.section-head { max-width: 680px; margin-bottom: var(--s-600); }
.section-head--center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head p.muted { margin-top: var(--s-200); }

.skip-link {
  position: fixed; top: var(--s-75); left: var(--s-75); z-index: 100;
  padding: var(--s-75) var(--s-100);
  background: var(--ink); color: var(--on-dark); border-radius: var(--r-lg);
  transform: translateY(-200%);
  transition: transform 500ms var(--ease);
}
.skip-link:focus { transform: translateY(0); }

/* Buttons: pills */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-75);
  padding: var(--s-75) var(--s-200);
  border: 0; border-radius: var(--r-full);
  cursor: pointer; white-space: nowrap;
  transition: background-color 300ms var(--ease), color 300ms var(--ease), transform 300ms var(--ease);
}
.btn:active { transform: scale(0.98); }
.btn--dark { background: var(--ink); color: var(--on-dark); }
.btn--dark:hover { background: var(--teal); }
.btn--teal { background: var(--teal); color: var(--on-dark); }
.btn--teal:hover { background: var(--teal-hover); }
.btn__arrow { transition: transform 300ms var(--ease); }
.btn:hover .btn__arrow { transform: translateX(4px); }

.link { display: inline-flex; align-items: center; gap: var(--s-75); color: var(--teal); transition: gap 300ms var(--ease); }
.link:hover { gap: var(--s-100); text-decoration: underline; text-underline-offset: 4px; }

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

/* Nav: full width bar */
.top { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, 0.9); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.nav { display: flex; align-items: center; gap: var(--s-300); height: 72px; max-width: 1280px; }
.nav__brand { flex: none; display: flex; align-items: center; }
.nav__brand img { height: 40px; width: 97px; max-width: none; }
.nav__links { display: none; align-items: center; gap: var(--s-50); margin-left: var(--s-300); }
.nav__link { white-space: nowrap; padding: var(--s-75) var(--s-100); border-radius: var(--r-full); color: var(--ink); transition: color 300ms var(--ease), background-color 300ms var(--ease); }
.nav__link:hover, .nav__link[aria-current="true"] { background: var(--pale); }
.nav__cta { display: none; margin-left: auto; }
.nav__toggle-wrap { position: relative; display: inline-flex; margin-left: auto; }
.nav__toggle { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; background: transparent; border: 0; border-radius: var(--r-lg); cursor: pointer; }
.nav__toggle span { position: absolute; width: 20px; height: 2px; background: var(--ink); border-radius: var(--r-full); transition: transform 500ms var(--ease); }
.nav__toggle span:nth-child(1) { transform: translateY(-4px); }
.nav__toggle span:nth-child(2) { transform: translateY(4px); }
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { transform: rotate(-45deg); }

.menu {
  position: fixed; inset: 0; z-index: 40;
  display: flex; flex-direction: column; justify-content: center; gap: var(--s-200);
  padding: var(--s-900) var(--s-300) var(--s-400);
  background: rgba(255, 255, 255, 0.96);
  -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px);
  opacity: 0; visibility: hidden;
  transition: opacity 500ms var(--ease), visibility 0s linear 500ms;
}
.menu.is-open { opacity: 1; visibility: visible; transition: opacity 500ms var(--ease); }
.menu a { opacity: 0; transform: translateY(24px); transition: opacity 500ms var(--ease), transform 500ms var(--ease), background-color 300ms var(--ease); }
.menu.is-open a { opacity: 1; transform: translateY(0); transition-delay: calc(var(--i) * 60ms); }
.menu .btn { align-self: flex-start; margin-top: var(--s-100); }

@media (min-width: 900px) {
  .nav__links { display: flex; }
  .nav__cta { display: inline-flex; }
  .nav__toggle-wrap { display: none; }
  .menu { display: none; }
}

/* Reveal and entrance */
.reveal { opacity: 0; transform: translateY(32px); transition: opacity 700ms var(--ease), transform 700ms var(--ease); }
.reveal.is-in { opacity: 1; transform: translateY(0); }
.rise { animation: rise 800ms var(--ease) both; animation-delay: calc(var(--d) * 70ms + 100ms); }
@keyframes rise { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }

/* Hero */
.hero { display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: var(--s-700); }
.hero .eyebrow { margin-bottom: var(--s-300); }
.hero__title, .hero__sub { max-width: 680px; }
.hero__title { font-size: 36px; line-height: 40px; }
.hero__title .hero__line { display: block; }
/* Mismo degradado azul del logo; en cada palabra para que el recorte del texto no falle con la animación. */
.hero__title .w {
  display: inline-block;
  color: #0b5fd6;
  background-image: linear-gradient(135deg, #005bbd 0%, #0b5fd6 50%, #007bff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: word 900ms var(--ease) both;
  animation-delay: calc(var(--d) * 70ms + 100ms);
}
@keyframes word { from { opacity: 0; transform: translateY(32px); } to { opacity: 1; transform: translateY(0); } }
.hero__sub { margin-top: var(--s-300); }
.hero__cta { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-75); margin-top: var(--s-400); }

/* Widgets */
.widgets { display: grid; gap: var(--s-200); width: 100%; margin-top: var(--s-700); text-align: left; }
.widget { padding: var(--s-300); background: var(--bg); border-radius: var(--r-2xl); }
.wlabel { display: flex; align-items: center; gap: var(--s-75); margin-bottom: var(--s-200); text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-2); }
.wlabel i { font-size: 16px; color: var(--teal); }
.wlabel .more { margin-left: auto; letter-spacing: 0; }
.wlabel--sp { margin-top: var(--s-300); }

.plist { display: grid; }
.prow { display: flex; align-items: center; justify-content: space-between; gap: var(--s-200); padding: var(--s-100) 0; }
.prow + .prow { box-shadow: inset 0 1px 0 var(--line); }
.prow__main { display: grid; min-width: 0; }
.prow__main b, .prow__main span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.pill { display: inline-flex; align-items: center; gap: var(--s-50); flex: none; padding: var(--s-25) var(--s-75); border-radius: var(--r-full); white-space: nowrap; }
.pill--ok { color: var(--ok); background: var(--ok-bg); }
.pill--warn { color: var(--warn); background: var(--warn-bg); }
.pill--bad { color: var(--bad); background: var(--bad-bg); }
.pill--warn i { animation: pulse 2s var(--ease) infinite; }
@keyframes pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(0.7); opacity: 0.5; } }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-200); }
.stats dd { margin-top: var(--s-25); }

.bars { display: flex; align-items: flex-end; gap: var(--s-75); height: 96px; }
.bar { flex: 1; height: var(--h); border-radius: 4px; background: var(--teal-soft); transform: scaleY(0); transform-origin: bottom; animation: grow 800ms var(--ease) both; animation-delay: calc(var(--i) * 60ms + 900ms); }
.bar.warn { background: #e8b13c; }
.bar.bad { background: #e0675c; }
@keyframes grow { to { transform: scaleY(1); } }

.widget--insight p b { font-weight: 600; }
.flow { display: flex; flex-wrap: wrap; gap: var(--s-75); }
.flow__s { padding: var(--s-50) var(--s-100); background: var(--pale); border-radius: var(--r-full); animation: flowOn 6s var(--ease) infinite; animation-delay: calc(var(--i) * 2s); }
@keyframes flowOn { 0%, 5% { opacity: 0.45; } 15%, 33% { opacity: 1; background: var(--teal-bg); } 45%, 100% { opacity: 0.45; } }
.tags { display: flex; flex-wrap: wrap; gap: var(--s-75); }
.tag { padding: var(--s-50) var(--s-100); background: var(--pale); border-radius: var(--r-full); }

@media (min-width: 900px) {
  .widgets { grid-template-columns: 1.2fr 1fr 1fr; grid-template-rows: auto 1fr; }
  .widget--list { grid-row: 1 / 3; }
  .widget--stats { grid-column: 2; grid-row: 1; }
  .widget--chart { grid-column: 2; grid-row: 2; }
  .widget--insight { grid-column: 3; grid-row: 1 / 3; }
}

/* Facts strip */
.trust { width: 100%; margin-top: var(--s-700); text-align: center; }
.trust__title { color: var(--ink-2); }
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s-300); margin-top: var(--s-300); }
.facts dd { font-family: var(--font-display); font-size: 30px; line-height: 36px; font-weight: 600; letter-spacing: -0.03em; }
.facts dt { margin-top: var(--s-25); }
@media (min-width: 768px) {
  .facts { grid-template-columns: repeat(4, 1fr); }
  .facts > div + div { box-shadow: inset 1px 0 0 var(--line); }
}

/* Marquee */
.marquee { overflow: hidden; padding: var(--s-300) 0 0; }
.marquee__track { display: flex; width: max-content; animation: marquee 40s linear infinite; }
.marquee__item { display: inline-flex; align-items: center; gap: var(--s-75); padding: 0 var(--s-300); color: var(--ink-2); white-space: nowrap; }
.marquee__item i { color: var(--teal); font-size: 16px; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Tiles */
.tile { display: flex; flex-direction: column; gap: var(--s-75); padding: var(--s-300); background: var(--bg); border-radius: var(--r-2xl); transition: transform 500ms var(--ease); }
.tile:hover { transform: translateY(-4px); }
.tile .link { margin-top: auto; padding-top: var(--s-600); }
.tile--icon i.ph { font-size: 32px; color: var(--teal); margin-bottom: var(--s-200); }
.tile--plain { background: var(--pale); }
.tile--teal { background: var(--teal); color: var(--on-dark); }
.tile--plain:hover, .tile--teal:hover { transform: none; }

.tiles { display: grid; gap: var(--s-200); }
.section > .container > .tiles .tile { background: var(--pale); }
@media (min-width: 768px) {
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .tiles--2 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .tiles:not(.tiles--2) { grid-template-columns: repeat(6, 1fr); }
  .tiles:not(.tiles--2) .tile { grid-column: span 2; min-height: 240px; }
  .tiles:not(.tiles--2) .tile:nth-child(4), .tiles:not(.tiles--2) .tile:nth-child(5) { grid-column: span 3; min-height: 200px; }
}

/* Problem / solution */
.split { display: grid; gap: var(--s-200); }
.split .tile { padding: var(--s-400); gap: var(--s-200); }
.split li { display: flex; gap: var(--s-100); padding: var(--s-75) 0; }
.split li i { flex: none; margin-top: var(--s-25); font-size: 20px; }
.split li i.is-bad { color: var(--bad); }
@media (min-width: 768px) { .split { grid-template-columns: 1fr 1fr; } }

/* Chain */
.chain { display: grid; gap: var(--s-300); max-width: 1000px; margin: 0 auto; }
.chain__node { position: relative; display: grid; grid-template-columns: 48px 1fr; grid-template-rows: auto auto; column-gap: var(--s-200); align-items: center; opacity: 0; transform: translateY(24px); transition: opacity 700ms var(--ease), transform 700ms var(--ease); transition-delay: calc(var(--i) * 150ms); }
.chain__node:nth-child(1) { --i: 0; }
.chain__node:nth-child(2) { --i: 1; }
.chain__node:nth-child(3) { --i: 2; }
.chain__node:nth-child(4) { --i: 3; }
.chain__node:nth-child(5) { --i: 4; }
.chain__icon { grid-row: span 2; display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; background: var(--bg); border-radius: var(--r-xl); color: var(--teal); font-size: 24px; transition: background-color 300ms var(--ease), color 300ms var(--ease); }
.chain__node:hover .chain__icon, .chain__node:last-child .chain__icon { background: var(--teal); color: var(--on-dark); }
.chain__node::after { content: ""; position: absolute; left: 23px; top: 56px; width: 2px; height: calc(100% - 32px); background: var(--line); transform: scaleY(0); transform-origin: top; transition: transform 700ms var(--ease); transition-delay: calc(var(--i) * 150ms + 300ms); }
.chain__node:last-child::after { display: none; }
.chain.is-in .chain__node { opacity: 1; transform: translateY(0); }
.chain.is-in .chain__node::after { transform: scaleY(1); }
@media (min-width: 900px) {
  .chain { grid-template-columns: repeat(5, 1fr); gap: var(--s-200); }
  .chain__node { grid-template-columns: 1fr; justify-items: start; row-gap: var(--s-75); }
  .chain__icon { grid-row: auto; margin-bottom: var(--s-75); }
  .chain__node::after { left: 64px; top: 23px; width: calc(100% - 48px); height: 2px; transform: scaleX(0); transform-origin: left; background: #bcd3e0; }
  .chain.is-in .chain__node::after { transform: scaleX(1); }
}

/* Tagline dark panel */
.tagline { position: relative; overflow: hidden; padding: var(--s-700) var(--s-300); text-align: center; }
.tagline > *:not(.rings) { position: relative; }
.tagline__text { max-width: 680px; margin: 0 auto; font-family: var(--font-display); font-size: 30px; line-height: 36px; font-weight: 600; letter-spacing: -0.03em; }
.tagline__word { display: inline-block; opacity: 0.25; transition: opacity 500ms var(--ease); }
.tagline__word.is-on { opacity: 1; }
.tagline__cols { display: grid; gap: var(--s-400); max-width: 960px; margin: var(--s-700) auto 0; }
.tagline__cols p { margin-top: var(--s-75); color: var(--on-dark-2); }
.tagline__btn { margin-top: var(--s-600); }
.rings { position: absolute; inset: 0; pointer-events: none; }
.rings i { position: absolute; top: 40%; left: 50%; width: 480px; height: 480px; margin: -240px 0 0 -240px; border: 1px solid rgba(255, 255, 255, 0.08); border-radius: var(--r-full); animation: ring 8s var(--ease) infinite; }
.rings i:nth-child(2) { animation-delay: 2.6s; }
.rings i:nth-child(3) { animation-delay: 5.2s; }
@keyframes ring { from { transform: scale(0.4); opacity: 1; } to { transform: scale(1.8); opacity: 0; } }
@media (min-width: 768px) {
  .tagline { padding: var(--s-900) var(--s-600); }
  .tagline__text { font-size: 48px; line-height: 48px; }
  .tagline__cols { grid-template-columns: repeat(3, 1fr); }
}

/* Steps */
.steps { display: grid; gap: var(--s-200); }
.step { padding: var(--s-300); background: var(--pale); border-radius: var(--r-2xl); transition: transform 500ms var(--ease); }
.step:hover { transform: translateY(-4px); }
.step__n { display: block; margin-bottom: var(--s-300); font-family: var(--font-display); font-size: 48px; line-height: 48px; font-weight: 600; letter-spacing: -0.03em; color: #7dd0fd; }
.step p { margin-top: var(--s-75); }
@media (min-width: 768px) { .steps { grid-template-columns: repeat(3, 1fr); } }

.chips { display: flex; flex-wrap: wrap; gap: var(--s-75); margin-top: var(--s-400); }
.chip { display: inline-flex; align-items: center; gap: var(--s-75); padding: var(--s-75) var(--s-100); background: var(--pale); border-radius: var(--r-full); }
.chip i { color: var(--teal); font-size: 16px; }

/* FAQ */
.faq { max-width: 800px; display: grid; gap: var(--s-75); }
.faq details { background: var(--pale); border-radius: var(--r-2xl); transition: background-color 300ms var(--ease); }
.faq details[open] { background: var(--pale-2); box-shadow: inset 0 0 0 1px var(--line); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: var(--s-200); padding: var(--s-200) var(--s-300); cursor: pointer; list-style: none; border-radius: var(--r-2xl); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--teal); }
.faq summary i { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; background: var(--bg); border-radius: var(--r-full); transition: transform 500ms var(--ease), background-color 300ms var(--ease), color 300ms var(--ease); }
.faq details[open] summary i { transform: rotate(45deg); background: var(--teal); color: var(--on-dark); }
.faq__a { padding: 0 var(--s-300) var(--s-300); color: var(--ink-2); }

/* CTA */
.cta { padding: var(--s-700) var(--s-300); text-align: center; }
.cta h2 { max-width: 680px; margin: 0 auto; }
.cta > p.body-3 { max-width: 680px; margin: var(--s-200) auto 0; color: var(--on-dark-2); }
.form { display: flex; flex-direction: column; gap: var(--s-75); max-width: 480px; margin: var(--s-400) auto 0; text-align: left; }
.form label { color: var(--on-dark-2); }
.form__row { display: flex; flex-direction: column; gap: var(--s-75); }
.input { width: 100%; padding: var(--s-100) var(--s-200); background: var(--bg); color: var(--ink); border: 1px solid transparent; border-radius: var(--r-full); transition: border-color 300ms var(--ease); }
.input::placeholder { color: var(--ink-2); }
.input:hover { border-color: var(--teal-soft); }
.input[aria-invalid="true"] { border-color: #f87171; }
.form__msg { min-height: 20px; color: #fca5a5; }
.form__msg.is-ok { color: #8be0b0; }
.cta__note { margin-top: var(--s-100); color: var(--on-dark-2); }
@media (min-width: 640px) {
  .form__row { flex-direction: row; }
  .form__row .input { flex: 1; }
  .form__row .btn { flex: none; }
  .cta { padding: var(--s-800) var(--s-400); }
}

/* Footer */
.footer { padding: var(--s-600) 0 var(--s-400); }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-200); }
.footer__brand img { height: 40px; width: 97px; max-width: none; }
.footer__links { display: flex; gap: var(--s-300); color: var(--ink-2); }
.footer__links a { transition: color 300ms var(--ease); }
.footer__links a:hover { color: var(--teal); }
.footer__copy { margin-top: var(--s-200); color: var(--ink-2); }

/* Simple pages */
.page { min-height: 100vh; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: var(--s-200); max-width: 680px; margin: 0 auto; padding: var(--s-900) var(--s-200); }
.page p { color: var(--ink-2); }
.back { display: inline-flex; align-items: center; gap: var(--s-75); color: var(--teal); }

@media (min-width: 768px) {
  .section { padding: var(--s-900) 0; }
  .container { padding: 0 var(--s-300); }
  .wrap { padding: 0 var(--s-300); }
  .panel { padding: var(--s-600); }
  .hero { padding-top: var(--s-800); }
  .hero__title { font-size: 48px; line-height: 48px; }
  .cta { padding: var(--s-800) var(--s-400); }
}

/* Reduced motion: opacity only */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .marquee__track, .rings i, .pill--warn i, .flow__s { animation: none; }
  .hero__title .w, .rise { animation: fadeOnly 400ms var(--ease) both; animation-delay: 0s; }
  .bar { animation: none; transform: none; }
  .reveal, .menu a, .chain__node { transform: none; }
  .reveal, .menu a { transition: opacity 300ms var(--ease); }
  .chain__node::after { transform: none; transition: none; }
  .tagline__word { opacity: 1; transition: none; }
  .nav__toggle span, .faq summary i, .btn, .tile, .step { transition: none; }
  .tile:hover, .step:hover { transform: none; }
  .progress { display: none; }
}
@keyframes fadeOnly { from { opacity: 0; } to { opacity: 1; } }

/* Brighter accent on dark panels */
.panel--dark .btn--teal { background: var(--teal-soft); }
.panel--dark .btn--teal:hover { background: #00a6fb; }

/* ===== Button motion ===== */
.btn {
  --fill: var(--teal);
  --lh: 24px;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  transform: translate3d(var(--mx, 0px), var(--my, 0px), 0) scale(var(--sc, 1));
  transition:
    transform 500ms var(--ease),
    background-color 300ms var(--ease),
    outline-offset 200ms var(--ease);
  will-change: transform;
}
.btn.button-sm { --lh: 20px; }
.btn--dark { --fill: var(--teal); }
.btn--teal { --fill: var(--teal-hover); }
.panel--dark .btn--teal { --fill: #00a6fb; }
.btn--dark:hover { background: var(--ink); }
.btn--teal:hover { background: var(--teal); }
.panel--dark .btn--teal:hover { background: var(--teal-soft); }

/* Fill sweep, bottom to top */
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--fill);
  border-radius: var(--r-full);
  transform: translateY(101%);
  transition: transform 550ms var(--ease);
}
.btn:hover::before, .btn:focus-visible::before { transform: translateY(0); }

/* Press feedback */
.btn:active { --sc: 0.96; transform: translate3d(var(--mx, 0px), var(--my, 0px), 0) scale(0.96); transition-duration: 120ms; }
.btn:focus-visible { outline: 2px solid var(--teal-soft); outline-offset: 4px; }

/* Label roll: text slides up and a copy rises in */
.btn__roll { display: inline-block; height: var(--lh); overflow: hidden; vertical-align: top; }
.btn__roll > span { display: block; height: var(--lh); transition: transform 500ms var(--ease); }
.btn:hover .btn__roll > span, .btn:focus-visible .btn__roll > span { transform: translateY(-100%); }

/* Arrow leaves to the right and re-enters from the left */
.btn:hover .btn__arrow, .btn:focus-visible .btn__arrow { transform: none; animation: arrowThrough 700ms var(--ease) both; }
@keyframes arrowThrough {
  0% { transform: translateX(0); opacity: 1; }
  45% { transform: translateX(14px); opacity: 0; }
  46% { transform: translateX(-14px); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}

/* Click ripple */
.btn__ripple {
  position: absolute;
  z-index: -1;
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  background: rgba(255, 255, 255, 0.35);
  border-radius: var(--r-full);
  pointer-events: none;
  animation: ripple 700ms var(--ease) forwards;
}
@keyframes ripple { from { transform: scale(1); opacity: 1; } to { transform: scale(48); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .btn { transform: none; transition: background-color 200ms var(--ease); }
  .btn::before { transition: none; }
  .btn__roll > span { transition: none; }
  .btn:hover .btn__roll > span { transform: none; }
  .btn:hover .btn__arrow { animation: none; }
  .btn__ripple { display: none; }
}

/* ===== Atom diagram ===== */
.atom-panel { display: grid; gap: var(--s-600); align-items: center; overflow: hidden; }
.atom-copy p.body-3 { margin-top: var(--s-200); color: var(--on-dark-2); }
.atom-copy .eyebrow { color: var(--on-dark-2); }

.atom { position: relative; width: 100%; max-width: 560px; aspect-ratio: 1; margin: 0 auto; }

.orbit {
  position: absolute;
  inset: var(--inset);
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: var(--r-full);
  animation: spin var(--t) linear infinite;
  animation-direction: var(--dir, normal);
}
.orbit--1 { --inset: 33%; --t: 12s; }
.orbit--2 { --inset: 24%; --t: 20s; --dir: reverse; }
.orbit--3 { --inset: 15%; --t: 32s; }
.orbit--4 { --inset: 6%; --t: 48s; --dir: reverse; }
@keyframes spin { to { transform: rotate(360deg); } }

.slot { position: absolute; inset: 0; transform: rotate(var(--a)); }

.mod {
  position: absolute;
  top: 0;
  left: 50%;
  display: inline-flex;
  align-items: center;
  gap: var(--s-75);
  padding: var(--s-75);
  background: var(--dark-2);
  color: var(--on-dark);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--r-full);
  white-space: nowrap;
  transform: translate(-50%, -50%) rotate(calc(var(--a) * -1));
  animation: unspin var(--t) linear infinite;
  animation-direction: var(--dir, normal);
  transition: background-color 300ms var(--ease), border-color 300ms var(--ease);
}
.orbit--1 .mod { --t: 12s; }
.orbit--2 .mod { --t: 20s; --dir: reverse; }
.orbit--3 .mod { --t: 32s; }
.orbit--4 .mod { --t: 48s; --dir: reverse; }
.mod i { font-size: 20px; color: #7dd0fd; }
.mod b { display: none; font-weight: 500; }
.mod:hover { background: var(--teal); border-color: transparent; }
.mod:hover i { color: var(--on-dark); }
@keyframes unspin {
  from { transform: translate(-50%, -50%) rotate(calc(var(--a) * -1)); }
  to { transform: translate(-50%, -50%) rotate(calc(var(--a) * -1 - 360deg)); }
}

.electron {
  position: absolute;
  top: 0;
  left: 50%;
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  background: #00a6fb;
  border-radius: var(--r-full);
  box-shadow: 0 0 0 4px rgba(0, 166, 251, 0.2), 0 0 16px 2px rgba(0, 166, 251, 0.8);
}

.nucleus {
  position: absolute;
  top: 50%;
  left: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: var(--s-25);
  width: 18%;
  aspect-ratio: 1;
  color: var(--ink);
  text-align: center;
  background: var(--bg);
  border-radius: var(--r-full);
  transform: translate(-50%, -50%);
  animation: beat 4s var(--ease) infinite;
}
.nucleus img { width: 46%; height: auto; }
@keyframes beat { 0%, 100% { transform: translate(-50%, -50%) scale(1); } 50% { transform: translate(-50%, -50%) scale(1.06); } }

.halo { position: absolute; inset: 0; pointer-events: none; }
.halo i {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18%;
  aspect-ratio: 1;
  margin: -9% 0 0 -9%;
  border: 1px solid rgba(0, 166, 251, 0.6);
  border-radius: var(--r-full);
  animation: halo 5s var(--ease) infinite;
}
.halo i:nth-child(2) { animation-delay: 2.5s; }
@keyframes halo { from { transform: scale(1); opacity: 0.9; } to { transform: scale(4.2); opacity: 0; } }


@media (min-width: 640px) {
  .mod { padding: var(--s-75) var(--s-200) var(--s-75) var(--s-100); }
  .mod b { display: inline; }
}
@media (min-width: 900px) {
  .atom-panel { grid-template-columns: 0.8fr 1.2fr; gap: var(--s-400); }
}
@media (prefers-reduced-motion: reduce) {
  .orbit, .mod, .nucleus, .halo i { animation: none; }
  .mod { transform: translate(-50%, -50%) rotate(calc(var(--a) * -1)); }
}

/* Atom: 3D tilt that follows the pointer */
.atom { transform: perspective(1100px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform 600ms var(--ease); }
@media (prefers-reduced-motion: reduce) { .atom { transform: none; } }

/* Traceability legend */
.legend { display: grid; gap: var(--s-100); margin-top: var(--s-400); counter-reset: none; }
.legend li { display: flex; align-items: center; gap: var(--s-100); }
.legend__n { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 24px; height: 24px; background: var(--dark-2); color: #7dd0fd; border-radius: var(--r-full); }
.legend b { font-weight: 600; }
.legend .caption-5 { color: var(--on-dark-2); }

/* ===== Traceability lab flow line ===== */
.line { position: relative; max-width: 1040px; margin: 0 auto; }
.stations { position: relative; z-index: 2; display: grid; grid-auto-rows: 88px; }
.station { display: flex; align-items: center; gap: var(--s-200); }
.station__icon {
  display: inline-flex; flex: none; align-items: center; justify-content: center;
  width: 56px; height: 56px; background: var(--bg); color: var(--teal);
  border-radius: var(--r-xl); font-size: 28px;
  animation: stationPulse 8s var(--ease) infinite;
  animation-delay: calc(var(--i) * 2s);
}
.station:last-child .station__icon { background: var(--teal); color: var(--on-dark); }
.station__text { display: grid; }
@keyframes stationPulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0, 166, 251, 0.5); }
  4% { transform: scale(1.12); box-shadow: 0 0 0 10px rgba(0, 166, 251, 0); }
  10%, 46% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0, 166, 251, 0); }
  50% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0, 166, 251, 0.5); }
  54% { transform: scale(1.12); box-shadow: 0 0 0 10px rgba(0, 166, 251, 0); }
  60%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(0, 166, 251, 0); }
}

/* pipe: vertical on mobile */
.pipe {
  position: absolute; z-index: 0; left: 24px; top: 44px; width: 8px; height: 352px;
  background: var(--bg); border-radius: var(--r-full); overflow: hidden;
}
.pipe::before {
  content: ""; position: absolute; left: 0; top: -24px; width: 8px; height: calc(100% + 24px);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='24'%3E%3Cpath d='M1 5l3 4 3-4' fill='none' stroke='%230582ca' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: repeat-y;
  animation: streamY 1.2s linear infinite;
}
@keyframes streamY { to { transform: translateY(24px); } }

.drop {
  position: absolute; z-index: 1; left: 22px; top: 38px; width: 12px; height: 12px;
  background: #00a6fb; border-radius: var(--r-full);
  box-shadow: 0 0 0 4px rgba(0, 166, 251, 0.25), 0 0 14px 2px rgba(0, 166, 251, 0.7);
  animation: runY 8s linear infinite;
}
.drop--2 { animation-delay: -4s; }
@keyframes runY { from { transform: translateY(0); } to { transform: translateY(352px); } }

@media (min-width: 900px) {
  .stations { grid-template-columns: repeat(5, 1fr); grid-auto-rows: auto; }
  .station { flex-direction: column; text-align: center; gap: var(--s-100); }
  .station__text { justify-items: center; }
  .line { container-type: inline-size; }
  .pipe { left: 10%; right: 10%; width: auto; top: 24px; height: 8px; }
  .pipe::before { left: -24px; top: 0; width: calc(100% + 24px); height: 8px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='8'%3E%3Cpath d='M9 1l4 3-4 3' fill='none' stroke='%230582ca' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: repeat-x; animation-name: streamX; }
  .drop { left: calc(10% - 6px); top: 22px; animation-name: runX; }
}
@keyframes streamX { to { transform: translateX(24px); } }
@keyframes runX { from { transform: translateX(0); } to { transform: translateX(80cqw); } }

@media (prefers-reduced-motion: reduce) {
  .station__icon, .pipe::before, .drop { animation: none; }
  .drop { display: none; }
}

/* Hero title: one left to right gradient with the two logo blues */
.hero__title .w {
  background-image: linear-gradient(180deg, #00a6fb 0%, #007bff 45%, #004a9f 100%);
  background-size: 100% var(--th, 100%);
  background-position: 0 var(--oy, 0);
  background-repeat: no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  padding-bottom: 4px;
}

/* Section titles: same blue gradient as the hero (light version on dark panels) */
h2.heading-3 {
  width: fit-content;
  max-width: 100%;
  padding-bottom: 4px;
  background-image: linear-gradient(180deg, #00a6fb 0%, #007bff 45%, #004a9f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.section-head--center h2.heading-3, .cta h2.heading-3 { margin-left: auto; margin-right: auto; }
.panel--dark h2.heading-3 { background-image: linear-gradient(180deg, #b3e3fe 0%, #38bbfc 45%, #00a6fb 100%); }

.tagline__word {
  background-image: linear-gradient(180deg, #b3e3fe 0%, #38bbfc 45%, #00a6fb 100%);
  background-size: 100% var(--th, 100%);
  background-position: 0 var(--oy, 0);
  background-repeat: no-repeat;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  padding-bottom: 4px;
}

.hero__title { position: relative; }
