:root {
  --color-bg: #020101;
  --color-bg-soft: #0a0707;
  --color-surface: #0f0c0c;
  --color-surface-2: #15100f;
  --color-accent: #d12b2d;
  --color-accent-strong: #ef3a3c;
  --color-accent-soft: rgba(209, 43, 45, 0.12);
  --color-text: #f4f1ef;
  --color-text-muted: #b6adab;
  --color-text-dim: #847a78;
  --color-border: rgba(255, 255, 255, 0.07);
  --color-border-strong: rgba(255, 255, 255, 0.14);
  --font-sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --container: 1200px;
  --container-narrow: 880px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --t-fast: 160ms;
  --t-base: 260ms;
  --t-slow: 480ms;
}

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

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(209, 43, 45, 0.1), transparent 60%),
    radial-gradient(900px 500px at -10% 20%, rgba(209, 43, 45, 0.05), transparent 60%),
    var(--color-bg);
}

img,
svg,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
}

input,
textarea,
select {
  font-family: inherit;
  color: inherit;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 0.4em;
  color: var(--color-text);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

h1 { font-size: clamp(2.4rem, 5vw, 3.8rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.4rem); }

p {
  margin: 0 0 1em;
  color: var(--color-text-muted);
}

::selection {
  background: var(--color-accent);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--color-accent-strong);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: clamp(64px, 9vw, 80px) 0;
}

.section-tight {
  padding: clamp(48px, 6vw, 80px) 0;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  color: var(--color-accent);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 22px;
  height: 1px;
  background: var(--color-accent);
  content: "";
  transition: width 560ms var(--ease) 260ms;
}

/* Eyebrow line "draws" itself when its reveal block enters view */
.reveal .eyebrow::before { width: 0; }
.reveal.is-visible .eyebrow::before { width: 22px; }

.lead {
  max-width: 720px;
  color: var(--color-text-muted);
  font-size: 1.1rem;
}

.skip-link {
  position: absolute;
  top: auto;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  top: 12px;
  left: 12px;
  z-index: 100;
  width: auto;
  height: auto;
  padding: 10px 14px;
  background: var(--color-text);
  color: var(--color-bg);
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 780ms var(--ease), transform 780ms var(--ease);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Zoom variant: element scales in instead of rising (used for hero art) */
.reveal-zoom { transform: scale(0.92); }
.reveal-zoom.is-visible { transform: scale(1); }

/* Shared header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid transparent;
  background: rgba(2, 1, 1, 0.55);
  backdrop-filter: blur(12px);
  transition: background-color var(--t-base) var(--ease), border-color var(--t-base) var(--ease);
}

.site-header.is-scrolled {
  border-bottom-color: var(--color-border);
  background: rgba(2, 1, 1, 0.85);
}

.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  color: var(--color-text);
}

.brand-logo {
  width: 156px;
  height: auto;
}

.desktop-nav {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.nav-link {
  position: relative;
  padding: 10px 14px;
  border-radius: 8px;
  color: var(--color-text-muted);
  font-size: 0.92rem;
  font-weight: 500;
  transition: color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--color-text);
}

.nav-link.active {
  color: var(--color-text);
}

.nav-link.active::after {
  position: absolute;
  right: 14px;
  bottom: 4px;
  left: 14px;
  height: 2px;
  border-radius: 2px;
  background: var(--color-accent);
  content: "";
}

.header-cta {
  display: inline-flex;
}

.burger {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: transparent;
}

.burger span {
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--color-text);
  transition: transform var(--t-base) var(--ease), opacity var(--t-fast);
}

.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  display: none;
  max-height: 0;
  overflow: hidden;
  border-top: 1px solid var(--color-border);
  background: rgba(2, 1, 1, 0.96);
  backdrop-filter: blur(12px);
  transition: max-height var(--t-slow) var(--ease);
}

.mobile-menu.is-open { max-height: 480px; }

.mobile-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: var(--container);
  margin: 0 auto;
  padding: 16px 24px 24px;
}

.mobile-link {
  padding: 14px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--color-text);
  font-weight: 500;
}

.mobile-link:hover {
  border-color: var(--color-border);
  background: rgba(255, 255, 255, 0.04);
}

/* Buttons */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-align: center;
  white-space: nowrap;
  transition:
    background-color var(--t-base) var(--ease),
    color var(--t-base) var(--ease),
    border-color var(--t-base) var(--ease),
    transform var(--t-fast) var(--ease),
    box-shadow var(--t-base) var(--ease);
}

.btn:active { transform: translateY(1px); }
.btn-lg { padding: 16px 28px; font-size: 1rem; }

.btn-primary {
  border-color: var(--color-accent);
  background: var(--color-accent);
  color: #fff;
  box-shadow: 0 8px 30px -10px rgba(209, 43, 45, 0.6);
}

.btn-primary:hover {
  border-color: var(--color-accent-strong);
  background: var(--color-accent-strong);
  box-shadow: 0 14px 40px -10px rgba(209, 43, 45, 0.75);
}

.btn-secondary {
  border-color: var(--color-border-strong);
  background: transparent;
  color: var(--color-text);
}

.btn-secondary:hover {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.04);
}

/* Shared footer */
.site-footer {
  margin-top: 80px;
  border-top: 1px solid var(--color-border);
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.02));
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1.2fr 1fr;
  gap: 48px;
  padding: 72px 24px 48px;
}

.footer-brand-col { max-width: 360px; }
.site-footer .brand { margin-bottom: 14px; }
.site-footer .brand-logo { width: 180px; }

.footer-tagline {
  margin: 6px 0 12px;
  color: var(--color-text-muted);
}

.footer-address {
  margin: 0;
  color: var(--color-text-dim);
  font-size: 0.9rem;
}

.footer-col h4 {
  margin: 0 0 16px;
  color: var(--color-text-dim);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-col li,
.footer-col a {
  color: var(--color-text-muted);
  font-size: 0.94rem;
  transition: color var(--t-fast) var(--ease);
}

.footer-col a:hover { color: var(--color-text); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px 36px;
  border-top: 1px solid var(--color-border);
  color: var(--color-text-dim);
  font-size: 0.85rem;
}

.footer-bottom p { margin: 0; color: inherit; }

/* Shared CTA */
.cta-section { padding-top: 80px; padding-bottom: 100px; }

.cta-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: clamp(24px, 4vw, 56px);
  overflow: hidden;
  padding: clamp(40px, 6vw, 72px);
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01)), var(--color-surface);
}

.cta-card::before {
  position: absolute;
  top: -40%;
  right: -10%;
  width: 60%;
  height: 200%;
  background: radial-gradient(closest-side, rgba(209, 43, 45, 0.3), transparent 70%);
  content: "";
  filter: blur(20px);
  pointer-events: none;
}

.cta-inner { position: relative; flex: 1 1 60%; max-width: 640px; }
.cta-title { margin: 0 0 14px; }
.cta-description { margin: 0 0 26px; color: var(--color-text-muted); font-size: 1.05rem; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.cta-figure {
  position: relative;
  z-index: 1;
  flex: 1 1 40%;
  align-self: flex-end;
  max-width: 440px;
  margin-bottom: calc(clamp(40px, 6vw, 72px) * -1);
}
.cta-figure img { width: 100%; height: auto; }

/* Home */
.home-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(56px, 8vw, 50px) 0;
}

.home-hero-bg,
.home-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
}

.home-hero-bg {
  background:
    linear-gradient(180deg, rgba(2, 1, 1, 0.22), rgba(2, 1, 1, 0.42)),
    url("/images/background-hero-3.png") center / cover no-repeat;
  background-attachment: scroll, fixed;
  animation: home-hero-bg-in 1000ms var(--ease) both;
}

@keyframes home-hero-bg-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.home-hero-overlay {
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(2, 1, 1, 0.72) 0%, rgba(2, 1, 1, 0.35) 45%, rgba(2, 1, 1, 0.05) 100%),
    linear-gradient(180deg, transparent 60%, rgba(2, 1, 1, 0.92) 100%);
}

.home-hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  gap: 64px;
}

.home-hero-title {
  max-width: 620px;
  margin: 0 0 18px;
  font-size: clamp(2rem, 3.8vw, 3rem);
  line-height: 1.08;
}

.home-hero-title span { color: var(--color-accent); }

.home-hero-lead {
  max-width: 520px;
  margin: 0 0 28px;
  color: var(--color-text-muted);
  font-size: 1.05rem;
}

.home-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.home-hero-scroll {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 30px;
  color: var(--color-text-dim);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  transition: color var(--t-fast) var(--ease);
}

.home-hero-scroll:hover { color: var(--color-text); }
.home-hero-scroll svg { color: var(--color-accent); animation: home-hero-scroll-cue 1.8s ease-in-out infinite; }

@keyframes home-hero-scroll-cue {
  0%, 100% { opacity: 0.48; transform: translateY(0); }
  50% { opacity: 1; transform: translateY(7px); }
}

.home-hero-illustration {
  position: relative;
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  filter: drop-shadow(0 50px 80px rgba(0, 0, 0, 0.55));
}

.home-hero-illustration::before {
  position: absolute;
  inset: 8% 4% 14%;
  z-index: -1;
  background: radial-gradient(closest-side, rgba(209, 43, 45, 0.32), transparent 70%);
  content: "";
  filter: blur(60px);
}

/* Hero construction sequence (cross-fade) */
.hero-seq {
  position: relative;
  display: grid;
}
/* Modern cross-fade: focus-pull (blur) + gentle zoom hides subtle
   position differences between the frames as they swap. */
.hero-seq-frame {
  grid-area: 1 / 1;
  width: 100%;
  opacity: 0;
  transform: scale(1.05);
  filter: blur(10px);
  transition:
    opacity 1100ms var(--ease),
    transform 1300ms var(--ease),
    filter 1100ms var(--ease);
  will-change: opacity, transform, filter;
}
.hero-seq-frame.is-active {
  opacity: 1;
  transform: scale(1);
  filter: blur(0);
}

/* Drop-shadow lives only on the inactive (blurred) frames; the resting
   frame keeps NO filter at all, so it renders at full native sharpness. */
.hero-seq.is-complete .hero-seq-frame {
  filter: none;
  transform: none;
  transition: opacity 600ms var(--ease);
  will-change: auto;
}

/* One-time light burst when the finished stage is reached */
.hero-seq::after {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(105deg, transparent 34%, rgba(255, 255, 255, 0.55) 48%, rgba(255, 255, 255, 0.95) 50%, rgba(255, 255, 255, 0.55) 52%, transparent 66%);
  background-repeat: no-repeat;
  background-size: 240% 100%;
  background-position: 170% 0;
  mix-blend-mode: screen;
  opacity: 0;
  pointer-events: none;
  content: "";
}
.hero-seq.is-complete::after {
  animation: hero-seq-flash 1200ms var(--ease) 200ms 1 forwards;
}

@keyframes hero-seq-flash {
  0% { background-position: 170% 0; opacity: 0; }
  18% { opacity: 1; }
  70% { opacity: 0.65; }
  100% { background-position: -70% 0; opacity: 0; }
}

.services-head { max-width: 760px; margin: 0 auto 40px; text-align: center; }
.services-head h2 { margin: 0 0 14px; }
.services-head p { margin: 0; font-size: 1.05rem; }

.services-track {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  overflow-y: hidden;
  margin: 0 -4px;
  padding: 4px 4px 8px;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  mask-image: linear-gradient(90deg, transparent 0, #000 24px, #000 calc(100% - 80px), transparent);
}

.services-track::-webkit-scrollbar { display: none; }

.service-slide {
  display: flex;
  flex: 0 0 clamp(260px, 31%, 360px);
  min-width: 0;
  scroll-snap-align: start;
}

/* Cascade the first visible row; off-screen cards reveal as the carousel scrolls */
.services-track .reveal:nth-child(2) { transition-delay: 130ms; }
.services-track .reveal:nth-child(3) { transition-delay: 260ms; }
.services-track .reveal:nth-child(4) { transition-delay: 390ms; }

.service-card {
  position: relative;
  overflow: hidden;
  width: 100%;
  padding: 28px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, var(--color-surface), var(--color-bg-soft));
}

.service-icon {
  display: block;
  width: 100px;
  height: 100px;
  margin-bottom: 18px;
  object-fit: contain;
}

.service-card h3 { margin: 0 0 8px; font-size: 1.05rem; }
.service-card p { margin: 0; font-size: 0.95rem; }

.services-foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 36px;
}

.carousel-controls { display: inline-flex; gap: 10px; }

.carousel-control {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--color-border-strong);
  border-radius: 50%;
  background: transparent;
  color: var(--color-text);
  transition: background-color var(--t-fast), border-color var(--t-fast), opacity var(--t-fast), transform var(--t-fast);
}

.carousel-control:hover:not(:disabled) {
  border-color: var(--color-accent);
  background: var(--color-accent);
}

.carousel-control:disabled { cursor: not-allowed; opacity: 0.28; }

.fm-band {
  padding: clamp(72px, 11vw, 140px) 0;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  background:
    radial-gradient(700px 280px at 80% 30%, rgba(209, 43, 45, 0.08), transparent 70%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.015), transparent 60%);
}

.fm-inner { max-width: 880px; margin: 0 auto; text-align: center; }
.fm-title { margin: 0 0 22px; font-size: clamp(2rem, 4.4vw, 3.2rem); line-height: 1.08; }
.fm-title span { color: var(--color-accent); }
.fm-lead { max-width: 680px; margin: 0 auto; font-size: 1.1rem; }

.system-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  align-items: center;
  gap: 56px;
}

.system-section {
  background:
    linear-gradient(90deg, rgba(2, 1, 1, 0.68) 0%, rgba(2, 1, 1, 0.48) 52%, rgba(2, 1, 1, 0.28) 100%),
    linear-gradient(180deg, rgba(2, 1, 1, 0.16), rgba(2, 1, 1, 0.56)),
    url("/images/background-hero-2.png") center / cover no-repeat;
  background-attachment: scroll, scroll, fixed;
}

.section-header { max-width: 760px; margin-bottom: 48px; }
.section-header.center { margin-right: auto; margin-left: auto; text-align: center; }
.section-header h2 { margin: 0 0 14px; }
.section-header p { margin: 0; font-size: 1.05rem; }
.system-grid .section-header { margin-bottom: 0; }

.system-note {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  padding: 10px 14px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--color-text-muted);
  font-size: 0.85rem;
}

.system-note::before { content: "\1F512"; filter: grayscale(1); }

.system-mockup-stage {
  position: relative;
  display: grid;
  isolation: isolate;
  place-items: center;
  perspective: 1200px;
}

/* Cinematic entrance: scale + lift settling into place */
.system-mockup-stage.reveal { transform: translateY(28px) scale(0.94); }
.system-mockup-stage.reveal.is-visible { transform: translateY(0) scale(1); }

.system-mockup-stage::before {
  position: absolute;
  z-index: -1;
  width: min(88%, 600px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(209, 43, 45, 0.34) 0%, rgba(209, 43, 45, 0.13) 38%, transparent 70%);
  content: "";
  filter: blur(28px);
  animation: system-mockup-glow 4.8s ease-in-out infinite;
}

/* Mouse-driven 3D tilt (JS sets --tilt-x / --tilt-y) */
.system-mockup-tilt {
  transform: rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transform-style: preserve-3d;
  transition: transform 320ms var(--ease);
  will-change: transform;
}

/* Continuous float (own layer so it never fights the tilt) */
.system-mockup-float {
  position: relative;
  width: min(92%, 430px);
  margin: 0 auto;
  animation: system-mockup-float 5.4s ease-in-out infinite;
  will-change: transform;
}

/* Tablet device frame */
.app-device {
  position: relative;
  padding: 12px;
  border: 1px solid var(--color-border-strong);
  border-radius: 30px;
  background: linear-gradient(160deg, #2b2627 0%, #0c0a0a 58%);
  box-shadow:
    0 40px 60px -22px rgba(0, 0, 0, 0.72),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.app-screen {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  background: var(--color-bg);
  font-size: 16px;
}

/* Light sheen sweeping across the glass */
.app-screen::after {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.1) 48%, rgba(255, 255, 255, 0.24) 50%, rgba(255, 255, 255, 0.1) 52%, transparent 60%);
  background-repeat: no-repeat;
  background-size: 220% 100%;
  mix-blend-mode: screen;
  pointer-events: none;
  content: "";
  animation: system-mockup-sheen 7s ease-in-out infinite;
}

/* App top bar */
.app-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--color-border);
  background: rgba(255, 255, 255, 0.02);
}
.app-logo { width: 104px; height: auto; }
.app-client {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 6px;
  border: 1px solid var(--color-border);
  border-radius: 11px;
  background: var(--color-surface);
}
.app-client-avatar {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--color-accent-soft);
  color: var(--color-accent-strong);
  font-size: 0.6rem;
  font-weight: 700;
}
.app-client-text { display: flex; flex-direction: column; line-height: 1.2; }
.app-client-text strong { font-size: 0.72rem; color: var(--color-text); }
.app-client-text small { font-size: 0.6rem; color: var(--color-text-dim); }

/* App content */
.app-content { padding: 18px 16px 16px; }
.app-kicker {
  margin: 0 0 5px;
  color: var(--color-text-dim);
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.16em;
}
.app-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 7px;
  font-size: 0.95rem;
  line-height: 1.25;
  color: var(--color-text);
}
.app-sub { margin: 0 0 16px; color: var(--color-text-muted); font-size: 0.64rem; }

.app-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border: 1px solid var(--color-border-strong);
  border-radius: 999px;
  color: var(--color-text-muted);
  font-size: 0.55rem;
  font-weight: 600;
}
.app-badge-pending,
.app-badge-created {
  border-color: rgba(96, 165, 250, 0.5);
  background: rgba(96, 165, 250, 0.12);
  color: #93c5fd;
}

.app-panel {
  padding: 16px;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.015);
}
.app-panel-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 16px; }
.app-panel-head strong { font-size: 0.8rem; color: var(--color-text); }
.app-panel-head span { font-size: 0.6rem; color: var(--color-text-dim); }

.app-feed { display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 0; list-style: none; }
.app-event { display: flex; gap: 10px; }
.app-avatar {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  background: var(--color-surface-2);
  color: var(--color-text-muted);
  font-size: 0.58rem;
  font-weight: 700;
}
.app-event-body {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.035);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.025);
}
.app-event-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-bottom: 4px; }
.app-event-meta strong { font-size: 0.68rem; color: var(--color-text); }
.app-event-meta time { font-size: 0.58rem; color: var(--color-text-dim); }
.app-event p { margin: 0; font-size: 0.63rem; line-height: 1.5; color: var(--color-text-muted); }

.app-footnote { margin: 16px 0 0; color: var(--color-text-dim); font-size: 0.58rem; text-align: center; }

@keyframes system-mockup-float {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(-0.8deg); }
  50% { transform: translate3d(0, -18px, 0) rotate(0.8deg); }
}

@keyframes system-mockup-glow {
  0%, 100% { opacity: 0.44; transform: scale(0.9); }
  50% { opacity: 0.82; transform: scale(1.08); }
}

@keyframes system-mockup-sheen {
  0% { background-position: 160% 0; }
  18%, 100% { background-position: -60% 0; }
}

.home-about-section { background: #1e0000; }

.home-about-preview {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  align-items: center;
  gap: 64px;
}

.home-about-image {
  overflow: hidden;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-lg);
  aspect-ratio: 4 / 3;
}

.home-about-image img { width: 100%; height: 100%; object-fit: cover; }
.home-about-preview .section-header,
.home-faq-grid .section-header { margin-bottom: 24px; }
.home-faq-section {
  position: relative;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  background:
    linear-gradient(180deg, rgba(2, 1, 1, 0.82) 0%, rgba(2, 1, 1, 0.72) 100%),
    url("/images/background-hero-3.png") center / cover no-repeat;
  background-attachment: scroll, fixed;
}
.home-faq-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 36px;
}
.home-faq-grid > .reveal { text-align: center; }
.home-faq-grid .section-header { margin-right: auto; margin-left: auto; }
.home-faq-list { width: min(100%, 860px); }

.portfolio-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.portfolio-foot { display: flex; justify-content: center; margin-top: 36px; }
.portfolio-controls { display: none; justify-content: center; margin-top: 28px; }

.portfolio-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  transition: transform var(--t-base) var(--ease), border-color var(--t-base), box-shadow var(--t-base);
}

.portfolio-card:hover { border-color: var(--color-border-strong); box-shadow: 0 30px 60px -40px rgba(0, 0, 0, 0.8); transform: translateY(-4px); }
.portfolio-open { position: relative; display: flex; flex-direction: column; width: 100%; height: 100%; padding: 0; border: 0; background: transparent; color: inherit; text-align: left; }
.portfolio-media { position: relative; overflow: hidden; aspect-ratio: 1 / 1; background: var(--color-bg-soft); }
.portfolio-media img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--t-slow) var(--ease); }
.portfolio-card:hover img { transform: scale(1.04); }
.portfolio-tag { position: absolute; top: 14px; left: 14px; padding: 6px 10px; border: 1px solid var(--color-border-strong); border-radius: 999px; background: rgba(2, 1, 1, 0.7); color: var(--color-text); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.portfolio-expand { position: absolute; top: 14px; right: 14px; z-index: 1; display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; border: 1px solid var(--color-border-strong); border-radius: 50%; background: rgba(2, 1, 1, 0.72); color: #fff; backdrop-filter: blur(6px); transition: border-color var(--t-fast), background-color var(--t-fast), transform var(--t-fast); }
.portfolio-card:hover .portfolio-expand { border-color: var(--color-accent); background: var(--color-accent); transform: scale(1.06); }

.modal-open { overflow: hidden; }
.portfolio-modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 24px; }
.portfolio-modal[hidden] { display: none; }
.portfolio-modal-backdrop { position: absolute; inset: 0; border: 0; background: rgba(0, 0, 0, 0.84); backdrop-filter: blur(8px); }
.portfolio-modal-content { position: relative; z-index: 1; max-width: min(100%, 980px); max-height: calc(100vh - 48px); padding: 12px; border: 1px solid var(--color-border-strong); border-radius: var(--radius-md); background: var(--color-surface); box-shadow: 0 32px 90px rgba(0, 0, 0, 0.72); }
.portfolio-modal-image { max-width: 100%; max-height: calc(100vh - 72px); border-radius: 8px; object-fit: contain; }
.portfolio-modal-close { position: absolute; top: 18px; right: 18px; z-index: 2; display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; border: 1px solid var(--color-border-strong); border-radius: 50%; background: rgba(2, 1, 1, 0.82); color: #fff; font-size: 1.7rem; line-height: 1; }
.portfolio-modal-close:hover { border-color: var(--color-accent); background: var(--color-accent); }

/* Inner pages */
.page-hero { padding: clamp(80px, 10vw, 120px) 0 40px; }

.about-hero {
  padding: clamp(80px, 11vw, 50px) 0 60px;
  background:
    linear-gradient(90deg, rgba(2, 1, 1, 0.9) 0%, rgba(2, 1, 1, 0.72) 50%, rgba(2, 1, 1, 0.42) 100%),
    linear-gradient(180deg, rgba(2, 1, 1, 0.2), rgba(2, 1, 1, 0.62)),
    url("/images/about-team.png") center / cover no-repeat;
  background-attachment: scroll, scroll, fixed;
  border-bottom: 1px solid var(--color-border);
}
.page-hero h1,
.about-hero h1 {
  margin: 0 0 18px;
  font-size: clamp(2rem, 3.8vw, 3rem);
  line-height: 1.08;
}
.about-hero-grid,
.about-split { display: grid; grid-template-columns: 1.3fr 1fr; align-items: center; gap: 56px; }
.about-hero-visual { position: relative; overflow: hidden; border: 1px solid var(--color-border-strong); border-radius: var(--radius-lg); background: var(--color-surface); aspect-ratio: 4 / 5; }
.about-hero-visual img,
.about-split-image img { width: 100%; height: 100%; object-fit: cover; }
.about-split { grid-template-columns: 1fr 1fr; }
.about-split-image { overflow: hidden; border: 1px solid var(--color-border-strong); border-radius: var(--radius-lg); aspect-ratio: 4 / 3; }
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.pillar-slide { display: flex; min-width: 0; }
.pillar { width: 100%; padding: 28px; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); transition: transform var(--t-base), border-color var(--t-base); }
.pillar:hover { border-color: rgba(209, 43, 45, 0.4); transform: translateY(-4px); }
.pillar-icon { width: 100px; height: 100px; object-fit: contain; }
.pillar h3 { margin: 12px 0 8px; font-size: 1.05rem; }
.pillar p { margin: 0; font-size: 0.94rem; }
.pillar-controls { display: none; justify-content: center; margin-top: 28px; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); overflow: hidden; border: 1px solid var(--color-border); border-radius: var(--radius-md); }
.stat { padding: 32px; border-right: 1px solid var(--color-border); background: var(--color-surface); }
.stat:last-child { border-right: 0; }
.stat-value { color: var(--color-text); font-size: 2rem; font-weight: 700; }
.stat-value span { color: var(--color-accent); }
.stat-label { margin-top: 6px; color: var(--color-text-muted); font-size: 0.92rem; }

.faq-list { display: flex; flex-direction: column; gap: 12px; margin: 0 auto; }
.faq-item { overflow: hidden; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); transition: border-color var(--t-base), background-color var(--t-base); }
.faq-item:hover { border-color: var(--color-border-strong); }
.faq-item.open { border-color: rgba(209, 43, 45, 0.35); }
.faq-trigger { display: flex; align-items: center; justify-content: space-between; gap: 24px; width: 100%; padding: 22px 24px; border: 0; background: transparent; color: var(--color-text); font-size: 1rem; font-weight: 600; text-align: left; }
.faq-icon { position: relative; flex-shrink: 0; width: 22px; height: 22px; }
.faq-icon span { position: absolute; border-radius: 2px; background: var(--color-accent); transition: transform var(--t-base), opacity var(--t-base); }
.faq-icon span:first-child { top: 10px; left: 2px; width: 18px; height: 2px; }
.faq-icon span:last-child { top: 2px; left: 10px; width: 2px; height: 18px; }
.faq-item.open .faq-icon span:last-child { opacity: 0; transform: scaleY(0); }
.faq-panel { max-height: 0; overflow: hidden; transition: max-height var(--t-slow) var(--ease); }
.faq-item.open .faq-panel { max-height: 400px; }
.faq-answer { margin: 0; padding: 0 24px 24px; font-size: 0.98rem; line-height: 1.65; }

.contact-layout { display: grid; grid-template-columns: 1fr 1.3fr; align-items: start; gap: 56px; }
.contact-info { position: sticky; top: 96px; padding: 32px; border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-surface); }
.contact-info h2 { margin: 0 0 18px; color: var(--color-text-dim); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; }
.contact-list { display: flex; flex-direction: column; gap: 16px; margin: 0 0 24px; padding: 0; list-style: none; }
.contact-list li { display: flex; flex-direction: column; gap: 2px; }
.contact-list span { color: var(--color-text-dim); font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; }
.contact-list a,
.contact-list strong { color: var(--color-text); font-size: 1rem; font-weight: 600; }
.contact-call-btn { display: none; gap: 10px; }
.contact-divider { height: 1px; margin: 22px 0; background: var(--color-border); }
.contact-hours { margin: 0; font-size: 0.9rem; }
.contact-hours strong { display: block; margin-bottom: 4px; color: var(--color-text); font-size: 0.85rem; letter-spacing: 0.1em; text-transform: uppercase; }

.contact-form { display: flex; flex-direction: column; gap: 20px; padding: 36px; border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-surface); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-field { display: flex; flex-direction: column; gap: 8px; }
.form-field label { color: var(--color-text-muted); font-size: 0.82rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.required { color: var(--color-accent); }
.form-field input,
.form-field textarea { padding: 14px 16px; border: 1px solid var(--color-border); border-radius: 10px; background: var(--color-bg-soft); color: var(--color-text); font-size: 0.98rem; transition: border-color var(--t-fast), background-color var(--t-fast); }
.form-field input:focus,
.form-field textarea:focus { border-color: var(--color-accent); outline: none; background: rgba(255, 255, 255, 0.025); }
.form-field textarea { min-height: 140px; resize: vertical; }
.form-help { margin: 0; color: var(--color-text-dim); font-size: 0.82rem; }
.form-error { margin: 0; color: #ff7a7c; font-size: 0.85rem; }
.file-box { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 18px; border: 1px dashed var(--color-border-strong); border-radius: 10px; background: var(--color-bg-soft); cursor: pointer; }
.file-box:hover { border-color: var(--color-accent); }
.file-name { color: var(--color-text); font-size: 0.95rem; font-weight: 600; text-transform: none; }
.file-hint { color: var(--color-text-dim); font-size: 0.78rem; font-weight: 400; letter-spacing: 0.04em; text-transform: none; }
.file-input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.submit-button { margin-top: 6px; padding: 16px 28px; border: 1px solid var(--color-accent); border-radius: 999px; background: var(--color-accent); color: #fff; font-size: 1rem; font-weight: 700; transition: background-color var(--t-base), box-shadow var(--t-base); }
.submit-button:hover:not(:disabled) { background: var(--color-accent-strong); box-shadow: 0 16px 36px -10px rgba(209, 43, 45, 0.7); }
.submit-button:disabled { cursor: progress; opacity: 0.7; }
.form-legal { margin: 0; color: var(--color-text-dim); font-size: 0.78rem; text-align: center; }
.honeypot { position: absolute; top: auto; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-success { display: none; padding: 56px 36px; border: 1px solid rgba(209, 43, 45, 0.35); border-radius: var(--radius-lg); background: var(--color-surface); text-align: center; }
.form-success.is-visible { display: block; }
.success-mark { display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; margin: 0 auto 18px; border-radius: 50%; background: var(--color-accent); color: #fff; font-size: 1.6rem; box-shadow: 0 0 0 8px rgba(209, 43, 45, 0.18); }
.form-success h3 { margin: 0 0 8px; }
.form-success p { margin: 0 0 16px; }
.link-button { border: 0; background: transparent; color: var(--color-accent); font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }

@media (max-width: 1024px) {
  .system-grid { grid-template-columns: 1fr; }
}

@media (max-width: 960px) {
  .home-hero-grid,
  .home-about-preview,
  .about-hero-grid,
  .about-split,
  .contact-layout { grid-template-columns: 1fr; }
  .home-hero-illustration { max-width: 360px; }
  .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
  .pillars { grid-template-columns: repeat(2, 1fr); }
  .contact-info { position: static; }
}

@media (max-width: 880px) {
  .desktop-nav,
  .header-cta { display: none; }
  .burger { display: inline-flex; }
  .mobile-menu { display: block; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 36px; padding: 56px 24px 36px; }
  .footer-brand-col { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 720px) {
  .cta-card { flex-direction: column; align-items: stretch; }
  .cta-inner { max-width: none; }
  .cta-figure { align-self: center; width: clamp(200px, 64%, 300px); margin-top: 12px; }
  .stat-row { grid-template-columns: 1fr; }
  .stat { border-right: 0; border-bottom: 1px solid var(--color-border); }
  .stat:last-child { border-bottom: 0; }
}

@media (max-width: 640px) {
  /* Center hero copy and all non-card section titles */
  .home-hero-copy { text-align: center; }
  .home-hero-title,
  .home-hero-lead { margin-left: auto; margin-right: auto; }
  .section-header { margin-left: auto; margin-right: auto; text-align: center; }

  /* Buttons: full container width, centered; two-button groups stack */
  .btn { display: flex; width: 100%; }
  .contact-call-btn { display: flex; }
  .home-hero-actions,
  .cta-actions { flex-direction: column; align-items: stretch; }

  .service-slide { flex-basis: 82%; }
  .services-track { mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 40px), transparent); }
  .pillars {
    display: flex;
    overflow-x: auto;
    padding: 4px 4px 8px;
    margin: 0 -4px;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 40px), transparent);
  }
  .pillars::-webkit-scrollbar { display: none; }
  .pillar-slide {
    flex: 0 0 82%;
    scroll-snap-align: start;
  }
  .pillar-controls { display: flex; }
  .portfolio-carousel {
    display: flex;
    overflow-x: auto;
    padding: 4px 4px 8px;
    margin: 0 -4px;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    mask-image: linear-gradient(90deg, transparent 0, #000 12px, #000 calc(100% - 40px), transparent);
  }
  .portfolio-carousel::-webkit-scrollbar { display: none; }
  .portfolio-carousel .portfolio-card {
    flex: 0 0 82%;
    scroll-snap-align: start;
  }
  .portfolio-controls { display: flex; }
  .form-row { grid-template-columns: 1fr; }
  .contact-form { padding: 24px; }
}

@media (max-width: 600px) {
  .portfolio-grid:not(.portfolio-carousel) { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .services-foot { align-items: center; }
  .carousel-controls { align-self: center; }
}

@media (max-width: 480px) {
  .footer-inner { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
