/* =========================================================
   Trajanov — Applied AI (light / vectr-inspired)
   Cool blue-grey canvas, electric cobalt accent, big tight
   grotesque, dotted-ring motif, scroll-driven 3D journey.
   ========================================================= */

:root {
  --canvas:   #dbe5ec;
  --canvas-2: #e7eef3;
  --paper:    #fcfcfd;
  --ink:      #07061a;
  --ink-soft: #3b3c49;
  --muted:    #767783;
  --line:     rgba(7, 6, 26, 0.12);
  --line-2:   rgba(7, 6, 26, 0.22);
  --accent:   #1f2ae6;
  --accent-d: #141ca8;
  --coral:    #ff5b46;
  --dark:     #0a0a16;
  --dark-2:   #11111f;

  --ff: 'General Sans', system-ui, -apple-system, sans-serif;
  --mono: 'Space Mono', ui-monospace, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --gutter: clamp(1.15rem, 4.5vw, 5.5rem);
  --maxw: 1380px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
/* Lenis */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--ff);
  font-size: clamp(1rem, 0.96rem + 0.2vw, 1.1rem);
  line-height: 1.55;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
.mono { font-family: var(--mono); letter-spacing: 0; }
::selection { background: var(--accent); color: #fff; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3 { font-weight: 600; letter-spacing: -0.035em; line-height: 0.98; }

/* ---------- preloader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 10000; background: var(--canvas);
  display: grid; place-items: center; color: var(--ink);
  transition: opacity 0.8s var(--ease), visibility 0.8s;
}
.loader.is-done { opacity: 0; visibility: hidden; pointer-events: none; }
.loader__core { position: relative; width: min(70vw, 460px); aspect-ratio: 1; display: grid; place-items: center; }
.loader__rings { position: absolute; inset: 0; width: 100%; height: 100%; color: rgba(7,6,26,0.3); animation: spin 18s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loader__mark { width: 46px; color: var(--accent); animation: markpulse 1.6s var(--ease) infinite; }
.loader__mark svg { width: 100%; height: auto; }
@keyframes markpulse { 0%,100%{ transform: scale(1); opacity:1 } 50%{ transform: scale(0.8); opacity:0.6 } }
.loader__pct { position: absolute; bottom: 8%; left: 50%; transform: translateX(-50%); font-family: var(--mono); font-size: 0.8rem; color: var(--muted); }

/* ---------- scroll progress ---------- */
.scroll-progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 9000; pointer-events: none; }
.scroll-progress span { display: block; height: 100%; width: 0%; background: var(--accent); }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: clamp(0.9rem, 1.8vw, 1.5rem) var(--gutter);
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease), backdrop-filter 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled { background: rgba(219,229,236,0.72); backdrop-filter: blur(12px) saturate(140%); -webkit-backdrop-filter: blur(12px) saturate(140%); border-bottom-color: var(--line); }
.nav__group { display: flex; align-items: center; gap: clamp(1rem, 2vw, 2rem); }
.nav__group--right { justify-content: flex-end; }
.nav__group a:not(.btn), .nav__link-min { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.02em; text-transform: uppercase; color: var(--ink-soft); position: relative; }
.nav__group a:not(.btn)::after, .nav__link-min::after { content:''; position:absolute; left:0; bottom:-3px; height:1px; width:0; background: var(--accent); transition: width 0.3s var(--ease); }
.nav__group a:not(.btn):hover::after, .nav__link-min:hover::after { width:100%; }
.nav__brand { font-weight: 700; letter-spacing: 0.16em; font-size: clamp(0.95rem, 1.4vw, 1.15rem); text-align: center; }
.nav__burger { display: none; background: none; border: 0; cursor: pointer; width: 34px; height: 30px; position: relative; }
.nav__burger span { position: absolute; left: 4px; right: 4px; height: 2px; background: var(--ink); transition: transform 0.4s var(--ease); }
.nav__burger span:nth-child(1){ top: 11px; } .nav__burger span:nth-child(2){ top: 18px; }
.nav__burger.is-open span:nth-child(1){ transform: translateY(3.5px) rotate(45deg); }
.nav__burger.is-open span:nth-child(2){ transform: translateY(-3.5px) rotate(-45deg); }

.mobile-menu { position: fixed; inset: 0; z-index: 999; background: var(--canvas); display: flex; flex-direction: column; justify-content: center; gap: 0.3rem; padding: var(--gutter); opacity: 0; visibility: hidden; transition: opacity 0.45s var(--ease), visibility 0.45s; }
.mobile-menu.is-open { opacity: 1; visibility: visible; }
.mobile-menu a { font-size: clamp(2rem, 9vw, 3rem); font-weight: 600; letter-spacing: -0.03em; padding: 0.35rem 0; }
.mobile-menu .mm-cta { color: var(--accent); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 0.55rem; font-family: var(--mono); font-size: 0.76rem; letter-spacing: 0.02em; text-transform: uppercase; cursor: pointer; transition: transform 0.3s var(--ease), background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease); white-space: nowrap; }
.btn svg { width: 15px; height: 15px; transition: transform 0.3s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn--solid { background: var(--accent); color: #fff; padding: 0.9rem 1.3rem; border-radius: 100px; }
.btn--solid:hover { background: var(--accent-d); transform: translateY(-2px); }
.btn--line { border: 1px solid var(--line-2); color: var(--ink); padding: 0.9rem 1.3rem; border-radius: 100px; }
.btn--line:hover { border-color: var(--accent); color: var(--accent); }
.btn--pill { border: 1px solid var(--line-2); color: var(--ink); padding: 0.6rem 1.05rem; border-radius: 100px; }
.btn--pill:hover { background: var(--ink); color: var(--canvas); border-color: var(--ink); }
.btn--pill-light { border-color: rgba(255,255,255,0.25); color: #fff; padding: 0.85rem 1.3rem; }
.btn--pill-light:hover { background: #fff; color: var(--dark); border-color: #fff; }

/* ---------- shared ---------- */
.kicker { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 0.6rem; }
.kicker span { color: var(--accent); }
.kicker--light { color: rgba(255,255,255,0.6); }
.kicker--light span { color: #fff; }
.section-title { font-size: clamp(2.2rem, 6vw, 5rem); }
.muted { color: var(--muted); }
.reveal { opacity: 0; transform: translateY(28px); }

/* =========================================================
   JOURNEY (pinned) + 3D SCENE
   ========================================================= */
.journey { position: relative; height: 520vh; }
.journey__sticky { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: 1; }
.scene__grain { position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0.5; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.35'/%3E%3C/svg%3E"); }

.hero { position: absolute; z-index: 5; left: var(--gutter); right: var(--gutter); top: 50%; transform: translateY(-50%); max-width: 900px; pointer-events: none; }
.hero .btn, .hero a { pointer-events: auto; }
.hero__eyebrow { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); display: inline-flex; align-items: center; gap: 0.6rem; margin-bottom: 1.4rem; }
.hero__eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(31,42,230,0.16); }
.hero__title { font-size: clamp(2.9rem, 9.5vw, 8rem); letter-spacing: -0.05em; line-height: 0.9; }
.hero__title .ln { display: block; overflow: hidden; }
.hero__title .ln > i { display: block; font-style: normal; transform: translateY(110%); }
.hero__title em { font-style: normal; color: var(--accent); }
.hero__sub { max-width: 44ch; margin-top: 1.6rem; color: var(--ink-soft); font-size: clamp(1.02rem, 1rem + 0.4vw, 1.3rem); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 2.1rem; }
.hero__scrollhint { display: flex; align-items: center; gap: 0.7rem; margin-top: 3.2rem; font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.hero__scrollhint i { width: 46px; height: 1px; background: var(--line-2); position: relative; overflow: hidden; }
.hero__scrollhint i::after { content:''; position:absolute; inset:0; left:-50%; width:50%; background: var(--accent); animation: slide 2s var(--ease) infinite; }
@keyframes slide { to { left: 150%; } }

/* steps */
.steps { position: absolute; z-index: 5; left: var(--gutter); bottom: clamp(2rem, 6vh, 4rem); list-style: none; max-width: 460px; opacity: 0; }
.step { display: grid; grid-template-columns: 30px 1fr; gap: 0.9rem; padding: 0.5rem 0; align-items: start; }
.step__idx { font-family: var(--mono); font-size: 0.78rem; color: var(--muted); padding-top: 0.25rem; }
.step__body h3 { font-size: 1.15rem; letter-spacing: -0.02em; color: var(--muted); transition: color 0.4s var(--ease); }
.step__body p { font-size: 0.92rem; color: var(--ink-soft); margin-top: 0.5rem; max-height: 0; opacity: 0; overflow: hidden; transition: max-height 0.5s var(--ease), opacity 0.4s var(--ease), margin 0.4s var(--ease); }
.step.is-active .step__idx { color: var(--accent); }
.step.is-active .step__body h3 { font-size: 1.5rem; color: var(--ink); }
.step.is-active .step__body p { max-height: 9rem; opacity: 1; }
.journey__caption { position: absolute; z-index: 5; right: var(--gutter); bottom: clamp(2rem, 6vh, 4rem); color: var(--muted); font-size: 0.72rem; }

/* =========================================================
   INTRO
   ========================================================= */
.intro { max-width: var(--maxw); margin: 0 auto; padding: clamp(6rem, 14vh, 11rem) var(--gutter) clamp(4rem, 8vh, 7rem); }
.intro__title { font-size: clamp(2rem, 5.5vw, 4.4rem); margin: 1.4rem 0 3rem; letter-spacing: -0.04em; }
.intro__cols { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(1.5rem, 4vw, 4rem); max-width: 980px; margin-left: auto; border-top: 1px solid var(--line); padding-top: 2.2rem; }
.intro__cols p { color: var(--ink-soft); }

/* =========================================================
   CAPABILITIES
   ========================================================= */
.caps { max-width: var(--maxw); margin: 0 auto; padding: clamp(3rem, 7vh, 6rem) var(--gutter); }
.caps__head { margin-bottom: 2.6rem; display: flex; flex-direction: column; gap: 1rem; }
.caps__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.cap { background: var(--canvas); padding: clamp(1.6rem, 2.6vw, 2.6rem); min-height: 270px; display: flex; flex-direction: column; transition: background 0.4s var(--ease); }
.cap:hover { background: var(--paper); }
.cap__ico { width: 56px; height: 56px; color: var(--accent); margin-bottom: 1.5rem; }
.cap__ico svg { width: 100%; height: 100%; }
.cap:hover .cap__ico { color: var(--coral); }
.cap h3 { font-size: clamp(1.2rem, 1.8vw, 1.5rem); letter-spacing: -0.025em; margin-bottom: 0.7rem; }
.cap p { color: var(--muted); font-size: 0.95rem; }

/* =========================================================
   STANDARDS BAND (dark)
   ========================================================= */
.band { background: var(--dark); color: #fff; display: grid; grid-template-columns: 1fr 1fr; align-items: stretch; min-height: 78vh; overflow: hidden; }
.band__visual { position: relative; overflow: hidden; min-height: 320px; background: radial-gradient(120% 120% at 30% 20%, #14142a, var(--dark) 70%); }
.band__visual canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.band__rings { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255,255,255,0.16); }
.band__rings svg { width: 80%; height: auto; animation: spin 26s linear infinite; }
.band__body { display: flex; flex-direction: column; justify-content: center; gap: 1.5rem; padding: clamp(2.5rem, 6vw, 6rem); }
.band__title { font-size: clamp(1.9rem, 4.2vw, 3.6rem); letter-spacing: -0.04em; }
.band__text { color: rgba(255,255,255,0.66); max-width: 46ch; }
.band .btn--pill-light { align-self: flex-start; }

/* =========================================================
   INDUSTRIES
   ========================================================= */
.industries { max-width: var(--maxw); margin: 0 auto; padding: clamp(5rem, 10vh, 9rem) var(--gutter); }
.industries__head { margin-bottom: 2.4rem; display: flex; flex-direction: column; gap: 1rem; }
.ind-list { list-style: none; border-top: 1px solid var(--line); }
.ind-list li { display: grid; grid-template-columns: 76px 1fr auto; gap: 1.4rem; align-items: baseline; padding: clamp(1.1rem, 2.4vw, 1.9rem) 0.4rem; border-bottom: 1px solid var(--line); position: relative; transition: padding 0.4s var(--ease); }
.ind-list li::before { content:''; position:absolute; inset:0; background: linear-gradient(90deg, rgba(31,42,230,0.06), transparent 55%); opacity:0; transition: opacity 0.4s var(--ease); }
.ind-list li:hover { padding-left: 1.4rem; }
.ind-list li:hover::before { opacity:1; }
.ind__idx { font-family: var(--mono); font-size: 0.74rem; color: var(--accent); }
.ind__name { font-size: clamp(1.35rem, 3.4vw, 2.5rem); letter-spacing: -0.03em; font-weight: 500; }
.ind__tag { font-size: 0.74rem; color: var(--muted); text-align: right; }

/* =========================================================
   TEAM
   ========================================================= */
.team { max-width: var(--maxw); margin: 0 auto; padding: clamp(3rem, 7vh, 6rem) var(--gutter) clamp(5rem, 10vh, 9rem); }
.team__head { margin-bottom: 2.6rem; display: flex; flex-direction: column; gap: 1rem; }
.team__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(1.2rem, 2.5vw, 2.4rem); }
.tm__photo { aspect-ratio: 4/5; border-radius: 12px; overflow: hidden; background: var(--canvas-2); border: 1px solid var(--line); margin-bottom: 1.2rem; }
.tm__photo img { width: 100%; height: 100%; object-fit: cover; object-position: center top; transition: transform 0.7s var(--ease); }
.tm:hover .tm__photo img { transform: scale(1.045); }
.tm__role { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--accent); }
.tm__name { font-size: clamp(1.3rem, 2.2vw, 1.8rem); letter-spacing: -0.03em; margin: 0.5rem 0 0.6rem; }
.tm__meta { font-family: var(--mono); font-size: 0.74rem; color: var(--ink-soft); line-height: 1.5; margin-bottom: 0.9rem; }
.tm__bio { color: var(--muted); font-size: 0.94rem; }

/* =========================================================
   STATS
   ========================================================= */
.stats { max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat { padding: clamp(2.2rem, 5vw, 4rem) var(--gutter); text-align: center; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat__n { display: block; font-size: clamp(2.6rem, 6vw, 4.6rem); font-weight: 600; letter-spacing: -0.04em; line-height: 1; }
.stat__l { display: block; margin-top: 0.7rem; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }

/* =========================================================
   FAQ
   ========================================================= */
.faq { max-width: var(--maxw); margin: 0 auto; padding: clamp(5rem, 10vh, 9rem) var(--gutter); display: grid; grid-template-columns: 0.7fr 1.3fr; gap: clamp(2rem, 5vw, 5rem); }
.faq__head { display: flex; flex-direction: column; gap: 1rem; position: sticky; top: 110px; align-self: start; }
.faq__list { border-top: 1px solid var(--line); }
.qa { border-bottom: 1px solid var(--line); }
.qa summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: clamp(1.1rem, 2.2vw, 1.7rem) 0; font-size: clamp(1.1rem, 2vw, 1.5rem); font-weight: 500; letter-spacing: -0.02em; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary i { position: relative; width: 18px; height: 18px; flex-shrink: 0; }
.qa summary i::before, .qa summary i::after { content:''; position:absolute; background: var(--accent); transition: transform 0.35s var(--ease); }
.qa summary i::before { top: 8px; left: 0; width: 18px; height: 2px; }
.qa summary i::after { left: 8px; top: 0; width: 2px; height: 18px; }
.qa[open] summary i::after { transform: scaleY(0); }
.qa__a { overflow: hidden; opacity: 0; transform: translateY(-6px); transition: opacity 0.4s var(--ease), transform 0.4s var(--ease); }
.qa[open] .qa__a { opacity: 1; transform: none; }
.qa__a p { color: var(--muted); padding-bottom: clamp(1.1rem, 2.2vw, 1.7rem); max-width: 60ch; }
.foot__wordmark { overflow: hidden; }

/* =========================================================
   FOOTER
   ========================================================= */
.foot { background: var(--dark); color: #fff; padding: clamp(4rem, 9vh, 8rem) var(--gutter) 2.5rem; overflow: hidden; }
.foot__cta { max-width: var(--maxw); margin: 0 auto; display: flex; flex-direction: column; gap: 1.6rem; align-items: flex-start; }
.foot__title { font-size: clamp(2.4rem, 7vw, 5.5rem); letter-spacing: -0.045em; }
.foot__email { font-family: var(--mono); margin-top: 0.4rem; }
.foot__links { max-width: var(--maxw); margin: clamp(3rem, 6vw, 5rem) auto 0; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid rgba(255,255,255,0.14); }
.foot__links a { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: clamp(1.3rem, 2.5vw, 2rem) clamp(1rem,2vw,2rem) clamp(1.3rem,2.5vw,2rem) 0; font-size: clamp(1.2rem, 2.4vw, 1.9rem); font-weight: 500; letter-spacing: -0.02em; border-right: 1px solid rgba(255,255,255,0.14); transition: color 0.3s var(--ease); }
.foot__links a:last-child { border-right: 0; }
.foot__links a svg { width: 22px; height: 22px; color: var(--accent); transition: transform 0.3s var(--ease); }
.foot__links a:hover { color: var(--accent); }
.foot__links a:hover svg { transform: translate(4px, -4px); }
.foot__wordmark { max-width: var(--maxw); margin: clamp(1.5rem, 3vw, 2.5rem) auto 0; font-weight: 700; letter-spacing: -0.05em; line-height: 0.82; font-size: clamp(3rem, 17vw, 16rem); color: #fff; white-space: nowrap; }
.foot__base { max-width: var(--maxw); margin: clamp(1.5rem,3vw,2.5rem) auto 0; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: 0.72rem; color: rgba(255,255,255,0.5); border-top: 1px solid rgba(255,255,255,0.14); padding-top: 1.4rem; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1024px) {
  .caps__grid { grid-template-columns: repeat(2, 1fr); }
  .team__grid { grid-template-columns: 1fr; max-width: 520px; }
  .faq { grid-template-columns: 1fr; }
  .faq__head { position: static; }
}
@media (max-width: 760px) {
  .nav { grid-template-columns: auto 1fr auto; }
  .nav__group--left, .nav__group--right { display: none; }
  .nav__brand { text-align: left; }
  .nav__burger { display: block; }
  .journey { height: 460vh; }
  .hero__title { line-height: 0.94; }
  .steps { right: var(--gutter); max-width: none; }
  .journey__caption { display: none; }
  .intro__cols { grid-template-columns: 1fr; }
  .caps__grid { grid-template-columns: 1fr; }
  .band { grid-template-columns: 1fr; }
  .band__visual { min-height: 260px; }
  .ind-list li { grid-template-columns: 54px 1fr; gap: 0.5rem 0.9rem; }
  .ind__tag { grid-column: 2; text-align: left; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(odd){ border-right: 1px solid var(--line); } .stat:nth-child(even){ border-right: 0; }
  .stat:nth-child(1),.stat:nth-child(2){ border-bottom: 1px solid var(--line); }
  .foot__links { grid-template-columns: 1fr; }
  .foot__links a { border-right: 0; border-bottom: 1px solid rgba(255,255,255,0.14); }
  .foot__wordmark { font-size: 16.5vw; letter-spacing: -0.04em; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .hero__title .ln > i { transform: none !important; }
  .steps { opacity: 1 !important; }
  .loader { display: none !important; }
}
