:root {
  --bg: #11161d;
  --bg-soft: #171d27;
  --bg-card: rgba(20, 26, 35, 0.78);
  --line: rgba(236, 238, 242, 0.12);
  --line-strong: rgba(236, 238, 242, 0.28);
  --text: #eceef2;
  --muted: #9ea6b5;
  --accent: #f47a1f;
  --accent-soft: rgba(244, 122, 31, 0.16);
  --shadow: 0 32px 80px rgba(0, 0, 0, 0.28);
  --radius-lg: 32px;
  --radius-md: 22px;
  --rail-width: 304px;
  --container: 1400px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: auto;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Montserrat", system-ui, sans-serif;
  background:
    radial-gradient(circle at top right, rgba(244, 122, 31, 0.14), transparent 28%),
    radial-gradient(circle at bottom left, rgba(74, 86, 112, 0.18), transparent 34%),
    var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

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

button {
  font: inherit;
}

img {
  display: block;
  max-width: 100%;
}

#smooth-wrapper {
  overflow: hidden;
}

.background-grid,
.particle-canvas,
.site-overlay,
.cursor,
.nav-toggle,
.site-rail {
  position: fixed;
}

.background-grid {
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(circle at center, black 48%, transparent 100%);
  pointer-events: none;
  opacity: 0.32;
}

.particle-canvas {
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  opacity: 0.58;
  z-index: 1;
}

.app-shell {
  position: relative;
  min-height: 100vh;
  z-index: 2;
}

.site-rail {
  top: 0;
  left: 0;
  width: var(--rail-width);
  height: 100vh;
  padding: 34px 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  background: linear-gradient(180deg, rgba(14, 18, 24, 0.92), rgba(14, 18, 24, 0.64));
  backdrop-filter: blur(22px);
  border-right: 1px solid var(--line);
  z-index: 10;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  width: fit-content;
}

.brand-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  font-size: 1.35rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.03);
}

.brand-text {
  display: grid;
  gap: 6px;
}

.brand-text strong {
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.brand-text small,
.rail-copy,
.rail-footer a,
.scroll-progress,
.eyebrow,
.hero-lead,
.info-card span,
.metric-strip span {
  color: var(--muted);
}

.rail-copy {
  display: grid;
  gap: 8px;
  font-size: 0.84rem;
  line-height: 1.6;
}

.rail-nav,
.rail-footer {
  display: grid;
  gap: 14px;
}

.rail-nav a,
.rail-footer a {
  width: fit-content;
  font-size: 0.92rem;
  transition: color 180ms ease, transform 180ms ease;
}

.rail-nav a:hover,
.rail-footer a:hover,
.rail-nav a.is-active {
  color: var(--text);
  transform: translateX(4px);
}

.rail-footer {
  margin-top: auto;
}

.scroll-progress {
  position: relative;
  margin-top: 18px;
  width: 100%;
  height: 3px;
}

.scroll-progress__track,
.scroll-progress__bar {
  position: absolute;
  inset: 0;
  border-radius: 999px;
}

.scroll-progress__track {
  background: rgba(255, 255, 255, 0.09);
}

.scroll-progress__bar {
  transform-origin: left center;
  transform: scaleX(0);
  background: linear-gradient(90deg, var(--accent), #f7a257);
}

.site-main {
  margin-left: var(--rail-width);
  padding: 0 4vw;
}

.site-main > * {
  max-width: var(--container);
  margin-left: auto;
  margin-right: auto;
}

.hero {
  min-height: 100vh;
  display: grid;
  align-items: center;
  gap: 60px;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  padding: 56px 0;
}

.hero-page {
  min-height: 82vh;
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.eyebrow {
  margin: 0 0 18px;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.hero-title,
.panel-heading h2,
.split-copy h2,
.contact-band h2 {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.94;
}

.hero-title {
  max-width: 12ch;
  font-size: clamp(3.2rem, 9vw, 6.6rem);
}

.hero-lead,
.rotator-item p,
.info-card p,
.case-card p,
.split-copy p,
.contact-band p {
  max-width: 44rem;
  font-size: clamp(1rem, 1.45vw, 1.16rem);
  line-height: 1.8;
}

.rotator {
  position: relative;
  min-height: 220px;
  margin: 30px 0 24px;
}

.rotator-item {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.rotator-item.is-active {
  opacity: 1;
  pointer-events: auto;
}

.inline-link,
.pill-link,
.refresh-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  padding: 14px 20px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.inline-link::after,
.pill-link::after {
  content: ">";
  color: var(--accent);
}

.refresh-button {
  cursor: pointer;
}

.inline-link:hover,
.pill-link:hover,
.refresh-button:hover {
  transform: translateY(-2px);
  border-color: rgba(244, 122, 31, 0.55);
  background: var(--accent-soft);
}

.hero-visual {
  position: relative;
  min-height: 620px;
}

.hero-visual--single {
  min-height: 540px;
}

.visual-card {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  padding: 16px;
  opacity: 0;
  transform: translateY(24px) scale(0.96) rotate(-3deg);
  filter: drop-shadow(var(--shadow));
}

.visual-card.is-active {
  opacity: 1;
  transform: translateY(0) scale(1) rotate(0deg);
}

.panel,
.split-panel,
.contact-band {
  margin: 10vh auto 18vh;
}

.panel-heading,
.split-copy {
  max-width: 880px;
}

.panel-heading h2,
.split-copy h2,
.contact-band h2 {
  font-size: clamp(2.4rem, 5vw, 4.8rem);
  max-width: 13ch;
}

.card-grid {
  margin-top: 38px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.info-card,
.case-card,
.metric-strip > div {
  border: 1px solid var(--line);
  background: var(--bg-card);
  backdrop-filter: blur(18px);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow);
}

.info-card,
.case-card {
  min-height: 240px;
  padding: 24px;
}

.info-card h3,
.case-card h3 {
  margin: 14px 0 10px;
  font-size: 1.42rem;
  line-height: 1.15;
}

.split-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 32px;
  align-items: start;
}

.metric-strip {
  display: grid;
  gap: 16px;
}

.metric-strip > div {
  padding: 22px 24px;
}

.metric-strip strong {
  display: block;
  margin-bottom: 8px;
  font-size: 2.2rem;
  line-height: 1;
}

.contact-band {
  padding: 40px 0 100px;
}

.nav-toggle {
  top: 22px;
  right: 22px;
  width: 56px;
  height: 56px;
  display: none;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: rgba(14, 18, 24, 0.9);
  backdrop-filter: blur(18px);
  z-index: 12;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  margin: 3px 0;
  transition: transform 180ms ease, opacity 180ms ease;
}

.site-overlay {
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  pointer-events: none;
  z-index: 8;
  transition: opacity 180ms ease;
}

.cursor {
  top: 0;
  left: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(4px);
  pointer-events: none;
  z-index: 30;
  mix-blend-mode: screen;
}

.cursor.is-active {
  width: 56px;
  height: 56px;
  margin-top: -17px;
  margin-left: -17px;
  background: rgba(244, 122, 31, 0.12);
  border-color: rgba(244, 122, 31, 0.55);
}

.reveal {
  opacity: 0;
  transform: translateY(48px);
}

body.nav-open .site-overlay {
  opacity: 1;
  pointer-events: auto;
}

body.nav-open .nav-toggle span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

body.nav-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}

body.nav-open .nav-toggle span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

@media (max-width: 1080px) {
  .hero,
  .split-panel,
  .card-grid {
    grid-template-columns: 1fr;
  }

  .hero-visual,
  .hero-visual--single {
    min-height: 420px;
  }

  .hero-title {
    max-width: none;
  }

  .site-main {
    padding: 0 28px;
  }
}

@media (max-width: 920px) {
  .nav-toggle {
    display: grid;
  }

  .site-rail {
    transform: translateX(-100%);
    transition: transform 200ms ease;
    width: min(82vw, 340px);
  }

  body.nav-open .site-rail {
    transform: translateX(0);
  }

  .site-main {
    margin-left: 0;
    padding-top: 88px;
  }

  .hero {
    min-height: auto;
    padding-top: 22px;
  }
}

@media (max-width: 640px) {
  .site-main {
    padding-left: 18px;
    padding-right: 18px;
  }

  .hero-title {
    font-size: clamp(2.6rem, 16vw, 4rem);
  }

  .panel-heading h2,
  .split-copy h2,
  .contact-band h2 {
    font-size: clamp(2rem, 12vw, 3.1rem);
    max-width: none;
  }

  .info-card,
  .case-card {
    min-height: auto;
  }

  .hero-visual,
  .hero-visual--single {
    min-height: 300px;
  }

  .cursor {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal,
  .visual-card,
  .rotator-item {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .particle-canvas,
  .cursor {
    display: none;
  }
}
