/* CerebriaX — mAIde for mAInds */

@font-face { font-family: "Antonio"; font-weight: 200; font-display: swap; src: url("/assets/fonts/antonio-latin-200-normal.woff2") format("woff2"); }
@font-face { font-family: "Antonio"; font-weight: 300; font-display: swap; src: url("/assets/fonts/antonio-latin-300-normal.woff2") format("woff2"); }
@font-face { font-family: "Antonio"; font-weight: 400; font-display: swap; src: url("/assets/fonts/antonio-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Archivo"; font-weight: 400; font-display: swap; src: url("/assets/fonts/archivo-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Archivo"; font-weight: 500; font-display: swap; src: url("/assets/fonts/archivo-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Archivo"; font-weight: 600; font-display: swap; src: url("/assets/fonts/archivo-latin-600-normal.woff2") format("woff2"); }

:root {
  --red: #d7141a;
  --red-deep: #9e0d12;
  --ink: #0e1012;
  --ink-2: #1a1d20;
  --fog: #e4e5e7;
  --fog-deep: #c3c5c8;
  --paper: #f5f5f6;
  --muted: #55595e;
  --on-ink-muted: #a7abb0;
  --on-red-muted: #ffd9d6;
  --display: "Antonio", "Arial Narrow", sans-serif;
  --text: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --gutter: clamp(16px, 2.4vw, 32px);
  --frame: clamp(6px, 0.8vw, 12px);
  --radius: clamp(14px, 1.6vw, 24px);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scrollbar-color: var(--red) var(--ink); }
body {
  margin: 0;
  background: var(--ink);
  color: var(--ink);
  font-family: var(--text);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  caret-color: var(--red);
}
::selection { background: var(--red); color: #fff; }
img, canvas { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
em { font-style: normal; color: var(--red); }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: fixed; top: 12px; left: 12px; z-index: 100; padding: 10px 16px; background: #fff; color: var(--ink); border-radius: 999px; transform: translateY(-200%); transition: transform .3s var(--ease-out); }
.skip:focus { transform: none; }

/* The framed screen */
.shell {
  position: relative;
  margin: var(--frame);
  border-radius: var(--radius);
  overflow: clip;
  background: var(--fog);
}
.corner-dot {
  position: fixed; z-index: 60; top: calc(var(--frame) + 6px); left: calc(var(--frame) + 6px);
  width: 9px; height: 9px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.35);
}
.scroll-handle {
  position: fixed; z-index: 60; left: 50%; bottom: calc(var(--frame) - 2px); transform: translateX(-50%);
  width: 72px; height: 4px; border-radius: 4px; background: rgba(255,255,255,.28); overflow: hidden;
}
.scroll-handle__fill { display: block; height: 100%; width: 100%; background: #fff; transform-origin: left; transform: scaleX(0); }

/* Small caps labels */
.topbar, .cta__corner, .tagline, .project__tag, .footer h2, .credentials__strip span {
  font-family: var(--text); font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; line-height: 1.3;
}

/* Top bar */
.topbar {
  position: absolute; z-index: 20; inset: 0 0 auto 0;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; gap: 16px;
  padding: calc(var(--gutter) * .8) var(--gutter) 0 calc(var(--gutter) * 1.6);
}
.topbar__brand { display: grid; text-decoration: none; }
.topbar__meta { display: grid; justify-items: end; text-align: right; color: var(--ink); }
.topbar__nav { display: flex; gap: 4px; padding: 4px; border-radius: 999px; background: rgba(255,255,255,.55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.topbar__nav a { padding: 7px 14px; border-radius: 999px; text-decoration: none; transition: background-color .25s, color .25s; }
.topbar__nav a:hover { background: var(--ink); color: #fff; }

/* Hero */
.hero {
  position: relative; min-height: max(640px, calc(100svh - var(--frame) * 2));
  background: radial-gradient(120% 90% at 45% 40%, #f1f1f2 0%, #dfe0e2 55%, #c4c6c9 100%);
  isolation: isolate;
}
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; touch-action: pan-y; }
.hero__rule {
  position: absolute; z-index: 1; left: calc(var(--gutter) * 1.6); right: var(--gutter); top: calc(var(--gutter) * .8 + 44px);
  border-top: 1px dotted rgba(14,16,18,.45);
}
.hero__rule::before { content: ""; position: absolute; left: 0; top: -3px; width: 5px; height: 5px; border-radius: 50%; background: var(--ink); }
.hero__copy {
  position: absolute; z-index: 2; left: calc(var(--gutter) * 1.6); bottom: calc(var(--gutter) * 1.4);
  display: grid; gap: 18px; justify-items: start; max-width: 34ch;
}
.hero__lead { font-size: 15px; line-height: 1.5; color: var(--ink); }
.hero__wordmark {
  position: absolute; z-index: 1; right: calc(var(--gutter) * .6); bottom: 0.04em;
  font-size: clamp(88px, 19.5vw, 400px);
  pointer-events: none;
}

.wordmark {
  font-family: var(--display); font-weight: 200; text-transform: uppercase;
  line-height: 1.02; letter-spacing: -0.02em; white-space: nowrap;
}

/* Pills */
.pill {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 44px; padding: 10px 18px 10px 20px; border-radius: 999px;
  font-family: var(--text); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; text-decoration: none;
  transition: transform .4s var(--ease-out), background-color .25s, color .25s, box-shadow .4s var(--ease-out);
}
.pill__icon { width: 16px; height: 16px; transition: transform .4s var(--ease-out); }
.pill:hover .pill__icon { transform: translate(2px, -2px); }
.pill:active { transform: scale(.97); }
.pill--ink { background: var(--ink); color: #fff; box-shadow: 0 8px 24px -10px rgba(14,16,18,.6); }
.pill--ink:hover { background: var(--red); }
.pill--light { background: #fff; color: var(--ink); box-shadow: 0 10px 30px -12px rgba(0,0,0,.4); }
.pill--light:hover { background: var(--ink); color: #fff; }
.pill--line { color: #fff; border: 1px solid rgba(255,255,255,.7); }
.pill--line:hover { background: #fff; color: var(--red); }

/* Brackets */
.bracketed { position: relative; padding: clamp(20px, 3vw, 44px) clamp(28px, 5vw, 80px); }
.bracketed::before, .bracketed::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: clamp(10px, 1.2vw, 18px);
  border: 1.5px solid currentColor; opacity: .9;
  clip-path: inset(0 0 0 0);
}
.bracketed::before { left: 0; border-right: 0; }
.bracketed::after { right: 0; border-left: 0; }

/* Taglines */
.tagline { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 0; font-size: 11px; }
.tagline li + li::before { content: "|"; margin: 0 .7em; opacity: .55; }

/* Bracket scenes: brackets open, then the text resolves */
.scene { position: relative; min-height: 100svh; }
.js .scene { height: 230vh; }
.scene__sticky {
  position: sticky; top: 0; min-height: 100svh; overflow: hidden; isolation: isolate;
  display: grid; place-content: center; justify-items: center; gap: clamp(20px, 3vh, 32px);
  text-align: center; padding: 12vh var(--gutter);
}
.scene__frame { position: relative; width: min(1180px, 100%); padding: clamp(18px, 2.6vw, 40px) clamp(30px, 5vw, 84px); --open: 1; --reveal: 1; }
.br {
  position: absolute; top: 0; bottom: 0; width: clamp(9px, 1.1vw, 16px);
  border: 1.5px solid currentColor;
  transition: none;
}
.br--l { border-right: 0; left: calc((1 - var(--open)) * (50% - 22px)); }
.br--r { border-left: 0; right: calc((1 - var(--open)) * (50% - 22px)); }
.scene__reveal {
  display: grid; justify-items: center; gap: 14px;
  opacity: var(--reveal); filter: blur(calc((1 - var(--reveal)) * 18px));
  transform: scale(calc(1.05 - .05 * var(--reveal)));
}
.scene__reveal2 { opacity: var(--reveal2, 1); filter: blur(calc((1 - var(--reveal2, 1)) * 12px)); transform: translateY(calc((1 - var(--reveal2, 1)) * 18px)); }
.scan { position: absolute; width: 64px; height: 30px; border: 1px solid currentColor; opacity: 0; pointer-events: none; }

/* Manifesto / slogan */
.manifesto { background: var(--ink); color: #fff; }
.manifesto__title {
  font-family: var(--display); font-weight: 300; text-transform: none; line-height: .9; letter-spacing: -0.01em;
  font-size: clamp(56px, 11vw, 190px);
}
.manifesto__title em { font-weight: 400; }
.manifesto .tagline { color: var(--on-ink-muted); }
.manifesto__body { max-width: 56ch; font-size: clamp(16px, 1.35vw, 19px); color: #e3e5e8; }

/* Work */
.work { position: relative; background: #d9dee4; color: var(--ink); }
.work__sky { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.work__clouds { filter: blur(6px); position: absolute; left: -5%; right: -5%; top: -10%; height: 120%; background-size: cover; background-position: center; will-change: transform; }
.work__clouds--front { opacity: .85; mix-blend-mode: screen; }
.work__sticky { position: relative; }
.work__title {
  position: relative; z-index: 1; text-align: center;
  font-family: var(--display); font-weight: 300; text-transform: uppercase; line-height: .9;
  font-size: clamp(48px, 7.6vw, 132px); letter-spacing: -0.01em; text-wrap: balance;
}
.work__index { display: none; }
.projects { position: relative; z-index: 2; }
.project__media { position: relative; border-radius: 6px; overflow: hidden; background: var(--ink); box-shadow: 0 30px 60px -30px rgba(14,16,18,.55); aspect-ratio: 3 / 4; }
.project__media canvas { width: 100%; height: 100%; }
.project__tag { position: absolute; left: 12px; top: 12px; padding: 5px 9px; border-radius: 999px; background: rgba(255,255,255,.12); color: #fff; font-size: 11px; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.project[data-demo="lms"] .project__tag, .project[data-demo="automation"] .project__tag { color: var(--ink); background: rgba(14,16,18,.08); }
.project__text h3 { font-family: var(--display); font-weight: 300; font-size: clamp(26px, 2.3vw, 38px); line-height: 1.02; text-transform: uppercase; text-wrap: balance; }
.project__text p { margin-top: 12px; font-size: 15px; color: #2b2f33; max-width: 40ch; }

/* Mobile and reduced-motion layout: a simple list */
.work { padding: clamp(80px, 14vh, 140px) var(--gutter); }
.projects { display: grid; gap: 56px; margin: 56px auto 0; max-width: 520px; }
.project { display: grid; gap: 20px; }

/* Desktop sticky film */
@media (min-width: 900px) and (prefers-reduced-motion: no-preference) {
  .work { padding: 0; height: 520vh; }
  .work__sticky { position: sticky; top: 0; height: 100vh; overflow: hidden; }
  .work__title { padding-top: 7vh; }
  .projects { position: absolute; inset: 0; margin: 0; max-width: none; display: block; }
  .project { position: absolute; inset: 0; display: block; pointer-events: none; }
  .project.is-active { pointer-events: auto; }
  .project__media {
    position: absolute; left: 50%; top: 30vh; width: clamp(240px, 21vw, 360px); translate: -50% 0;
    opacity: 0; filter: blur(18px); scale: 1.04;
    transition: opacity .8s var(--ease-out), filter 1s var(--ease-out), scale 1.2s var(--ease-out);
  }
  .project.is-active .project__media { opacity: 1; filter: blur(0); scale: 1; }
  .project.is-leaving .project__media { opacity: 0; filter: blur(18px); scale: .98; }
  .project__text {
    position: absolute; left: calc(50% + clamp(140px, 13vw, 220px)); top: 46vh; width: min(340px, 24vw);
    opacity: 0; translate: 0 24px; filter: blur(6px);
    transition: opacity .7s var(--ease-out), translate .9s var(--ease-out), filter .7s var(--ease-out);
  }
  .project.is-active .project__text { opacity: 1; translate: 0 0; filter: blur(0); transition-delay: .15s; }
  .work__index {
    display: flex; align-items: center; gap: 14px; position: absolute; z-index: 3;
    left: calc(var(--gutter) * 1.6); top: calc(46vh + 6px); width: calc(50% - clamp(140px, 11vw, 200px) - var(--gutter) * 2);
    font-family: var(--display); font-weight: 300; font-size: 22px;
  }
  .work__track { flex: 1; height: 2px; background-image: radial-gradient(circle, rgba(14,16,18,.35) 1px, transparent 1.5px); background-size: 6px 2px; position: relative; }
  .work__track-fill { position: absolute; inset: 0; background-image: radial-gradient(circle, var(--ink) 1.1px, transparent 1.6px); background-size: 6px 2px; transform-origin: left; transform: scaleX(0); }
}

/* Credentials */
.credentials { background: var(--paper); padding: clamp(90px, 16vh, 160px) var(--gutter) clamp(80px, 12vh, 130px) calc(var(--gutter) * 1.6); }
.credentials__head { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 32px 6vw; align-items: end; max-width: 1360px; }
.credentials__head h2 { font-family: var(--display); font-weight: 300; text-transform: uppercase; line-height: .92; font-size: clamp(44px, 6.4vw, 104px); }
.credentials__head p { max-width: 44ch; font-size: 17px; color: #33373b; padding-bottom: .6em; }
.credentials__strip {
  margin-top: clamp(48px, 8vh, 88px); max-width: 1360px;
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px dotted rgba(14,16,18,.45); border-bottom: 1px dotted rgba(14,16,18,.45);
}
.credentials__strip li { display: grid; grid-template-rows: 1fr auto; gap: 22px; padding: 36px 28px 26px; background: #fff; }
.credentials__strip li + li { border-left: 1px dotted rgba(14,16,18,.45); }
.credentials__strip img { width: 100%; max-width: 300px; height: 92px; object-fit: contain; object-position: left center; }
.credentials__strip img.is-ms { max-width: 220px; }
.credentials__strip span { color: var(--muted); display: flex; align-items: center; gap: 8px; }
.credentials__strip span::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--red); }

/* CTA */
.cta { background: var(--red); color: #fff; }
.cta__canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; opacity: .4; }
.cta__frame h2, .cta h2 { font-family: var(--display); font-weight: 300; text-transform: uppercase; line-height: .95; font-size: clamp(48px, 7.4vw, 124px); }
.cta__body { display: grid; justify-items: center; gap: 22px; }
.cta__note { font-size: 17px; color: #fff; max-width: 40ch; }
.cta__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.cta__corner { position: absolute; bottom: calc(var(--gutter) * 1.1); display: grid; color: #fff; }
.cta__corner em { color: #fff; text-decoration: underline; text-underline-offset: .25em; }
.cta__corner--left { left: calc(var(--gutter) * 1.6); text-align: left; }
.cta__corner--right { right: var(--gutter); text-align: right; text-transform: none; }

/* Footer */
.footer { position: relative; background: var(--ink); color: #fff; padding: clamp(80px, 14vh, 140px) var(--gutter) 0 calc(var(--gutter) * 1.6); overflow: hidden; }
.footer::before { content: ""; position: absolute; left: var(--gutter); right: var(--gutter); top: 0; height: 10px; background: var(--red); border-radius: 0 0 6px 6px; }
.footer__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; max-width: 1200px; }
.footer h2 { color: #fff; margin-bottom: 10px; }
.footer p { color: var(--on-ink-muted); font-size: 14px; }
.footer a { text-decoration: none; background-image: linear-gradient(currentColor, currentColor); background-size: 0 1px; background-position: 0 100%; background-repeat: no-repeat; transition: background-size .4s var(--ease-out), color .2s; }
.footer a:hover { color: #fff; background-size: 100% 1px; }
.footer__legal { margin-top: clamp(48px, 10vh, 100px); font-size: 12px !important; }
.footer .footer__wordmark { color: #fff; text-align: right; font-size: clamp(80px, 19.5vw, 400px); margin: 2vh calc(var(--gutter) * -.4) 0.03em 0; }
.footer .footer__wordmark em { color: var(--red); }

/* Floating WhatsApp */
.wa-float {
  position: fixed; z-index: 70; right: calc(var(--frame) + 14px); bottom: calc(var(--frame) + 14px);
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 18px 0 14px;
  border-radius: 999px; background: var(--ink); color: #fff; text-decoration: none;
  font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  box-shadow: 0 12px 30px -10px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.12);
  transition: transform .5s var(--ease-out), background-color .25s;
}
.js .wa-float:not(.is-on) { opacity: 0; translate: 0 16px; pointer-events: none; }
.wa-float { transition: transform .5s var(--ease-out), background-color .25s, opacity .4s var(--ease-out), translate .5s var(--ease-out); }
.wa-float svg { width: 22px; height: 22px; color: #3ddc84; }
.wa-float:hover { background: var(--red); transform: translateY(-2px); }
.wa-float:hover svg { color: #fff; }

/* Reveal helper (content stays visible without JS) */
.js .reveal { opacity: 0; translate: 0 28px; transition: opacity .9s var(--ease-out), translate 1.1s var(--ease-out); }
.js .reveal.is-in { opacity: 1; translate: 0 0; }

/* Responsive */
@media (max-width: 899px) {
  .topbar { grid-template-columns: 1fr auto; padding-left: calc(var(--gutter) + 10px); }
  .topbar__meta { display: none; }
  .hero__rule { top: calc(var(--gutter) * .8 + 50px); left: calc(var(--gutter) + 10px); }
  .hero__copy { left: calc(var(--gutter) + 6px); right: var(--gutter); bottom: auto; top: 58svh; }
  .hero__wordmark { right: calc(var(--gutter) * .4); font-size: 23vw; }
  .credentials__head { grid-template-columns: 1fr; }
  .credentials__strip { grid-template-columns: 1fr; }
  .credentials__strip li + li { border-left: 0; border-top: 1px dotted rgba(14,16,18,.45); }
  .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cta__corner { display: none; }
}
@media (max-width: 560px) {
  .topbar__nav a { padding: 7px 10px; }
  .topbar__nav a[href="#credentials"] { display: none; }
  .wa-float { padding: 0; width: 52px; justify-content: center; }
  .wa-float__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .footer__grid { grid-template-columns: 1fr; }
  .scene__frame { padding-inline: 26px; }
  .tagline { gap: 4px 14px; }
  .tagline li + li::before { content: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .js .reveal { opacity: 1; translate: none; }
  .js .scene { height: auto; }
}
