@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap");

@font-face {
  font-family: "GT Sectra";
  src: url("fonts/GT-Sectra-Display-Medium.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "GT Sectra";
  src: url("fonts/GT-Sectra-Display-Medium-Italic.woff") format("woff");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  --accent-blue: #006EAB;
  --accent-blue-400: #1684C2;
  --display-serif: "Songti SC", "STSongti-SC-Black", "宋体-简", "Hiragino Mincho ProN", "Noto Serif CJK SC", "Source Han Serif SC", "SimSun", serif;
  --cream: #fdfbf7;
  --gray: #f4f5f2;
  --charcoal: #444;
  --black: #111;
  --white: #fff;
  --border: rgba(32, 32, 32, 0.1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  font-family: Inter, "Nunito Sans", system-ui, sans-serif;
  color: var(--charcoal);
  background: var(--white);
}

body {
  margin: 0;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s, border-color 0.2s, transform 0.25s, background-color 0.25s;
}

p {
  margin: 0;
  line-height: 1.7;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  color: var(--black);
  font-family: "GT Sectra", Georgia, serif;
  font-weight: 500;
  line-height: 1.05;
}

h1, h2, h3 {
  font-family: var(--display-serif);
  font-weight: 800;
}

h1 { font-size: clamp(3.15rem, 5.25vw, 6.1rem); }
h2 { font-size: clamp(2.8rem, 5.2vw, 5.8rem); }
h3 { font-size: clamp(2.4rem, 4.4vw, 4.8rem); }
h5 { font-size: clamp(1.08rem, 1.5vw, 1.3rem); }

i { font-style: italic; }

.container-custom {
  width: min(100%, 1280px);
  margin-inline: auto;
  padding-inline: 2rem;
}

.section-spacing {
  padding-block: clamp(6rem, 13vw, 12rem);
}

.narrow { max-width: 832px; }

#site-loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  animation: loaderOverlay 2.1s forwards;
  pointer-events: none;
}

#site-loader img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  opacity: 0;
  animation: loaderLogoIn 1.8s forwards;
}

@keyframes loaderLogoIn {
  0% { opacity: 0; transform: translateY(16px); }
  18%, 88% { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(-16px); }
}

@keyframes loaderOverlay {
  0%, 90% { opacity: 1; }
  to { opacity: 0; visibility: hidden; }
}

#header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  background: transparent;
  transition: background-color 0.3s, box-shadow 0.3s, backdrop-filter 0.3s;
}

#header[data-scrolled="true"] {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  backdrop-filter: blur(12px);
}

nav {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 2rem;
  transition: padding 0.3s;
}

#header[data-scrolled="true"] nav { padding-block: 1rem; }

[data-header-anim] {
  opacity: 0;
  animation: headerSlideIn 0.8s cubic-bezier(0.17, 0.84, 0.44, 1) forwards;
  animation-delay: calc(1.9s + var(--header-anim-index, 0) * 20ms);
}

[data-header-anim="0"] { --header-anim-index: 0; }
[data-header-anim="1"] { --header-anim-index: 1; }
[data-header-anim="2"] { --header-anim-index: 2; }
[data-header-anim="4"] { --header-anim-index: 4; }

@keyframes headerSlideIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.58rem;
  min-width: 260px;
  z-index: 1;
}

.brand-logo {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  box-shadow: 0 1px 2px rgba(17, 17, 17, 0.08);
}

.brand-wordmark {
  color: var(--black);
  font-family: "Songti SC", "STSong", "Noto Serif CJK SC", "Source Han Serif SC", "SimSun", serif;
  font-size: 1.65rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0;
  transform: translateY(-1px);
  white-space: nowrap;
}

.nav-links {
  position: absolute;
  left: 50%;
  translate: -50% 0;
  display: flex;
  align-items: center;
  gap: 2rem;
  font-weight: 500;
  color: var(--charcoal);
  white-space: nowrap;
}

.nav-links a:hover, footer a:hover { color: var(--accent-blue); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-left: auto;
  z-index: 1;
}

.btn {
  appearance: none;
  border: 0;
  font: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 1rem 2rem;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  will-change: transform;
}

.btn:hover { transform: scale(1.05); }
.btn:active { transform: scale(0.95); }

.btn-sm {
  padding: 0.8rem 1.5rem;
  font-size: 0.9rem;
}

.btn-primary {
  background: var(--accent-blue);
  color: #fff;
  box-shadow: 0 14px 26px rgba(0, 110, 171, 0.22);
}

.btn-primary:hover { background: var(--accent-blue-400); }

.btn-secondary {
  background: #fff;
  color: #111;
  border: 1px solid rgba(32, 32, 32, 0.2);
}

.btn-secondary:hover { border-color: var(--accent-blue-400); }

.friend-dialog {
  width: min(88vw, 430px);
  padding: 1rem;
  border: 0;
  border-radius: 1.25rem;
  background: #fff;
  box-shadow: 0 24px 70px rgba(17, 17, 17, 0.18);
  opacity: 0;
  transform: translateY(10px) scale(0.98);
}

.friend-dialog[open] {
  animation: dialogEnter 180ms ease-out forwards;
}

.friend-dialog::backdrop {
  background: rgba(17, 17, 17, 0.42);
  backdrop-filter: blur(4px);
}

.friend-dialog img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0.75rem;
}

.friend-dialog-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid rgba(32, 32, 32, 0.12);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--black);
  font: inherit;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(17, 17, 17, 0.08);
}

.friend-dialog-close:hover {
  color: var(--accent-blue);
  border-color: rgba(0, 110, 171, 0.28);
}

@keyframes dialogEnter {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  padding-top: 6rem;
}

.hero-container {
  position: relative;
  z-index: 4;
}

.hero-copy {
  max-width: min(100%, 1180px);
  margin: -3.5rem auto 0;
  text-align: center;
}

.hero-copy h1 {
  margin-bottom: 1.8rem;
  opacity: 0;
  animation: fadeInUp 1.6s cubic-bezier(0.17, 0.84, 0.44, 1) 2.05s forwards;
}

.hero-subheadline {
  max-width: 900px;
  margin: 0 auto 2.8rem;
  font-size: clamp(1rem, 1.42vw, 1.22rem);
  line-height: 1.55;
  color: rgba(68, 68, 68, 0.8);
  opacity: 0;
  animation: fadeInUp 1.6s cubic-bezier(0.17, 0.84, 0.44, 1) 2.18s forwards;
}

.hero-copy .btn {
  opacity: 0;
  animation: fadeInUp 1.6s cubic-bezier(0.17, 0.84, 0.44, 1) 2.32s forwards;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

.floral-root {
  position: absolute;
  inset: 0 0 -140px;
  z-index: 1;
  pointer-events: none;
  user-select: none;
  overflow: visible;
}

.tech-asset {
  position: absolute;
  width: clamp(48px, 5.6vw, 82px);
  height: clamp(48px, 5.6vw, 82px);
  color: var(--accent-blue);
  filter: drop-shadow(0 2px 2px rgba(0,0,0,0.06));
  opacity: 0;
  transform: scale(0) rotate(calc(var(--rotate, 0deg) - 20deg));
  transition: opacity 0.45s cubic-bezier(0.32, 0.72, 0, 1), transform 0.45s cubic-bezier(0.32, 0.72, 0, 1);
}

.tech-asset svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

.tech-fill-main { fill: rgba(0, 110, 171, 0.18); }
.tech-fill-mid { fill: rgba(0, 110, 171, 0.26); }
.tech-fill-soft { fill: rgba(0, 110, 171, 0.09); }
.tech-stroke { stroke: rgba(0, 110, 171, 0.46); }
.tech-ink { fill: rgba(34, 50, 62, 0.28); }
.tech-glow { fill: rgba(41, 169, 232, 0.22); }

.floral-root.is-blooming .tech-asset {
  animation: bloom 0.8s var(--ease-spring) forwards, floralSway var(--sway-duration, 4.8s) ease-in-out infinite;
  animation-delay: var(--delay), calc(var(--delay) + 0.8s);
}

.floral-label {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  max-width: 270px;
  padding: 0.55rem 0.85rem;
  border: 1px solid rgba(32,32,32,0.08);
  border-radius: 999px;
  background: rgba(255,255,255,0.92);
  box-shadow: 0 7px 18px rgba(17,17,17,0.1);
  color: rgba(68,68,68,0.7);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: clamp(0.68rem, 1vw, 0.9rem);
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  transform: translateY(18px) scale(0.92) rotate(var(--rotate, 0deg));
  transition: opacity 0.45s cubic-bezier(0.32, 0.72, 0, 1), transform 0.45s cubic-bezier(0.32, 0.72, 0, 1);
}

.floral-root.is-blooming .floral-label {
  animation: labelBloom 0.65s var(--ease-spring) forwards, floralSway var(--sway-duration, 4.8s) ease-in-out infinite;
  animation-delay: var(--delay), calc(var(--delay) + 0.65s);
}

.floral-label::before {
  content: "";
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  border: 1px solid rgba(32,32,32,0.1);
  background: var(--dot, #fff);
  flex: none;
}

@keyframes bloom {
  from { opacity: 0; transform: scale(0) rotate(calc(var(--rotate, 0deg) - 20deg)); }
  65% { opacity: 0.72; transform: scale(calc(var(--scale, 1) * 1.05)) rotate(calc(var(--rotate, 0deg) + 2deg)); }
  to { opacity: 0.72; transform: scale(var(--scale, 1)) rotate(var(--rotate, 0deg)); }
}

@keyframes labelBloom {
  from { opacity: 0; transform: translateY(18px) scale(0.92) rotate(var(--rotate, 0deg)); }
  to { opacity: 1; transform: translateY(0) scale(1) rotate(var(--rotate, 0deg)); }
}

@keyframes floralSway {
  0%, 100% { translate: 0 0; rotate: 0deg; }
  25% { translate: 7px 3px; rotate: 2deg; }
  75% { translate: -7px -3px; rotate: -2deg; }
}

.floral-root[data-floral-past="true"] .tech-asset {
  animation: floralExit 0.8s var(--ease-spring) forwards;
  animation-delay: var(--exit-delay, 0s);
}

.floral-root[data-floral-past="true"] .floral-label {
  animation: labelExit 0.65s var(--ease-spring) forwards;
  animation-delay: var(--exit-delay, 0s);
}

@keyframes floralExit {
  from { opacity: 0.72; transform: scale(var(--scale, 1)) rotate(var(--rotate, 0deg)); }
  to { opacity: 0; transform: scale(0.5) rotate(var(--rotate, 0deg)); }
}

@keyframes labelExit {
  from { opacity: 1; transform: translateY(0) scale(1) rotate(var(--rotate, 0deg)); }
  to { opacity: 0; transform: translateY(18px) scale(0.92) rotate(var(--rotate, 0deg)); }
}

.section-header {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 3rem;
}

.section-header.centered {
  align-items: center;
  text-align: center;
}

.section-header h2 { max-width: 740px; }
.section-header p {
  max-width: 760px;
  color: rgba(68, 68, 68, 0.8);
  font-size: clamp(1rem, 1.5vw, 1.125rem);
}

.configure-section { background: #fff; }

.playground-shell {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
}

.mode-switch {
  position: relative;
  z-index: 0;
  width: 320px;
  margin: 0 auto -1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 1rem;
  background: rgba(244,245,242,0.75);
  padding: 0.75rem 1rem 2rem;
  font-size: 0.78rem;
}

.mode-switch button {
  width: 56px;
  height: 32px;
  border: 0;
  border-radius: 999px;
  background: #e5e7eb;
  padding: 4px;
  cursor: pointer;
}

.mode-switch button span {
  display: block;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: white;
  box-shadow: 0 1px 3px rgba(0,0,0,0.14);
  transition: transform 0.3s var(--ease-smooth);
}

.mode-switch button.active { background: #374151; }
.mode-switch button.active span { transform: translateX(24px); }

.playground {
  position: relative;
  z-index: 1;
  min-height: 680px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 1rem;
  overflow: hidden;
  border-radius: 2rem;
  background: var(--gray);
  padding: 1rem;
}

.preview-panel,
.config-panel {
  min-width: 0;
  overflow: hidden;
  border: 2px solid #fff;
  border-radius: 1.5rem;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.preview-panel {
  background: linear-gradient(135deg, #fbfdfc, #eef6ef);
  padding: clamp(1rem, 4vw, 3rem);
}

.preview-window {
  height: 100%;
  min-height: 560px;
  border: 1px solid rgba(32,32,32,0.08);
  border-radius: 1rem;
  overflow: hidden;
  background: #fbfdfc;
}

.preview-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 58px;
  padding-inline: 1rem;
  border-bottom: 1px solid rgba(32,32,32,0.06);
  background: linear-gradient(#f8fbf9, rgba(238,246,239,0.35));
}

.preview-nav div {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.preview-nav div:nth-child(1) { background: #fd736d; }
.preview-nav div:nth-child(2) { background: #eebc4a; }
.preview-nav div:nth-child(3) { background: #29a9e8; }

.preview-grid {
  display: grid;
  grid-template-columns: 24% 1fr;
  height: calc(100% - 58px);
  min-height: 500px;
}

.preview-grid aside {
  background: #f5f7f6;
  padding: 2rem 1rem;
}

.preview-grid aside span,
.preview-card,
.preview-buttons span,
.preview-buttons strong {
  display: block;
  border-radius: 8px;
  background: #eef1ee;
}

.preview-grid aside span {
  width: 72%;
  height: 10px;
  margin-bottom: 1.4rem;
}

.preview-grid aside span:nth-child(3) { background: rgba(0,110,171,0.2); }

.preview-grid article {
  padding: 2rem;
}

.preview-card.hero-card { height: 34%; background: #eef5ef; margin-bottom: 1.2rem; }
.preview-card.small { height: 18%; margin-bottom: 1.2rem; }
.preview-card.split { height: 22%; margin-bottom: 1.6rem; }

.preview-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 0.8rem;
}

.preview-buttons span { width: 110px; height: 36px; background: #fff; border: 1px solid rgba(32,32,32,0.1); }
.preview-buttons strong { width: 130px; height: 36px; background: var(--accent-blue); }

.config-panel {
  padding: 1.25rem;
  overflow-y: auto;
}

.config-panel label {
  display: block;
  margin: 0.9rem 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(68,68,68,0.8);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

input[type="color"] {
  width: 48px;
  height: 48px;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 0.8rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
  background: none;
}

.ramp {
  height: 16px;
  margin-top: 0.55rem;
  border-radius: 0.35rem;
}

.ramp.blue { background: linear-gradient(90deg, #e9f6fc, #b9def1, #58a9d5, #006EAB, #003a5c); }
.ramp.amber { background: linear-gradient(90deg, #fff7e8, #f7d59a, #d88d4a, #9c5629, #5c2d16); }

.select-like {
  border: 1px solid var(--border);
  border-radius: 0.7rem;
  padding: 0.75rem 0.85rem;
  color: rgba(68,68,68,0.76);
}

.option-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding-top: 1rem;
  margin-top: 1rem;
  border-top: 1px solid var(--border);
}

.option-group label {
  flex: 0 0 100%;
  margin-top: 0;
}

.option-group button {
  border: 1px solid var(--border);
  border-radius: 0.55rem;
  background: #fff;
  color: rgba(68,68,68,0.8);
  padding: 0.48rem 0.65rem;
  font-size: 0.75rem;
}

.option-group button.active {
  border-color: var(--accent-blue);
  color: var(--accent-blue);
  background: rgba(0,110,171,0.06);
  font-weight: 700;
}

.decision-map {
  position: relative;
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) 360px;
  gap: 1rem;
  align-items: stretch;
  padding: 1rem;
  border: 1px solid rgba(0,110,171,0.14);
  border-radius: 1.5rem;
  background:
    radial-gradient(circle at 90% 10%, rgba(0,110,171,0.08), transparent 28%),
    linear-gradient(135deg, #fbfdff, #f4f9fc 72%, #fff);
  box-shadow: 0 18px 50px rgba(0, 49, 77, 0.07);
}

.decision-rail,
.decision-card,
.route-compare,
.insight-card {
  border: 1px solid rgba(0,110,171,0.16);
  border-radius: 0.9rem;
  background: rgba(255,255,255,0.88);
}

.decision-rail {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.55rem;
  padding: 1rem;
  color: var(--accent-blue);
}

.decision-rail span {
  font-size: 0.82rem;
  font-weight: 700;
  color: rgba(68,68,68,0.76);
}

.decision-rail strong {
  font-size: 1.1rem;
  line-height: 1.4;
}

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

.decision-card {
  padding: 1rem;
}

.decision-card-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
  color: var(--accent-blue);
  font-weight: 800;
}

.decision-card-title span {
  display: inline-grid;
  place-items: center;
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 50%;
  background: var(--accent-blue);
  color: #fff;
  font-size: 0.8rem;
}

.decision-card p,
.insight-card p {
  color: rgba(32,32,32,0.72);
  font-size: 0.86rem;
  line-height: 1.65;
}

.mini-tools {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
  margin-top: 0.9rem;
}

.mini-tools span,
.factor-grid span {
  display: grid;
  place-items: center;
  min-height: 2.2rem;
  border-radius: 0.55rem;
  background: rgba(0,110,171,0.07);
  color: var(--accent-blue);
  font-size: 0.74rem;
  font-weight: 700;
}

.mode-card {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  align-content: center;
  justify-content: center;
}

.mode-card strong {
  color: var(--black);
  font-weight: 800;
}

.agent-flow {
  grid-column: 2;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr repeat(4, 1fr) 1.2fr;
  gap: 0.6rem;
  align-items: center;
  padding: 1rem;
  border: 1px solid rgba(0,110,171,0.16);
  border-radius: 0.9rem;
  background: rgba(255,255,255,0.9);
}

.user-bubble,
.agent-step,
.result-card {
  min-height: 4.6rem;
  display: grid;
  place-items: center;
  text-align: center;
  border-radius: 0.75rem;
  padding: 0.75rem;
  font-size: 0.8rem;
  line-height: 1.45;
}

.user-bubble {
  border: 1px solid rgba(0,110,171,0.18);
  background: #fff;
  color: rgba(32,32,32,0.78);
}

.agent-node {
  display: grid;
  place-items: center;
  width: 4.4rem;
  height: 4.4rem;
  margin: auto;
  border: 1px solid rgba(0,110,171,0.26);
  border-radius: 50%;
  background: rgba(0,110,171,0.08);
  color: var(--accent-blue);
  font-weight: 800;
}

.agent-step {
  background: rgba(0,110,171,0.08);
  color: var(--accent-blue);
  font-weight: 800;
}

.result-card {
  background: #fff;
  border: 1px solid rgba(0,110,171,0.24);
  color: var(--accent-blue);
  font-weight: 800;
}

.route-compare {
  grid-column: 1 / 3;
  padding: 1rem;
}

.route-compare > div + div {
  margin-top: 0.8rem;
  padding-top: 0.8rem;
  border-top: 1px solid rgba(0,110,171,0.12);
}

.route-compare span {
  display: block;
  margin-bottom: 0.55rem;
  color: var(--accent-blue);
  font-weight: 800;
}

.route-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1.25rem;
  position: relative;
}

.route-row b {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  min-height: 2.3rem;
  border-radius: 0.6rem;
  background: rgba(0,110,171,0.07);
  color: rgba(32,32,32,0.72);
  font-size: 0.72rem;
  text-align: center;
}

.route-row.active b {
  color: var(--accent-blue);
  background: rgba(0,110,171,0.1);
}

.route-row i {
  position: absolute;
  top: 50%;
  width: 1rem;
  height: 1px;
  background: rgba(0,110,171,0.55);
}

.route-row i:nth-of-type(1) { left: 18.5%; }
.route-row i:nth-of-type(2) { left: 39%; }
.route-row i:nth-of-type(3) { left: 59.5%; }
.route-row i:nth-of-type(4) { left: 80%; }

.insight-stack {
  grid-column: 3;
  grid-row: 2 / span 3;
  display: grid;
  gap: 1rem;
}

.insight-card {
  padding: 1rem;
}

.insight-card h5 {
  margin-bottom: 0.55rem;
  color: var(--accent-blue);
  font-family: Inter, "Nunito Sans", system-ui, sans-serif;
  font-size: 1rem;
}

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

.pipeline-section {
  background: rgba(244,245,242,0.8);
  margin-bottom: 4rem;
}

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

.pipeline-card .anim-container {
  position: relative;
  aspect-ratio: 4 / 3;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  border-radius: 1.5rem;
  background: #fff;
  margin-bottom: 1.5rem;
}

.project-image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

.project-video-container {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.05rem, 2.2vw, 1.65rem);
}

.project-video {
  width: 74%;
  height: 68%;
  max-width: none;
  display: block;
  object-fit: contain;
  object-position: center bottom;
  border-radius: 1rem;
  background: #f4f8fb;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  transform: scale(1.34);
  transform-origin: center;
}

.project-video-top {
  object-position: center top;
  transform-origin: center;
  transform: scale(1.34);
}

.project-video-contained {
  width: 90%;
  height: 90%;
  object-position: center;
  transform-origin: center;
  transform: scale(1.08);
}

.pipeline-card > span {
  display: block;
  margin-bottom: 0.5rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.88rem;
  color: rgba(68,68,68,0.4);
}

.pipeline-card h5 { margin-bottom: 0.5rem; }
.pipeline-card p {
  color: rgba(68,68,68,0.8);
  font-size: clamp(0.92rem, 1.2vw, 1rem);
}

.anim1 {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8%;
  padding: 10% 12%;
}

.anim1-header {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.anim1-swatch {
  width: 18%;
  aspect-ratio: 1;
  border-radius: 24%;
  box-shadow: 0 3px 14px rgba(32,32,32,0.1), 0 1px 3px rgba(32,32,32,0.06);
  transition: background-color 0.35s var(--ease-smooth), transform 0.22s var(--ease-smooth);
}

.anim1-swatch.is-pressed { transform: scale(0.94); }

.anim1-hex {
  border: 1px solid rgba(32,32,32,0.1);
  border-radius: 10px;
  padding: 12px 10px;
  font: 14px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  color: rgba(32,32,32,0.65);
}

.anim1-ramps {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.anim1-row {
  display: flex;
  overflow: hidden;
  border-radius: 8px;
}

.anim1-cell {
  flex: 1;
  height: 24px;
  transition: background-color 0.3s var(--ease-smooth);
}

.anim1-cell.is-popping { animation: a1Pop 0.25s cubic-bezier(0.34,1.4,0.64,1); }

@keyframes a1Pop {
  45% { transform: scaleY(1.1); }
}

.anim1-ptr {
  position: absolute;
  top: 28%;
  left: 18%;
  width: 48px;
  height: 48px;
  filter: drop-shadow(0 1px 3px rgba(32,32,32,0.22));
  transition: transform 0.12s var(--ease-smooth);
}

.anim1-ptr.is-clicking { transform: translateY(4px); }

.anim2 {
  position: absolute;
  inset: 16% 6%;
  background: #171b1f;
  border: 1px solid rgba(255,255,255,0.9);
  border-radius: 12px;
  box-shadow: 0 3px 6px rgba(0,0,0,0.12);
  overflow: hidden;
  padding: 18px 14px;
}

.anim2-code {
  font: clamp(9px, 1.1vw, 13px)/1.75 ui-monospace, SFMono-Regular, Menlo, monospace;
  color: #bbbec1;
  white-space: nowrap;
}

.anim2-line {
  display: flex;
  gap: 1.25em;
}

.anim2-gutter { color: rgba(113,113,113,0.55); min-width: 1ch; }

.anim3 {
  position: absolute;
  inset: 10%;
}

.anim3-frame {
  width: 100%;
  height: 100%;
  border: 1px solid rgba(32,32,32,0.1);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #fbfdfc;
}

.anim3-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 13%;
  padding: 0 10px;
  background: linear-gradient(180deg,#f8fbf9,#eef6ef59);
  border-bottom: 1px solid rgba(32,32,32,0.06);
  animation: a3Nav 5.8s cubic-bezier(0.22,1,0.36,1) infinite;
}

.anim3-nav span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.anim3-nav span:nth-child(1) { background: #fd736d; }
.anim3-nav span:nth-child(2) { background: #eebc4a; }
.anim3-nav span:nth-child(3) { background: #29a9e8; }
.anim3-nav div {
  flex: 1;
  height: 52%;
  max-height: 22px;
  border-radius: 5px;
  background: rgba(255,255,255,0.75);
  border: 1px solid rgba(32,32,32,0.06);
}

.anim3-body {
  flex: 1;
  display: flex;
}

.anim3-body aside {
  width: 22%;
  background: #f5f7f6;
  padding: 10% 8%;
}

.anim3-body i,
.anim3-body b,
.anim3-body em,
.anim3-body strong {
  display: block;
  border-radius: 6px;
  background: rgba(32,32,32,0.07);
}

.anim3-body i {
  height: 8px;
  margin-bottom: 18px;
}

.anim3-body i:nth-child(3) { background: rgba(0,110,171,0.2); }

.anim3-body main {
  flex: 1;
  padding: 8%;
  display: flex;
  flex-direction: column;
  gap: 5%;
}

.anim3-body b:nth-child(1) { height: 28%; }
.anim3-body b:nth-child(2) { height: 18%; }
.anim3-body b:nth-child(3) { height: 20%; }

.anim3-body main div {
  display: flex;
  justify-content: flex-end;
  gap: 3%;
  margin-top: auto;
}

.anim3-body em { width: 28%; height: 22px; background: #fff; border: 1px solid rgba(32,32,32,0.1); }
.anim3-body strong { width: 32%; height: 22px; background: var(--accent-blue); }

@keyframes a3Nav {
  0%, 3% { opacity: 0; transform: translateY(-100%); }
  12%, 84% { opacity: 1; transform: translateY(0); }
  91%, 100% { opacity: 0; transform: translateY(-6px); }
}

.features-grid {
  max-width: 768px;
  margin: 0 auto;
  border: 1px solid var(--border);
  background: #fff;
}

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

.feature-item {
  display: flex;
  gap: 1rem;
  padding: 2rem;
  border-bottom: 1px solid var(--border);
}

.feature-item:nth-child(odd) { border-right: 1px solid var(--border); }
.feature-item:last-child { border-bottom: 0; }
.feature-item:nth-last-child(2) { border-bottom: 0; }

.feature-icon {
  width: 22px;
  height: 22px;
  margin-top: 0.25rem;
  color: var(--accent-blue);
  flex: none;
}

.feature-item h5 { margin-bottom: 0.25rem; }
.feature-item p {
  color: rgba(68,68,68,0.8);
  font-size: 0.96rem;
}

.bottom-note {
  margin-top: 2rem;
  text-align: center;
  color: rgba(68,68,68,0.8);
}

.faq-section { padding-top: 4rem; }

.faq-list {
  background: #fff;
}

.faq-item {
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background: #fff;
  transition: border-color 0.3s;
}

.faq-item:hover { border-color: rgba(32,32,32,0.2); }

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border: 0;
  background: transparent;
  padding: 2rem;
  text-align: left;
  font: 600 clamp(1.05rem, 1.8vw, 1.25rem)/1.3 Inter, sans-serif;
  color: var(--black);
  cursor: pointer;
  transition: padding 0.3s;
}

.faq-question:hover { padding-inline: 2.5rem; }

.faq-question svg {
  width: 24px;
  height: 24px;
  flex: none;
  transition: transform 0.3s;
}

.faq-item.open .faq-question svg { transform: rotate(180deg); }

.faq-answer {
  height: 0;
  overflow: hidden;
  opacity: 0;
  transition: height 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

.faq-answer-inner {
  padding: 0 2rem 1.5rem;
  color: rgba(68,68,68,0.8);
}

footer {
  background: var(--gray);
  padding-block: 5rem;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 4rem;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 3rem;
}

.footer-brand-head {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.footer-brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  width: fit-content;
}

.footer-brand img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
}

.footer-brand .brand-wordmark {
  font-size: 1.65rem;
}

.footer-contact {
  display: grid;
  gap: 0.35rem;
}

.footer-brand p,
.footer-contact p {
  color: rgba(68,68,68,0.8);
  font-size: 0.9rem;
}

.footer-contact p {
  margin: 0;
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 3rem;
}

.footer-links h5 { margin-bottom: 1rem; }
.footer-links a {
  display: block;
  margin-block: 0.75rem;
  font-weight: 300;
}

@media (max-width: 900px) {
  .brand { min-width: auto; }
  .brand-logo { width: 38px; height: 38px; }
  .brand-wordmark { font-size: 1.4rem; }
  .nav-links { display: none; }
  .playground { grid-template-columns: 1fr; min-height: auto; }
  .config-panel { order: -1; }
  .decision-map {
    grid-template-columns: 1fr;
  }
  .decision-map > .decision-rail,
  .decision-map > .decision-chain,
  .decision-map > .mode-card,
  .decision-map > .agent-flow,
  .decision-map > .route-compare {
    display: none;
  }
  .decision-rail,
  .agent-flow,
  .route-compare,
  .insight-stack {
    grid-column: auto;
    grid-row: auto;
  }
  .decision-chain {
    grid-template-columns: 1fr;
  }
  .agent-flow {
    grid-template-columns: 1fr;
  }
  .route-row {
    grid-template-columns: 1fr;
    gap: 0.45rem;
  }
  .route-row i {
    display: none;
  }
  .pipeline-grid { grid-template-columns: 1fr; }
  .pipeline-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
  }
  .pipeline-card .anim-container {
    order: 4;
    margin-top: 1.5rem;
    margin-bottom: 0;
  }
  .pipeline-card > span { order: 1; }
  .pipeline-card h5 { order: 2; }
  .pipeline-card p { order: 3; }
  .features-grid { grid-template-columns: 1fr; }
  .feature-item, .feature-item:nth-child(odd) { border-right: 0; }
  .feature-item:nth-last-child(2) { border-bottom: 1px solid var(--border); }
}

@media (max-width: 640px) {
  .container-custom { padding-inline: 1.25rem; }
  nav { padding-block: 1.5rem; }
  .nav-actions { gap: 0.25rem; }
  .btn-sm { padding: 0.75rem 1rem; }
  .hero-section { overflow: hidden; }
  .hero-copy { margin-top: -2rem; }
  .hero-subheadline { line-height: 1.45; }
  .floral-root { overflow: hidden; }
  .tech-asset { width: 58px; height: 58px; }
  .floral-label { display: none; }
  .mode-switch { display: none; }
  .playground { border-radius: 1.5rem; padding: 0.75rem; }
  .decision-map { border-radius: 1rem; padding: 0.75rem; }
  .mini-tools,
  .factor-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .preview-window { min-height: 420px; }
  .preview-grid article { padding: 1.25rem; }
  .footer-grid { flex-direction: column; }
}

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