/* MFM-1 Polaris — Horizon promo / hero (Satoshi, llmcharts marketing) */

/* Landing: Latest Releases shell (Altitude rhythm; Horizon stays in card) */
.polaris-releases {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1rem;
}

.polaris-releases-label {
  margin: 0;
  font-family: "Satoshi", system-ui, -apple-system, sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--alt-muted, #9aabc0);
  text-align: left;
}

.polaris-releases-card {
  position: relative;
  width: 100%;
  border-radius: var(--alt-radius-2xl, 0.625rem);
  border: 1px solid var(--alt-border, rgba(165, 181, 210, 0.14));
  overflow: hidden;
  background: #080b0f;
  box-shadow: 0 12px 40px rgba(8, 14, 24, 0.28);
}

.polaris-releases-card .polaris-horizon {
  min-height: 580px;
  width: 100%;
  margin: 0;
  border-radius: 0;
}

.polaris-horizon {
  --ph-bg: #080b0f;
  --ph-fg: #f5f5f1;
  --ph-muted: #b5bdc4;
  --ph-meta: #9aa5ae;
  --ph-font: "Satoshi", system-ui, -apple-system, sans-serif;
  --ph-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  position: relative;
  overflow: hidden;
  min-height: 670px;
  padding: 3.125rem 6% 2.75rem;
  background: var(--ph-bg);
  color: var(--ph-fg);
  text-align: center;
  font-family: var(--ph-font);
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}

/* Clear fixed marketing header on the one-pager */
.polaris-horizon--under-nav {
  padding-top: calc(3.125rem + var(--alt-header-h, 4rem));
  min-height: calc(670px + var(--alt-header-h, 4rem));
}

.polaris-horizon-inner {
  position: relative;
  z-index: 2;
  max-width: 920px;
  margin: 0 auto;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.polaris-horizon-eyebrow {
  margin: 0;
  font-family: var(--ph-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #aab5bd;
}

.polaris-horizon-model {
  margin: 2.75rem 0 0;
  font-family: var(--ph-mono);
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  color: #aab5bd;
}

.polaris-horizon-title {
  margin: 0.8rem 0 1.35rem;
  font-family: var(--ph-font);
  font-weight: 500;
  font-size: clamp(4.5rem, 12vw, 10rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
  color: var(--ph-fg);
}

.polaris-horizon-title .polaris-i {
  position: relative;
  display: inline-block;
}

.polaris-horizon-title .polaris-light {
  position: absolute;
  left: calc(50% + 0.022em);
  top: 0.2em;
  width: 0.055em;
  height: 0.055em;
  transform: translateX(-50%);
  border-radius: 50%;
  background: #fffefa;
  box-shadow:
    0 0 0.025em 0.018em #fff,
    0 0 0.075em 0.035em #f0f7ffeb,
    0 0 0.17em 0.075em #d3e7ff8c,
    0 0 0.36em 0.13em #accfff35;
  isolation: isolate;
  filter: brightness(var(--star-brightness, 1));
  transform: translateX(-50%) scale(var(--star-scale, 1));
  will-change: transform, filter;
}

.polaris-horizon-title .polaris-light::before,
.polaris-horizon-title .polaris-light::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.polaris-horizon-title .polaris-light::before {
  height: 0.66em;
  width: 0.012em;
  background: linear-gradient(
    transparent 0%,
    #b5d6ff15 12%,
    #d9ebff85 35%,
    #fff 47%,
    #fff 53%,
    #d9ebff85 65%,
    #b5d6ff15 88%,
    transparent 100%
  );
  filter: drop-shadow(0 0 2px #d7eaff90);
}

.polaris-horizon-title .polaris-light::after {
  height: 0.009em;
  width: 0.53em;
  background: linear-gradient(
    90deg,
    transparent,
    #c2dfff55 25%,
    #fff 47%,
    #fff 53%,
    #c2dfff55 75%,
    transparent
  );
  filter: drop-shadow(0 0 2px #d7eaff80);
}

.polaris-horizon-title .star-bloom {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1.25em;
  height: 1.25em;
  transform: translate(-50%, -50%) scale(var(--bloom-scale, 1));
  border-radius: 50%;
  background: radial-gradient(
    circle,
    #fffefa90 0%,
    #e6f2ff65 4%,
    #cce4ff30 11%,
    #accfff13 24%,
    #87b3fa08 39%,
    transparent 65%
  );
  pointer-events: none;
  z-index: -1;
  opacity: var(--bloom-alpha, 1);
}

.polaris-horizon-title .star-diagonal {
  position: absolute;
  inset: 0;
  transform: rotate(45deg);
  opacity: 0.65;
}

.polaris-horizon-title .star-diagonal::before,
.polaris-horizon-title .star-diagonal::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 1px;
  height: 0.32em;
  background: linear-gradient(transparent, #dfefff90 35%, #fff 50%, #dfefff90 65%, transparent);
}

.polaris-horizon-title .star-diagonal::after {
  width: 0.32em;
  height: 1px;
  background: linear-gradient(90deg, transparent, #dfefff90 35%, #fff 50%, #dfefff90 65%, transparent);
}

.polaris-horizon-tagline {
  margin: 0 auto 1.5rem;
  max-width: 28rem;
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  font-weight: 400;
  line-height: 1.5;
  color: var(--ph-muted);
}

/* Match marketing .alt-btn.alt-hero-cta (dark-surface primary) */
.polaris-horizon .alt-btn.alt-hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  width: auto;
  height: 2.75rem;
  margin-top: 0.35rem;
  padding: 0 1.35rem;
  gap: 0.45rem;
  border-radius: var(--alt-btn-radius, 9999px);
  border: 1px solid rgba(255, 255, 255, 0.38);
  background: rgba(255, 255, 255, 0.92);
  color: #0c0c0c;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0;
  text-decoration: none;
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.28);
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.polaris-horizon .alt-btn.alt-hero-cta:hover {
  background: #ffffff;
  border-color: rgba(255, 255, 255, 0.55);
  color: #0c0c0c;
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.28);
  opacity: 1;
  transform: none;
}

.polaris-horizon .alt-btn.alt-hero-cta:active {
  transform: scale(0.97);
}

.polaris-horizon-foot {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 1.25rem;
  /* Match GPT Horizon: foot sits just above the planet arc */
  margin-top: auto;
  padding-top: 1.25rem;
  padding-bottom: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  font-family: var(--ph-mono);
  font-size: 0.625rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ph-meta);
  text-align: left;
  flex-shrink: 0;
}

.polaris-horizon-foot span:last-child {
  text-align: right;
}

.polaris-horizon-art {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

/* Exact GPT Horizon + polaris-motion.js treatment */
.polaris-horizon-glow {
  position: absolute;
  inset: -40px 0;
  background: radial-gradient(
    ellipse 50% 20% at 50% 102%,
    #fff 0,
    #adbac7 12%,
    #586677 25%,
    #1e2836 45%,
    transparent 75%
  );
  transform: translateY(var(--horizon-y, 0px));
  opacity: var(--horizon-alpha, 1);
  will-change: transform;
}

.polaris-horizon-rim {
  position: absolute;
  left: -10%;
  right: -10%;
  height: 200px;
  bottom: -165px;
  border: 1px solid #cbd9eaaa;
  border-radius: 50%;
  box-shadow: 0 -8px 40px #a5bcd72b;
  transform: translateY(var(--rim-y, 0px));
}

.polaris-horizon-stars {
  position: absolute;
  inset: 0;
}

.polaris-horizon-stars span {
  position: absolute;
  border-radius: 50%;
  background: #d7e5f2;
  box-shadow: 0 0 2px 0.4px #e1efff80, 0 0 7px 1px #a9ccff28;
  animation: polaris-stellar-scintillation var(--twinkle-time, 7s) ease-in-out infinite;
  animation-delay: var(--twinkle-delay, 0s);
}

@keyframes polaris-stellar-scintillation {
  0%,
  100% {
    opacity: var(--star-low, 0.1);
    transform: scale(0.85);
  }
  24% {
    opacity: var(--star-mid, 0.3);
    transform: scale(1);
  }
  39% {
    opacity: var(--star-high, 0.5);
    transform: scale(1.12);
  }
  45% {
    opacity: var(--star-mid, 0.3);
    transform: scale(0.96);
  }
  52% {
    opacity: var(--star-high, 0.5);
    transform: scale(1.08);
  }
  70% {
    opacity: var(--star-low, 0.1);
    transform: scale(0.88);
  }
  84% {
    opacity: var(--star-mid, 0.3);
    transform: scale(1);
  }
}

.polaris-horizon-grain {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.14;
  mix-blend-mode: screen;
  pointer-events: none;
}

.polaris-horizon.motion-paused .polaris-horizon-stars span {
  animation-play-state: paused;
}

@media (prefers-reduced-motion: reduce) {
  .polaris-horizon-stars span {
    animation: none !important;
  }
  .polaris-horizon-glow,
  .polaris-horizon-rim {
    transform: none !important;
  }
  .polaris-horizon-title .polaris-light {
    filter: none !important;
    transform: translateX(-50%) !important;
  }
  .polaris-horizon-title .star-bloom {
    transform: translate(-50%, -50%) !important;
  }
}

@media (max-width: 700px) {
  .polaris-releases-card .polaris-horizon {
    min-height: 540px;
    padding: 2.25rem 7% 2rem;
  }

  .polaris-horizon {
    min-height: 620px;
    padding: 2.5rem 7% 2.25rem;
  }
  .polaris-horizon-title {
    letter-spacing: -0.04em;
  }
  .polaris-horizon-foot {
    font-size: 0.5625rem;
    line-height: 1.55;
  }
}

/* One-pager long-form below hero */
.polaris-doc {
  --pd-fg: #171919;
  --pd-muted: #5e6460;
  --pd-border: #d8dcda;
  --pd-bg: #fff;
  font-family: "Satoshi", system-ui, -apple-system, sans-serif;
  color: var(--pd-fg);
  background: var(--pd-bg);
  -webkit-font-smoothing: antialiased;
}

.polaris-doc-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem 6%;
  border-bottom: 1px solid var(--pd-border);
  font-size: 0.875rem;
}

.polaris-doc-nav a {
  color: inherit;
  text-decoration: none;
  font-weight: 500;
}

.polaris-doc-nav a:hover {
  opacity: 0.7;
}

.polaris-doc-brand {
  font-weight: 600;
  letter-spacing: -0.03em;
  font-size: 1.125rem;
}

.polaris-doc-main {
  max-width: 42rem;
  margin: 0 auto;
  padding: 4rem 1.5rem 6rem;
}

.polaris-doc-main .eyebrow {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #656b67;
  margin: 0 0 0.75rem;
}

.polaris-doc-main h2 {
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  margin: 0 0 1.25rem;
  line-height: 1.2;
}

.polaris-doc-main h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 2.5rem 0 0.75rem;
}

.polaris-doc-main p {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--pd-muted);
  margin: 0 0 1.15rem;
}

.polaris-doc-main section {
  margin-bottom: 4rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--pd-border);
}

.polaris-doc-main section:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.polaris-doc-examples {
  max-width: min(56rem, 100%);
}

.polaris-example-figure {
  margin: 1.5rem 0 0;
  padding: 0;
}

.polaris-example-terminal {
  border: 1px solid var(--pd-border);
  border-radius: 12px;
  overflow: hidden;
  background: transparent;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.08);
}

html[data-theme="dark"] .polaris-example-terminal {
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
}

.polaris-example-chart {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: top;
}

/* Example chart chrome — light defaults, dark overrides */
.polaris-example-chart .pex-bg {
  fill: #f4f5f4;
}

.polaris-example-chart .pex-grid {
  stroke: #e2e6e3;
  stroke-width: 1;
}

.polaris-example-chart .pex-axis {
  fill: #6b7280;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10px;
}

.polaris-example-chart .pex-title {
  fill: #171919;
  font-family: Satoshi, system-ui, sans-serif;
  font-size: 13px;
  font-weight: 600;
}

.polaris-example-chart .pex-sub {
  fill: #6b7280;
  font-family: Satoshi, system-ui, sans-serif;
  font-size: 12px;
}

.polaris-example-chart .pex-guide {
  stroke: #c5cac7;
  stroke-width: 1;
}

.polaris-example-chart .pex-guide-label {
  fill: #8a918c;
  font-family: Satoshi, system-ui, sans-serif;
  font-size: 10px;
}

.polaris-example-chart .pex-card {
  fill: rgba(255, 255, 255, 0.92);
  stroke: #d8dcda;
  stroke-width: 1;
}

.polaris-example-chart .pex-card-muted {
  fill: #6b7280;
}

.polaris-example-chart .pex-card-fg {
  fill: #171919;
}

.polaris-example-chart .pex-dot-hole {
  fill: #f4f5f4;
}

html[data-theme="dark"] .polaris-example-chart .pex-bg {
  fill: #0c0c0c;
}

html[data-theme="dark"] .polaris-example-chart .pex-grid {
  stroke: #1a1a1a;
}

html[data-theme="dark"] .polaris-example-chart .pex-axis {
  fill: #929aa5;
}

html[data-theme="dark"] .polaris-example-chart .pex-title {
  fill: #f8f8f8;
}

html[data-theme="dark"] .polaris-example-chart .pex-sub {
  fill: #6b7280;
}

html[data-theme="dark"] .polaris-example-chart .pex-guide {
  stroke: #333;
}

html[data-theme="dark"] .polaris-example-chart .pex-guide-label {
  fill: #737373;
}

html[data-theme="dark"] .polaris-example-chart .pex-card {
  fill: rgba(16, 16, 16, 0.92);
  stroke: #2c2c2c;
}

html[data-theme="dark"] .polaris-example-chart .pex-card-muted {
  fill: #6b7280;
}

html[data-theme="dark"] .polaris-example-chart .pex-card-fg {
  fill: #e5e5e5;
}

html[data-theme="dark"] .polaris-example-chart .pex-dot-hole {
  fill: #0c0c0c;
}

.polaris-example-figure figcaption {
  margin-top: 0.85rem;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--pd-muted);
}

.polaris-example-figure figcaption a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.polaris-doc-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  margin: 2rem 0 0;
  padding: 1.25rem 0 0;
  border-top: 1px solid var(--pd-border);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: #656b67;
}

.polaris-doc-toc a {
  color: inherit;
  text-decoration: none;
}

.polaris-doc-toc a:hover {
  color: var(--pd-fg);
}

.polaris-doc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  margin: 1.25rem 0 1.75rem;
}

.polaris-doc-table th,
.polaris-doc-table td {
  text-align: left;
  padding: 0.65rem 0.5rem;
  border-bottom: 1px solid var(--pd-border);
  color: var(--pd-muted);
}

.polaris-doc-table th {
  font-weight: 600;
  color: var(--pd-fg);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.polaris-doc-note {
  font-size: 0.875rem;
  color: #7a807c;
  font-style: italic;
}

.polaris-doc-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.polaris-doc-cta-row a {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.15rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
}

.polaris-doc-cta-row a.primary {
  background: #171919;
  color: #fff;
}

.polaris-doc-cta-row a.ghost {
  border: 1px solid var(--pd-border);
  color: var(--pd-fg);
}

.polaris-doc-code {
  display: block;
  overflow-x: auto;
  padding: 1rem 1.1rem;
  margin: 1rem 0 1.5rem;
  background: #0f1216;
  color: #d7dde3;
  border-radius: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.75rem;
  line-height: 1.55;
}

/* One-pager under marketing nav: keep doc bg, don’t inherit altitude page bg */
body.landing-altitude.polaris-doc {
  background: var(--pd-bg, #fff);
  color: var(--pd-fg, #171919);
}

html[data-theme="dark"] .polaris-doc {
  --pd-fg: #f2f4f5;
  --pd-muted: #a8b0b6;
  --pd-border: #2a3036;
  --pd-bg: #0c0e11;
}

html[data-theme="dark"] body.landing-altitude.polaris-doc {
  background: var(--pd-bg);
  color: var(--pd-fg);
}

html[data-theme="dark"] .polaris-doc-cta-row a.primary {
  background: #f5f5f1;
  color: #101317;
}
