:root {
  color-scheme: light;
  --page: #f6f1ea;
  --milk: #fffdf8;
  --paper: #fbf7ef;
  --graphite: #171719;
  --graphite-soft: #2a2830;
  --muted: #625d67;
  --line: #e1d8cc;
  --plum: #5c2f68;
  --plum-deep: #2a1835;
  --coral: #e26d5a;
  --green: #47745d;
  --amber: #bc7b2b;
  --red: #bd3f3f;
  --white: #ffffff;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --shadow-soft: 0 24px 70px rgb(23 23 25 / 12%);
  --shadow-strong: 0 42px 110px rgb(23 23 25 / 20%);
  --container: min(100% - 40px, 1180px);
  --font: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  scroll-behavior: smooth;
  font-size: 18px;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 82% 8%, rgb(226 109 90 / 16%), transparent 22rem),
    radial-gradient(circle at 12% 22%, rgb(92 47 104 / 13%), transparent 24rem),
    linear-gradient(135deg, var(--milk), var(--page) 48%, #eee4d8);
  color: var(--graphite);
  font-family: var(--font);
  line-height: 1.55;
}

body.workspace-body {
  background: #f2eee7;
}

button,
input,
textarea {
  font: inherit;
}

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

button,
.button {
  min-height: 46px;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.82rem 1.08rem;
  font-weight: 800;
  transition:
    transform 180ms var(--ease),
    box-shadow 180ms var(--ease),
    background-color 180ms var(--ease),
    color 180ms var(--ease),
    border-color 180ms var(--ease);
}

button:hover,
.button:hover {
  transform: translateY(-2px);
}

button:active,
.button:active {
  transform: translateY(0);
}

button:focus-visible,
a:focus-visible {
  outline: 4px solid rgb(226 109 90 / 42%);
  outline-offset: 4px;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 20;
  transform: translateY(-5rem);
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-sm);
  background: var(--graphite);
  color: var(--white);
}

.skip-link:focus-visible {
  transform: translateY(0);
}

.site-header {
  width: var(--container);
  margin: 0 auto;
  padding: 1.1rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  min-width: 0;
}

.brand-symbol {
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: var(--graphite);
  color: var(--milk);
  font-weight: 900;
  box-shadow: 0 14px 32px rgb(23 23 25 / 18%);
}

.brand-mark strong,
.brand-mark small {
  display: block;
}

.brand-mark strong {
  font-size: 0.95rem;
}

.brand-mark small {
  color: var(--muted);
  font-size: 0.76rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.35rem;
  border: 1px solid rgb(23 23 25 / 8%);
  border-radius: 999px;
  background: rgb(255 253 248 / 76%);
  box-shadow: 0 12px 34px rgb(23 23 25 / 8%);
}

.site-nav a {
  border-radius: 999px;
  padding: 0.58rem 0.82rem;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.site-nav a:hover {
  background: var(--graphite);
  color: var(--white);
}

.menu-toggle {
  display: none;
  background: var(--graphite);
  color: var(--white);
}

.hero-section,
.intro-band,
.feature-layout,
.workspace-preview,
.agents-section,
.process-section,
.calendar-section,
.quality-section,
.site-footer {
  width: var(--container);
  margin: 0 auto;
}

.hero-section {
  min-height: calc(100vh - 6rem);
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(440px, 1fr);
  gap: clamp(1.2rem, 4vw, 4rem);
  align-items: center;
  padding: clamp(2rem, 5vw, 4.8rem) 0;
}

.hero-copy {
  max-width: 34rem;
}

.eyebrow,
.section-kicker {
  margin: 0 0 0.85rem;
  color: var(--plum);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 1.2rem;
  font-size: clamp(3.1rem, 5.2vw, 5.2rem);
  line-height: 0.92;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 1rem;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 0.55rem;
  font-size: 1.16rem;
}

.hero-lead,
.intro-band p,
.quality-section p {
  max-width: 660px;
  color: var(--muted);
  font-size: clamp(1.08rem, 1.6vw, 1.35rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 2rem 0;
}

.button-primary {
  background: var(--graphite);
  color: var(--white);
  box-shadow: 0 18px 40px rgb(23 23 25 / 18%);
}

.button-secondary {
  background: var(--white);
  color: var(--graphite);
  box-shadow: 0 14px 30px rgb(23 23 25 / 9%);
}

.button-ghost {
  border: 1px solid rgb(23 23 25 / 12%);
  background: rgb(255 255 255 / 54%);
  color: var(--graphite);
}

.hero-signals {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin: 0;
}

.hero-signals div {
  padding: 1rem;
  border-radius: var(--radius-md);
  background: rgb(255 255 255 / 66%);
  box-shadow: 0 10px 28px rgb(23 23 25 / 7%);
}

.hero-signals dt {
  font-size: 2rem;
  font-weight: 900;
}

.hero-signals dd {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.hero-visual {
  position: relative;
  min-height: 640px;
  border-radius: 34px;
  overflow: hidden;
  box-shadow: var(--shadow-strong);
  background: var(--graphite);
}

.hero-photo,
.hero-photo img,
.feature-photo img {
  display: block;
  width: 100%;
  height: 100%;
}

.hero-photo img,
.feature-photo img {
  object-fit: cover;
}

.hero-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgb(23 23 25 / 0%), rgb(23 23 25 / 62%)),
    linear-gradient(90deg, rgb(92 47 104 / 22%), transparent);
}

.editorial-console {
  position: absolute;
  left: 1.4rem;
  right: 1.4rem;
  bottom: 1.4rem;
  z-index: 1;
  padding: 1.2rem;
  border: 1px solid rgb(255 255 255 / 18%);
  border-radius: 22px;
  background: rgb(255 253 248 / 88%);
  box-shadow: 0 22px 60px rgb(0 0 0 / 22%);
}

.console-top,
.console-grid,
.workspace-toolbar,
.topbar-actions,
.section-heading,
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.console-top span,
.console-grid span,
.status-pill,
.material-table em {
  border-radius: 999px;
  padding: 0.34rem 0.55rem;
  background: rgb(92 47 104 / 10%);
  color: var(--plum);
  font-size: 0.75rem;
  font-style: normal;
  font-weight: 900;
}

.console-title {
  max-width: 620px;
  margin: 1rem 0;
  font-size: clamp(1.35rem, 3vw, 2.2rem);
  font-weight: 900;
  line-height: 1.05;
}

.console-grid {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.quality-line {
  height: 0.55rem;
  margin-top: 1rem;
  border-radius: 999px;
  overflow: hidden;
  background: rgb(23 23 25 / 10%);
}

.quality-line span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--plum), var(--coral));
}

.intro-band {
  padding: clamp(3rem, 7vw, 6rem);
  border-radius: 34px;
  background: var(--graphite);
  color: var(--white);
  box-shadow: var(--shadow-strong);
}

.intro-band .section-kicker,
.intro-band p {
  color: rgb(255 253 248 / 74%);
}

.feature-layout,
.workspace-preview,
.agents-section,
.process-section,
.calendar-section,
.quality-section {
  padding: clamp(4rem, 7vw, 7rem) 0 0;
}

.feature-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.75fr;
  gap: 1rem;
}

.feature-large,
.feature-dark,
.feature-photo,
.workspace-frame,
.agents-section,
.process-section,
.calendar-section,
.quality-section,
.workspace-section,
.dashboard-hero {
  border-radius: var(--radius-lg);
}

.feature-large,
.workspace-section,
.dashboard-hero {
  padding: clamp(1.2rem, 3vw, 2rem);
  background: rgb(255 253 248 / 76%);
  box-shadow: var(--shadow-soft);
}

.feature-dark {
  padding: 1.4rem;
  background: var(--plum-deep);
  color: var(--white);
  box-shadow: var(--shadow-soft);
}

.feature-dark p {
  color: rgb(255 255 255 / 72%);
}

.feature-photo {
  grid-column: 1 / -1;
  min-height: 360px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

.check-list,
.stack-list {
  padding: 0;
  margin: 1.2rem 0 0;
  list-style: none;
  display: grid;
  gap: 0.7rem;
}

.check-list li,
.stack-list li {
  padding-left: 1.4rem;
  position: relative;
}

.check-list li::before,
.stack-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72rem;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--coral);
}

.workspace-frame {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 620px;
  overflow: hidden;
  background: #201e24;
  box-shadow: var(--shadow-strong);
}

.workspace-frame aside {
  padding: 1.2rem;
  display: grid;
  align-content: start;
  gap: 0.65rem;
  background: #171719;
  color: var(--white);
}

.workspace-frame aside a {
  padding: 0.68rem 0.75rem;
  border-radius: 12px;
  color: rgb(255 255 255 / 72%);
}

.workspace-frame aside a.active,
.workspace-frame aside a:hover {
  background: rgb(255 255 255 / 10%);
  color: var(--white);
}

.workspace-main {
  padding: 1.2rem;
  background: #f4efe6;
}

.workspace-toolbar,
.metric-row,
.material-table {
  margin-bottom: 1rem;
}

.workspace-toolbar {
  padding: 1rem;
  border-radius: var(--radius-md);
  background: var(--white);
}

.workspace-toolbar button {
  background: var(--graphite);
  color: var(--white);
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.metric-row div {
  padding: 1rem;
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: 0 10px 28px rgb(23 23 25 / 6%);
}

.metric-row strong {
  display: block;
  font-size: 2.1rem;
  line-height: 1;
}

.metric-row span {
  color: var(--muted);
  font-size: 0.86rem;
}

.material-table {
  min-width: 0;
  max-width: 100%;
  display: grid;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: 0 14px 36px rgb(23 23 25 / 8%);
}

.material-table [role="row"] {
  display: grid;
  grid-template-columns: 1.5fr 0.7fr 0.85fr 0.6fr;
  gap: 0.7rem;
  align-items: center;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid rgb(23 23 25 / 8%);
}

.app-table [role="row"] {
  grid-template-columns: 1.5fr 0.6fr 0.8fr 0.7fr 0.45fr;
}

.material-table [role="row"]:first-child {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.material-table [role="row"]:last-child {
  border-bottom: 0;
}

.state-row {
  grid-template-columns: auto minmax(0, 0.9fr) minmax(0, 1.4fr) !important;
  color: var(--muted);
}

.state-row > span:first-child {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgb(92 47 104 / 10%);
  color: var(--plum);
  font-weight: 900;
}

.empty-state,
.error-state {
  color: var(--muted);
}

.empty-state strong,
.error-state strong {
  color: var(--graphite);
}

.error-state > span:first-child {
  background: rgb(189 63 63 / 12%);
  color: var(--red);
}

.loading-dot {
  position: relative;
}

.loading-dot::after {
  content: "";
  width: 0.56rem;
  height: 0.56rem;
  border-radius: 999px;
  background: currentcolor;
  animation: pulse-dot 900ms var(--ease) infinite alternate;
}

@keyframes pulse-dot {
  from {
    opacity: 0.34;
    transform: scale(0.76);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.agent-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.agent-grid article {
  padding: 1.2rem;
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-soft);
  transition:
    transform 180ms var(--ease),
    box-shadow 180ms var(--ease);
}

.agent-grid article:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-strong);
}

.agent-grid span {
  display: grid;
  place-items: center;
  width: 2.8rem;
  height: 2.8rem;
  margin-bottom: 1rem;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--plum), var(--coral));
  color: var(--white);
  font-weight: 900;
}

.agent-grid p,
.stack-list span,
.workspace-section p {
  color: var(--muted);
}

.process-section {
  color: var(--white);
}

.process-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: rgb(255 255 255 / 16%);
  box-shadow: var(--shadow-strong);
}

.process-steps div {
  min-height: 220px;
  padding: 1.2rem;
  display: grid;
  align-content: space-between;
  background: var(--graphite);
}

.process-steps strong {
  color: var(--coral);
  font-size: 2.2rem;
}

.calendar-section {
  display: grid;
  grid-template-columns: 0.75fr 1fr;
  gap: 1.2rem;
  align-items: start;
}

.calendar-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.7rem;
}

.calendar-board span,
.calendar-board article {
  padding: 0.85rem;
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: 0 12px 28px rgb(23 23 25 / 7%);
}

.calendar-board span {
  color: var(--muted);
  font-weight: 900;
  text-align: center;
}

.calendar-board article {
  min-height: 128px;
  font-weight: 900;
}

.calendar-board .calendar-empty {
  grid-column: 1 / -1;
}

.calendar-board b {
  color: var(--plum);
  font-size: 0.78rem;
}

.quality-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.4rem;
  align-items: center;
}

.quality-section blockquote {
  margin: 0;
  padding: clamp(1.4rem, 4vw, 3rem);
  border-radius: var(--radius-lg);
  background: var(--plum-deep);
  color: var(--white);
  font-size: clamp(1.5rem, 3vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  box-shadow: var(--shadow-strong);
}

.site-footer {
  padding: 4rem 0 2rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
}

.site-footer strong {
  color: var(--graphite);
}

.app-shell {
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
}

.app-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 1rem;
  background: var(--graphite);
  color: var(--white);
}

.app-brand {
  margin-bottom: 1.2rem;
}

.app-sidebar nav {
  display: grid;
  gap: 0.25rem;
}

.app-sidebar nav a {
  border-radius: 14px;
  padding: 0.72rem 0.8rem;
  color: rgb(255 255 255 / 68%);
  font-weight: 800;
}

.app-sidebar nav a.active,
.app-sidebar nav a:hover {
  background: rgb(255 255 255 / 10%);
  color: var(--white);
}

.app-main {
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
  padding: clamp(1rem, 2vw, 2rem);
}

.app-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.app-topbar h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 4rem);
}

.app-menu-toggle {
  display: none;
}

.dashboard-hero {
  display: grid;
  grid-template-columns: 1fr minmax(280px, 0.45fr);
  gap: 1rem;
  margin-bottom: 1rem;
}

.decision-card {
  padding: 1.2rem;
  border-radius: var(--radius-lg);
  background: var(--graphite);
  color: var(--white);
}

.decision-card p {
  color: rgb(255 255 255 / 70%);
}

.warning {
  background: rgb(188 123 43 / 18%);
  color: #ffd08c;
}

.workspace-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.workspace-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.workspace-section {
  min-width: 0;
  margin-top: 1rem;
}

.section-heading.compact {
  margin-bottom: 1rem;
}

.filter-bar {
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-bottom: 0.8rem;
}

.filter-bar button {
  min-height: 38px;
  background: var(--white);
  color: var(--muted);
}

.filter-bar button.active {
  background: var(--graphite);
  color: var(--white);
}

.stack-list li {
  display: grid;
}

.quality-stack {
  display: grid;
  gap: 0.7rem;
}

.quality-stack span {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.82rem;
  border-radius: var(--radius-sm);
  background: rgb(92 47 104 / 8%);
}

.quality-stack em {
  color: var(--green);
  font-style: normal;
  font-weight: 900;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .section-reveal,
  .workspace-section,
  .dashboard-hero,
  .workspace-metrics {
    animation: rise-in 620ms var(--ease) both;
  }

  .hero-visual img {
    animation: photo-settle 1200ms var(--ease) both;
  }

  @keyframes rise-in {
    from {
      opacity: 0;
      transform: translateY(18px);
      filter: blur(8px);
    }

    to {
      opacity: 1;
      transform: translateY(0);
      filter: blur(0);
    }
  }

  @keyframes photo-settle {
    from {
      transform: scale(1.045);
      filter: saturate(0.86) contrast(0.94);
    }

    to {
      transform: scale(1);
      filter: saturate(1.02) contrast(1.02);
    }
  }
}

@media (max-width: 1024px) {
  .hero-section,
  .feature-layout,
  .calendar-section,
  .quality-section,
  .dashboard-hero {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    min-height: 520px;
  }

  .agent-grid,
  .workspace-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .app-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 10;
    width: min(86vw, 320px);
    transform: translateX(-104%);
    transition: transform 220ms var(--ease);
  }

  .app-sidebar.is-open {
    transform: translateX(0);
  }

  .app-menu-toggle {
    display: inline-flex;
  }
}

@media (max-width: 768px) {
  :root {
    --container: min(100% - 28px, 1180px);
  }

  html {
    font-size: 16.5px;
  }

  .site-header {
    position: relative;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    z-index: 30;
    width: min(88vw, 340px);
    display: none;
    padding: 0.7rem;
    border-radius: var(--radius-md);
    background: var(--milk);
    box-shadow: 0 22px 60px rgb(23 23 25 / 18%);
    flex-direction: column;
    align-items: stretch;
  }

  .site-nav.is-open {
    display: flex;
  }

  .hero-section {
    min-height: auto;
    padding-top: 1rem;
  }

  h1 {
    max-width: 100%;
    font-size: clamp(2.55rem, 12vw, 3.7rem);
    line-height: 0.98;
    overflow-wrap: normal;
    word-break: normal;
  }

  .hero-signals,
  .metric-row,
  .agent-grid,
  .workspace-grid,
  .process-steps,
  .calendar-board {
    grid-template-columns: 1fr;
  }

  .hero-signals {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hero-signals div {
    padding: 0.72rem;
  }

  .hero-signals dt {
    font-size: 1.45rem;
  }

  .hero-signals dd {
    font-size: 0.72rem;
  }

  .workspace-frame {
    grid-template-columns: 1fr;
  }

  .workspace-frame aside {
    display: none;
  }

  .material-table {
    max-width: 100%;
    overflow-x: auto;
  }

  .material-table [role="row"],
  .app-table [role="row"] {
    width: 760px;
    max-width: 760px;
  }

  .app-topbar,
  .topbar-actions,
  .site-footer {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 390px) {
  h1 {
    font-size: clamp(2.25rem, 10.4vw, 2.9rem);
  }

  .hero-visual {
    min-height: 430px;
    border-radius: 24px;
  }

  .hero-signals {
    gap: 0.45rem;
  }

  .hero-signals div {
    padding: 0.6rem;
  }

  .hero-signals dd {
    font-size: 0.66rem;
  }

  .editorial-console {
    left: 0.8rem;
    right: 0.8rem;
    bottom: 0.8rem;
  }
}
