/* IntelliForce Dynamics — site styles
   Palette from the lockup: amber #FFB800, blue #295D9E, mist #93A6B3. Dark navy derived from the blue. */
:root {
  --bg: #0B1626;
  --bg-2: #10203A;
  --bg-3: #16304F;
  --blue: #295D9E;
  --blue-2: #4F86CB;
  --blue-3: #8FB3E3;
  --amber: #FFB800;
  --amber-2: #FFD15C;
  --mist: #93A6B3;
  --text: #F2F5F8;
  --muted: #B3C0CB;
  --line: rgba(255, 255, 255, 0.10);
  --line-2: rgba(255, 255, 255, 0.18);
  --max: 1200px;
  --gutter: clamp(16px, 5vw, 72px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0 0 0.5em; font-weight: 300; letter-spacing: -0.015em; line-height: 1.1; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 4.8vw, 4.3rem); max-width: 18ch; }
h2 { font-size: clamp(1.7rem, 3.4vw, 3rem); max-width: 22ch; }
h3 { font-size: clamp(1.15rem, 1.6vw, 1.45rem); font-weight: 500; letter-spacing: -0.01em; }
.lead { font-size: clamp(1.1rem, 1.5vw, 1.35rem); color: var(--muted); max-width: 60ch; }
.muted { color: var(--muted); }
.wrap { width: min(var(--max), 100% - 2 * var(--gutter)); margin-inline: auto; }
.prose { max-width: 68ch; }
.prose p + h3, .prose ul + h3 { margin-top: 2em; }
.todo { color: var(--amber-2); border-bottom: 1px dashed rgba(255, 184, 0, 0.6); }

.skip { position: absolute; left: -999px; top: 8px; background: var(--amber); color: var(--bg); padding: 8px 14px; border-radius: 6px; z-index: 100; }
.skip:focus { left: 8px; }

/* Kicker: small numbered label with amber dot (like a section index) */
.kicker {
  display: inline-flex; align-items: center; gap: 0.7em;
  margin: 0 0 1.4em; font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--mist);
}
.kicker::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 4px rgba(255, 184, 0, 0.15); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 0.6em;
  padding: 0.95em 1.6em; border-radius: 999px; border: 1px solid transparent;
  background: var(--amber); color: var(--bg); font-weight: 600; text-decoration: none; font-size: 0.95rem; line-height: 1;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background-color 0.2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(255, 184, 0, 0.22); background: var(--amber-2); }
.btn:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-2); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.06); box-shadow: none; }
.btn-sm { padding: 0.7em 1.2em; font-size: 0.85rem; white-space: nowrap; }
.btn .arrow { transition: transform 0.35s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }
.link { color: var(--text); text-decoration: none; font-weight: 500; position: relative; padding-bottom: 2px; }
.link::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--amber); transform: scaleX(0.35); transform-origin: left; transition: transform 0.4s var(--ease); }
.link:hover::after { transform: scaleX(1); }
.link .arrow { display: inline-block; margin-left: 0.35em; transition: transform 0.35s var(--ease); }
.link:hover .arrow { transform: translateX(4px); }

/* Header */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--header-h);
  transition: background-color 0.4s, backdrop-filter 0.4s, border-color 0.4s;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled { background: rgba(11, 22, 38, 0.72); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-color: var(--line); }
.header-inner { height: 100%; width: min(1400px, 100% - 2 * var(--gutter)); margin-inline: auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; white-space: nowrap; flex-shrink: 0; }
.brand-mark { width: 40px; height: 40px; }
.brand-word { display: inline-flex; align-items: baseline; gap: 0; font-family: Inter, system-ui, sans-serif; font-style: italic; letter-spacing: 0.02em; line-height: 1; }
.w1 { color: var(--amber); font-weight: 500; }
.w2 { color: var(--text); font-weight: 700; }
.w3 { color: var(--mist); font-weight: 500; font-size: 0.72em; margin-left: 0.6em; }
.brand-word { font-size: 1.15rem; }
.site-nav ul { display: flex; gap: clamp(22px, 3vw, 44px); counter-reset: nav; }
.site-nav li { counter-increment: nav; }
.site-nav a { white-space: nowrap; text-decoration: none; font-size: 0.78rem; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); padding: 8px 0; position: relative; display: inline-flex; align-items: baseline; gap: 0.6em; transition: color 0.2s; }
.site-nav a::before { content: counter(nav, decimal-leading-zero); font-size: 0.68rem; letter-spacing: 0.12em; color: var(--amber); opacity: 0.7; transition: opacity 0.2s; }
.site-nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--amber); transform: scaleX(0); transform-origin: left; transition: transform 0.4s var(--ease); }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--text); }
.site-nav a:hover::before, .site-nav a[aria-current="page"]::before { opacity: 1; }
.site-nav a:hover::after, .site-nav a[aria-current="page"]::after { transform: scaleX(1); }
.header-tools { display: flex; align-items: center; gap: 18px; }
.lang { text-decoration: none; font-size: 0.82rem; letter-spacing: 0.12em; color: var(--muted); border: 1px solid var(--line-2); padding: 6px 10px; border-radius: 999px; transition: color 0.2s, border-color 0.2s; }
.lang:hover { color: var(--text); border-color: var(--text); }
.menu-btn { display: none; align-items: center; gap: 12px; background: none; border: 1px solid var(--line-2); border-radius: 999px; color: var(--text); font: inherit; font-size: 0.78rem; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; cursor: pointer; padding: 9px 14px 9px 16px; transition: border-color 0.2s, background-color 0.2s; }
.menu-btn:hover, .nav-open .menu-btn { border-color: var(--amber); }
.menu-icon { width: 22px; height: 14px; position: relative; display: inline-block; }
.menu-icon i { position: absolute; left: 0; right: 0; height: 2px; background: currentColor; transition: transform 0.4s var(--ease), top 0.4s var(--ease); }
.menu-icon i:first-child { top: 0; }
.menu-icon i:last-child { top: 12px; }
.nav-open .menu-icon i:first-child { top: 6px; transform: rotate(45deg); }
.nav-open .menu-icon i:last-child { top: 6px; transform: rotate(-45deg); }

.nav-overlay {
  position: fixed; inset: 0; z-index: 40; background: rgba(11, 22, 38, 0.97);
  display: grid; place-items: center; opacity: 0; pointer-events: none; transition: opacity 0.45s var(--ease);
}
.nav-open .nav-overlay { opacity: 1; pointer-events: auto; }
.nav-overlay ul { display: grid; gap: 14px; justify-items: start; text-align: left; counter-reset: nav; }
.nav-overlay li { counter-increment: nav; }
.nav-overlay ul a { text-decoration: none; font-size: clamp(2rem, 8vw, 3.2rem); font-weight: 300; letter-spacing: -0.015em; line-height: 1.1; color: var(--text); display: inline-flex; align-items: baseline; gap: 0.5em; opacity: 0; transform: translateY(16px); transition: opacity 0.5s var(--ease), transform 0.5s var(--ease); }
.nav-overlay ul a::before { content: counter(nav, decimal-leading-zero); font-size: 0.8rem; font-weight: 500; letter-spacing: 0.16em; color: var(--amber); }
.nav-overlay ul a:hover { color: var(--amber-2); }
.nav-open .nav-overlay ul a { opacity: 1; transform: none; }
.nav-overlay li:nth-child(1) a { transition-delay: 0.05s; } .nav-overlay li:nth-child(2) a { transition-delay: 0.1s; } .nav-overlay li:nth-child(3) a { transition-delay: 0.15s; } .nav-overlay li:nth-child(4) a { transition-delay: 0.2s; } .nav-overlay li:nth-child(5) a { transition-delay: 0.25s; } .nav-overlay li:nth-child(6) a { transition-delay: 0.3s; }
.overlay-tools { display: flex; gap: 16px; justify-content: center; align-items: center; margin-top: 32px; }
.nav-open { overflow: hidden; }

@media (max-width: 1100px) {
  .site-nav, .header-cta, .header-tools .lang { display: none; }
  .menu-btn { display: inline-flex; }
}
@media (min-width: 1101px) { .nav-overlay { display: none; } }

/* Background layers: gradient, fine grid, large logo mark */
.panel, .page-hero { position: relative; isolation: isolate; overflow: hidden; }
.bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.bg-grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 96px 96px; opacity: 0.35;
  -webkit-mask-image: radial-gradient(ellipse at 70% 40%, #000 20%, transparent 75%); mask-image: radial-gradient(ellipse at 70% 40%, #000 20%, transparent 75%);
}
.bg-mark {
  position: absolute; right: -8vw; top: 50%; width: min(92vh, 80vw); aspect-ratio: 1; opacity: 0.11;
  transform: translate3d(0, calc(-50% + var(--p, 0) * -70px), 0) rotate(calc(var(--p, 0) * 5deg));
  will-change: transform;
}
.bg-mark.left { right: auto; left: -14vw; }
.bg-mark.faint { opacity: 0.06; }
.bg-glow { position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%; filter: blur(80px); opacity: 0.35; }
.glow-blue { background: radial-gradient(closest-side, rgba(41, 93, 158, 0.55), transparent 70%); right: -20vmax; top: -20vmax; }
.glow-amber { background: radial-gradient(closest-side, rgba(255, 184, 0, 0.22), transparent 70%); left: -25vmax; bottom: -30vmax; }
.tone-2 { background: linear-gradient(160deg, var(--bg-2), var(--bg) 70%); }
.tone-3 { background: linear-gradient(200deg, var(--bg-3), var(--bg) 75%); }

/* Home: full-screen panels with scroll snap */
.home .panel { min-height: 100svh; display: grid; align-items: center; padding: calc(var(--header-h) + 40px) 0 80px; scroll-snap-align: start; }
.home .panel.hero { min-height: 100svh; }
html.snap { scroll-snap-type: y proximity; }
@media (max-width: 860px), (max-height: 680px) { html.snap { scroll-snap-type: none; } .home .panel { min-height: 0; padding-top: calc(var(--header-h) + 56px); padding-bottom: 72px; } .home .panel.hero { min-height: 100svh; } }
.panel-inner { width: min(var(--max), 100% - 2 * var(--gutter)); margin-inline: auto; }
.hero h1 { margin-bottom: 0.6em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-top: 2em; }
.scroll-hint { position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%); font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--mist); display: grid; justify-items: center; gap: 8px; text-decoration: none; }
.scroll-hint svg { width: 18px; height: 18px; animation: hint 2.2s var(--ease) infinite; }
@keyframes hint { 0%, 100% { transform: translateY(0); opacity: 0.7; } 50% { transform: translateY(6px); opacity: 1; } }

.dots { position: fixed; right: 22px; top: 50%; transform: translateY(-50%); z-index: 30; display: grid; gap: 14px; }
.dots a { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, 0.3); display: block; transition: background-color 0.3s, transform 0.3s var(--ease); position: relative; }
.dots a::before { content: attr(data-label); position: absolute; right: 20px; top: 50%; transform: translateY(-50%) translateX(6px); white-space: nowrap; font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--mist); opacity: 0; transition: opacity 0.3s, transform 0.3s var(--ease); }
.dots a:hover::before { opacity: 1; transform: translateY(-50%) translateX(0); }
.dots a.active { background: var(--amber); transform: scale(1.35); }
@media (max-width: 960px) { .dots { display: none; } }

/* Content blocks */
.split { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.split > .sticky { position: sticky; top: calc(var(--header-h) + 32px); }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } .split > .sticky { position: static; } }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 24px; }
.cards-flow { display: flex; flex-wrap: wrap; gap: 24px; }
.cards-flow > .card { flex: 1 1 300px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 24px; }

.card {
  position: relative; display: flex; flex-direction: column; gap: 10px;
  background: rgba(255, 255, 255, 0.035); border: 1px solid var(--line); border-radius: 20px; padding: clamp(22px, 3vw, 36px);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: transform 0.5s var(--ease), border-color 0.3s, background-color 0.3s;
}
.card:hover { transform: translateY(-4px); border-color: rgba(255, 184, 0, 0.45); background: rgba(255, 255, 255, 0.05); }
.card h3 { margin-bottom: 0.2em; }
.card p { color: var(--muted); margin: 0; }
.card .link { margin-top: auto; padding-top: 14px; align-self: flex-start; }
.card .idx { font-size: 0.78rem; letter-spacing: 0.16em; color: var(--amber); }
a.card { text-decoration: none; color: inherit; }

.list { display: grid; gap: 0; }
.list li { padding: 18px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 2.4em 1fr; gap: 10px; align-items: baseline; color: var(--muted); }
.list li:last-child { border-bottom: 1px solid var(--line); }
.list li b, .list li strong { color: var(--text); font-weight: 500; }
.list .n { color: var(--amber); font-size: 0.8rem; letter-spacing: 0.12em; }
.bullets li { position: relative; padding-left: 1.4em; margin: 0.45em 0; color: var(--muted); }
.bullets li::before { content: ""; position: absolute; left: 0; top: 0.72em; width: 7px; height: 7px; border-radius: 50%; background: var(--amber); }
.bullets li strong { color: var(--text); font-weight: 500; }

.steps { counter-reset: s; display: grid; gap: 18px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 56px 1fr; gap: 18px; padding: 22px 0; border-top: 1px solid var(--line); }
.steps li::before { content: "0" counter(s); font-size: 1.6rem; color: var(--amber); font-weight: 300; line-height: 1; letter-spacing: -0.02em; }
.steps h3 { margin: 0 0 0.3em; }
.steps p { color: var(--muted); margin: 0; }

.stat { display: grid; gap: 4px; }
.stat b { font-size: clamp(2rem, 4vw, 3rem); font-weight: 300; letter-spacing: -0.03em; line-height: 1; color: var(--text); }
.stat span { color: var(--mist); font-size: 0.9rem; }

.portrait { border-radius: 22px; overflow: hidden; aspect-ratio: 4 / 5; position: relative; background: var(--bg-2); border: 1px solid var(--line); }
.portrait img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; filter: saturate(0.85) contrast(1.04); }
.portrait::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11, 22, 38, 0) 55%, rgba(11, 22, 38, 0.55)); }
.portrait-sm { max-width: 320px; }

/* Sub pages */
.page-hero { padding: calc(var(--header-h) + clamp(56px, 10vh, 120px)) 0 clamp(48px, 8vh, 96px); min-height: 62vh; display: grid; align-items: end; }
.page-hero .lead { margin-top: 1.2em; }
.section { padding: clamp(56px, 9vh, 112px) 0; border-top: 1px solid var(--line); }
.section[id] { scroll-margin-top: var(--header-h); }
.section-head { margin-bottom: clamp(28px, 4vh, 48px); }
.cta-band { padding: clamp(64px, 12vh, 140px) 0; text-align: left; position: relative; isolation: isolate; overflow: hidden; border-top: 1px solid var(--line); }
.cta-band h2 { max-width: 20ch; }
.cta-band .actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 1.6em; }

.case { border-top: 1px solid var(--line); padding: clamp(28px, 4vh, 44px) 0; display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: clamp(20px, 4vw, 64px); }
.case:last-of-type { border-bottom: 1px solid var(--line); }
.case .tag { font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--amber); margin-bottom: 0.8em; display: block; }
.case h3 { font-size: clamp(1.3rem, 2vw, 1.7rem); font-weight: 400; letter-spacing: -0.02em; }
.case dl { margin: 0; display: grid; grid-template-columns: 9em 1fr; gap: 10px 18px; }
.case dt { color: var(--mist); font-size: 0.85rem; letter-spacing: 0.06em; text-transform: uppercase; padding-top: 3px; }
.case dd { margin: 0; color: var(--muted); }
.case dd strong { color: var(--text); font-weight: 500; }
@media (max-width: 760px) { .case { grid-template-columns: 1fr; } .case dl { grid-template-columns: 1fr; gap: 2px 0; } .case dd { margin-bottom: 10px; } }
.case.placeholder { border: 1px dashed rgba(255, 184, 0, 0.5); border-radius: 18px; padding: 28px; margin: 24px 0; }

.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 24px; }
.contact-card { border: 1px solid var(--line); border-radius: 18px; padding: 24px; }
.contact-card span { display: block; color: var(--mist); font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 10px; }
.contact-card a { text-decoration: none; font-size: 1.1rem; }
.contact-card a:hover { color: var(--amber-2); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: clamp(48px, 8vh, 96px) 0 32px; background: linear-gradient(180deg, var(--bg), #08111E); font-size: 0.95rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-brand img { margin-bottom: 14px; }
.footer-name { font-style: italic; font-size: 1.15rem; margin-bottom: 0.4em; }
.footer-tag { color: var(--muted); max-width: 34ch; }
.footer-h { font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--mist); font-weight: 500; margin-bottom: 1em; }
.footer-col li { margin: 0.45em 0; color: var(--muted); }
.footer-col a { text-decoration: none; color: var(--muted); transition: color 0.2s; }
.footer-col a:hover { color: var(--text); }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; margin-top: 48px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--mist); font-size: 0.85rem; }
.footer-bottom p { margin: 0; }
.to-top { text-decoration: none; color: var(--mist); }
.to-top:hover { color: var(--text); }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); transition-delay: calc(var(--i, 0) * 90ms); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.snap { scroll-snap-type: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .scroll-hint svg { animation: none; }
  .bg-mark { transform: translate3d(0, -50%, 0); }
  .btn, .card, .link::after { transition: none; }
}

/* Small screens: compact brand so the menu button always fits */
@media (max-width: 520px) {
  .header-inner { gap: 12px; }
  .brand { gap: 10px; }
  .brand-mark { width: 34px; height: 34px; }
  .brand-word { font-size: 1.02rem; }
  .brand-word .w3 { display: none; }
  .menu-btn { flex-shrink: 0; }
}
