/* Brainy Factor — luminous white redesign. Blue is the only saturated colour.
   Breakthrough hero (neural canvas + kinetic type) and a floating glass nav dock. */

:root {
  --blue: #1690D0;
  --blue-600: #0E76AD;
  --blue-700: #0C5E88;
  --cyan: #4FB9EA;
  --blue-050: #EAF6FC;
  --blue-tint: #F4FAFE;

  --ink: #0B1A24;          /* near-black with a blue bias (chosen, not pure black) */
  --ink-2: #2B3A44;
  --slate: #5B6B76;
  --slate-2: #8A99A3;
  --paper: #FFFFFF;
  --paper-2: #F7FAFC;      /* barely-there cool white for section rhythm */
  --line: #EAF0F4;
  --line-2: #E1E9EF;

  --maxw: 1240px;
  --r-sm: 12px; --r-md: 18px; --r-lg: 26px; --r-xl: 36px;
  --shadow-xs: 0 1px 2px rgba(11,26,36,.04), 0 6px 18px rgba(11,26,36,.05);
  --shadow-sm: 0 8px 30px rgba(11,26,36,.08);
  --shadow-md: 0 18px 50px rgba(11,26,36,.10);
  --shadow-blue: 0 14px 40px rgba(22,144,208,.28);

  --f-display: "Outfit", system-ui, "Segoe UI", Roboto, sans-serif;
  --f-body: "Figtree", system-ui, "Segoe UI", Roboto, sans-serif;

  --step--1: clamp(.85rem,.81rem + .15vw,.95rem);
  --step-0: clamp(1.05rem,1rem + .25vw,1.2rem);
  --step-1: clamp(1.35rem,1.15rem + .7vw,1.7rem);
  --step-2: clamp(1.9rem,1.45rem + 1.6vw,2.8rem);
  --step-3: clamp(2.4rem,1.8rem + 2.8vw,4rem);
  --giant: clamp(3.2rem,2rem + 8vw,9rem);

  --ease: cubic-bezier(.22,.61,.36,1);
  --pad-x: clamp(20px,4vw,40px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--f-body); font-size: var(--step-0); line-height: 1.55;
  color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
h1,h2,h3 { font-family: var(--f-display); font-weight: 700; line-height: 1.0; letter-spacing: -.03em; text-wrap: balance; margin: 0; color: var(--ink); }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img, svg, canvas { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 8px; }

.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad-x); }
.section { padding-block: clamp(64px, 9vw, 150px); position: relative; }
.section.tint { background: var(--paper-2); }
.eyebrow {
  display: inline-flex; align-items: center; gap: .6em; font-family: var(--f-display); font-weight: 600;
  font-size: var(--step--1); letter-spacing: .2em; text-transform: uppercase; color: var(--blue-600);
}
.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--blue); border-radius: 2px; }
.section-head { max-width: 760px; display: grid; gap: 18px; margin-bottom: clamp(40px,5vw,68px); }
.section-head h2 { font-size: var(--step-3); }
.lead { font-size: var(--step-1); color: var(--slate); line-height: 1.4; font-weight: 400; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: .55em; font-family: var(--f-display); font-weight: 600;
  font-size: var(--step-0); padding: .9em 1.55em; border-radius: 999px; cursor: pointer; border: 1.5px solid transparent;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s, color .2s, border-color .2s; }
.btn svg { width: 1.05em; height: 1.05em; }
.btn-primary { background: var(--blue); color: #fff; box-shadow: var(--shadow-blue); }
.btn-primary:hover { background: var(--blue-600); transform: translateY(-3px); }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue-600); transform: translateY(-3px); }

/* ===================== FLOATING GLASS NAV DOCK ===================== */
.dock-wrap { position: fixed; inset: 0 0 auto; z-index: 80; display: flex; justify-content: center;
  padding: clamp(12px,2vw,20px) var(--pad-x); pointer-events: none; }
.dock { pointer-events: auto; width: 100%; max-width: var(--maxw);
  display: flex; align-items: center; gap: 18px; height: 96px; padding: 0 14px 0 28px;
  background: rgba(255,255,255,.72); backdrop-filter: blur(16px) saturate(1.4);
  border: 1px solid rgba(255,255,255,.7); border-radius: 999px;
  box-shadow: var(--shadow-sm); transition: max-width .4s var(--ease), height .4s var(--ease), box-shadow .3s, background .3s; }
.dock.shrunk { max-width: 940px; height: 60px; box-shadow: var(--shadow-md); background: rgba(255,255,255,.86); }
.brand-logo { height: 62px; flex: 0 0 auto; transition: height .4s var(--ease); }
.dock.shrunk .brand-logo { height: 28px; }
.brand-logo img { height: 100%; width: auto; }
.dock-links { position: relative; display: flex; gap: 4px; margin-inline: auto; }
.dock-links a { position: relative; z-index: 1; font-family: var(--f-display); font-weight: 500; color: var(--ink-2);
  padding: 9px 16px; border-radius: 999px; transition: color .25s; }
.dock-links a:hover, .dock-links a.active { color: var(--blue-700); }
.nav-pill { position: absolute; z-index: 0; top: 0; height: 100%; border-radius: 999px; background: var(--blue-050);
  opacity: 0; transition: transform .35s var(--ease), width .35s var(--ease), opacity .3s; }
.dock-links:hover .nav-pill { opacity: 1; }
.dock-actions { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.lang-toggle { display: inline-flex; border: 1.5px solid var(--line-2); border-radius: 999px; overflow: hidden;
  font-family: var(--f-display); font-weight: 600; font-size: .8rem; }
.lang-toggle button { border: 0; background: transparent; padding: .4em .72em; cursor: pointer; color: var(--slate); }
.lang-toggle button[aria-pressed="true"] { background: var(--blue); color: #fff; }
.dock .btn { padding: .6em 1.2em; font-size: .95rem; }
.burger { display: none; }

/* full-screen overlay menu */
.overlay { position: fixed; inset: 0; z-index: 90; background: rgba(255,255,255,.98); backdrop-filter: blur(8px);
  display: grid; align-content: center; gap: 6px; padding: var(--pad-x);
  clip-path: circle(0% at calc(100% - 44px) 44px); transition: clip-path .55s var(--ease); pointer-events: none; }
.overlay.open { clip-path: circle(150% at calc(100% - 44px) 44px); pointer-events: auto; }
.overlay a { font-family: var(--f-display); font-weight: 700; font-size: clamp(2.2rem,10vw,4rem); color: var(--ink);
  letter-spacing: -.03em; line-height: 1.1; opacity: 0; transform: translateY(20px); transition: opacity .4s, transform .4s; }
.overlay.open a { opacity: 1; transform: none; }
.overlay.open a:nth-child(1){ transition-delay:.12s } .overlay.open a:nth-child(2){ transition-delay:.18s }
.overlay.open a:nth-child(3){ transition-delay:.24s } .overlay.open a:nth-child(4){ transition-delay:.30s }
.overlay a:hover { color: var(--blue); }
.overlay-close { position: absolute; top: 30px; right: var(--pad-x); width: 48px; height: 48px; border-radius: 50%;
  border: 1.5px solid var(--line-2); background: #fff; cursor: pointer; display: grid; place-items: center; }

/* ===================== HERO ===================== */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; overflow: hidden; background: var(--paper); }
#neural { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(70% 80% at 18% 50%, #fff 32%, rgba(255,255,255,.65) 55%, rgba(255,255,255,0) 80%); }
/* corner shadow, blue-grey from the palette, fading away from the top-right */
.hero::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(74% 70% at 100% 0%,
    rgba(14,118,173,.36) 0%, rgba(22,144,208,.20) 28%, rgba(43,58,68,.10) 50%, rgba(14,118,173,.04) 64%, transparent 80%); }
.hero .wrap { position: relative; z-index: 2; padding-top: 150px; }
.hero-content { max-width: min(100%, 58rem); }
.hero .eyebrow { margin-bottom: 26px; }
.hero h1 { font-size: var(--giant); font-weight: 800; letter-spacing: -.045em; }
.hero h1 .lead-word { display: block; color: var(--ink); }
.rotator { display: block; position: relative; height: 1.15em; overflow: hidden; }
.rotator span { position: absolute; left: 0; top: 0; color: var(--blue); white-space: nowrap;
  opacity: 0; transform: translateY(1.1em); transition: opacity .45s var(--ease), transform .55s var(--ease); }
.rotator span.active { opacity: 1; transform: none; }
.rotator span.out { opacity: 0; transform: translateY(-1.1em); }
.hero .lead { margin-top: 28px; max-width: 30ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 38px; }

/* capability marquee */
.marquee { position: absolute; bottom: 0; left: 0; right: 0; z-index: 2; border-top: 1px solid var(--line);
  background: rgba(255,255,255,.7); backdrop-filter: blur(6px); overflow: hidden; padding: 16px 0; }
.marquee-track { display: inline-flex; gap: 44px; white-space: nowrap; animation: marquee 28s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee span { font-family: var(--f-display); font-weight: 600; font-size: var(--step-0); color: var(--slate);
  display: inline-flex; align-items: center; gap: 44px; letter-spacing: .02em; }
.marquee span::after { content: "●"; color: var(--blue); font-size: .5em; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ===================== STATS ===================== */
.stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 30px; }
.stat { display: grid; gap: 6px; padding: 30px; border: 1px solid var(--line); border-radius: var(--r-lg); background: #fff;
  transition: transform .3s var(--ease), box-shadow .3s; }
.stat:hover { transform: translateY(-5px); box-shadow: var(--shadow-sm); }
.stat b { font-family: var(--f-display); font-weight: 800; font-size: var(--step-3); line-height: 1; color: var(--blue); }
.stat span { color: var(--slate); font-size: var(--step-0); }

/* ===================== SERVICES (light cards w/ image + expand) ===================== */
.svc-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 24px; }
.svc { background: #fff; border: 1px solid var(--line); border-radius: var(--r-xl); overflow: hidden; cursor: pointer;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .3s; display: flex; flex-direction: column; }
.svc:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: var(--blue-050); }
.svc-media { aspect-ratio: 16/9; overflow: hidden; position: relative; }
.svc-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.svc:hover .svc-media img, .svc.open .svc-media img { transform: scale(1.07); }
.svc-num { position: absolute; top: 16px; left: 18px; font-family: var(--f-display); font-weight: 700; font-size: .85rem;
  letter-spacing: .14em; color: #fff; background: rgba(11,26,36,.35); backdrop-filter: blur(4px); padding: 4px 12px; border-radius: 999px; }
.svc-hint { position: absolute; top: 14px; right: 16px; width: 38px; height: 38px; border-radius: 50%; background: #fff;
  display: grid; place-items: center; box-shadow: var(--shadow-xs); transition: transform .4s var(--ease), background .3s; }
.svc-hint svg { width: 17px; height: 17px; stroke: var(--blue); }
.svc:hover .svc-hint, .svc.open .svc-hint { transform: rotate(45deg); background: var(--blue); }
.svc:hover .svc-hint svg, .svc.open .svc-hint svg { stroke: #fff; }
.svc-body { padding: 28px 30px 30px; display: grid; gap: 12px; }
.svc h3 { font-size: var(--step-2); }
.svc-tag { color: var(--slate); }
.svc-more { display: grid; gap: 10px; max-height: 0; opacity: 0; overflow: hidden;
  transition: max-height .5s var(--ease), opacity .4s var(--ease), margin .4s; }
.svc:hover .svc-more, .svc.open .svc-more { max-height: 260px; opacity: 1; margin-top: 2px; }
.svc-more ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.svc-more li { position: relative; padding-left: 22px; color: var(--ink-2); font-size: var(--step--1); }
.svc-more li::before { content: ""; position: absolute; left: 0; top: .5em; width: 10px; height: 10px; border-radius: 3px; background: var(--blue); }

/* ===================== METHOD ===================== */
.steps { display: grid; grid-template-columns: repeat(5,1fr); gap: 6px; }
.mstep { padding: 30px 22px; border-radius: var(--r-md); background: transparent; transition: background .35s var(--ease), transform .35s; }
.mstep:hover { background: #fff; box-shadow: var(--shadow-sm); transform: translateY(-5px); }
.mstep .n { font-family: var(--f-display); font-weight: 800; font-size: var(--step-2); color: var(--blue); }
.mstep .bar { height: 3px; background: linear-gradient(90deg,var(--blue),transparent); border-radius: 3px; margin: 12px 0 16px; transform: scaleX(.4); transform-origin: left; transition: transform .6s var(--ease); }
.mstep:hover .bar { transform: scaleX(1); }
.mstep h3 { font-size: var(--step-1); margin-bottom: 6px; }
.mstep p { color: var(--slate); font-size: var(--step--1); }

/* ===================== ABOUT ===================== */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px,5vw,72px); align-items: center; }
.about-media { position: relative; border-radius: var(--r-xl); overflow: hidden; box-shadow: var(--shadow-md); }
.about-media img { width: 100%; aspect-ratio: 4/3; object-fit: cover; transition: transform 1s var(--ease); }
.about-media:hover img { transform: scale(1.05); }
.about-media .float-badge { position: absolute; left: 20px; bottom: 20px; background: rgba(255,255,255,.92); backdrop-filter: blur(8px);
  border-radius: var(--r-md); padding: 12px 16px; box-shadow: var(--shadow-sm); }
.about-media .float-badge img { height: 24px; }
.about-text { display: grid; gap: 18px; }
.about-text h2 { font-size: var(--step-3); }
.about-extra { max-height: 0; opacity: 0; overflow: hidden; transition: max-height .55s var(--ease), opacity .4s; display: grid; gap: 14px; }
.about-extra p { color: var(--slate); }
.about.expanded .about-extra { max-height: 420px; opacity: 1; }
.read-more { border: 0; background: none; color: var(--blue-700); font-family: var(--f-display); font-weight: 600; font-size: var(--step-0); cursor: pointer; display: inline-flex; align-items: center; gap: .4em; padding: 0; justify-self: start; }
.read-more svg { width: 1em; height: 1em; transition: transform .3s; }
.about.expanded .read-more svg { transform: rotate(180deg); }

/* ===================== CONTACT (light) ===================== */
.contact-grid { display: grid; grid-template-columns: minmax(0, 640px); gap: 48px; }
.contact-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 34px; box-shadow: var(--shadow-xs); }
.field { display: grid; gap: 7px; margin-bottom: 18px; }
.field label { font-family: var(--f-display); font-weight: 600; font-size: var(--step--1); }
.field input, .field textarea { font-family: inherit; font-size: var(--step-0); color: var(--ink); background: var(--paper-2);
  border: 1.5px solid var(--line-2); border-radius: 12px; padding: .85em 1em; width: 100%; transition: border-color .2s, background .2s; }
.field input::placeholder, .field textarea::placeholder { color: var(--slate-2); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--blue); background: #fff; }
.contact-info { display: grid; gap: 14px; align-content: start; }
.info-row { display: flex; gap: 16px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); padding: 20px 22px; transition: transform .3s var(--ease), border-color .3s, box-shadow .3s; }
.info-row:hover { transform: translateX(6px); border-color: var(--blue-050); box-shadow: var(--shadow-xs); }
.info-ic { width: 46px; height: 46px; flex: 0 0 auto; border-radius: 13px; background: var(--blue-050); display: grid; place-items: center; }
.info-ic svg { width: 22px; height: 22px; stroke: var(--blue); }
.info-row b { font-family: var(--f-display); display: block; }
.info-row a, .info-row span { color: var(--slate); }
.info-row a:hover { color: var(--blue-700); }

/* ===================== FOOTER (light) ===================== */
.site-footer { background: var(--paper-2); border-top: 1px solid var(--line); padding-block: 56px 30px; color: var(--slate); }
.footer-top { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; padding-bottom: 34px; border-bottom: 1px solid var(--line); }
.footer-brand { max-width: 340px; display: grid; gap: 16px; }
.footer-brand .brand-logo { height: 32px; }
.footer-nav { display: flex; gap: 60px; flex-wrap: wrap; }
.footer-nav h4 { font-family: var(--f-display); color: var(--ink); font-size: var(--step--1); letter-spacing: .1em; text-transform: uppercase; margin: 0 0 14px; }
.footer-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.footer-nav a:hover { color: var(--blue-700); }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 22px; font-size: var(--step--1); }
.badge-private { display: inline-flex; align-items: center; gap: .5em; }
.badge-private::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 4px var(--blue-050); }

/* ---------- reveal ---------- */
[data-reveal] { opacity: 0; transform: translateY(34px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
[data-reveal].in { opacity: 1; transform: none; }
[data-reveal][data-d="1"] { transition-delay: .08s; } [data-reveal][data-d="2"] { transition-delay: .16s; }
[data-reveal][data-d="3"] { transition-delay: .24s; } [data-reveal][data-d="4"] { transition-delay: .32s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .001ms !important; }
  [data-reveal] { opacity: 1; transform: none; }
  .rotator span { position: static; opacity: 1; transform: none; } .rotator span:not(.active){ display:none; }
}

/* ---------- responsive ---------- */
@media (max-width: 920px) {
  .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .svc-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2,1fr); gap: 10px; }
  .svc-more, .svc.open .svc-more { max-height: 260px; opacity: 1; }
}
@media (max-width: 680px) {
  .dock-links, .dock .btn, .lang-toggle { display: none; }
  .burger { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 50%;
    border: 1.5px solid var(--line-2); background: #fff; cursor: pointer; margin-left: auto; }
  .burger svg { width: 20px; height: 20px; stroke: var(--ink); }
  .stats { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
}
