/* ==========================================================================
   Homepage Specific Styles (assets/css/home.css)
   ========================================================================== */

/* 1. Hero Section */
.hero {
  position: relative;
  min-height: 860px;
  overflow: hidden;
  display: flex;
  align-items: center;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(7, 21, 34, 0.98) 0%, rgba(7, 21, 34, 0.91) 45%, rgba(7, 21, 34, 0.48) 75%, rgba(7, 21, 34, 0.2) 100%);
  z-index: 2;
}

.hero-inner {
  position: relative;
  z-index: 3;
  width: 100%;
}

.hero-copy {
  max-width: 780px;
  padding: 80px 0;
}

.hero-title {
  font-size: clamp(52px, 6.5vw, 98px);
  line-height: 0.94;
  letter-spacing: -0.06em;
  color: #fff;
  margin: 0;
}

.hero-title-outline {
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.7);
}

.hero-lead {
  max-width: 640px;
  margin: 32px 0 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 18px;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 40px;
}

.hero-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  width: max-content;
  max-width: 100%;
  margin-top: 60px;
  background: rgba(255, 255, 255, 0.15);
}

.proof-item {
  min-width: 140px;
  padding: 16px 22px;
  background: rgba(7, 21, 34, 0.75);
}

.proof-val {
  display: block;
  font-size: 20px;
  color: #fff;
}

.proof-lbl {
  display: block;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.scroll-note {
  position: absolute;
  z-index: 3;
  right: 48px;
  bottom: 34px;
  color: rgba(255, 255, 255, 0.45);
  font-size: 9px;
  letter-spacing: 0.15em;
  writing-mode: vertical-rl;
  text-transform: uppercase;
}

.scroll-note::after {
  display: inline-block;
  width: 1px;
  height: 50px;
  margin-top: 14px;
  background: var(--color-orange-500);
  content: "";
}

/* 2. Trust Bar */
.trust {
  border-bottom: 1px solid var(--color-line);
}

.trust-grid {
  display: grid;
  grid-template-columns: 1.25fr repeat(4, 1fr);
}

.trust-label,
.trust-item {
  display: flex;
  min-height: 96px;
  padding: 20px 24px;
  align-items: center;
  border-right: 1px solid var(--color-line);
}

.trust-label {
  color: var(--color-muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.trust-item {
  gap: 10px;
  color: var(--color-navy-900);
  font-size: 13px;
  font-weight: 700;
}

.trust-item:last-child {
  border-right: none;
}

.check {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  color: var(--color-green-600);
  background: #EAF5F0;
  border-radius: 50%;
  font-size: 11px;
}

/* 4. Evidence Section */
.evidence-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  border-left: 1px solid rgba(255, 255, 255, 0.16);
}

.metric-card {
  padding: 34px;
  border-right: 1px solid rgba(255, 255, 255, 0.16);
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.metric-tag {
  display: block;
  color: rgba(255, 255, 255, 0.45);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.metric-val {
  display: block;
  margin-top: 36px;
  font-size: clamp(44px, 4.5vw, 68px);
  line-height: 1;
  letter-spacing: -0.06em;
  color: #fff;
}

.metric-val i {
  font-style: normal;
  color: var(--color-orange-500);
}

.metric-desc {
  margin-top: 16px;
  color: rgba(255, 255, 255, 0.55);
  font-size: 13px;
  line-height: 1.5;
}

.capacity-note {
  display: flex;
  justify-content: space-between;
  margin-top: 28px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* 5. Process Section */
.process-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
}

.process-visual {
  position: relative;
  min-height: 600px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-navy-900);
}

.process-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(7, 21, 34, 0.85));
  z-index: 1;
}

.image-caption {
  position: absolute;
  z-index: 2;
  bottom: 24px;
  left: 28px;
  right: 28px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  color: #fff;
}

.image-caption b {
  max-width: 320px;
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.image-caption span {
  color: var(--color-orange-500);
  font-size: 9px;
  letter-spacing: 0.12em;
}

.process-title {
  font-size: clamp(36px, 3.8vw, 54px);
  line-height: 1.05;
  letter-spacing: -0.05em;
  margin: 0 0 32px;
}

.step-item {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 16px;
  padding: 24px 0;
  border-top: 1px solid var(--color-line);
  align-items: start;
}

.step-no {
  color: var(--color-orange-500);
  font-size: 11px;
  padding-top: 4px;
}

.step-body h3 {
  font-size: 17px;
  margin: 0;
  color: var(--color-navy-900);
}

.step-body p {
  margin-top: 6px;
  color: var(--color-steel);
  font-size: 13px;
  line-height: 1.6;
}

.step-tag {
  padding: 4px 8px;
  background: var(--color-blue-100);
  color: var(--color-blue-600);
  border-radius: var(--radius-sm);
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* 7. Quality Logic */
.quality-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.quality-card {
  min-height: 280px;
  padding: 34px;
  background: var(--color-white);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-md);
  transition: transform 0.2s var(--ease-brand), box-shadow 0.2s var(--ease-brand);
}

.quality-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-soft);
}

.quality-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 44px;
  color: var(--color-blue-600);
  background: var(--color-blue-100);
  border-radius: var(--radius-md);
  font-size: 11px;
}

.quality-card h3 {
  font-size: 20px;
  margin: 0;
  color: var(--color-navy-900);
}

.quality-card p {
  margin-top: 12px;
  color: var(--color-steel);
  font-size: 14px;
  line-height: 1.65;
}

/* 8. CTA Section — Inherits unified breathing room & styles from style.css */

/* Responsive Overrides */
@media (max-width: 1040px) {
  .hero {
    min-height: 720px;
  }
  .hero-copy {
    padding: 60px 0;
  }
  .scroll-note {
    display: none;
  }
  .trust-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .trust-label {
    grid-column: 1 / -1;
    border-right: none;
    border-bottom: 1px solid var(--color-line);
  }
  .evidence-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .process-grid {
    grid-template-columns: 1fr;
  }
  .process-visual {
    min-height: 480px;
  }
  .quality-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 680px) {
  .hero {
    min-height: 600px;
  }
  .hero-title {
    font-size: 44px;
  }
  .hero-lead {
    font-size: 16px;
  }
  .proof-item {
    min-width: 120px;
    padding: 12px 16px;
  }
  .trust-grid {
    grid-template-columns: 1fr;
  }
  .trust-item {
    border-right: none;
    border-bottom: 1px solid var(--color-line);
  }
  .evidence-grid,
  .quality-grid {
    grid-template-columns: 1fr;
  }
  .cta-panel {
    padding: 40px 24px;
  }
}

/* ==========================================================================
   New 页面规划 Layout Additions (assets/css/home.css)
   ========================================================================== */

/* Hero Image Cover */
.hero-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.home-systems-cta {
  margin-top: 48px;
  text-align: center;
}

/* ==========================================================================
   Motion layer & 3D module (Plan B)
   Additive only: every element is fully visible and correctly laid out
   without JavaScript, and all of this is disabled under reduced motion.
   ========================================================================== */

/* --- 1. Scroll reveal ---------------------------------------------------- */
/* Gated on the motion layer having started: without the script, or under
   reduced motion, content is never left hidden. */
.home-main[data-motion-ready] [data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 0.7s var(--ease-brand) var(--reveal-delay, 0ms),
    transform 0.7s var(--ease-brand) var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}

.home-main[data-motion-ready] [data-reveal][data-revealed="true"] {
  opacity: 1;
  transform: none;
}

/* --- 2. Hero entrance --------------------------------------------------- */
.hero-fade {
  animation: chouse-hero-in 0.9s var(--ease-brand) both;
  animation-delay: var(--hero-delay, 0ms);
}

/* transform does not apply to non-replaced inline boxes, and the title's
   two lines are spans. */
.hero-title .hero-fade {
  display: inline-block;
}

@keyframes chouse-hero-in {
  from {
    opacity: 0;
    transform: translateY(26px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* --- 3. Depth layers ---------------------------------------------------- */
.hero-bg[data-depth] {
  transform: translate3d(0, var(--depth-shift, 0px), 0) scale(1.06);
  will-change: transform;
}

.process-visual__frame[data-depth] {
  transform: translate3d(0, var(--depth-shift, 0px), 0);
  will-change: transform;
}

/* Engineering grid over the hero photograph: flat, thin, no glow. */
.hero-grid-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(155, 200, 232, 0.075) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(155, 200, 232, 0.075) 1px, transparent 1px);
  background-size: 88px 88px;
  mask-image: linear-gradient(105deg, transparent 32%, #000 78%);
  -webkit-mask-image: linear-gradient(105deg, transparent 32%, #000 78%);
}

.evidence {
  position: relative;
  overflow: hidden;
}

.evidence-mesh {
  position: absolute;
  inset: -10% -5%;
  z-index: 0;
  pointer-events: none;
  transform: translate3d(0, var(--depth-shift, 0px), 0);
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 120px 120px;
  mask-image: radial-gradient(ellipse at 70% 30%, #000 10%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 70% 30%, #000 10%, transparent 70%);
}

.evidence .wrap {
  position: relative;
  z-index: 1;
}

/* --- 4. Hero 3D module --------------------------------------------------- */
.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.78fr);
  gap: 48px;
  align-items: center;
}

/* Overrides the single-column padding set above, now that the hero is a grid. */
.hero-copy {
  max-width: 720px;
  padding: 96px 0;
}

.hero-module {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 460px;
  perspective: 1400px;
  perspective-origin: 55% 45%;
}

/* The photograph is lightest on this side, so the module gets its own scrim
   to sit against. Without it the wireframe reads as noise. */
.hero-module::before {
  content: "";
  position: absolute;
  inset: -6% -10%;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(
    ellipse at 50% 50%,
    rgba(7, 21, 34, 0.82) 0%,
    rgba(7, 21, 34, 0.55) 45%,
    transparent 75%
  );
}

.module-stage {
  z-index: 1;
}

.module-stage {
  position: relative;
  width: 300px;
  height: 300px;
  transform-style: preserve-3d;
  transform:
    rotateX(calc(-18deg + var(--tilt-x, 0deg)))
    rotateY(calc(34deg + var(--tilt-y, 0deg)));
  transition: transform 1.1s var(--ease-brand);
  animation: chouse-module-drift 18s ease-in-out infinite alternate;
}

/* While the pointer drives it, follow closely and stop the idle drift. */
.module-stage[data-tracking] {
  transition: transform 0.25s ease-out;
  animation: none;
}

@keyframes chouse-module-drift {
  from {
    transform: rotateX(-18deg) rotateY(28deg);
  }
  to {
    transform: rotateX(-13deg) rotateY(46deg);
  }
}

.module-cube {
  position: absolute;
  inset: 0;
  width: 200px;
  height: 92px;
  margin: auto;
  transform-style: preserve-3d;
  transform: translate3d(0, -52px, 0);
}

.module-cube--second {
  transform: translate3d(0, 46px, 0) rotateY(0deg);
  opacity: 0.92;
}

.cube-face {
  position: absolute;
  display: block;
  border: 1.5px solid rgba(155, 200, 232, 0.7);
  background: rgba(18, 49, 77, 0.85);
  box-shadow: inset 0 0 15px rgba(23, 105, 170, 0.3);
}

/* 200 x 92 x 120 box: half-extents 100 / 46 / 60. */
.cube-face--front,
.cube-face--back {
  width: 200px;
  height: 92px;
}

.cube-face--front {
  transform: translateZ(60px);
  background: rgba(23, 105, 170, 0.7);
}

.cube-face--back {
  transform: rotateY(180deg) translateZ(60px);
}

.cube-face--left,
.cube-face--right {
  width: 120px;
  height: 92px;
  left: 40px;
}

.cube-face--left {
  transform: rotateY(-90deg) translateZ(100px);
  background: rgba(7, 21, 34, 0.85);
}

.cube-face--right {
  transform: rotateY(90deg) translateZ(100px);
  background: rgba(37, 132, 196, 0.38);
}

.cube-face--top,
.cube-face--bottom {
  width: 200px;
  height: 120px;
  top: -14px;
}

.cube-face--top {
  transform: rotateX(90deg) translateZ(46px);
  background: rgba(155, 200, 232, 0.2);
}

.cube-face--bottom {
  transform: rotateX(-90deg) translateZ(46px);
  background: rgba(7, 21, 34, 0.9);
}

/* Corrugated profile on the long faces, drawn with a repeating gradient
   so the module reads as a container rather than a plain box. */
.cube-face--front::after,
.cube-face--back::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.11) 0 1px,
    transparent 1px 13px
  );
}

/* Ground plane, so the module sits on something. */
.module-floor {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 330px;
  height: 330px;
  margin: -165px 0 0 -165px;
  transform: rotateX(90deg) translateZ(-110px);
  background-image:
    linear-gradient(to right, rgba(155, 200, 232, 0.16) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(155, 200, 232, 0.16) 1px, transparent 1px);
  background-size: 30px 30px;
  mask-image: radial-gradient(circle at 50% 50%, #000 15%, transparent 72%);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 15%, transparent 72%);
}

/* --- 5. Systems switcher (replaces the static 4-card grid) --------------- */
.systems-switcher {
  margin-top: 24px;
}

.systems-tablist {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--color-line);
  border-bottom: 1px solid var(--color-line);
}

.systems-tab {
  display: flex;
  align-items: baseline;
  gap: 12px;
  min-height: 64px;
  padding: 18px 20px;
  background: none;
  border: none;
  border-right: 1px solid var(--color-line);
  color: var(--color-steel);
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
  position: relative;
  transition: color 0.25s var(--ease-brand), background-color 0.25s var(--ease-brand);
}

.systems-tab:last-child {
  border-right: none;
}

/* The active marker slides because it is a scaled bar, not a moved element. */
.systems-tab::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--color-orange-500);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.35s var(--ease-brand);
}

.systems-tab:hover {
  color: var(--color-navy-900);
  background: var(--color-canvas);
}

.systems-tab[aria-selected="true"] {
  color: var(--color-navy-900);
  background: var(--color-white);
}

.systems-tab[aria-selected="true"]::after {
  transform: scaleX(1);
}

.systems-tab__no {
  color: var(--color-muted);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.systems-tab[aria-selected="true"] .systems-tab__no {
  color: var(--color-orange-500);
}

.systems-panel {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
  padding: 44px 0 8px;
  animation: chouse-panel-in 0.55s var(--ease-brand) both;
}

@keyframes chouse-panel-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.systems-panel__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--color-navy-900);
}

.systems-panel__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.02);
  transition: transform 1.2s var(--ease-brand);
}

.systems-panel:hover .systems-panel__media img {
  transform: scale(1.06);
}

.systems-panel__badge {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 6px 12px;
  background: rgba(7, 21, 34, 0.88);
  color: var(--color-orange-500);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.systems-panel__meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  color: var(--color-muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.systems-panel__meta i {
  flex: 1;
  height: 1px;
  background: var(--color-line);
}

.systems-panel__title {
  margin: 0 0 14px;
  color: var(--color-navy-900);
  font-size: clamp(28px, 2.6vw, 38px);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.systems-panel__desc {
  margin: 0 0 24px;
  color: var(--color-steel);
  font-size: 16px;
  line-height: 1.65;
}

.systems-panel__specs {
  margin: 0 0 26px;
  padding: 18px 0 0;
  border-top: 1px solid var(--color-line);
  list-style: none;
  display: grid;
  gap: 10px;
  color: var(--color-graphite);
  font-size: 12px;
}

.systems-panel__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--color-navy-900);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.systems-panel__link .arrow {
  transition: transform 0.25s var(--ease-brand);
}

.systems-panel__link:hover {
  color: var(--color-blue-600);
}

.systems-panel__link:hover .arrow {
  transform: translateX(4px);
}

/* --- 6. Interaction polish on existing cards ---------------------------- */
.step-item {
  position: relative;
  transition: border-color 0.3s var(--ease-brand);
}

/* Progress rail: each step's own left marker grows on hover/focus-within. */
.step-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: -1px;
  width: 0;
  height: 2px;
  background: var(--color-orange-500);
  transition: width 0.45s var(--ease-brand);
}

.step-item:hover::before {
  width: 56px;
}

.step-item:hover .step-no {
  color: var(--color-navy-900);
}

.metric-card {
  position: relative;
  transition: background-color 0.35s var(--ease-brand);
}

.metric-card:hover {
  background: rgba(255, 255, 255, 0.04);
}

.quality-card {
  transition:
    transform 0.35s var(--ease-brand),
    box-shadow 0.35s var(--ease-brand),
    border-color 0.35s var(--ease-brand);
}

/* --- 7. Responsive ------------------------------------------------------ */
@media (max-width: 1040px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }
  .hero-module {
    display: none;
  }
  .systems-panel {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .systems-tablist {
    grid-template-columns: repeat(2, 1fr);
  }
  .systems-tab:nth-child(2n) {
    border-right: none;
  }
  .systems-tab:nth-child(-n + 2) {
    border-bottom: 1px solid var(--color-line);
  }
}

@media (max-width: 680px) {
  .systems-tablist {
    grid-template-columns: 1fr;
  }
  .systems-tab {
    border-right: none;
    border-bottom: 1px solid var(--color-line);
    min-height: 56px;
  }
  .systems-tab:last-child {
    border-bottom: none;
  }
  .hero-grid-overlay {
    background-size: 56px 56px;
  }
  .capacity-note {
    flex-direction: column;
    gap: 8px;
  }
}

/* --- 8. Reduced motion -------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .home-main [data-reveal],
  .home-main[data-motion-ready] [data-reveal],
  .home-main [data-reveal][data-revealed="true"] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hero-fade,
  .module-stage,
  .systems-panel {
    animation: none;
  }

  .hero-bg[data-depth],
  .process-visual__frame[data-depth],
  .evidence-mesh {
    transform: none;
  }

  .hero-bg[data-depth] {
    transform: scale(1.02);
  }

  .module-stage {
    transform: rotateX(-16deg) rotateY(34deg);
    transition: none;
  }

  .systems-panel__media img,
  .step-item::before,
  .systems-panel__link .arrow,
  .systems-tab::after {
    transition: none;
  }

  .systems-panel:hover .systems-panel__media img {
    transform: scale(1.02);
  }
}
