/* ================================================
   CONVOLOID® APPLICATION PAGES
   Builds on style.css tokens.
   ================================================ */
.app-hero {
  position: relative;
  padding: 150px 0 70px;
  background:
    radial-gradient(ellipse 50% 60% at 78% 45%, rgba(245,130,32,0.12), transparent 70%),
    var(--bg-deep);
  overflow: hidden;
}
.app-hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 56px;
  align-items: center;
}
.app-crumb {
  display: inline-block;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 22px;
  text-decoration: none;
}
.app-crumb:hover { color: var(--accent-cyan); }
.app-title {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 5vw, 4.2rem);
  font-weight: 700;
  line-height: 1.02;
  color: var(--text-primary);
  margin-bottom: 22px;
}
.app-sub { font-size: 1.12rem; color: var(--text-secondary); line-height: 1.75; max-width: 560px; margin-bottom: 34px; }
.app-ctas { display: flex; gap: 14px; flex-wrap: wrap; }
.app-hero-visual { margin: 0; }
.app-hero-visual canvas, .scene3d { display: block; width: 100%; aspect-ratio: 560 / 440; border-radius: var(--radius-lg); background: var(--bg-card); border: 1px solid var(--border); }
.gear-stage .scene3d { border: none; border-radius: 0; aspect-ratio: 520 / 360; }
.app-hero-visual figcaption { text-align: left; }

.app-stats { background: var(--bg-primary); border-top: 1px solid var(--border-subtle); border-bottom: 1px solid var(--border-subtle); }
.app-stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.app-stat { padding: 38px 28px; border-right: 1px solid var(--border-subtle); text-align: center; }
.app-stat:last-child { border-right: none; }
.app-stat-num { font-family: var(--font-number); font-size: 3.6rem; line-height: 1; color: var(--accent-cyan); }
.app-stat-unit { font-size: 0.55em; margin-left: 2px; }
.app-stat-label { margin-top: 10px; font-size: 0.88rem; color: var(--text-secondary); letter-spacing: 0.02em; }

.pain-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.pain-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
}
.pain-num { font-family: var(--font-number); font-size: 1.6rem; color: var(--accent-cyan); margin-bottom: 14px; }
.pain-card h4 { font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; color: var(--text-primary); margin-bottom: 10px; }
.pain-card p { color: var(--text-secondary); line-height: 1.7; font-size: 0.95rem; }

.compare-wrap { margin-bottom: 36px; }
.compare-stage { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); }
.compare-stage canvas { aspect-ratio: 960 / 420; }
.vs-table { width: 100%; border-collapse: collapse; background: var(--bg-card); border-radius: var(--radius-lg); overflow: hidden; }
.vs-table th, .vs-table td { padding: 16px 22px; text-align: left; border-bottom: 1px solid var(--border-subtle); font-size: 0.95rem; }
.vs-table thead th { font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.78rem; color: var(--text-muted); }
.vs-table thead th:last-child { color: var(--accent-cyan); }
.vs-table td:first-child { color: var(--text-primary); font-weight: 500; }
.vs-table td:nth-child(2) { color: var(--text-muted); }
.vs-table td:last-child { color: var(--text-primary); background: rgba(245,130,32,0.06); font-weight: 600; }
.vs-table tr:last-child td { border-bottom: none; }

.scene-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 44px; }
.scene-grid .gear-stage canvas { aspect-ratio: 520 / 360; }
.use-block h3 { font-family: var(--font-display); font-size: 1.4rem; color: var(--text-primary); margin-bottom: 16px; }
.use-list { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.use-list li {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  color: var(--text-secondary);
  font-size: 0.92rem;
}
.use-list li::before { content: '⚙'; color: var(--accent-cyan); margin-right: 10px; }

.proof-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.proof-card {
  display: block;
  text-decoration: none;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 30px 28px;
  transition: border-color var(--transition), transform var(--transition);
}
.proof-card:hover { border-color: var(--border); transform: translateY(-4px); }
.proof-num { font-family: var(--font-number); font-size: 2.6rem; color: var(--accent-cyan); line-height: 1; margin-bottom: 12px; }
.proof-card h4 { font-family: var(--font-display); font-size: 1.2rem; color: var(--text-primary); margin-bottom: 8px; }
.proof-card p { color: var(--text-secondary); font-size: 0.92rem; line-height: 1.65; margin-bottom: 14px; }
.proof-link { font-size: 0.82rem; color: var(--accent-cyan); font-weight: 600; }
.app-footnote { margin-top: 22px; font-size: 0.8rem; color: var(--text-muted); font-style: italic; }

.deck-band { padding: 70px 0; background: linear-gradient(135deg, rgba(245,130,32,0.14), rgba(245,130,32,0.04)); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.deck-band-inner { display: flex; align-items: center; justify-content: space-between; gap: 40px; }
.deck-band .section-title { margin-bottom: 10px; }

.other-apps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-top: 8px; }
.other-app {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 18px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  transition: border-color var(--transition), color var(--transition);
}
.other-app:hover { border-color: var(--accent-cyan); color: var(--accent-cyan); }
.other-arrow { color: var(--accent-cyan); }

.app-footer { padding: 40px 0; border-top: 1px solid var(--border-subtle); background: var(--bg-deep); }
.app-footer-inner { display: flex; align-items: center; gap: 28px; justify-content: space-between; }
.app-footer-inner img { height: 46px; width: auto; }
.app-footer-inner p { font-size: 0.8rem; color: var(--text-muted); flex: 1; }
.app-footer-inner a { color: var(--accent-cyan); font-size: 0.9rem; }

/* Application cards on the home page become links */
a.app-card { display: block; text-decoration: none; color: inherit; }
.app-card-link { margin-top: 14px; display: inline-block; font-size: 0.85rem; font-weight: 600; color: var(--accent-cyan); }

@media (max-width: 1024px) {
  .app-hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .pain-grid, .proof-grid { grid-template-columns: 1fr; }
  .scene-grid { grid-template-columns: 1fr; }
  .use-list { grid-template-columns: 1fr 1fr; }
  .other-apps { grid-template-columns: 1fr 1fr; }
  .deck-band-inner { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 768px) {
  .app-hero { padding: 120px 0 50px; }
  .app-stats-grid { grid-template-columns: 1fr; }
  .app-stat { border-right: none; border-bottom: 1px solid var(--border-subtle); padding: 26px; }
  .use-list, .other-apps { grid-template-columns: 1fr; }
  .vs-table th, .vs-table td { padding: 12px 12px; font-size: 0.84rem; }
  .app-footer-inner { flex-direction: column; text-align: center; }
}

/* Top-level pages (build/build-pages.js): a compact header above the home-page sections */
.page-hero { padding-bottom: 20px; }
.page-hero .app-sub { max-width: 720px; margin-bottom: 0; }
.page-hero + .section { padding-top: 64px; }
