/* Platform marketing homepage (apex hosts only). Scoped under .platform-home. */

.platform-home-shell {
  min-height: 100vh;
  background: #0f141f;
  color: #e8edf7;
}

.platform-home {
  --ph-navy: #1e2538;
  --ph-navy-deep: #0f141f;
  --ph-primary: #1a56db;
  --ph-primary-bright: #3b7cff;
  --ph-accent: #38bdf8;
  --ph-surface: #161d2e;
  --ph-surface-2: #1e2740;
  --ph-text: #e8edf7;
  --ph-muted: #9aa8c3;
  --ph-line: rgba(232, 237, 247, 0.12);
  --ph-font-display: "Segoe UI", system-ui, -apple-system, sans-serif;
  --ph-font-body: "Segoe UI", system-ui, -apple-system, sans-serif;
  font-family: var(--ph-font-body);
  color: var(--ph-text);
  background: var(--ph-navy-deep);
  overflow-x: hidden;
  scroll-behavior: smooth;
}

.platform-home a {
  color: inherit;
  text-decoration: none;
}

.platform-home a:hover {
  color: var(--ph-accent);
}

/* Nav */
.ph-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem clamp(1rem, 4vw, 2.5rem);
  background: rgba(15, 20, 31, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--ph-line);
}

.ph-nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 1.1rem;
}

.ph-nav__brand img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.ph-nav__links {
  display: none;
  align-items: center;
  gap: 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.ph-nav__links a {
  color: var(--ph-muted);
  font-size: 0.95rem;
  font-weight: 500;
}

.ph-nav__links a:hover {
  color: var(--ph-text);
}

.ph-nav__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.ph-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: 0.55rem;
  padding: 0.7rem 1.15rem;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.ph-btn:hover {
  transform: translateY(-1px);
}

/* Anchor buttons need .platform-home a.ph-btn* so color beats `.platform-home a`. */
.platform-home a.ph-btn--primary,
.ph-btn--primary {
  background: linear-gradient(135deg, var(--ph-primary) 0%, var(--ph-primary-bright) 100%);
  color: #fff;
  box-shadow: 0 10px 28px rgba(26, 86, 219, 0.35);
}

.platform-home a.ph-btn--primary:hover,
.ph-btn--primary:hover {
  color: #fff;
}

.platform-home a.ph-btn--ghost,
.ph-btn--ghost {
  background: transparent;
  border-color: var(--ph-line);
  color: var(--ph-text);
}

.platform-home a.ph-btn--ghost:hover,
.ph-btn--ghost:hover {
  border-color: rgba(59, 124, 255, 0.55);
  color: #fff;
}

.platform-home a.ph-btn--light,
.ph-btn--light {
  background: #fff;
  color: var(--ph-navy);
}

.platform-home a.ph-btn--light:hover,
.ph-btn--light:hover {
  color: var(--ph-navy);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.ph-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

/* Hero — full bleed */
.ph-hero {
  position: relative;
  min-height: min(92vh, 880px);
  display: flex;
  align-items: center;
  padding: clamp(2.5rem, 8vw, 5rem) clamp(1rem, 4vw, 2.5rem) 4rem;
  overflow: hidden;
}

.ph-hero__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% 20%, rgba(26, 86, 219, 0.45), transparent 55%),
    radial-gradient(ellipse 50% 40% at 15% 80%, rgba(56, 189, 248, 0.18), transparent 50%),
    linear-gradient(160deg, #0f141f 0%, #1e2538 45%, #152a5c 100%);
  z-index: 0;
}

.ph-hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 20%, transparent 75%);
  animation: ph-grid-drift 28s linear infinite;
  z-index: 1;
  pointer-events: none;
}

@keyframes ph-grid-drift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-48px, -48px, 0); }
}

.ph-hero__orb {
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 124, 255, 0.35), transparent 68%);
  filter: blur(8px);
  top: 8%;
  right: 8%;
  animation: ph-orb-pulse 7s ease-in-out infinite;
  z-index: 1;
  pointer-events: none;
}

@keyframes ph-orb-pulse {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50% { opacity: 0.9; transform: scale(1.08); }
}

.ph-hero__inner {
  position: relative;
  z-index: 2;
  width: min(720px, 100%);
}

.ph-hero__logo {
  width: min(280px, 72vw);
  height: auto;
  margin-bottom: 1.75rem;
  filter: drop-shadow(0 12px 40px rgba(0, 0, 0, 0.35));
  animation: ph-fade-up 0.8s ease both;
}

.ph-hero__title {
  font-family: var(--ph-font-display);
  font-size: clamp(2.1rem, 5.2vw, 3.4rem);
  font-weight: 750;
  letter-spacing: -0.035em;
  line-height: 1.08;
  margin: 0 0 1rem;
  animation: ph-fade-up 0.85s 0.08s ease both;
}

.ph-hero__sub {
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  color: var(--ph-muted);
  line-height: 1.55;
  max-width: 36rem;
  margin: 0 0 1.75rem;
  animation: ph-fade-up 0.85s 0.16s ease both;
}

.ph-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  animation: ph-fade-up 0.85s 0.24s ease both;
}

@keyframes ph-fade-up {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Sections */
.ph-section {
  padding: clamp(3.5rem, 8vw, 5.5rem) clamp(1rem, 4vw, 2.5rem);
}

.ph-section--surface {
  background: var(--ph-surface);
}

.ph-section__eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ph-accent);
  margin-bottom: 0.65rem;
}

.ph-section__title {
  font-size: clamp(1.7rem, 3.5vw, 2.35rem);
  font-weight: 720;
  letter-spacing: -0.03em;
  margin: 0 0 0.65rem;
}

.ph-section__lead {
  color: var(--ph-muted);
  font-size: 1.05rem;
  max-width: 40rem;
  margin: 0 0 2rem;
  line-height: 1.55;
}

.ph-wrap {
  max-width: 1120px;
  margin: 0 auto;
}

/* Module explorer */
.ph-modules {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.ph-module-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.ph-module-tab {
  appearance: none;
  border: 1px solid var(--ph-line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--ph-muted);
  border-radius: 999px;
  padding: 0.55rem 0.95rem;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.ph-module-tab:hover {
  color: var(--ph-text);
  border-color: rgba(59, 124, 255, 0.45);
}

.ph-module-tab.is-active {
  background: rgba(26, 86, 219, 0.28);
  border-color: rgba(59, 124, 255, 0.7);
  color: #fff;
  transform: translateY(-1px);
}

.ph-module-stage {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: center;
  background: linear-gradient(145deg, var(--ph-surface-2), rgba(26, 86, 219, 0.12));
  border: 1px solid var(--ph-line);
  border-radius: 1.25rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  min-height: 320px;
}

.ph-module-stage__visual {
  position: relative;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ph-module-stage__visual img,
.ph-module-stage__visual svg {
  width: min(100%, 440px);
  height: auto;
  animation: ph-scene-in 0.45s ease both;
}

@keyframes ph-scene-in {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.ph-module-stage__copy h3 {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.65rem;
}

.ph-module-stage__copy p {
  color: var(--ph-muted);
  margin: 0;
  line-height: 1.55;
}

/* Stepper */
.ph-steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.ph-step {
  text-align: left;
  appearance: none;
  border: 1px solid var(--ph-line);
  background: rgba(255, 255, 255, 0.02);
  color: inherit;
  border-radius: 0.9rem;
  padding: 1rem 1.1rem;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.ph-step:hover {
  border-color: rgba(59, 124, 255, 0.4);
}

.ph-step.is-active {
  background: rgba(26, 86, 219, 0.22);
  border-color: rgba(59, 124, 255, 0.65);
  transform: translateY(-1px);
}

.ph-step__num {
  display: inline-flex;
  width: 1.7rem;
  height: 1.7rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.18);
  color: var(--ph-accent);
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 0.45rem;
}

.ph-step__title {
  display: block;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.ph-step__body {
  color: var(--ph-muted);
  font-size: 0.92rem;
  line-height: 1.45;
  margin: 0;
}

.ph-step-panel {
  border: 1px solid var(--ph-line);
  border-radius: 1.1rem;
  padding: clamp(1.25rem, 3vw, 2rem);
  background: linear-gradient(160deg, rgba(26, 86, 219, 0.18), rgba(15, 20, 31, 0.4));
  min-height: 180px;
  animation: ph-fade-up 0.4s ease both;
}

.ph-step-panel h3 {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
}

.ph-step-panel p {
  margin: 0;
  color: var(--ph-muted);
  line-height: 1.55;
}

/* Proof strip */
.ph-proof {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.ph-proof__item {
  padding: 1.15rem 1.2rem;
  border-left: 3px solid var(--ph-primary-bright);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 0 0.75rem 0.75rem 0;
}

.ph-proof__item strong {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 1.05rem;
}

.ph-proof__item span {
  color: var(--ph-muted);
  font-size: 0.95rem;
  line-height: 1.45;
}

/* Demo form */
.ph-demo {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: start;
}

.ph-form {
  background: var(--ph-surface-2);
  border: 1px solid var(--ph-line);
  border-radius: 1.15rem;
  padding: clamp(1.25rem, 3vw, 1.75rem);
}

.ph-form label {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 0.35rem;
}

.ph-form .form-control,
.ph-form .form-select,
.ph-form textarea {
  background: rgba(15, 20, 31, 0.65);
  border: 1px solid var(--ph-line);
  color: var(--ph-text);
  border-radius: 0.55rem;
}

.ph-form .form-control:focus,
.ph-form .form-select:focus,
.ph-form textarea:focus {
  background: rgba(15, 20, 31, 0.85);
  border-color: rgba(59, 124, 255, 0.7);
  box-shadow: 0 0 0 0.2rem rgba(26, 86, 219, 0.25);
  color: var(--ph-text);
}

.ph-form .form-select option {
  background: #1e2538;
  color: #fff;
}

.ph-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.ph-form-status {
  margin-top: 0.85rem;
  font-size: 0.95rem;
}

.ph-form-status--ok {
  color: #6ee7b7;
}

.ph-form-status--err {
  color: #fca5a5;
}

/* Footer */
.ph-footer {
  border-top: 1px solid var(--ph-line);
  padding: 2rem clamp(1rem, 4vw, 2.5rem) 2.5rem;
  color: var(--ph-muted);
  font-size: 0.9rem;
}

.ph-footer__inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
}

.ph-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.15rem;
}

.ph-footer__links a {
  color: var(--ph-muted);
}

.ph-footer__links a:hover {
  color: var(--ph-text);
}

.ph-gate {
  min-height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ph-muted);
}

@media (min-width: 768px) {
  .ph-nav__links {
    display: flex;
  }

  .ph-modules {
    grid-template-columns: 1fr;
  }

  .ph-module-stage {
    grid-template-columns: 1.15fr 0.85fr;
  }

  .ph-steps {
    grid-template-columns: repeat(3, 1fr);
  }

  .ph-proof {
    grid-template-columns: repeat(3, 1fr);
  }

  .ph-demo {
    grid-template-columns: 0.9fr 1.1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ph-hero__grid,
  .ph-hero__orb,
  .ph-hero__logo,
  .ph-hero__title,
  .ph-hero__sub,
  .ph-hero__actions,
  .ph-module-stage__visual img,
  .ph-module-stage__visual svg,
  .ph-step-panel,
  .ph-btn {
    animation: none !important;
    transition: none !important;
  }
}
