/* OpenNeo AI — Homepage specific styles */

/* Hero floor starts at the very top — aurora extends behind the floating
   header, no blank spacer band (other pages keep .site-main padding). */
.site-main {
  padding-top: 0;
}

/* Feature visual SVG shadow */
.feature-visual svg {
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.04));
}

/* CTA grid texture */
.cta-section {
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}

.cta-section .container {
  position: relative;
  z-index: 1;
}

/* Contact floor: CTA left, company story / mission / vision right
   (absorbed from the removed contact page). */
.cta-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(40px, 5vw, 88px);
  align-items: center;
  text-align: left;
}

.cta-intro .cta-title {
  font-size: clamp(28px, 2.4vw, 40px);
}

.cta-intro .cta-desc {
  margin: 0 0 var(--space-6);
}

.cta-about-block h3 {
  margin-bottom: var(--space-2);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #ffffff;
}

.cta-about-block h3::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 2px;
  margin-right: 10px;
  vertical-align: 4px;
  background: rgba(255, 255, 255, 0.55);
}

.cta-about-block p {
  font-size: 15px;
  line-height: 1.9;
  color: rgba(255, 255, 255, 0.8);
}

.cta-about-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
  margin-top: var(--space-6);
}

@media (max-width: 1024px) {
  .cta-grid {
    grid-template-columns: 1fr;
    gap: var(--space-7);
  }
}

@media (max-width: 480px) {
  .cta-about-row {
    grid-template-columns: 1fr;
  }
}

/* ===================================================================
   Business areas — asymmetric bento (home only)
   Replaces the 4-equal-card row with a rhythm: a tall dark flagship
   tile + a tinted wide tile + two square tiles.
   =================================================================== */
/* Shared floor heading: left-aligned title + subtitle, one consistent
   rhythm across every homepage floor (business / products / methodology / news). */
.floor-head {
  margin-bottom: var(--space-7);
}

.floor-head .section-subtitle {
  margin-bottom: 0;
}

.biz-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 1fr;
  gap: var(--space-5);
}

.biz-tile {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 182px;
  padding: var(--space-6);
  background: #ffffff;
  border: 1px solid rgba(0, 153, 153, 0.12);
  border-radius: var(--radius-lg);
  box-shadow: 0 1px 2px rgba(10, 61, 61, 0.04), 0 8px 24px rgba(10, 61, 61, 0.05);
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}

.biz-tile:hover {
  z-index: 1;
  transform: translateY(-6px);
  border-color: rgba(0, 153, 153, 0.22);
  box-shadow: 0 16px 40px rgba(0, 153, 153, 0.12), 0 4px 8px rgba(0, 0, 0, 0.04);
}

/* Flagship tile: dark brand fill, spans 2x2, vertically centered */
.biz-tile--feature {
  grid-column: span 2;
  grid-row: span 2;
  justify-content: center;
  color: #ffffff;
  background: linear-gradient(150deg, #063e3e 0%, var(--color-primary-text) 58%, var(--color-primary-dark) 100%);
  border-color: transparent;
  box-shadow: 0 18px 48px rgba(6, 62, 62, 0.28);
}

.biz-tile--feature .card-title {
  color: #ffffff;
  font-size: 24px;
  line-height: 1.25;
}

.biz-tile--feature .card-text {
  color: rgba(255, 255, 255, 0.82);
  font-size: 15px;
  max-width: 34em;
}

.biz-tile--feature .card-icon {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.22);
  color: #ffffff;
  box-shadow: none;
}

/* Accent tile: tinted, spans 2 cols */
.biz-tile--accent {
  grid-column: span 2;
  background: var(--color-primary-subtle);
  border-color: rgba(0, 153, 153, 0.16);
}

.biz-tile--accent .card-text {
  max-width: 34em;
}

/* Watermark = the tile's own icon enlarged and faint (a meaningful motif) */
.biz-watermark {
  position: absolute;
  right: -16px;
  bottom: -16px;
  z-index: -1;
  width: 152px;
  height: 152px;
  opacity: 0.06;
  color: currentColor;
  pointer-events: none;
}

.biz-tile--feature .biz-watermark {
  width: 190px;
  height: 190px;
  opacity: 0.1;
}

/* ===================================================================
   Product 2 — dark "engineering spotlight" + code sample card.
   Product 1 stays the light marketing split, so the two products now
   read as marketing-light vs engineering-dark (their real audiences).
   =================================================================== */
.feature--dark {
  position: relative;
  overflow: hidden;
  color: #ffffff;
  background: linear-gradient(160deg, #063a3a 0%, #074a4c 55%, #063e3e 100%);
}

.feature--dark::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 55% 50% at 78% 18%, rgba(0, 153, 153, 0.28) 0%, transparent 60%);
  pointer-events: none;
}

.feature--dark .feature-inner {
  position: relative;
  z-index: 1;
}

.feature--dark .feature-title {
  color: #ffffff;
}

.feature--dark .feature-desc {
  color: rgba(255, 255, 255, 0.78);
}

.feature--dark .feature-list li {
  color: rgba(255, 255, 255, 0.85);
}

.feature--dark .feature-list li::before {
  background: rgba(255, 255, 255, 0.14);
  color: #8af3e8;
}

.feature--dark .feature-tag {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.24);
  color: #a7f6ee;
}

/* Code sample card (language-neutral; representative MCP/SQL call) */
.code-card {
  position: relative;
  align-self: center;
  width: 100%;
  background: #04262a;
  border: 1px solid rgba(138, 243, 232, 0.18);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  font-family: ui-monospace, "SFMono-Regular", "Cascadia Code", Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 13.5px;
  line-height: 1.75;
  color: #cdeee9;
  overflow-x: auto;
  direction: ltr;
  text-align: left;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.feature--dark:hover .code-card {
  transform: translateY(-5px);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.code-card .ln {
  display: block;
  white-space: pre;
}

.code-card .k {
  color: #62d8ca;
}

.code-card .s {
  color: #a8e6cf;
}

.code-card .c {
  color: #5f938b;
  font-style: italic;
}

.code-card .caret {
  display: inline-block;
  width: 8px;
  height: 1.05em;
  margin-left: 3px;
  vertical-align: -2px;
  background: #62d8ca;
  animation: caretBlink 1.1s steps(1, end) infinite;
}

@keyframes caretBlink {
  50% {
    opacity: 0;
  }
}

/* Product 1 visual: gentle hover lift for life */
.feature-visual {
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.feature:hover .feature-visual {
  transform: translateY(-5px);
  box-shadow: 0 20px 48px rgba(0, 107, 107, 0.12);
}

/* ===================================================================
   Bento responsive collapse
   =================================================================== */
@media (max-width: 1024px) {
  .biz-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .biz-tile--feature {
    grid-column: span 2;
    grid-row: auto;
  }

  .biz-tile--accent {
    grid-column: span 2;
  }
}

@media (max-width: 480px) {
  .biz-grid {
    grid-template-columns: 1fr;
  }

  .biz-tile--feature,
  .biz-tile--accent {
    grid-column: auto;
  }

  .biz-tile--feature .card-title {
    font-size: 21px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .code-card .caret {
    animation: none;
  }
}

/* ===================================================================
   Products floor — one shared floor, horizontal slider with depth.
   Progressive enhancement: dim/active states only apply after JS
   adds .has-slider; without JS the track is a plain scroll-snap row.
   =================================================================== */
.products-floor {
  overflow: hidden;
  padding: clamp(64px, 6vw, 96px) 0;
}

.products-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-6);
}

.products-controls {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-shrink: 0;
}

.products-count {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  margin-right: var(--space-2);
}

.products-count b {
  font-size: 24px;
  font-weight: 800;
  color: var(--color-ink);
}

.products-count-total {
  font-size: 15px;
  font-weight: 600;
}

.slider-arrow {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: #ffffff;
  color: var(--color-ink);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition-fast), color var(--transition-fast),
    transform var(--transition-fast), box-shadow var(--transition-fast);
}

.slider-arrow svg {
  width: 20px;
  height: 20px;
}

.slider-arrow:hover {
  border-color: rgba(0, 153, 153, 0.45);
  color: var(--color-primary-text);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.slider-arrow:active {
  transform: translateY(0);
}

/* Track: full-bleed scroll row; the active slide snaps to the viewport
   center, neighbours peek in on both sides (infinite loop via JS clones).
   Side padding must be at least half a slide's exposed width so the
   center-snap positions of the edge clones stay reachable — otherwise
   mandatory snapping can't land on them and 1↔3 wrap-around glitches.
   (100vw also leaves slack for the page's vertical scrollbar.) */
.products-track {
  display: flex;
  gap: var(--space-6);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  outline: none;
  padding: var(--space-2) max(0px, calc((100vw - min(1040px, 86vw)) / 2 + 2px)) var(--space-4);
}

.products-track::-webkit-scrollbar {
  display: none;
}

/* While JS animates to a slide, snapping is suspended so mandatory snap
   can't intercept or reverse the programmatic scroll; it's re-enabled the
   moment the move lands (always on an exact snap position). */
.products-track.is-animating {
  scroll-snap-type: none;
}

.products-track:focus-visible {
  border-radius: var(--radius-lg);
  box-shadow: 0 0 0 2px var(--color-primary);
}

.product-slide {
  flex: 0 0 min(1040px, 86vw);
  scroll-snap-align: center;
  scroll-snap-stop: always;
  border-radius: var(--radius-lg);
  transition: opacity 0.6s var(--ease-out-soft), transform 0.6s var(--ease-out-soft);
}

/* Depth: recede inactive slides (JS-enabled state only) */
.products-floor.has-slider .product-slide {
  opacity: 0.45;
  transform: scale(0.95);
}

.products-floor.has-slider .product-slide.is-active {
  opacity: 1;
  transform: scale(1);
}

/* Hovering a receded slide pulls it part-way forward */
.products-floor.has-slider .product-slide:not(.is-active):hover {
  opacity: 0.8;
  transform: scale(0.98);
}

.product-slide-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: var(--space-7);
  min-height: 460px;
  height: 100%;
  padding: clamp(28px, 3.2vw, 56px);
  border-radius: var(--radius-lg);
}

.product-slide-content .feature-tag {
  margin-bottom: var(--space-4);
}

/* Slide themes: light / dark engineering / tinted */
.product-slide--light {
  background: #ffffff;
  border: 1px solid rgba(0, 153, 153, 0.12);
  box-shadow: 0 2px 6px rgba(10, 61, 61, 0.04), 0 16px 48px rgba(10, 61, 61, 0.07);
}

.product-slide--tint {
  background: linear-gradient(160deg, #ffffff 0%, var(--color-primary-light) 100%);
  border: 1px solid rgba(0, 153, 153, 0.18);
  box-shadow: 0 2px 6px rgba(10, 61, 61, 0.04), 0 16px 48px rgba(0, 107, 107, 0.08);
}

.product-slide--dark {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, #063a3a 0%, #074a4c 55%, #063e3e 100%);
  border: 1px solid rgba(138, 243, 232, 0.14);
  box-shadow: 0 24px 60px rgba(6, 62, 62, 0.3);
}

.product-slide--dark::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 55% 50% at 78% 18%, rgba(0, 153, 153, 0.28) 0%, transparent 60%);
  pointer-events: none;
}

.product-slide--dark .product-slide-inner {
  position: relative;
  z-index: 1;
}

.product-slide--dark .feature-title {
  color: #ffffff;
}

.product-slide--dark .feature-desc {
  color: rgba(255, 255, 255, 0.78);
}

.product-slide--dark .feature-list li {
  color: rgba(255, 255, 255, 0.85);
}

.product-slide--dark .feature-list li::before {
  background: rgba(255, 255, 255, 0.14);
  color: #8af3e8;
}

.product-slide--dark .feature-tag {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.24);
  color: #a7f6ee;
}

.product-slide--dark .code-card {
  width: auto;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.product-slide-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-slide-visual svg {
  width: 100%;
  max-width: 400px;
  height: auto;
  filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.05));
}

/* Staggered entrance of the content column when a slide becomes active */
.products-floor.has-slider .product-slide.is-active .product-slide-content > * {
  animation: slide-item-in 0.7s var(--ease-out-soft) both;
}

.products-floor.has-slider .product-slide.is-active .product-slide-content > *:nth-child(1) {
  animation-delay: 0.05s;
}

.products-floor.has-slider .product-slide.is-active .product-slide-content > *:nth-child(2) {
  animation-delay: 0.12s;
}

.products-floor.has-slider .product-slide.is-active .product-slide-content > *:nth-child(3) {
  animation-delay: 0.19s;
}

.products-floor.has-slider .product-slide.is-active .product-slide-content > *:nth-child(4) {
  animation-delay: 0.26s;
}

.products-floor.has-slider .product-slide.is-active .product-slide-content > *:nth-child(5) {
  animation-delay: 0.33s;
}

@keyframes slide-item-in {
  from {
    opacity: 0;
    transform: translateY(22px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

/* Dots with autoplay progress fill */
.products-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: var(--space-6);
}

.products-dot {
  position: relative;
  width: 36px;
  height: 4px;
  padding: 0;
  border-radius: var(--radius-pill);
  background: rgba(0, 153, 153, 0.18);
  overflow: hidden;
  transition: background var(--transition-fast);
}

.products-dot:hover {
  background: rgba(0, 153, 153, 0.32);
}

.products-dot i {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--color-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease-out-soft);
}

.products-dot.active i {
  transform: scaleX(1);
}

.products-dot.filling i {
  transition: none;
  animation: dot-fill 6.5s linear forwards;
}

@keyframes dot-fill {
  from {
    transform: scaleX(0);
  }

  to {
    transform: scaleX(1);
  }
}

@media (max-width: 1024px) {
  .product-slide {
    flex-basis: 88vw;
  }

  .products-track {
    padding-inline: max(0px, calc((100vw - 88vw) / 2 + 2px));
  }

  .product-slide-inner {
    gap: var(--space-6);
  }
}

@media (max-width: 768px) {
  .products-head {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-5);
    margin-bottom: var(--space-6);
  }

  .product-slide {
    flex-basis: 88vw;
  }

  .product-slide-inner {
    grid-template-columns: 1fr;
    min-height: 0;
    gap: var(--space-6);
  }

  .slider-arrow {
    width: 44px;
    height: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .products-floor.has-slider .product-slide {
    transition: none;
  }

  .products-floor.has-slider .product-slide.is-active .product-slide-content > * {
    animation: none;
  }

  .products-dot.filling i {
    animation: none;
    transform: scaleX(1);
  }
}

/* ===================================================================
   Methodology floor — four-stage staircase (数→法→智→然).
   Cards bottom-align and climb left→right; the fourth is solid brand.
   Chevron connectors sit in the gutters (rotate downward on mobile).
   =================================================================== */
.methodology-track {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: end;
  gap: clamp(18px, 2.2vw, 30px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.methodology-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 330px;
  padding: clamp(22px, 2vw, 30px);
  border-radius: var(--radius-lg);
  background: var(--color-primary-subtle);
  border: 1px solid var(--color-primary-light);
  box-shadow: var(--shadow-sm);
}

.methodology-card:nth-child(2) { min-height: 372px; }
.methodology-card:nth-child(3) { min-height: 414px; }
.methodology-card:nth-child(4) { min-height: 456px; }

.methodology-card--solid {
  background: var(--gradient-brand);
  border-color: transparent;
  box-shadow: var(--shadow-glow);
}

.methodology-card:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 50%;
  right: calc(clamp(18px, 2.2vw, 30px) / -2);
  width: 11px;
  height: 11px;
  border-top: 2px solid var(--color-primary);
  border-right: 2px solid var(--color-primary);
  transform: translate(50%, -50%) rotate(45deg);
}

.methodology-num {
  font-size: clamp(34px, 2.6vw, 46px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.01em;
  color: var(--color-primary);
}

.methodology-name {
  margin: var(--space-4) 0 var(--space-3);
  font-size: 20px;
  font-weight: 700;
  color: var(--color-ink);
}

.methodology-desc {
  font-size: 15px;
  line-height: 1.85;
  color: var(--color-text-secondary);
}

.methodology-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: var(--space-6);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--color-primary-text);
}

.methodology-tag svg {
  width: 16px;
  height: 16px;
  flex: none;
}

.methodology-card--solid .methodology-num,
.methodology-card--solid .methodology-name,
.methodology-card--solid .methodology-tag {
  color: #ffffff;
}

.methodology-card--solid .methodology-desc {
  color: rgba(255, 255, 255, 0.86);
}

.methodology-loop {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: var(--space-7) 0 0;
  font-size: 15px;
  font-weight: 600;
  color: #b45309; /* amber accent taken from the reference deck's flywheel note */
}

.methodology-loop svg {
  width: 18px;
  height: 18px;
  flex: none;
}

@media (max-width: 1024px) {
  .methodology-track {
    grid-template-columns: 1fr 1fr;
  }

  .methodology-card:not(:last-child)::after {
    display: none;
  }
}

@media (max-width: 768px) {
  .methodology-track {
    grid-template-columns: 1fr;
    gap: var(--space-6);
  }

  .methodology-card,
  .methodology-card:nth-child(2),
  .methodology-card:nth-child(3),
  .methodology-card:nth-child(4) {
    min-height: 0;
  }

  .methodology-card:not(:last-child)::after {
    display: block;
    top: auto;
    right: auto;
    bottom: calc(var(--space-6) / -2);
    left: 50%;
    transform: translate(-50%, 50%) rotate(135deg);
  }

  .methodology-loop {
    flex-direction: column;
    gap: var(--space-2);
    text-align: center;
  }
}

/* ===================================================================
   Full-screen floors: every homepage section fills the viewport,
   content vertically centered. min-height only — sections taller
   than the screen (e.g. news on mobile) scroll normally.
   =================================================================== */
main > section {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
