/* ============================================
   Homepage Visual Revision 2.0
   Scannable layout · section visuals · hero platform
   ============================================ */

/* — Shared section patterns — */
.page-home .section-head,
.site-theme .section-head {
  margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
}

.page-home .section-head--center,
.site-theme .section-head--center {
  text-align: start;
}

.page-home .section-head--center .section-lead,
.site-theme .section-head--center .section-lead {
  margin-inline: 0;
}

.page-home .section-title,
.site-theme .section-title {
  letter-spacing: -0.025em;
  line-height: 1.25;
  text-align: start;
}

.page-home .section-lead,
.site-theme .section-lead {
  margin-top: var(--space-sm);
  font-size: 1.0625rem;
  color: #a0adbf;
  line-height: 1.7;
  max-width: 34em;
  text-align: start;
}

.page-home .vis-icon,
.page-home .vis-meta,
.site-theme .vis-icon,
.site-theme .vis-meta {
  width: 2rem;
  height: 2rem;
  color: var(--vis-accent);
  flex-shrink: 0;
  opacity: 0.82;
}

/* Lucide SVGs replace <i data-lucide> — same box as .vis-meta */
.page-home i[data-lucide].vis-meta,
.page-home svg.lucide.vis-meta {
  display: block;
  width: 2rem;
  height: 2rem;
  color: var(--vis-accent);
  flex-shrink: 0;
  opacity: 0.88;
  stroke: currentColor;
}

.page-home .text-link svg.lucide {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  color: currentColor;
  opacity: 1;
  /* arrow-left already matches RTL forward; skip brand scaleX flip */
  transform: none;
}

.page-home .text-link:hover svg.lucide {
  transform: translateX(-2px);
}

.page-home .vis-icon--lg,
.page-home .vis-meta--lg,
.site-theme .vis-icon--lg,
.site-theme .vis-meta--lg,
.page-home svg.lucide.vis-meta--lg {
  width: 2.75rem;
  height: 2.75rem;
}

.page-home .vis-icon--sm,
.page-home .vis-meta--sm,
.site-theme .vis-icon--sm,
.site-theme .vis-meta--sm,
.page-home svg.lucide.vis-meta--sm {
  width: 1.35rem;
  height: 1.35rem;
}

.page-home .vis-meta--flow,
.site-theme .vis-meta--flow {
  width: 100%;
  max-width: 720px;
  height: auto;
  color: var(--vis-accent);
}

.page-home .vis-meta--sora,
.site-theme .vis-meta--sora {
  width: 100%;
  max-width: 280px;
  height: auto;
  margin-inline: auto;
  color: var(--vis-accent);
}

.page-home .vis-meta--contact,
.site-theme .vis-meta--contact,
.page-home svg.lucide.vis-meta--contact {
  width: 3rem;
  height: 3rem;
  max-width: none;
  margin: 0 0 var(--space-md);
  color: var(--vis-accent);
}

/* Reveal timing owned by home-presence.css — hero stays immediate */

/* — Hero platform animation — */
.page-home .hero-platform {
  position: relative;
  aspect-ratio: 520 / 440;
  overflow: hidden;
  background: radial-gradient(ellipse 80% 70% at 50% 40%, rgba(77, 159, 255, 0.11) 0%, transparent 65%),
              #141820;
}

.page-home .hero-platform__flow {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
  opacity: 0.9;
}

.page-home .hero-platform__svg {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 1;
}

.page-home .hp-ambient {
  opacity: 0;
  animation: hp-ambient-in 1s var(--hp-ease) 0.2s forwards;
}

@keyframes hp-ambient-in {
  to { opacity: 1; }
}

/* Connection paths */
.page-home .hp-path {
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
  opacity: 0;
  animation: hp-path-draw 0.9s var(--hp-ease) forwards;
}

.page-home .hp-path--1 { animation-delay: 0.55s; }
.page-home .hp-path--2 { animation-delay: 0.65s; }
.page-home .hp-path--3 { animation-delay: 0.75s; }
.page-home .hp-path--4 { animation-delay: 0.85s; }
.page-home .hp-path--5 { animation-delay: 1.05s; }
.page-home .hp-path--6 { animation-delay: 1.25s; }
.page-home .hp-path--7 { animation-delay: 1.35s; }

@keyframes hp-path-draw {
  0%   { stroke-dashoffset: 200; opacity: 0; }
  20%  { opacity: 0.9; }
  100% { stroke-dashoffset: 0; opacity: 0.75; }
}

/* Source modules — fly in from scattered positions */
.page-home .hp-layer--src {
  opacity: 0;
  animation: hp-src-in 0.85s var(--hp-ease) forwards;
}

.page-home .hp-layer--src-a { animation-delay: 0.1s; --hp-from-x: -28px; --hp-from-y: -22px; }
.page-home .hp-layer--src-b { animation-delay: 0.18s; --hp-from-x: 28px;  --hp-from-y: -26px; }
.page-home .hp-layer--src-c { animation-delay: 0.26s; --hp-from-x: -32px; --hp-from-y: 8px; }
.page-home .hp-layer--src-d { animation-delay: 0.34s; --hp-from-x: 32px;  --hp-from-y: 6px; }

@keyframes hp-src-in {
  0%   { opacity: 0; transform: translate(var(--hp-from-x), var(--hp-from-y)) scale(0.88); }
  100% { opacity: 1; transform: translate(0, 0) scale(1); }
}

/* Hub */
.page-home .hp-layer--hub {
  opacity: 0;
  transform: scale(0.6);
  transform-origin: 250px 186px;
  animation: hp-hub-in 0.65s var(--hp-ease) 0.95s forwards;
}

@keyframes hp-hub-in {
  0%   { opacity: 0; transform: scale(0.72); }
  100% { opacity: 1; transform: scale(1); }
}

.page-home .hp-hub-ring {
  opacity: 0;
  animation: hp-ring-in 0.5s var(--hp-ease) 1.15s forwards;
}

@keyframes hp-ring-in {
  to { opacity: 1; }
}

/* Core platform */
.page-home .hp-layer--core {
  opacity: 0;
  transform: translateY(24px) scale(0.94);
  transform-origin: 250px 304px;
  animation: hp-core-in 0.8s var(--hp-ease) 1.15s forwards;
}

@keyframes hp-core-in {
  0%   { opacity: 0; transform: translateY(24px) scale(0.94); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* Output modules */
.page-home .hp-layer--out {
  opacity: 0;
  animation: hp-out-in 0.7s var(--hp-ease) forwards;
}

.page-home .hp-layer--out-a { animation-delay: 1.45s; --hp-out-x: -20px; }
.page-home .hp-layer--out-b { animation-delay: 1.55s; --hp-out-x: 20px; }

@keyframes hp-out-in {
  0%   { opacity: 0; transform: translateX(var(--hp-out-x)) translateY(12px); }
  100% { opacity: 1; transform: translateX(0) translateY(0); }
}

/* Ambient loop after intro */
.page-home .hero-platform.is-ambient .hp-hub-ring {
  animation: hp-hub-pulse 5.5s ease-in-out infinite;
}

@keyframes hp-hub-pulse {
  0%, 100% { opacity: 0.7; }
  50%      { opacity: 1; }
}

/* Reduced motion — static composed state */
@media (prefers-reduced-motion: reduce) {
  .page-home .hero-platform.is-reduced-motion .hp-ambient,
  .page-home .hero-platform.is-reduced-motion .hp-layer,
  .page-home .hero-platform.is-reduced-motion .hp-path {
    opacity: 1;
    animation: none;
    transform: none;
    stroke-dashoffset: 0;
  }

  .page-home .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* — Conversation — */
.page-home .diag-flow {
  margin-bottom: var(--space-md);
}

.page-home .diag-flow__svg {
  display: block;
  width: 100%;
  max-width: 720px;
  height: auto;
  margin-inline: auto;
}

.page-home .diag-grid {
  display: grid;
  gap: var(--space-sm);
  list-style: none;
  margin-bottom: var(--space-lg);
}

.page-home .diag-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  padding: clamp(1.1rem, 2.5vw, 1.35rem) clamp(1.1rem, 2.5vw, 1.5rem);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  transition: border-color 0.25s var(--hp-ease);
}

.page-home .diag-card:hover {
  border-color: var(--color-border-strong);
}

.page-home .diag-card__title {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.35;
  text-align: start;
}

.page-home .diag-card__text {
  font-size: 0.875rem;
  color: #a0adbf;
  line-height: 1.6;
  text-align: start;
}

.page-home .conversation-layout,
.page-home .conversation-panel,
.page-home .question-list,
.page-home .prose--after {
  display: none;
}

/* — Beats / process — */
.page-home .process-track {
  display: grid;
  gap: var(--space-sm);
  list-style: none;
  margin-bottom: var(--space-xl);
  counter-reset: none;
  position: relative;
}

.page-home .process-track::before {
  content: "";
  display: none;
}

.page-home .process-step {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto auto;
  gap: 0.15rem var(--space-md);
  padding: clamp(1.1rem, 2.5vw, 1.35rem) clamp(1.1rem, 2.5vw, 1.5rem);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  align-items: start;
  transition: border-color 0.25s var(--hp-ease);
}

.page-home .process-step:hover {
  border-color: var(--color-border-strong);
}

.page-home .process-step__num {
  grid-row: 1 / -1;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--color-accent);
  padding-top: 0.35rem;
}

.page-home .process-step .vis-icon,
.page-home .process-step .vis-meta {
  grid-column: 2;
  grid-row: 1;
  margin-bottom: 0.35rem;
  opacity: 0.7;
}

.page-home .process-step__title {
  grid-column: 2;
  grid-row: 2;
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  text-align: start;
}

.page-home .process-step__text {
  grid-column: 2;
  grid-row: 3;
  font-size: 0.875rem;
  color: #a0adbf;
  line-height: 1.6;
  text-align: start;
}

.page-home .beats-grid,
.page-home .beat {
  display: none;
}

/* — Sora — */
.page-home .sora-panel--visual {
  display: grid;
  gap: var(--space-xl);
}

.page-home .sora-body {
  font-size: 0.9375rem;
  color: var(--color-text-muted);
  margin-bottom: var(--space-sm);
  text-align: start;
  max-width: 36em;
  line-height: 1.65;
}

.page-home .sora-reveal {
  font-size: 1rem;
  color: var(--color-text);
  margin: var(--space-md) 0 var(--space-lg);
  text-align: start;
  max-width: 36em;
  line-height: 1.55;
}

.page-home .sora-visual {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.page-home .sora-timeline {
  display: flex;
  justify-content: space-between;
  list-style: none;
  gap: 0.25rem;
  position: relative;
}

.page-home .sora-timeline::before {
  content: "";
  position: absolute;
  top: 50%;
  inset-inline: 0;
  height: 1px;
  background: var(--color-border-strong);
  transform: translateY(-50%);
  z-index: 0;
}

.page-home .sora-timeline__step {
  position: relative;
  z-index: 1;
  flex: 1;
  text-align: center;
}

.page-home .sora-timeline__step span {
  display: inline-block;
  padding: 0.4rem 0.55rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--color-text-soft);
  background: rgba(9, 12, 17, 0.45);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
}

.page-home .sora-timeline__step--active span {
  color: var(--vis-accent);
  border-color: rgba(77, 159, 255, 0.45);
  background: var(--color-status-bg);
}

.page-home .sora-stack {
  width: 100%;
  max-width: 280px;
  margin-inline: auto;
}

.page-home .sora-diagram {
  display: none;
}

/* — Outcomes capability grid — */
.page-home .capability-grid {
  display: grid;
  gap: 0.75rem;
  list-style: none;
  margin-bottom: var(--space-lg);
}

.page-home .cap-card {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: clamp(1rem, 2.2vw, 1.2rem) clamp(1rem, 2.2vw, 1.25rem);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  transition: border-color 0.25s var(--hp-ease), background 0.25s var(--hp-ease);
}

.page-home .cap-card:hover {
  border-color: rgba(77, 159, 255, 0.28);
  background: #191d25;
}

.page-home .cap-card .vis-meta {
  opacity: 0.65;
  margin-bottom: 0.15rem;
}

.page-home .cap-card__title {
  font-family: var(--font-display);
  font-size: 0.9875rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
  text-align: start;
}

.page-home .cap-card__text {
  font-size: 0.8125rem;
  color: #9eacca;
  line-height: 1.55;
  text-align: start;
}

@media (min-width: 640px) {
  .page-home .cap-card--wide {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    column-gap: 0.85rem;
    row-gap: 0.35rem;
    padding-inline: clamp(1.15rem, 2.5vw, 1.5rem);
  }

  .page-home .cap-card--wide .vis-meta {
    margin-top: 0.15rem;
    margin-bottom: 0;
  }

  .page-home .cap-card--wide .cap-card__title {
    flex: 1;
    min-width: 12rem;
    margin-bottom: 0;
  }

  .page-home .cap-card--wide .cap-card__text {
    flex: 1 1 100%;
    padding-inline-start: calc(2rem + 0.85rem);
  }
}

.page-home .tech-strip {
  margin-top: clamp(1.25rem, 3vw, 1.75rem);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-border);
}

.page-home .tech-strip .tech-note {
  margin-top: 0.65rem;
  font-size: 0.8125rem;
  color: #8b98ab;
  line-height: 1.55;
}

.page-home .outcomes-grid,
.page-home .outcome,
.page-home .section-intro {
  display: none;
}

/* — Audience fit chips — */
.page-home .fit-grid {
  display: grid;
  gap: var(--space-sm);
  list-style: none;
}

.page-home .fit-chip {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 1rem 1.25rem;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  font-size: 0.9375rem;
  color: #a0adbf;
  line-height: 1.5;
  transition: border-color 0.25s var(--hp-ease);
}

.page-home .fit-chip:hover {
  border-color: var(--color-border-strong);
}

.page-home .fit-chip .vis-meta {
  opacity: 0.7;
}

.page-home .fit-chip strong {
  color: var(--color-text);
  font-weight: 600;
}

.page-home .audience-grid,
.page-home .audience-item {
  display: none;
}

/* — Contact — */
.page-home .contact-panel--visual {
  text-align: start;
  max-width: 34em;
  margin-inline: auto;
}

.page-home .contact-panel--visual .section-title,
.page-home .contact-panel--visual .contact-lead {
  text-align: start;
}

.page-home .contact-visual {
  display: block;
  width: 100%;
  max-width: 96px;
  margin: 0 0 var(--space-md);
  opacity: 0.75;
  color: var(--vis-accent);
}

.page-home .contact-panel--visual .btn-primary {
  margin-top: var(--space-md);
}

.page-home .contact-panel--visual .north-star {
  text-align: start;
  max-width: 28em;
  margin-inline: 0;
}

/* — Responsive — */
@media (min-width: 640px) {
  .page-home .diag-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .page-home .capability-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .page-home .cap-card--wide {
    grid-column: span 2;
  }

  .page-home .fit-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .page-home .process-track {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
  }

  .page-home .process-track::before {
    display: block;
    position: absolute;
    top: 2.75rem;
    inset-inline: 10%;
    height: 1px;
    background: linear-gradient(to left, transparent, var(--color-border-strong), transparent);
  }

  .page-home .process-step {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto auto;
    text-align: start;
    padding-top: var(--space-lg);
  }

  .page-home .process-step__num {
    grid-row: 1;
    grid-column: 1;
    padding-top: 0;
  }

  .page-home .process-step .vis-icon,
  .page-home .process-step .vis-meta {
    grid-column: 1;
    grid-row: 2;
    margin-inline: 0;
  }

  .page-home .process-step__title {
    grid-column: 1;
    grid-row: 3;
    text-align: start;
  }

  .page-home .process-step__text {
    grid-column: 1;
    grid-row: 4;
    text-align: start;
  }

  .page-home .sora-panel--visual {
    grid-template-columns: 1fr 300px;
    align-items: center;
  }

  .page-home .capability-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .page-home .cap-card--wide {
    grid-column: span 1;
  }
}

@media (min-width: 1024px) {
  .page-home .capability-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .page-home .cap-card--wide {
    grid-column: span 2;
  }
}

@media (max-width: 767px) {
  .page-home .hero-support {
    font-size: 1rem;
  }

  .page-home .section {
    padding-block: clamp(3rem, 8vw, 5rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-home .hero-platform.is-ambient .hp-hub-ring {
    animation: none;
  }
}
