* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(31, 95, 255, 0.1), transparent 24%),
    radial-gradient(circle at 100% 0%, rgba(27, 163, 111, 0.05), transparent 18%),
    linear-gradient(180deg, #fbfdff 0%, #f3f8fc 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--bg-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--bg-grid) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.7), transparent 78%);
  opacity: 0.55;
}

.sim-page {
  background:
    radial-gradient(circle at top left, rgba(16, 63, 156, 0.14), transparent 24%),
    linear-gradient(180deg, #f4f8fd 0%, #eef4fa 100%);
}

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

button,
input,
select,
textarea {
  font: inherit;
}

input,
select,
textarea {
  appearance: none;
}

.wrap {
  width: min(calc(100% - 40px), var(--max-width));
  margin: 0 auto;
}

.section {
  position: relative;
  padding: 88px 0;
}

.section:nth-of-type(odd)::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(190, 209, 229, 0.9), transparent);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(248, 251, 255, 0.78);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(190, 209, 229, 0.74);
  box-shadow: 0 10px 30px rgba(12, 35, 56, 0.05);
}

.topbar-inner,
.top-actions,
.hero-actions,
.sim-toolbar,
.sim-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.topbar-inner {
  justify-content: space-between;
  min-height: 78px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  font-family: var(--mono);
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--blue-deep), var(--blue));
  box-shadow: 0 16px 26px rgba(31, 95, 255, 0.22);
}

.sim-page .brand-mark {
  background: linear-gradient(135deg, #0d2f5f, #1b4f97);
}

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

.brand-copy strong,
.card h3,
.section-heading h2,
.sim-toolbar h1,
.hero-copy h1,
.status-card strong,
.timeline-item strong,
.thread-message strong,
.success-box strong {
  color: var(--text-strong);
}

.brand-copy strong {
  font-size: 0.98rem;
  line-height: 1.15;
}

.brand-copy span,
.muted,
.hero-copy p,
.service-card p,
.review-card p,
.thread-message p,
.timeline-item p,
.status-card p,
.footer-note,
.empty-state {
  color: var(--muted);
}

.brand-copy span {
  font-size: 0.85rem;
}

.pill,
.eyebrow,
.meta,
.step-label {
  font-family: var(--mono);
}

.pill,
.button {
  min-height: 44px;
  border-radius: 999px;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border: 1px solid rgba(190, 209, 229, 0.92);
  background: rgba(255, 255, 255, 0.92);
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.01em;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border: 1px solid transparent;
  font-weight: 700;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    color 160ms ease;
}

.button:hover,
.button:focus-visible,
.pill:hover {
  transform: translateY(-1px);
}

.button:focus-visible,
.input:focus-visible {
  outline: none;
}

.button-primary {
  color: #fff;
  background: linear-gradient(135deg, #1a5cff, #0f49d8);
  box-shadow: 0 16px 28px rgba(31, 95, 255, 0.2);
}

.button-primary:hover,
.button-primary:focus-visible {
  box-shadow: 0 20px 34px rgba(31, 95, 255, 0.26);
}

.button-secondary {
  background: #fff;
  color: var(--text-strong);
  border-color: rgba(190, 209, 229, 1);
  box-shadow: 0 8px 20px rgba(12, 35, 56, 0.06);
}

.button-ghost {
  background: rgba(255, 255, 255, 0.56);
  color: var(--muted);
  border-color: rgba(190, 209, 229, 0.82);
}

.button:disabled {
  opacity: 0.52;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  padding: 9px 12px;
  border-radius: 999px;
  background: #edf3ff;
  color: var(--blue-deep);
  border: 1px solid #dce7ff;
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.panel,
.card {
  position: relative;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(249, 252, 255, 0.95));
  border: 1px solid rgba(209, 221, 235, 0.95);
  border-radius: var(--radius-xl);
  box-shadow:
    0 18px 48px rgba(18, 54, 92, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.88);
  padding: 30px;
}

.hero-grid,
.dual-grid,
.service-grid,
.sim-grid,
.status-grid {
  display: grid;
  gap: 24px;
}

.hero-grid {
  grid-template-columns: minmax(0, 1.06fr) minmax(360px, 0.94fr);
  align-items: stretch;
}

.dual-grid,
.status-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

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

.sim-grid {
  grid-template-columns: 0.95fr 1.05fr;
}

.hero-copy {
  display: grid;
  align-content: start;
  gap: 22px;
  min-height: 100%;
  padding: 42px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(244, 249, 255, 0.98)),
    linear-gradient(180deg, #ffffff, #f9fbfe);
}

.hero-copy::before,
.sim-toolbar > div:first-child::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--blue), var(--green));
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(2.9rem, 5vw, 5rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
  max-width: 9ch;
}

.hero-copy p {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.65;
  max-width: 62ch;
}

.hero-points,
.thread,
.timeline,
.pipeline {
  display: grid;
  gap: 14px;
}

.hero-points {
  padding: 0;
  margin: 0;
  list-style: none;
}

.hero-points li {
  position: relative;
  padding-left: 26px;
  font-size: 0.98rem;
  color: var(--text);
}

.hero-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55rem;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--blue), var(--green));
  box-shadow: 0 0 0 5px rgba(31, 95, 255, 0.08);
}

.section-heading {
  display: grid;
  gap: 10px;
  margin-bottom: 26px;
}

.section-heading h2,
.sim-toolbar h1 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.section-heading p,
.sim-toolbar p {
  margin: 0;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px;
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-strong);
}

.field-full {
  grid-column: 1 / -1;
}

.input {
  width: 100%;
  min-height: 50px;
  padding: 13px 15px;
  border-radius: 16px;
  border: 1px solid rgba(190, 209, 229, 0.95);
  background: linear-gradient(180deg, #ffffff, #f9fbfe);
  color: var(--text-strong);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    background 160ms ease;
}

.input:focus,
.input:focus-visible {
  border-color: rgba(31, 95, 255, 0.8);
  box-shadow:
    0 0 0 4px rgba(31, 95, 255, 0.11),
    inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.textarea {
  min-height: 122px;
  resize: vertical;
}

#requestForm,
.success-box {
  display: grid;
  gap: 18px;
}

.success-box {
  margin-top: 18px;
  padding: 20px 22px;
  border: 1px solid rgba(157, 224, 194, 0.96);
  border-radius: 22px;
  background: linear-gradient(180deg, #effdf6, #e7fbf1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.success-box strong {
  font-size: 1rem;
}

.service-card,
.review-card,
.status-card,
.timeline-item,
.thread-message {
  padding: 22px;
  border: 1px solid rgba(209, 221, 235, 0.95);
  border-radius: 22px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow: 0 10px 28px rgba(18, 54, 92, 0.05);
}

.service-card {
  display: grid;
  gap: 12px;
  min-height: 220px;
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.service-card:hover {
  transform: translateY(-4px);
  border-color: rgba(31, 95, 255, 0.32);
  box-shadow: 0 20px 38px rgba(18, 54, 92, 0.09);
}

.service-card h3,
.review-card h3 {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.service-card p,
.review-card p {
  margin: 0;
  line-height: 1.65;
}

.service-card .meta,
.review-card .meta,
.status-card .meta {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 7px 10px;
  border-radius: 999px;
  background: #eef4ff;
  border: 1px solid #dde8ff;
}

.meta {
  color: var(--blue-deep);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.sim-page .section {
  padding-top: 44px;
}

.sim-toolbar {
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.workflow-overview {
  display: grid;
  gap: 24px;
  margin-bottom: 24px;
  overflow: hidden;
}

.workflow-overview.is-live {
  border-color: rgba(144, 181, 255, 0.9);
}

.workflow-head,
.progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.sim-toolbar > div:first-child {
  position: relative;
  display: grid;
  gap: 10px;
  padding-left: 18px;
}

.sim-actions {
  justify-content: flex-end;
}

.live-indicator,
.progress-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 11px 15px;
  border-radius: 999px;
  border: 1px solid rgba(190, 209, 229, 0.95);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 24px rgba(18, 54, 92, 0.05);
}

.live-indicator strong,
.progress-pill {
  color: var(--text-strong);
  font-size: 0.88rem;
}

.live-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--green), #59d68e);
  box-shadow: 0 0 0 0 rgba(27, 163, 111, 0.28);
  animation: livePulse 1.7s ease-out infinite;
}

.progress-shell {
  display: grid;
  gap: 14px;
}

.progress-track {
  position: relative;
  width: 100%;
  height: 14px;
  border-radius: 999px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(226, 235, 246, 0.95), rgba(214, 226, 240, 0.88));
  border: 1px solid rgba(190, 209, 229, 0.95);
}

.progress-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: inherit;
  background:
    linear-gradient(90deg, rgba(31, 95, 255, 0.98), rgba(81, 154, 255, 0.92) 58%, rgba(27, 163, 111, 0.88));
  box-shadow: 0 12px 26px rgba(31, 95, 255, 0.16);
  transition: width 680ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.progress-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.42), transparent);
  transform: translateX(-100%);
  animation: progressSweep 2.1s linear infinite;
}

.progress-copy {
  display: grid;
  gap: 8px;
}

.status-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 24px;
}

.status-card {
  display: grid;
  gap: 10px;
  min-height: 138px;
  align-content: start;
}

.status-card strong {
  font-size: 1.14rem;
  line-height: 1.24;
  letter-spacing: -0.02em;
}

.step-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}

.step-item {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: center;
  padding: 15px 16px;
  border: 1px solid rgba(209, 221, 235, 0.96);
  border-radius: 18px;
  background: #fff;
  transition: border-color 160ms ease, background 160ms ease;
}

.step-item.is-complete {
  background: linear-gradient(180deg, #effdf6, #e7fbf1);
  border-color: rgba(157, 224, 194, 0.92);
}

.step-item.is-active {
  background: linear-gradient(180deg, #eef4ff, #e8f0ff);
  border-color: rgba(144, 181, 255, 0.92);
}

.step-item.is-advancing {
  animation: stepAdvance 780ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.step-dot {
  position: relative;
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: var(--line-strong);
}

.step-item.is-complete .step-dot {
  background: var(--green);
}

.step-item.is-active .step-dot {
  background: var(--blue);
}

.step-item.is-active .step-dot::after {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: 999px;
  border: 1px solid rgba(31, 95, 255, 0.24);
  animation: dotPing 1.7s ease-out infinite;
}

.step-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-strong);
}

.empty-state {
  padding: 26px 28px;
  border-radius: 22px;
  border: 1px dashed rgba(190, 209, 229, 1);
  background: rgba(255, 255, 255, 0.75);
}

.thread {
  grid-auto-rows: min-content;
  max-height: 430px;
  overflow: auto;
  padding-right: 4px;
}

.thread-message {
  display: grid;
  gap: 8px;
  position: relative;
  overflow: hidden;
}

.thread-message::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: #dbe5f1;
}

.thread-message.is-customer::before {
  background: var(--orange);
}

.thread-message.is-system::before {
  background: var(--blue);
}

.thread-message.is-team::before {
  background: var(--green);
}

.thread-message strong {
  font-size: 0.88rem;
  text-transform: capitalize;
}

.thread-message p {
  margin: 0;
  line-height: 1.65;
}

.thread-message.is-new,
.timeline-item.is-new {
  opacity: 0;
  transform: translateY(18px) scale(0.985);
  animation: itemRise 520ms cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  animation-delay: var(--enter-delay, 0ms);
}

.timeline {
  display: grid;
  gap: 12px;
  max-height: 430px;
  overflow: auto;
  padding-right: 4px;
}

.timeline-item {
  display: grid;
  gap: 8px;
}

.timeline-item strong {
  font-size: 0.92rem;
  text-transform: lowercase;
}

.timeline-item p {
  margin: 0;
  line-height: 1.6;
}

.status-card.is-bumping,
.workflow-overview.is-bumping {
  animation: panelBump 540ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.is-hidden {
  display: none !important;
}

@keyframes livePulse {
  0% {
    box-shadow: 0 0 0 0 rgba(27, 163, 111, 0.28);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(27, 163, 111, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(27, 163, 111, 0);
  }
}

@keyframes progressSweep {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(200%);
  }
}

@keyframes panelBump {
  0% {
    transform: translateY(0);
    box-shadow:
      0 18px 48px rgba(18, 54, 92, 0.08),
      inset 0 1px 0 rgba(255, 255, 255, 0.88);
  }
  50% {
    transform: translateY(-3px);
    box-shadow:
      0 24px 56px rgba(31, 95, 255, 0.16),
      inset 0 1px 0 rgba(255, 255, 255, 0.88);
  }
  100% {
    transform: translateY(0);
  }
}

@keyframes stepAdvance {
  0% {
    transform: translateX(-6px);
    border-color: rgba(31, 95, 255, 0.24);
  }
  55% {
    transform: translateX(0);
    border-color: rgba(31, 95, 255, 0.72);
    box-shadow: 0 14px 32px rgba(31, 95, 255, 0.14);
  }
  100% {
    transform: translateX(0);
  }
}

@keyframes dotPing {
  0% {
    transform: scale(0.8);
    opacity: 0.82;
  }
  100% {
    transform: scale(1.75);
    opacity: 0;
  }
}

@keyframes itemRise {
  0% {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 1100px) {
  .hero-grid,
  .dual-grid,
  .sim-grid,
  .service-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 760px) {
  .wrap {
    width: min(calc(100% - 24px), var(--max-width));
  }

  .section {
    padding: 60px 0;
  }

  .topbar-inner,
  .sim-toolbar,
  .workflow-head,
  .progress-meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .sim-actions {
    justify-content: flex-start;
  }

  .form-grid,
  .status-grid {
    grid-template-columns: 1fr;
  }

  .field-full {
    grid-column: auto;
  }

  .hero-copy,
  .panel,
  .card {
    padding: 24px;
  }

  .hero-copy h1 {
    font-size: clamp(2.2rem, 10vw, 3.4rem);
  }
}

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

  .button,
  .service-card,
  .progress-fill,
  .live-dot,
  .thread-message.is-new,
  .timeline-item.is-new,
  .status-card.is-bumping,
  .workflow-overview.is-bumping,
  .step-item.is-advancing,
  .step-item.is-active .step-dot::after {
    animation: none !important;
    transition: none !important;
  }
}
