/* ==========================================================
   YOGERA — INDEX (HOMEPAGE) PAGE-SPECIFIC STYLES
   Hero, Voice Bubble Interface (signature element), Build
   Pipeline, Build Section, and homepage sections 01–10.
   Depends on shared.css being loaded first.
   ========================================================== */

/* ============ HERO ============ */
.hero {
  position: relative;
  z-index: 1;
  padding: 170px 24px 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.4rem, 5.6vw, 4.6rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  max-width: 920px;
  opacity: 0;
  transform: translateY(16px);
  animation: reveal var(--dur-page) var(--ease) 0.22s forwards;
}
.hero h1 .grad {
  background: linear-gradient(
    100deg,
    var(--blue),
    var(--purple) 55%,
    var(--blue)
  );
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradient-flow 7s ease-in-out infinite;
}
@keyframes gradient-flow {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.hero p.lead {
  max-width: 620px;
  margin-top: 22px;
  font-size: 17.5px;
  line-height: 1.65;
  color: var(--text-secondary);
  opacity: 0;
  transform: translateY(14px);
  animation: reveal var(--dur-page) var(--ease) 0.36s forwards;
}

.hero-ctas {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 34px;
  flex-wrap: wrap;
  justify-content: center;
  opacity: 0;
  transform: translateY(14px);
  animation: reveal var(--dur-page) var(--ease) 0.48s forwards;
}
.btn-primary-lg {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, var(--blue), var(--purple));
  color: #fff;
  font-weight: 700;
  font-size: 15.5px;
  box-shadow: 0 10px 34px var(--blue-glow);
  transition:
    transform var(--dur-micro) var(--ease),
    box-shadow var(--dur-comp) var(--ease),
    padding var(--dur-comp) var(--ease);
}
.btn-primary-lg:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 40px var(--purple-glow);
  padding-right: 34px;
}
.btn-primary-lg:active {
  transform: translateY(0) scale(0.98);
}
.btn-primary-lg .arrow {
  transition: transform var(--dur-micro) var(--ease);
}
.btn-primary-lg:hover .arrow {
  transform: translateX(4px);
}
.btn-primary-lg .shine {
  position: absolute;
  top: 0;
  left: -60%;
  width: 35%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(255, 255, 255, 0.5),
    transparent
  );
  transform: skewX(-20deg);
  animation: shine-sweep 6s ease-in-out infinite 1s;
}
.btn-secondary-lg {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 24px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 15px;
  transition: all var(--dur-micro) var(--ease);
}
.btn-secondary-lg:hover {
  color: var(--text-primary);
  border-color: var(--blue-glow);
  background: var(--surface);
}
.btn-secondary-lg svg {
  transition: transform var(--dur-micro) var(--ease);
}
.btn-secondary-lg:hover svg {
  transform: translateX(3px);
}
.btn-secondary-lg i {
  transition: transform var(--dur-micro) var(--ease);
}
.btn-secondary-lg:hover i {
  transform: translateX(3px);
}

.hero-micro {
  margin-top: 22px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-faint);
  letter-spacing: 0.02em;
  opacity: 0;
  animation: reveal var(--dur-page) var(--ease) 0.7s forwards;
}

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

/* ============ CINEMATIC BUILD EXPERIENCE (signature element) ============
   Structure per brief: upper zone (40%) = human + glassmorphism
   conversation panel + AI robot; lower zone (60%) = application
   assembly. Human/robot are minimal SVG line-art with animated
   neural/holographic accents rather than photorealistic renders —
   no image-generation tooling is available in this environment,
   and restrained abstract linework is closer to the OpenAI/Linear
   reference than a literal photo would be anyway. */
.cinematic-stage {
  position: relative;
  z-index: 1;
  width: min(1180px, 92%);
  margin-top: 60px;
  opacity: 0;
  transform: translateY(24px);
  animation: reveal var(--dur-page) var(--ease) 0.45s forwards;
}

.cinematic-upper {
  display: grid;
  grid-template-columns: 1fr 1.3fr 1fr;
  align-items: center;
  gap: 0;
  min-height: 340px;
}

.figure {
  position: relative;
  width: 100%;
  max-width: 260px;
  justify-self: center;
  display: flex;
  align-items: center;
  justify-content: center;
}
.figure-photo {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 230px;
  height: auto;
  filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.35));
}
.figure-glow {
  position: absolute;
  z-index: 1;
  width: 230px;
  height: 230px;
  border-radius: 50%;
  filter: blur(30px);
}
.figure-human .figure-glow {
  background: radial-gradient(circle, var(--blue-soft) 0%, transparent 70%);
}
.figure-robot .figure-glow {
  background: radial-gradient(circle, var(--purple-soft) 0%, transparent 70%);
}

.figure-human {
  animation: figure-breathe 5s ease-in-out infinite;
}
.figure-robot {
  animation: figure-breathe 5s ease-in-out infinite 0.4s;
}
@keyframes figure-breathe {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.015);
  }
}

/* "Who's talking now" cue — synced exactly to the chat panel's typing animation via JS
   toggling .speaking on the active figure. No literal lip-sync (that needs multiple image
   frames or video, which a single static photo can't provide) — instead a clear glow-pulse
   ring plus a slightly stronger talking-bob on whichever figure is currently "speaking." */
.speaking-ring {
  position: absolute;
  z-index: 0;
  inset: -10px;
  border-radius: 50%;
  border: 2px solid transparent;
  opacity: 0;
  transition: opacity var(--dur-comp) var(--ease);
}
.figure-human .speaking-ring {
  border-color: var(--blue);
}
.figure-robot .speaking-ring {
  border-color: var(--purple);
}
.figure.speaking .speaking-ring {
  opacity: 0.8;
  animation: speaking-pulse 1.1s ease-in-out infinite;
}
.figure.speaking {
  animation: figure-talk-bob 0.55s ease-in-out infinite;
}
@keyframes speaking-pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.5;
  }
  50% {
    transform: scale(1.08);
    opacity: 0.9;
  }
}
@keyframes figure-talk-bob {
  0%,
  100% {
    transform: scale(1) translateY(0);
  }
  50% {
    transform: scale(1.015) translateY(-2px);
  }
}

.chat-panel {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 400px;
  justify-self: center;
  height: 260px;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-xl, 22px);
  background: var(--glass-panel);
  border: 1px solid var(--line-strong);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  box-shadow: 0 30px 70px var(--shadow-lg);
}
.chat-panel-head {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 18px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-faint);
  border-bottom: 1px solid var(--line);
}
.chat-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
  animation: pulse-dot 2s ease-in-out infinite;
}
.chat-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scroll-behavior: smooth;
}
.chat-bubble {
  max-width: 85%;
  padding: 10px 13px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.5;
}
.chat-bubble.human {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--blue), var(--purple));
  color: #fff;
  border-bottom-right-radius: 4px;
}
.chat-bubble.ai {
  align-self: flex-start;
  background: var(--bg-deep);
  color: var(--text-primary);
  border: 1px solid var(--line);
  border-bottom-left-radius: 4px;
}

.cinematic-lower {
  margin-top: 36px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}
.assembly-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 10px;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: center;
}
.assembly-item i {
  font-size: 20px;
  color: var(--blue);
}

@media (prefers-reduced-motion: reduce) {
  .figure-human,
  .figure-robot,
  .chat-dot,
  .figure.speaking,
  .speaking-ring {
    animation: none !important;
  }
  .figure.speaking .speaking-ring {
    opacity: 0.8;
  }
}

@media (max-width: 960px) {
  .cinematic-upper {
    grid-template-columns: 1fr;
    gap: 24px;
    justify-items: center;
  }
  .figure {
    display: none;
  }
  .cinematic-lower {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 640px) {
  .cinematic-lower {
    grid-template-columns: 1fr 1fr;
  }
  .chat-panel {
    height: 220px;
  }
}

/* ============ BUILD PIPELINE ============ */
.pipeline-wrap {
  position: relative;
  z-index: 1;
  padding: 20px 24px 90px;
  display: flex;
  justify-content: center;
}
.pipeline {
  width: min(920px, 100%);
  display: flex;
  align-items: flex-start;
  position: relative;
  padding: 0;
}
.pipeline::before {
  content: "";
  position: absolute;
  top: 22px;
  left: var(--line-start, 22px);
  right: var(--line-end, 22px);
  height: 2px;
  background: var(--line);
}
.pipeline .fill-line {
  position: absolute;
  top: 22px;
  left: 0;
  height: 2px;
  width: 0;
  background: linear-gradient(90deg, var(--blue), var(--purple));
  transition:
    width 900ms var(--ease),
    left 300ms var(--ease);
}
.stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  flex: 1 1 0;
  min-width: 0;
  z-index: 1;
}
.stage .node {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--surface);
  border: 1.5px solid var(--line-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  transition: all var(--dur-comp) var(--ease);
}
.stage.is-active .node {
  border-color: var(--blue);
  background: var(--blue-soft);
  box-shadow: 0 0 22px var(--blue-glow);
  transform: scale(1.08);
}
.stage.is-done .node {
  border-color: var(--success);
  background: rgba(63, 208, 138, 0.14);
}
.stage .label {
  font-family: var(--font-mono);
  font-size: 11.5px;
  text-align: center;
  color: var(--text-faint);
  transition: color var(--dur-comp);
}
.stage.is-active .label,
.stage.is-done .label {
  color: var(--text-secondary);
}

/* ============ BUILD SECTION ============ */
.section-build {
  position: relative;
  z-index: 1;
  padding: 60px 24px 120px;
}
.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 52px;
}
.section-head h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  letter-spacing: -0.01em;
}
.section-head p {
  margin-top: 14px;
  color: var(--text-muted);
  font-size: 15.5px;
  line-height: 1.6;
}

.split {
  width: min(1060px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.pane {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  min-height: 360px;
  display: flex;
  flex-direction: column;
}
.pane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.pane-head .tag {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  text-transform: uppercase;
}
.pane-head .state {
  font-size: 12px;
  color: var(--blue);
  font-family: var(--font-mono);
}

.idea-box {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
}
.idea-box .quote {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-secondary);
  font-style: normal;
  border-left: 2px solid var(--purple);
  padding-left: 16px;
}
.idea-mic {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-faint);
  font-size: 12.5px;
  font-family: var(--font-mono);
}
.idea-mic .dot-sm {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--purple);
  animation: pulse-dot 1.6s infinite;
}

.gen-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex-grow: 1;
  justify-content: center;
}
.gen-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--bg-deep);
  border: 1px solid var(--line);
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 500ms var(--ease),
    transform 500ms var(--ease),
    border-color 300ms;
}
.gen-item.is-visible {
  opacity: 1;
  transform: translateY(0);
  border-color: var(--line-strong);
}
.gen-item .gen-item-icon {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--blue-soft);
  flex-shrink: 0;
  font-size: 13px;
}
.gen-item span.gen-item-label {
  font-size: 13.5px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ============ PAGE-SPECIFIC RESPONSIVE ============ */
@media (max-width: 860px) {
  .split {
    grid-template-columns: 1fr;
  }
  .hero {
    padding-top: 150px;
  }
}
@media (max-width: 960px) {
  .modes-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 640px) {
  .pipeline {
    overflow-x: auto;
    padding-bottom: 6px;
  }
  .stage {
    flex: 0 0 78px;
  }
}

/* ============ HOMEPAGE: 01 GALLERY ============ */
@media (max-width: 860px) {
  .gallery-grid {
    grid-auto-flow: column;
    grid-auto-columns: 78%;
    grid-template-columns: none;
    grid-template-rows: 1fr;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 10px;
    margin: 0 -24px;
    padding-left: 24px;
    padding-right: 24px;
  }
  .gallery-grid .mega-card {
    scroll-snap-align: start;
  }
}

/* ============ HOMEPAGE: 03 MODES ============ */
.modes-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.mode-card {
  padding: 28px 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: all var(--dur-comp) var(--ease);
}
.mode-card:hover {
  border-color: var(--blue-glow);
  transform: translateY(-4px);
  box-shadow: 0 20px 40px var(--shadow-md);
}
.mode-card .m-eyebrow {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--purple);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.mode-card h3 {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
}
.mode-card p {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.6;
}
.mode-demo {
  margin-top: auto;
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--bg-deep);
  border: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.mode-demo .flow-chip {
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--surface-hover);
}
.mode-demo .flow-arrow {
  color: var(--text-faint);
}

/* ============ HOMEPAGE: 05/06 shared visual frame ============ */
.diagram-frame {
  padding: 52px 24px 40px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface);
}
.benefit-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 40px;
}
.benefit-card {
  padding: 22px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--surface);
}
.benefit-card .benefit-card-icon {
  font-size: 20px;
  margin-bottom: 10px;
}
.benefit-card h4 {
  font-size: 14.5px;
  font-weight: 700;
  margin-bottom: 6px;
}
.benefit-card p {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ============ HOMEPAGE: 08 PRICING PREVIEW ============ */
.pricing-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.pp-card {
  padding: 22px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all var(--dur-comp) var(--ease);
}
.pp-card:hover {
  border-color: var(--blue-glow);
  transform: translateY(-3px);
}
.pp-card .pp-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.pp-card .pp-price {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
}
.pp-card .pp-price small {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
}
.pp-card p {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
  flex-grow: 1;
}

/* ============ HOMEPAGE: 09 RESOURCES + FAQ ============ */
.resources-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 56px;
}
.faq-list {
  max-width: 680px;
  margin: 0 auto;
}

/* ============ HOMEPAGE: 10 FINAL CTA ============ */
.final-cta {
  text-align: center;
}
.final-cta h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 4vw, 2.9rem);
  letter-spacing: -0.01em;
}
.final-cta p {
  margin: 16px auto 34px;
  max-width: 560px;
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.6;
}
.final-cta .cta-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}
.mini-wave {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 32px;
  margin: 44px auto 0;
  opacity: 0.6;
}
.mini-wave span {
  width: 3px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--blue), var(--purple));
  animation: mini-breathe 2.4s ease-in-out infinite;
}

@keyframes mini-breathe {
  0%,
  100% {
    height: 6px;
  }
  50% {
    height: 20px;
  }
}

@media (max-width: 860px) {
  .modes-grid,
  .resources-grid {
    grid-template-columns: 1fr;
  }
  .pricing-preview-grid {
    grid-template-columns: 1fr 1fr;
  }
  .benefit-row {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 640px) {
  .pricing-preview-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 480px) {
  .cinematic-lower {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .chat-panel {
    height: 200px;
  }
  .chat-panel-body {
    padding: 12px 14px;
  }
}
