/* ====== Technical Binder Styles ====== */

html {
  scroll-behavior: smooth;
  scroll-padding-top: 72px;
}

:root {
  --binder-bg: #fbfaf6;
  --binder-surface: #f4f1e8;
  --binder-border: #e2dfd3;
  --binder-text: #1c2124;
  --binder-muted: #4a5258;
  --binder-accent: #00b6ae;
  --binder-accent-dim: rgba(0, 182, 174, 0.12);
  --binder-card-bg: #ffffff;
}

/* Hero */
.binder-hero {
  background: linear-gradient(135deg, #f4f1e8 0%, #ecf3f0 50%, #fbfaf6 100%);
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--binder-border);
}

.binder-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 50%, rgba(0, 182, 174, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.binder-hero-content {
  position: relative;
  z-index: 1;
  padding: 4rem 2rem;
}

.binder-hero-label {
  font-size: 0.85rem;
  letter-spacing: 0.3em;
  color: var(--binder-accent);
  text-transform: uppercase;
  margin-bottom: 1rem;
  font-weight: 500;
}

.binder-hero-title {
  font-size: 4.5rem;
  font-weight: 800;
  color: var(--binder-text);
  line-height: 1.1;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.binder-hero-subtitle {
  font-size: 1.2rem;
  color: var(--binder-muted);
  margin-bottom: 2rem;
  font-weight: 300;
}

.binder-hero-badge {
  display: inline-block;
  padding: 0.4rem 1.2rem;
  border: 1px solid var(--binder-accent);
  color: var(--binder-accent);
  border-radius: 999px;
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* 3D Viewer Preview */
.binder-3d-preview {
  background: var(--binder-surface);
  border: 1px solid var(--binder-border);
  border-radius: 16px;
  margin: 3rem auto;
  max-width: 1100px;
  position: relative;
  z-index: 2;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(28, 33, 36, 0.08);
}

.binder-3d-preview-placeholder {
  aspect-ratio: 16 / 9;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  color: var(--binder-muted);
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  background: radial-gradient(ellipse at center, rgba(0, 182, 174, 0.05) 0%, transparent 70%);
}

.binder-3d-preview-placeholder:hover {
  color: var(--binder-accent);
  background: radial-gradient(ellipse at center, rgba(0, 182, 174, 0.1) 0%, transparent 70%);
}

.binder-3d-preview-placeholder svg {
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

.binder-3d-preview-placeholder:hover svg {
  opacity: 1;
}

.binder-3d-preview-label {
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.05em;
}

.binder-3d-preview-hint {
  font-size: 0.8rem;
  color: var(--binder-muted);
}

.binder-3d-preview-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1rem;
  border-top: 1px solid var(--binder-border);
  background: rgba(28, 33, 36, 0.02);
}

.stl-preview-tab {
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
  color: var(--binder-muted);
  background: rgba(28, 33, 36, 0.04);
  border: 1px solid var(--binder-border);
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.stl-preview-tab:hover {
  color: var(--binder-accent);
  border-color: var(--binder-accent);
}

.stl-preview-tab.active {
  color: var(--binder-accent);
  border-color: var(--binder-accent);
  background: var(--binder-accent-dim);
}

.stl-preview-open {
  margin-left: auto;
  font-size: 0.85rem;
  color: var(--binder-accent);
  text-decoration: none;
  border: 1px solid var(--binder-accent);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
  transition: all 0.2s ease;
}

.stl-preview-open:hover {
  background: var(--binder-accent-dim);
  text-decoration: none;
}

/* Section Styles */
.binder-section {
  padding: 4rem 0;
  border-bottom: 1px solid var(--binder-border);
}

.binder-section:last-child {
  border-bottom: none;
}

.binder-section-alt {
  background: var(--binder-surface);
}

.binder-section-header {
  margin-bottom: 3rem;
}

.binder-section-number {
  font-size: 0.8rem;
  color: var(--binder-accent);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.binder-section-category {
  font-size: 0.82rem;
  color: var(--binder-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.binder-section-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--binder-text);
  margin-bottom: 0.75rem;
  line-height: 1.2;
}

.binder-section-desc {
  font-size: 1.05rem;
  color: var(--binder-muted);
  max-width: 600px;
  line-height: 1.6;
}

/* Module Cards */
.binder-module {
  background: var(--binder-card-bg);
  border: 1px solid var(--binder-border);
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 1.5rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.binder-module:hover {
  border-color: rgba(0, 182, 174, 0.35);
  box-shadow: 0 8px 30px rgba(28, 33, 36, 0.08);
}

/* 3D 联动提示（模块已关联 STL 部件） */
.binder-module[data-stl] .binder-module-title::after,
.binder-module[data-render] .binder-module-title::after {
  content: '3D';
  display: inline-block;
  margin-left: 0.6rem;
  padding: 0.1rem 0.5rem;
  font-size: 0.62rem;
  letter-spacing: 0.05em;
  color: var(--binder-accent);
  border: 1px solid var(--binder-accent);
  border-radius: 999px;
  vertical-align: middle;
  font-weight: 600;
}

.binder-module[data-stl]:hover,
.binder-module[data-render]:hover {
  border-color: var(--binder-accent);
  box-shadow: 0 8px 30px rgba(0, 182, 174, 0.15);
}

/* 整机概览舞台：图片居中，标注占用左右安全区 */
.binder-robot-stage {
  min-height: min(790px, calc(100svh - 72px));
  border-bottom: 1px solid var(--binder-border);
  background: var(--binder-bg);
}

.binder-robot-stage-inner {
  position: relative;
  width: min(1480px, 100%);
  min-height: min(790px, calc(100svh - 72px));
  margin: 0 auto;
  overflow: hidden;
}

.render-images {
  position: absolute;
  inset: 0 16%;
}

.render-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 3.5rem 0 4.5rem;
  box-sizing: border-box;
  opacity: 0;
  transform: scale(0.985);
  transition: opacity 0.35s ease, transform 0.45s ease;
  pointer-events: none;
}

.render-img.active {
  opacity: 1;
  transform: scale(1);
}

.render-callouts {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.render-callout {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: 0;
  height: 0;
  color: var(--binder-muted);
  pointer-events: auto;
  cursor: pointer;
  text-decoration: none;
}

.render-callout-dot {
  position: absolute;
  left: -5px;
  top: -5px;
  width: 10px;
  height: 10px;
  border: 1px solid var(--binder-rule-strong, #cfcbb9);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(28, 33, 36, 0.08);
  transition: transform 0.2s ease, background 0.2s ease;
}

.render-callout-line {
  position: absolute;
  top: 0;
  width: clamp(76px, 10vw, 155px);
  height: 1px;
  background: var(--binder-border);
  transition: background 0.2s ease;
}

.callout-right .render-callout-line { left: 8px; }
.callout-left .render-callout-line { right: 8px; }

.render-callout-copy {
  position: absolute;
  top: -15px;
  width: clamp(150px, 16vw, 230px);
  color: var(--binder-muted);
  line-height: 1.3;
  transition: color 0.2s ease;
}

.callout-right .render-callout-copy { left: clamp(90px, 11vw, 175px); text-align: left; }
.callout-left .render-callout-copy { right: clamp(90px, 11vw, 175px); text-align: right; }

.render-callout-copy strong {
  display: block;
  color: var(--binder-text);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.render-callout-copy small {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.8rem;
  line-height: 1.5;
}

.render-callout:hover .render-callout-dot,
.render-callout.active .render-callout-dot {
  background: var(--binder-accent);
  transform: scale(1.4);
}

.render-callout:hover .render-callout-line,
.render-callout.active .render-callout-line { background: var(--binder-accent); }
.render-callout:hover .render-callout-copy,
.render-callout.active .render-callout-copy { color: var(--binder-accent-deep, #009093); }

.binder-stage-skip {
  position: absolute;
  left: 50%;
  bottom: 1.7rem;
  transform: translateX(-50%);
  color: var(--binder-muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-decoration: none;
  text-transform: uppercase;
}

.binder-stage-skip:hover { color: var(--binder-accent-deep, #009093); }

.render-autoplay-dots {
  position: absolute;
  left: 50%;
  bottom: 4.2rem;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  z-index: 3;
}

.render-autoplay-dot {
  width: 8px;
  height: 8px;
  border: none;
  border-radius: 50%;
  padding: 0;
  background: rgba(28, 33, 36, 0.18);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.render-autoplay-dot:hover {
  background: rgba(0, 182, 174, 0.6);
}

.render-autoplay-dot.active {
  background: var(--binder-accent);
  transform: scale(1.35);
}

/* 机械详情：每个功能为完整横向叙事章节 */
.binder-mechanical-story { background: var(--binder-bg); }

.binder-feature-section {
  min-height: min(760px, 90svh);
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--binder-border);
  scroll-margin-top: 72px;
}

.binder-feature-section:nth-child(even) { background: var(--binder-surface); }

.binder-feature-inner {
  width: min(1280px, 90vw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  align-items: center;
  gap: clamp(3rem, 8vw, 10rem);
}

.binder-feature-section.media-right .binder-feature-media { order: 2; }
.binder-feature-section.media-right .binder-feature-copy { order: 1; }

.binder-feature-media {
  position: relative;
  min-width: 0;
  aspect-ratio: 1.28 / 1;
  display: grid;
  place-items: center;
}

.binder-feature-media > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.binder-detail-images {
  position: relative;
  width: 100%;
  height: 100%;
}

.binder-detail-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.binder-detail-image.active { opacity: 1; }

.binder-detail-switch {
  position: absolute;
  z-index: 2;
  bottom: 1rem;
  left: 50%;
  display: inline-flex;
  gap: 0.25rem;
  padding: 0.3rem;
  transform: translateX(-50%);
  border: 1px solid rgba(28, 33, 36, 0.08);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 6px 20px rgba(28, 33, 36, 0.08);
  white-space: nowrap;
}

.binder-detail-btn {
  padding: 0.5rem 1.1rem;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--binder-muted);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.binder-detail-btn:hover {
  color: var(--binder-text);
  background: rgba(0, 182, 174, 0.08);
}

.binder-detail-btn.active {
  background: var(--binder-accent);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 182, 174, 0.35);
}

.binder-feature-placeholder {
  color: var(--binder-muted);
  font-size: 0.85rem;
}

.binder-feature-copy { min-width: 0; }

.binder-detail-kicker,
.binder-detail-label {
  color: var(--binder-accent-deep, #009093);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.binder-feature-copy h2 {
  margin: 0.5rem 0 0.85rem;
  color: var(--binder-text);
  font-size: clamp(2.2rem, 4.5vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.binder-feature-copy h2 span { color: var(--binder-accent); }

.binder-feature-lead {
  margin: 0;
  color: var(--binder-text-2, #4a5258);
  font-size: 1.05rem;
  line-height: 1.7;
}

.binder-detail-rule {
  height: 1px;
  margin: 2rem 0 1.4rem;
  background: var(--binder-border);
}

.binder-feature-copy .binder-module-features {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.binder-feature-copy .binder-module-features li {
  position: relative;
  margin: 0.65rem 0;
  padding-left: 1.2rem;
  color: var(--binder-text-2, #4a5258);
  font-size: 0.95rem;
  line-height: 1.55;
}

.binder-feature-copy .binder-module-features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.58rem;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--binder-accent);
}

.binder-3d-section {
  padding: 5rem 0;
  background: var(--binder-surface);
}

.binder-module-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.binder-module-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--binder-text);
  margin: 0;
}

.binder-module-number {
  font-size: 0.8rem;
  color: var(--binder-muted);
  white-space: nowrap;
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--binder-border);
  border-radius: 6px;
}

.binder-module-desc {
  color: var(--binder-muted);
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
  line-height: 1.6;
}

.binder-module-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.binder-module-features li {
  position: relative;
  padding-left: 1.25rem;
  font-size: 0.92rem;
  color: #4a5258;
  line-height: 1.55;
}

.binder-module-features li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--binder-accent);
  opacity: 0.6;
}

/* Software Section */
.binder-software-content {
  max-width: 700px;
}

.binder-software-features {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.binder-software-features li {
  position: relative;
  padding-left: 1.5rem;
  font-size: 0.95rem;
  color: #4a5258;
  line-height: 1.5;
}

.binder-software-features li::before {
  content: '◆';
  position: absolute;
  left: 0;
  color: var(--binder-accent);
  font-size: 0.6rem;
  top: 0.35em;
}

/* Apps Grid */
.binder-apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.binder-app-card {
  background: var(--binder-card-bg);
  border: 1px solid var(--binder-border);
  border-radius: 12px;
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  transition: all 0.25s ease;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.binder-app-card:hover {
  border-color: rgba(0, 182, 174, 0.35);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(28, 33, 36, 0.08);
  text-decoration: none;
  color: inherit;
}

.binder-app-icon {
  width: 40px;
  height: 40px;
  background: var(--binder-accent-dim);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 0.25rem;
}

.binder-app-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--binder-text);
}

.binder-app-desc {
  font-size: 0.9rem;
  color: var(--binder-muted);
  line-height: 1.45;
}

.binder-app-status {
  align-self: flex-start;
  font-size: 0.75rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: rgba(0, 182, 174, 0.12);
  color: var(--binder-accent);
  margin-top: auto;
}

/* Image placeholder */
.binder-image-placeholder {
  background: var(--binder-surface);
  border: 1px dashed var(--binder-border);
  border-radius: 10px;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--binder-muted);
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.binder-image-placeholder img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.binder-image-empty {
  flex-direction: column;
  gap: 0.5rem;
  opacity: 0.55;
}

.binder-image-empty-label {
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Navigation */
.binder-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 250, 246, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--binder-border);
  padding: 0.75rem 0;
}

.binder-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.binder-nav-brand {
  color: var(--binder-text);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  letter-spacing: -0.01em;
}

.binder-nav-brand:hover {
  color: var(--binder-accent);
  text-decoration: none;
}

.binder-nav-links {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.binder-nav-link {
  padding: 0.35rem 0.75rem;
  font-size: 0.88rem;
  color: var(--binder-muted);
  text-decoration: none;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.binder-nav-link:hover {
  color: var(--binder-text);
  background: rgba(28, 33, 36, 0.05);
  text-decoration: none;
}

.binder-nav-link.active {
  color: var(--binder-accent);
  background: var(--binder-accent-dim);
}

.binder-nav-back {
  flex-shrink: 0;
  margin-left: 0.5rem;
  padding: 0.35rem 0.9rem;
  font-size: 0.85rem;
  color: var(--binder-text);
  text-decoration: none;
  border: 1px solid var(--binder-border);
  border-radius: 6px;
  background: rgba(28, 33, 36, 0.04);
  transition: all 0.2s ease;
}

.binder-nav-back:hover {
  color: var(--binder-accent);
  border-color: var(--binder-accent);
  background: var(--binder-accent-dim);
  text-decoration: none;
}

/* Scroll animation */
.binder-scroll-fade {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.binder-scroll-fade.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 960px) {
  .binder-robot-stage,
  .binder-robot-stage-inner {
    min-height: 640px;
  }

  .render-images {
    inset: 4rem 10% 6rem;
  }

  .render-callout-copy small {
    display: none;
  }

  .binder-feature-section {
    min-height: 0;
    padding: 5rem 0;
  }

  .binder-feature-inner {
    width: min(760px, 88vw);
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .binder-feature-section.media-right .binder-feature-media,
  .binder-feature-section.media-right .binder-feature-copy {
    order: initial;
  }

  .binder-feature-media {
    max-height: 520px;
  }
}

@media (max-width: 768px) {
  .binder-hero-title {
    font-size: 2.5rem;
  }
  .binder-section-title {
    font-size: 1.8rem;
  }
  .binder-3d-preview {
    margin: 2rem 0;
  }
  .binder-nav-links {
    display: none;
  }
  .binder-apps-grid {
    grid-template-columns: 1fr;
  }

  .binder-robot-stage,
  .binder-robot-stage-inner {
    min-height: 540px;
  }

  .render-images {
    inset: 4rem 3% 7rem;
  }

  .render-img {
    padding: 0;
  }

  .render-callout {
    top: auto !important;
    bottom: 3.8rem;
  }

  .render-callout:nth-child(1) { left: 20% !important; }
  .render-callout:nth-child(2) { left: 50% !important; }
  .render-callout:nth-child(3) { left: 80% !important; }

  .render-callout-line {
    display: none;
  }

  .render-callout-copy,
  .callout-right .render-callout-copy,
  .callout-left .render-callout-copy {
    left: 50%;
    right: auto;
    top: 12px;
    width: 94px;
    transform: translateX(-50%);
    text-align: center;
  }

  .render-callout-copy strong {
    font-size: 0.56rem;
    letter-spacing: 0.06em;
  }

  .binder-stage-skip {
    bottom: 1rem;
  }

  .binder-feature-section {
    padding: 4rem 0;
  }

  .binder-feature-inner {
    width: 88vw;
  }

  .binder-feature-copy h2 {
    font-size: clamp(2.6rem, 14vw, 4.5rem);
  }
}
