:root {
  --ph-ink: #f4f8fc;
  --ph-muted: rgba(222, 233, 244, 0.72);
  --ph-faint: rgba(204, 222, 240, 0.46);
  --ph-bridge: rgba(201, 222, 240, 0.62);
  --ph-bg: #050b12;
  --ph-rule: rgba(191, 220, 246, 0.28);
  --ph-chrome-pad: calc(var(--aa-chrome-header-height, 150px) + env(safe-area-inset-top, 0px));
}

html[data-theme="light"] {
  --ph-ink: #0a0d12;
  --ph-muted: #2e3640;
  --ph-faint: rgba(46, 54, 64, 0.58);
  --ph-bridge: rgba(46, 54, 64, 0.72);
  --ph-bg: #ffffff;
  --ph-rule: rgba(46, 54, 64, 0.28);
}

html[data-theme="stellar"] {
  --ph-ink: #f4f8fc;
  --ph-muted: rgba(222, 233, 244, 0.72);
  --ph-faint: rgba(204, 222, 240, 0.46);
  --ph-bridge: rgba(201, 222, 240, 0.62);
  --ph-bg: #03070c;
  --ph-rule: rgba(191, 220, 246, 0.32);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html:has(body.ph-home) {
  height: 100%;
  overflow: hidden;
}

html,
body {
  margin: 0;
}

body.ph-home {
  height: 100svh;
  height: 100dvh;
  overflow: hidden;
  background: var(--ph-bg);
  color: var(--ph-ink);
}

body.ph-home .aa-chrome-header {
  position: fixed;
  inset: 0 auto auto 0;
  right: 0;
  z-index: 80;
}

body.ph-home .aa-chrome-header-spacer {
  display: none !important;
}

html[data-theme="light"] body.ph-home {
  background:
    radial-gradient(ellipse 120% 72% at 88% 0%, rgba(210, 234, 255, 0.52), transparent 58%),
    radial-gradient(ellipse 88% 56% at 6% 100%, rgba(228, 244, 255, 0.42), transparent 52%),
    linear-gradient(180deg, #ffffff 0%, #fbfdff 52%, #f4f9ff 100%);
}

html[data-theme="light"] body.ph-home .aa-chrome-header .glass-bar {
  background: linear-gradient(
    168deg,
    rgba(255, 255, 255, 0.98),
    rgba(247, 251, 255, 0.96) 48%,
    rgba(235, 245, 253, 0.94)
  );
  border-color: rgba(168, 196, 220, 0.48);
  box-shadow:
    0 14px 44px rgba(4, 16, 28, 0.08),
    inset 0 1px rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: blur(18px) saturate(112%);
  backdrop-filter: blur(18px) saturate(112%);
}

html[data-theme="stellar"] body.ph-home {
  background:
    radial-gradient(circle at 72% 18%, rgba(53, 92, 128, 0.14), transparent 32%),
    radial-gradient(circle at 8% 78%, rgba(43, 79, 112, 0.1), transparent 28%),
    linear-gradient(180deg, #03070c 0%, #07111c 54%, #081521 100%);
}

html[data-theme="dark"] body.ph-home {
  background:
    radial-gradient(circle at 70% 12%, rgba(48, 84, 118, 0.16), transparent 34%),
    linear-gradient(180deg, #050b12 0%, #07111c 54%, #081521 100%);
}

.ph-stage {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  height: 100svh;
  height: 100dvh;
  max-height: 100dvh;
  padding-top: calc(var(--ph-chrome-pad) + clamp(10px, 2.2vh, 20px));
  padding-left: max(var(--aa-chrome-rail-pad, 20px), env(safe-area-inset-left));
  padding-right: max(var(--aa-chrome-rail-pad, 20px), env(safe-area-inset-right));
  padding-bottom: max(72px, calc(env(safe-area-inset-bottom) + 56px));
  overflow: hidden;
}

.ph-composition {
  width: 100%;
  max-width: 46rem;
  margin: 0;
  padding-top: clamp(2px, 1.2vh, 12px);
}

.ph-company {
  margin: 0 0 clamp(14px, 2.4vh, 22px);
  color: var(--ph-faint);
  font-size: clamp(0.68rem, 1.5vw, 0.76rem);
  font-weight: 650;
  letter-spacing: 0.18em;
  line-height: 1.2;
  text-transform: uppercase;
}

.ph-headline {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", Arial, sans-serif;
  font-weight: 750;
  letter-spacing: -0.045em;
  line-height: 0.96;
  font-size: clamp(2.75rem, 9.2vw, 5.2rem);
  text-wrap: balance;
}

.ph-headline__line {
  display: block;
}

.ph-support {
  max-width: 42ch;
  margin: clamp(16px, 2.6vh, 28px) 0 0;
  color: var(--ph-muted);
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  font-weight: 400;
  line-height: 1.48;
  letter-spacing: -0.012em;
  text-wrap: pretty;
}

.ph-bridge {
  margin: clamp(18px, 3vh, 30px) 0 0;
  color: var(--ph-bridge);
  font-size: clamp(0.72rem, 1.6vw, 0.82rem);
  font-weight: 550;
  letter-spacing: -0.01em;
  line-height: 1.45;
}

.ph-depth {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-top: clamp(28px, 5vh, 48px);
  padding-top: clamp(16px, 2.4vh, 22px);
  border-top: 1px solid var(--ph-rule);
  max-width: 36rem;
}

.ph-depth__link {
  color: var(--ph-faint);
  font-size: clamp(0.78rem, 1.7vw, 0.88rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.3;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.ph-depth__link:hover,
.ph-depth__link:focus-visible {
  color: var(--ph-ink);
  border-bottom-color: currentColor;
}

.ph-depth__link:focus-visible {
  outline: 2px solid rgba(121, 189, 241, 0.55);
  outline-offset: 6px;
  border-radius: 2px;
}

.ph-depth__link--mission {
  color: var(--ph-muted);
}

.ph-legal {
  position: absolute;
  left: max(var(--aa-chrome-rail-pad, 20px), env(safe-area-inset-left));
  right: max(var(--aa-chrome-rail-pad, 20px), env(safe-area-inset-right));
  bottom: max(14px, env(safe-area-inset-bottom));
  margin: 0;
  color: var(--ph-faint);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
}

@media (max-width: 430px) {
  .ph-headline {
    font-size: clamp(2.45rem, 11.5vw, 3.2rem);
  }

  .ph-depth {
    flex-direction: column;
    gap: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ph-depth__link {
    transition: none;
  }
}
