:root {
  color-scheme: dark;
  --ink: #f7f3ec;
  --muted: #aaa49a;
  --faint: #706a60;
  --black: #050505;
  --panel: rgba(14, 14, 14, 0.82);
  --panel-strong: rgba(20, 20, 20, 0.94);
  --line: rgba(232, 226, 215, 0.16);
  --line-strong: rgba(232, 226, 215, 0.36);
  --chrome: #ded8cc;
  --accent: #9c2424;
  --amber: #d8a947;
  --shadow: 0 36px 100px rgba(0, 0, 0, 0.72);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 86% 8%, rgba(156, 36, 36, 0.2), transparent 22rem),
    radial-gradient(circle at 16% 22%, rgba(216, 169, 71, 0.13), transparent 26rem),
    linear-gradient(145deg, #101010 0%, var(--black) 54%, #0a0908 100%);
  overflow-x: hidden;
}

button,
input {
  font: inherit;
}

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

.atmosphere,
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.atmosphere {
  z-index: 0;
  opacity: 0.34;
}

.grain {
  z-index: 1;
  opacity: 0.11;
  background-image:
    linear-gradient(rgba(255,255,255,.2) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.16) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, transparent 0, black 12%, black 78%, transparent 100%);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  width: min(1220px, calc(100% - 28px));
  min-height: 68px;
  margin: 0 auto;
  border-bottom: 1px solid var(--line);
  background: rgba(5, 5, 5, 0.7);
  backdrop-filter: blur(20px);
}

.brand {
  display: grid;
  gap: 2px;
}

.brand span,
.eyebrow {
  color: var(--chrome);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.brand strong {
  font-size: 1rem;
  text-transform: uppercase;
}

.topbar nav {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.topbar nav a {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 8px 10px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.topbar nav a:hover {
  border-color: var(--line);
  color: var(--ink);
  background: rgba(255,255,255,.055);
}

main {
  position: relative;
  z-index: 2;
  width: min(1220px, calc(100% - 28px));
  margin: 0 auto 48px;
}

.hero {
  position: relative;
  min-height: calc(100vh - 68px);
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(320px, 0.72fr);
  align-items: center;
  gap: 34px;
  padding: 44px 0 52px;
}

.hero-copy {
  position: relative;
  z-index: 3;
  display: grid;
  gap: 18px;
}

.eyebrow {
  margin: 0;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(4rem, 12vw, 10rem);
  line-height: 0.84;
  letter-spacing: 0.035em;
  text-transform: uppercase;
  text-shadow: 0 0 28px rgba(232, 226, 215, 0.22);
  background: linear-gradient(92deg, #fffaf1 0%, #a99f8f 36%, #fff 55%, #d5a247 72%, #f7f3ec 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.tagline {
  max-width: 720px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  line-height: 1.62;
}

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

.hero-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.hero-proof span {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 10px;
  background: rgba(255,255,255,.035);
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
  backdrop-filter: blur(12px);
}

.primary,
.ghost {
  position: relative;
  overflow: hidden;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  padding: 0 16px;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  transform-style: preserve-3d;
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease, background 220ms ease;
}

.primary::after,
.ghost::after {
  content: "";
  position: absolute;
  inset: -60% -35%;
  background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.42), transparent 64%);
  transform: translateX(-120%) rotate(9deg);
  transition: transform 520ms ease;
}

.primary:hover::after,
.ghost:hover::after {
  transform: translateX(120%) rotate(9deg);
}

.primary {
  border: 1px solid rgba(232, 226, 215, 0.7);
  background: linear-gradient(135deg, #f4eee4, #b7b0a4 58%, #fff);
  color: #070707;
  box-shadow: 0 14px 48px rgba(232, 226, 215, 0.12);
}

.ghost {
  border: 1px solid var(--line);
  background: rgba(255,255,255,.045);
  color: var(--chrome);
}

.primary:hover,
.ghost:hover {
  transform: translate3d(0, -2px, 0);
  box-shadow: 0 22px 72px rgba(0, 0, 0, 0.46);
}

.hero-media {
  position: relative;
  min-height: 540px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #111;
  box-shadow: var(--shadow);
  transform-style: preserve-3d;
  isolation: isolate;
}

.hero-media::before {
  content: "";
  position: absolute;
  inset: 1px;
  z-index: 2;
  border-radius: 7px;
  pointer-events: none;
  background:
    radial-gradient(circle at var(--mx, 64%) var(--my, 28%), rgba(255,255,255,.2), transparent 15rem),
    linear-gradient(115deg, rgba(255,255,255,.16), transparent 30%, rgba(216,169,71,.12) 68%, transparent);
  mix-blend-mode: screen;
  opacity: .72;
}

.hero-media img,
.discipline-strip img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  filter: saturate(0.8) contrast(1.12) brightness(0.72);
}

.hero-media img {
  opacity: .58;
  transform: scale(1.04);
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(0,0,0,.72), transparent 55%),
    radial-gradient(circle at 75% 14%, rgba(156, 36, 36, 0.42), transparent 17rem);
  z-index: 1;
  pointer-events: none;
}

.hero-scene {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  display: block;
  opacity: .96;
  pointer-events: none;
}

.status-card {
  position: absolute;
  right: 18px;
  bottom: 18px;
  z-index: 4;
  min-width: 178px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 14px;
  background: rgba(5,5,5,.72);
  backdrop-filter: blur(18px);
  box-shadow: 0 28px 70px rgba(0,0,0,.46), inset 0 1px 0 rgba(255,255,255,.08);
}

.status-card span,
.status-card small {
  display: block;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.status-card strong {
  display: block;
  margin: 2px 0;
  font-size: 3.2rem;
  line-height: 0.95;
}

.scroll-cue {
  position: absolute;
  left: 0;
  bottom: 22px;
  z-index: 4;
  width: 34px;
  height: 54px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255,255,255,.035);
  backdrop-filter: blur(12px);
}

.scroll-cue span {
  position: absolute;
  left: 50%;
  top: 11px;
  width: 4px;
  height: 8px;
  border-radius: 999px;
  background: var(--chrome);
  transform: translateX(-50%);
  animation: cueDrop 1.9s ease-in-out infinite;
}

@keyframes cueDrop {
  0%, 100% { opacity: .35; transform: translate(-50%, 0); }
  48% { opacity: 1; transform: translate(-50%, 18px); }
}

.section-divider {
  height: 1px;
  margin-bottom: 36px;
  background:
    linear-gradient(90deg, transparent, rgba(232,226,215,.42), transparent),
    linear-gradient(90deg, rgba(156,36,36,.32), transparent 34%, rgba(216,169,71,.24));
  opacity: .8;
}

.section-note {
  max-width: 430px;
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.55;
}

.system-overview,
.workflow {
  position: relative;
  padding: 66px 0;
}

.system-grid,
.workflow-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.system-card,
.workflow-step,
.suite-panel {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(255,255,255,.07), rgba(255,255,255,.018)),
    rgba(8,8,8,.62);
  box-shadow: 0 24px 80px rgba(0,0,0,.28);
}

.system-card {
  min-height: 230px;
  display: grid;
  align-content: space-between;
  gap: 18px;
  padding: 18px;
  transform-style: preserve-3d;
  transition: transform 260ms ease, border-color 260ms ease, box-shadow 260ms ease;
}

.system-card::before,
.workflow-step::before,
.suite-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at var(--mx, 52%) var(--my, 18%), rgba(232,226,215,.13), transparent 15rem),
    linear-gradient(135deg, rgba(156,36,36,.11), transparent 44%, rgba(216,169,71,.08));
  opacity: .58;
  pointer-events: none;
}

.system-card:hover {
  transform: translate3d(0, -4px, 0);
  border-color: rgba(232, 226, 215, 0.38);
  box-shadow: 0 30px 78px rgba(0,0,0,.42);
}

.system-card span,
.workflow-step span {
  color: var(--amber);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.system-card strong {
  display: block;
  margin-bottom: 10px;
  font-size: 1.18rem;
  line-height: 1.05;
}

.system-card p,
.workflow-step p {
  margin: 0;
  color: var(--muted);
  line-height: 1.48;
}

.system-card small {
  color: var(--chrome);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.workflow {
  padding-top: 34px;
}

.workflow-step {
  min-height: 190px;
  padding: 18px;
}

.workflow-step h3 {
  position: relative;
  margin: 28px 0 10px;
  font-size: clamp(1.35rem, 2vw, 2.1rem);
  line-height: 1;
}

.suite {
  padding: 18px 0;
}

.suite-panel {
  padding: clamp(20px, 3.4vw, 34px);
  overflow: visible;
}

.section-head {
  max-width: 780px;
  margin-bottom: 24px;
}

.section-head h2 {
  margin-bottom: 0;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 0.96;
  letter-spacing: 0;
}

.section-head.split {
  max-width: none;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 28px;
}

.search {
  width: min(360px, 100%);
  display: grid;
  gap: 7px;
}

.search span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.search input {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 12px;
  outline: none;
  background: rgba(0,0,0,.52);
  color: var(--ink);
}

.tool-grid,
.tool-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.filter-rail {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -2px 0 18px;
}

.suite-filter {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 13px;
  background: rgba(255,255,255,.035);
  color: var(--muted);
  cursor: pointer;
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.suite-filter:hover,
.suite-filter.is-active {
  border-color: var(--line-strong);
  background: rgba(232,226,215,.12);
  color: var(--ink);
  transform: translateY(-1px);
}

.tool-card {
  position: relative;
  overflow: hidden;
  min-height: 178px;
  display: grid;
  align-content: space-between;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background:
    linear-gradient(145deg, rgba(255,255,255,.075), rgba(255,255,255,.018)),
    var(--panel);
  box-shadow: 0 20px 60px rgba(0,0,0,.34);
  transform-style: preserve-3d;
  transition: transform 220ms ease, border-color 220ms ease, background 220ms ease, box-shadow 220ms ease;
}

.tool-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at var(--mx, 50%) var(--my, 0%), rgba(232,226,215,.18), transparent 11rem),
    linear-gradient(135deg, rgba(216,169,71,.08), transparent 44%);
  opacity: 0;
  transition: opacity 220ms ease;
  pointer-events: none;
}

.tool-card:hover {
  transform: translate3d(0, -5px, 0) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  border-color: rgba(232, 226, 215, 0.48);
  background:
    linear-gradient(145deg, rgba(156,36,36,.14), rgba(255,255,255,.026)),
    var(--panel-strong);
  box-shadow: 0 28px 82px rgba(0,0,0,.5);
}

.tool-card:hover::before {
  opacity: 1;
}

.tool-card small {
  color: var(--amber);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tool-card h3 {
  margin: 8px 0 8px;
  font-size: 1.3rem;
  line-height: 1.1;
}

.tool-card p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.45;
}

.tool-card .open {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--chrome);
  font-weight: 900;
  text-transform: uppercase;
}

.motion-ready .hero-copy > *,
.motion-ready .hero-media,
.motion-ready .system-card,
.motion-ready .workflow-step,
.motion-ready .suite,
.motion-ready .tool-card {
  opacity: 0;
  transform: translate3d(0, 22px, 0);
}

.motion-ready .is-revealed {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 20;
  max-width: min(360px, calc(100vw - 36px));
  padding: 12px 14px;
  border: 1px solid rgba(232, 226, 215, 0.32);
  border-radius: 8px;
  background: #111;
  color: var(--ink);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

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

@media (max-width: 980px) {
  .hero,
  .system-grid,
  .workflow-grid,
  .tool-grid,
  .tool-list {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-media {
    min-height: 380px;
  }

  .scroll-cue {
    display: none;
  }

  .section-head.split,
  .topbar {
    align-items: start;
    flex-direction: column;
  }

  .topbar {
    position: relative;
    padding: 14px 0;
  }

  .system-overview,
  .workflow {
    padding: 44px 0;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }

  .motion-ready .hero-copy > *,
  .motion-ready .hero-media,
  .motion-ready .system-card,
  .motion-ready .workflow-step,
  .motion-ready .suite,
  .motion-ready .tool-card {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 560px) {
  main,
  .topbar {
    width: min(100% - 18px, 1220px);
  }

  h1 {
    font-size: 3.7rem;
  }

  .hero-actions {
    display: grid;
  }
}
