/*
Theme Name: personalhumanai
Theme URI: https://personalhuman.app
Author: Personal Human AI
Description: Dark, brand-matched landing theme for phAI Messenger.
Version: 1.0.0
Text Domain: personalhumanai
*/


@font-face {
  font-family: 'Nunito';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('assets/fonts/nunito-600.woff2') format('woff2');
}

:root {
  --phai-brand: linear-gradient(100deg, #3478F6 0%, #2563EB 100%);
  --phai-blue: linear-gradient(135deg, #3478F6 0%, #2563EB 100%);
  --phai-border: rgba(255, 255, 255, 0.09);
  --phai-card: #0F1424;
  --phai-radius: 20px;
  /* Violet is a background shimmer only — never text, never borders.
     Rule of thumb: you should feel it, not spot it. */
  --phai-violet: 124, 92, 255;
  --phai-bg: #070910;
}

html {
  scroll-behavior: smooth;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Hero image */
.phai-hero-banner img {
  border-radius: 22px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
  border: 1px solid var(--phai-border);
}

body {
  background-color: #070910;
  background-image:
    radial-gradient(900px 500px at 15% -5%, rgba(52, 120, 246, 0.14), transparent 60%),
    radial-gradient(circle at 78% 26%, rgba(var(--phai-violet), 0.10), transparent 38%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

/* Gradient text */
.phai-gradient-text {
  background: var(--phai-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* The template-part <header> wrapper is what actually sticks
   (the inner pill's parent is too short to stick within). */
header.wp-block-template-part {
  position: sticky;
  top: 0;
  z-index: 50;
}

/* Header — floating topbar (visual pill inside the sticky wrapper) */
.phai-header {
  position: relative;
  z-index: 50;
  width: min(1160px, calc(100% - 1.5rem));
  margin: 0.75rem auto 0;
  border: 1px solid var(--phai-border);
  border-radius: 18px;
  background: rgba(32, 37, 60, 0.72);
  backdrop-filter: blur(18px) saturate(140%);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

.phai-header img {
  display: block;
}

.phai-brandname {
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.05;
  font-size: 1.15rem;
}

/* Nav bar layout */
.phai-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: relative;
}

.phai-logo-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: #fff;
}

.phai-logo-link img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.phai-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.phai-nav a {
  color: var(--wp--preset--color--muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  white-space: nowrap;
  transition: color 0.15s ease, background 0.15s ease;
}

.phai-nav a:hover {
  color: #fff;
}

.phai-nav .phai-nav-cta {
  background: var(--phai-blue);
  color: #fff;
  padding: 0.55rem 1.4rem;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35);
}

.phai-nav .phai-nav-cta:hover {
  color: #fff;
  transform: translateY(-1px);
}

/* Hamburger (hidden on desktop) */
.phai-nav-toggle {
  display: none;
}

.phai-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--phai-border);
  cursor: pointer;
  flex: 0 0 auto;
}

.phai-burger span {
  display: block;
  width: 20px;
  height: 2px;
  margin: 0 auto;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

@media (max-width: 860px) {
  .phai-burger {
    display: flex;
  }

  .phai-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 14px);
    flex-direction: column;
    align-items: stretch;
    gap: 0.2rem;
    background: rgba(9, 10, 22, 0.98);
    backdrop-filter: blur(18px);
    border: 1px solid var(--phai-border);
    border-radius: 16px;
    padding: 0.5rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    z-index: 60;
  }

  .phai-nav-toggle:checked~.phai-nav {
    display: flex;
  }

  .phai-nav a {
    padding: 0.85rem 1rem;
    border-radius: 10px;
    font-size: 1rem;
  }

  .phai-nav a:hover {
    background: rgba(255, 255, 255, 0.06);
  }

  .phai-nav .phai-nav-cta {
    text-align: center;
    margin-top: 0.3rem;
    box-shadow: none;
  }

  .phai-nav-toggle:checked~.phai-burger span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .phai-nav-toggle:checked~.phai-burger span:nth-child(2) {
    opacity: 0;
  }

  .phai-nav-toggle:checked~.phai-burger span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
}

.phai-navlinks a {
  color: var(--wp--preset--color--muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.phai-navlinks a:hover {
  color: #fff;
}

/* Eyebrow pill */
.phai-eyebrow {
  display: inline-block;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  background: rgba(52, 120, 246, 0.12);
  border: 1px solid rgba(52, 120, 246, 0.35);
  font-size: 0.85rem;
  font-weight: 600;
  color: #9DC0FF;
}

/* Buttons */
.wp-block-button.phai-btn-primary .wp-block-button__link {
  background: var(--phai-blue);
  border-radius: 999px;
  padding: 0.95rem 2.3rem;
  font-weight: 700;
  color: #fff;
  box-shadow: 0 10px 34px rgba(37, 99, 235, 0.4);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.wp-block-button.phai-btn-primary .wp-block-button__link:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(37, 99, 235, 0.55);
}

.wp-block-button.phai-btn-ghost .wp-block-button__link {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--phai-border);
  color: #fff;
  border-radius: 999px;
  padding: 0.85rem 2rem;
  font-weight: 700;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.wp-block-button.phai-btn-ghost .wp-block-button__link:hover {
  border-color: rgba(52, 120, 246, 0.6);
  background: rgba(52, 120, 246, 0.08);
}

/* Feature cards */
.phai-card {
  background:
    radial-gradient(circle at 70% 30%, rgba(var(--phai-violet), 0.09), transparent 45%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015));
  border: 1px solid var(--phai-border);
  border-radius: var(--phai-radius);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35), 0 0 45px rgba(var(--phai-violet), 0.12);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  height: 100%;
}

.phai-card:hover {
  transform: translateY(-4px);
  border-color: rgba(52, 120, 246, 0.45);
}

.phai-card-icon {
  font-size: 1.7rem;
  line-height: 1;
  margin-bottom: 0.2rem;
}

/* Showcase gallery of store slides */
.phai-showcase {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0.5rem 1.5rem 1.5rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(52, 120, 246, 0.5) transparent;
}

.phai-showcase::-webkit-scrollbar {
  height: 8px;
}

.phai-showcase::-webkit-scrollbar-thumb {
  background: rgba(52, 120, 246, 0.5);
  border-radius: 999px;
}

.phai-showcase figure {
  flex: 0 0 auto;
  width: min(78vw, 300px);
  margin: 0;
  scroll-snap-align: center;
}

.phai-showcase img {
  width: 100%;
  height: auto;
  border-radius: 18px;
  border: 1px solid var(--phai-border);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  display: block;
}

/* Character chips */
.phai-companions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  justify-content: center;
}

.phai-chip {
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--phai-border);
  background: rgba(255, 255, 255, 0.03);
  font-weight: 600;
  font-size: 0.95rem;
}

.phai-chip span {
  color: var(--wp--preset--color--muted);
  font-weight: 400;
}

/* Steps */
.phai-step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.7rem;
  height: 2.7rem;
  border-radius: 999px;
  background: var(--phai-brand);
  color: #fff;
  font-weight: 800;
  font-size: 1.1rem;
  box-shadow: 0 8px 24px rgba(52, 120, 246, 0.4);
}

/* Privacy band */
.phai-privacy {
  background:
    radial-gradient(circle at 70% 30%, rgba(var(--phai-violet), 0.12), transparent 38%),
    #0B1020;
  border: 1px solid var(--phai-border);
  border-radius: 28px;
  box-shadow: 0 0 70px rgba(var(--phai-violet), 0.12);
}

/* FAQ */
.phai-faq details {
  background: var(--phai-card);
  border: 1px solid var(--phai-border);
  border-radius: 16px;
  padding: 1.1rem 1.4rem;
  margin-bottom: 0.9rem;
}

.phai-faq summary {
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.phai-faq summary::-webkit-details-marker {
  display: none;
}

.phai-faq summary::after {
  content: "+";
  float: right;
  color: #3478F6;
  font-weight: 700;
}

.phai-faq details[open] summary::after {
  content: "\2013";
}

/* Readable prose for legal / content pages */
.phai-prose {
  font-size: 1.05rem;
  line-height: 1.75;
  color: #C7CEDD;
}

.phai-prose h2 {
  font-size: 1.5rem;
  margin: 2.2rem 0 0.8rem;
}

.phai-prose h3 {
  font-size: 1.2rem;
  margin: 1.6rem 0 0.5rem;
}

.phai-prose p,
.phai-prose ul,
.phai-prose ol {
  margin: 0 0 1rem;
}

.phai-prose ul,
.phai-prose ol {
  padding-left: 1.3rem;
}

.phai-prose li {
  margin: 0.3rem 0;
}

.phai-prose a {
  color: var(--wp--preset--color--primary-bright);
}

.phai-prose strong {
  color: #fff;
}

.phai-prose hr {
  border: 0;
  border-top: 1px solid var(--phai-border);
  margin: 2rem 0;
}

/* Footer */
.phai-footer {
  border-top: 1px solid var(--phai-border);
}

.phai-footer a {
  color: var(--wp--preset--color--muted);
  text-decoration: none;
}

.phai-footer a:hover {
  color: #fff;
}

.phai-footer-cols {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.phai-footer-cols h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--wp--preset--color--muted);
  margin: 0 0 0.9rem;
  font-weight: 700;
}

.phai-footer-cols ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.phai-footer-cols li {
  margin: 0.5rem 0;
}

.phai-footer-cols a {
  font-size: 0.95rem;
}

.phai-footer-brand p {
  color: var(--wp--preset--color--muted);
  font-size: 0.92rem;
  margin: 0.6rem 0 0;
  max-width: 30ch;
}

.phai-footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  border-top: 1px solid var(--phai-border);
  padding-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--wp--preset--color--muted);
}

@media (max-width: 800px) {
  .phai-footer-cols {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
  }

  .phai-footer-brand {
    grid-column: 1 / -1;
  }
}

/* ===== First-visit intro splash ===== */
.phai-intro {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(600px 420px at 50% 45%, rgba(52, 120, 246, 0.16), transparent 70%),
    #070910;
  animation: phai-intro-out 0.55s ease 1.55s forwards;
}

.phai-intro img {
  width: 180px;
  height: 180px;
  object-fit: contain;
  filter: drop-shadow(0 16px 54px rgba(52, 120, 246, 0.6));
  transform-style: preserve-3d;
  backface-visibility: visible;
  animation: phai-intro-logo 1.4s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes phai-intro-logo {
  0% {
    transform: perspective(1000px) rotateY(-540deg) scale(0.55);
    opacity: 0;
  }

  70% {
    transform: perspective(1000px) rotateY(18deg) scale(1.06);
    opacity: 1;
  }

  100% {
    transform: perspective(1000px) rotateY(0deg) scale(1);
    opacity: 1;
  }
}

@keyframes phai-intro-out {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

/* Skip on repeat visits (class set from an inline <head> script) */
.phai-intro-done .phai-intro {
  display: none;
}

/* Respect reduced motion — no splash at all */
@media (prefers-reduced-motion: reduce) {
  .phai-intro {
    display: none;
  }
}

/* Extra breathing room between homepage sections */
.phai-anim>.wp-block-group+.wp-block-group {
  margin-top: 3.25rem;
}

/* ===== Rotating headline word (point 2) ===== */
.phai-rotator {
  display: inline-block;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.phai-rotator.is-out {
  opacity: 0;
  transform: translateY(-14px);
}

/* ===== Drifting aurora background (point 3) ===== */
.phai-aurora {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.phai-aurora span {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.42;
}

.phai-aurora span:nth-child(1) {
  width: 520px;
  height: 520px;
  background: rgba(52, 120, 246, 0.5);
  top: -9%;
  left: -6%;
  animation: aurora-a 24s ease-in-out infinite;
}

.phai-aurora span:nth-child(2) {
  width: 480px;
  height: 480px;
  background: rgba(var(--phai-violet), 0.26);
  top: -12%;
  right: -8%;
  animation: aurora-b 28s ease-in-out infinite;
}

.phai-aurora span:nth-child(3) {
  width: 460px;
  height: 460px;
  background: rgba(52, 120, 246, 0.42);
  top: 45%;
  left: 40%;
  animation: aurora-c 32s ease-in-out infinite;
}

@keyframes aurora-a {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  50% {
    transform: translate(70px, 50px) scale(1.15);
  }
}

@keyframes aurora-b {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  50% {
    transform: translate(-60px, 60px) scale(1.1);
  }
}

@keyframes aurora-c {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  50% {
    transform: translate(-50px, -40px) scale(1.2);
  }
}

/* ===== Cursor glow (point 4) ===== */
.phai-cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  pointer-events: none;
  z-index: -1;
  background: radial-gradient(circle, rgba(var(--phai-violet), 0.10), transparent 62%);
  will-change: transform;
}

/* ===== Micro-interactions (point 4) — animated page only ===== */
.phai-anim .phai-card {
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.phai-anim .phai-card:hover {
  transform: translateY(-6px);
  border-color: rgba(52, 120, 246, 0.55);
  box-shadow: 0 24px 60px rgba(52, 120, 246, 0.28);
}

.phai-anim .phai-community-card:hover {
  box-shadow: 0 22px 54px rgba(52, 120, 246, 0.3);
}

/* Button shine sweep */
.phai-anim .phai-hero-cta .primary,
.phai-anim .wp-block-button.phai-btn-primary .wp-block-button__link {
  position: relative;
  overflow: hidden;
}

.phai-anim .phai-hero-cta .primary::after,
.phai-anim .wp-block-button.phai-btn-primary .wp-block-button__link::after {
  content: "";
  position: absolute;
  top: 0;
  left: -130%;
  width: 55%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: skewX(-20deg);
  pointer-events: none;
}

.phai-anim .phai-hero-cta .primary:hover::after,
.phai-anim .wp-block-button.phai-btn-primary .wp-block-button__link:hover::after {
  animation: phai-shine 0.8s ease;
}

@keyframes phai-shine {
  to {
    left: 140%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .phai-aurora span {
    animation: none;
  }

  .phai-rotator {
    transition: none;
  }
}

/* ===== Animated hero chat ===== */
.phai-hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2.5rem;
  align-items: center;
}

.phai-hero-copy h1 {
  font-size: clamp(2.2rem, 4.5vw, 3.4rem) !important;
  font-weight: 800 !important;
  line-height: 1.1 !important;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
  color: #fff;
}

/* Stack the visible headline on top of an invisible copy that holds the
   longest rotating variant — the ghost sets the height, so the word can
   change without ever shifting the page. */
.phai-h1-rot {
  display: grid;
}

.phai-h1-rot>.phai-h1-line {
  grid-area: 1 / 1;
}

.phai-h1-ghost {
  visibility: hidden;
  pointer-events: none;
}

.phai-hero-sub {
  color: var(--wp--preset--color--muted);
  font-size: 1.15rem;
  line-height: 1.6;
  margin: 0 0 1.6rem;
  max-width: 46ch;
}

.phai-hero-cta {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.phai-hero-cta a {
  display: inline-block;
  padding: 0.9rem 2rem;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.phai-hero-cta .primary {
  background: var(--phai-blue);
  color: #fff;
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.4);
}

.phai-hero-cta .primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(37, 99, 235, 0.55);
}

.phai-hero-cta .ghost {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--phai-border);
  color: #fff;
}

.phai-hero-cta .ghost:hover {
  border-color: rgba(52, 120, 246, 0.6);
}

.phai-hero-platforms {
  color: var(--wp--preset--color--muted);
  font-size: 0.9rem;
  margin: 0;
}

.phai-chat {
  background:
    radial-gradient(circle at 70% 30%, rgba(var(--phai-violet), 0.12), transparent 38%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--phai-border);
  border-radius: 24px;
  padding: 1rem 1.1rem 1.2rem;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5), 0 0 70px rgba(var(--phai-violet), 0.12);
}

.phai-chat-head {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.2rem 0.3rem 0.9rem;
  border-bottom: 1px solid var(--phai-border);
  margin-bottom: 0.9rem;
}

.phai-chat-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  flex: 0 0 auto;
  box-shadow: 0 0 0 2px rgba(52, 120, 246, 0.35);
}

.phai-chat-head strong {
  display: block;
  font-size: 0.98rem;
  color: #fff;
  line-height: 1.1;
}

.phai-chat-status {
  font-size: 0.78rem;
  color: #4ade80;
}

.phai-chat-status::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4ade80;
  margin-right: 5px;
  vertical-align: middle;
}

.phai-chat-body {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  /* fixed height so the page below never shifts while messages animate in */
  height: 330px;
  overflow-y: auto;
  scrollbar-width: none;
  /* start at top so first message is always visible */
  justify-content: flex-start;
}

.phai-chat-body::-webkit-scrollbar {
  display: none;
}

.phai-msg {
  max-width: 80%;
  padding: 0.65rem 0.95rem;
  border-radius: 18px;
  font-size: 0.98rem;
  line-height: 1.42;
  animation: msg-pop 0.45s cubic-bezier(0.34, 1.4, 0.5, 1) both;
}

.phai-msg.them {
  align-self: flex-start;
  background: #181f34;
  color: #e8ecf5;
  border-bottom-left-radius: 6px;
}

.phai-msg.me {
  align-self: flex-end;
  background: linear-gradient(135deg, #3478F6, #6366F1);
  color: #fff;
  border-bottom-right-radius: 6px;
}

@keyframes msg-pop {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.96);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

.phai-typing {
  align-self: flex-start;
  background: #181f34;
  padding: 0.75rem 0.95rem;
  border-radius: 18px;
  border-bottom-left-radius: 6px;
  display: inline-flex;
  gap: 5px;
  animation: msg-pop 0.3s ease both;
}

.phai-typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #8a94ad;
  animation: typing-bounce 1.2s infinite;
}

.phai-typing span:nth-child(2) {
  animation-delay: 0.15s;
}

.phai-typing span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes typing-bounce {

  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.5;
  }

  30% {
    transform: translateY(-5px);
    opacity: 1;
  }
}

@media (max-width: 860px) {
  .phai-hero-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .phai-hero-copy {
    text-align: center;
  }

  .phai-hero-sub {
    margin-left: auto;
    margin-right: auto;
  }

  .phai-hero-cta {
    justify-content: center;
  }
}

/* Step headings ("Start in minutes"): slightly smaller and responsive, applied
   evenly to all four. No forced nowrap — the longest one ("Choose or create")
   fits on one line when there's room and wraps naturally when there isn't. */
#how .wp-block-column h3 {
  font-size: clamp(1.05rem, 1.35vw, 1.25rem);
  line-height: 1.15;
  white-space: normal;
  overflow-wrap: normal;
}

/* ===== Splash: Messenger vs. Presence split screen ===== */
.phai-splash {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-weight: 600;
  transition: grid-template-columns 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.phai-split-logo {
  display: block;
  width: clamp(96px, 7.5vw, 132px);
  height: clamp(96px, 7.5vw, 132px);
  object-fit: contain;
  margin: 0 auto 1.3rem;
  filter: drop-shadow(0 12px 34px rgba(0, 0, 0, 0.6));
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.phai-split:hover .phai-split-logo {
  transform: translateY(-5px) scale(1.06);
}

.phai-split {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 3rem 2rem 4.5rem;
  text-decoration: none;
  overflow: hidden;
  isolation: isolate;
}

/* the artwork */
.phai-split::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
  filter: brightness(0.82) saturate(0.95);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), filter 0.4s ease;
}

.phai-split.messenger::before {
  background-image: url('assets/split-messenger.jpg');
}

.phai-split.presence::before {
  background-image: url('assets/split-presence.jpg');
}

/* readability veil */
.phai-split::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(to top, rgba(4, 6, 14, 0.88) 0%, rgba(4, 6, 14, 0.35) 55%, rgba(4, 6, 14, 0.1) 100%);
  transition: background 0.4s ease;
}

.phai-split-inner {
  text-align: center;
  max-width: 26rem;
}

.phai-split-title {
  font-size: clamp(2.2rem, 3.6vw, 3.4rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: #fff;
  margin: 0 0 0.5rem;
}

.phai-split-sub {
  font-size: clamp(1rem, 1.25vw, 1.15rem);
  color: rgba(255, 255, 255, 0.72);
  margin: 0 0 1.7rem;
  transition: color 0.3s ease;
}

.phai-split-btn {
  display: inline-block;
  padding: 0.85rem 2rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
  color: #fff;
  font-weight: 600;
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

/* hover: chosen side brighter + a touch larger, the other one recedes */
.phai-splash:has(.messenger:hover) {
  grid-template-columns: 1.08fr 0.92fr;
}

.phai-splash:has(.presence:hover) {
  grid-template-columns: 0.92fr 1.08fr;
}

.phai-splash:hover .phai-split::before {
  filter: brightness(0.55) saturate(0.8);
}

.phai-splash:hover .phai-split::after {
  background: linear-gradient(to top, rgba(4, 6, 14, 0.9) 0%, rgba(4, 6, 14, 0.65) 100%);
}

.phai-split:hover::before {
  filter: brightness(1.05) saturate(1.05) !important;
  transform: scale(1.08);
}

.phai-split:hover::after {
  background: linear-gradient(to top, rgba(4, 6, 14, 0.8) 0%, rgba(4, 6, 14, 0.2) 60%, transparent 100%) !important;
}

.phai-split:hover .phai-split-sub {
  color: rgba(255, 255, 255, 0.95);
}

.phai-split:hover .phai-split-btn {
  background: var(--phai-blue);
  border-color: transparent;
  box-shadow: 0 12px 34px rgba(37, 99, 235, 0.5);
  transform: translateY(-2px);
}

@media (max-width: 860px) {
  .phai-splash {
    grid-template-columns: 1fr;
  }

  .phai-splash:has(.messenger:hover),
  .phai-splash:has(.presence:hover) {
    grid-template-columns: 1fr;
  }

  .phai-split {
    min-height: 55vh;
    padding: 2.5rem 1.5rem 3rem;
  }
}

@media (prefers-reduced-motion: reduce) {

  .phai-splash,
  .phai-split::before,
  .phai-split-btn {
    transition: none;
  }

  .phai-split:hover::before {
    transform: scale(1.02);
  }
}

/* ===== Pricing plans ===== */
.phai-plans {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 2rem;
  align-items: stretch;
}

.phai-plan {
  display: flex;
  flex-direction: column;
  padding: 2rem 1.3rem 1.6rem;
  border-radius: 20px;
  border: 1px solid var(--phai-border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  box-shadow: 0 0 40px rgba(var(--phai-violet), 0.10);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.phai-plan:hover {
  transform: translateY(-4px);
}

.phai-plan.featured {
  border-color: rgba(52, 120, 246, 0.55);
  box-shadow: 0 0 50px rgba(var(--phai-violet), 0.14);
}

.phai-plan h3 {
  font-size: 1.25rem;
  margin: 0 0 1rem;
  color: #fff;
  padding-top: 0;
}

.phai-plan ul {
  list-style: none;
  margin: 0 0 1.3rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  flex: 1;
  /* eats the free space so every badge sits flush at the bottom */
}

.phai-plan li {
  font-size: 0.94rem;
  line-height: 1.4;
  padding-left: 1.5rem;
  position: relative;
  color: #C7CEDD;
}

.phai-plan li.yes::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: #3478F6;
  font-weight: 700;
}

.phai-plan li.no {
  color: var(--wp--preset--color--muted);
  opacity: 0.6;
}

.phai-plan li.no::before {
  content: "\2715";
  position: absolute;
  left: 0;
  color: #64748B;
}

.phai-plan-badge {
  align-self: flex-start;
  margin: 0;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 0.45rem 1rem;
  border-radius: 999px;
  background: rgba(52, 120, 246, 0.15);
  border: 1px solid rgba(52, 120, 246, 0.4);
  color: #9DC0FF;
}

.phai-plan-badge.age {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--phai-border);
  color: #C7CEDD;
}

.phai-plans-note {
  text-align: center;
  color: var(--wp--preset--color--muted);
  font-size: 0.9rem;
  margin: 1.4rem 0 0;
}

@media (max-width: 1000px) {
  .phai-plans {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .phai-plans {
    grid-template-columns: 1fr;
  }
}

/* ===== Real app screenshots ===== */
.phai-shots {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0.5rem 1.5rem 1.5rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(52, 120, 246, 0.5) transparent;
}

.phai-shots::-webkit-scrollbar {
  height: 8px;
}

.phai-shots::-webkit-scrollbar-thumb {
  background: rgba(52, 120, 246, 0.5);
  border-radius: 999px;
}

.phai-shots figure {
  flex: 0 0 auto;
  width: min(64vw, 250px);
  margin: 0;
  scroll-snap-align: center;
  text-align: center;
}

.phai-shots img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 20px;
  border: 1px solid var(--phai-border);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), 0 0 45px rgba(var(--phai-violet), 0.12);
}

.phai-shots figcaption {
  margin-top: 0.9rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--wp--preset--color--muted);
}

/* ===== Companion cast cards ("Start instantly — or create your own") ===== */
.phai-cast {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}

.phai-cast-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.5rem;
  padding: 1.5rem 1rem;
  border-radius: 18px;
  border: 1px solid var(--phai-border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  text-decoration: none;
  box-shadow: 0 0 40px rgba(var(--phai-violet), 0.10);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.phai-cast-card:hover {
  transform: translateY(-4px);
  border-color: rgba(52, 120, 246, 0.5);
}

.phai-cast-avatar {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
  background: linear-gradient(135deg, var(--a, #2563EB), var(--b, #3478F6));
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), inset 0 0 0 2px rgba(255, 255, 255, 0.08);
}

.phai-cast-card strong {
  color: #fff;
  font-size: 1.05rem;
}

.phai-cast-card>span:last-child {
  color: var(--wp--preset--color--muted);
  font-size: 0.85rem;
  line-height: 1.3;
}

.phai-cast-card.create {
  border-style: dashed;
  background:
    radial-gradient(circle at 70% 30%, rgba(var(--phai-violet), 0.10), transparent 45%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  box-shadow: 0 0 60px rgba(var(--phai-violet), 0.10);
}

.phai-cast-plus {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  background: rgba(52, 120, 246, 0.15);
  border: 1px solid rgba(52, 120, 246, 0.4);
}

@media (max-width: 900px) {
  .phai-cast {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 600px) {
  .phai-cast {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ===== "Real conversations" example cards ===== */
.phai-convos {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0.5rem 1.5rem 1.5rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(52, 120, 246, 0.5) transparent;
}

.phai-convos::-webkit-scrollbar {
  height: 8px;
}

.phai-convos::-webkit-scrollbar-thumb {
  background: rgba(52, 120, 246, 0.5);
  border-radius: 999px;
}

.phai-convo-card {
  flex: 0 0 auto;
  width: min(86vw, 360px);
  scroll-snap-align: center;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  border: 1px solid var(--phai-border);
  border-radius: 22px;
  padding: 1.3rem 1.3rem 1.4rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), 0 0 40px rgba(var(--phai-violet), 0.10);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.phai-anim .phai-convo-card:hover {
  transform: translateY(-4px);
  border-color: rgba(52, 120, 246, 0.5);
}

.phai-convo-title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0 0 0.15rem;
  color: #fff;
}

.phai-convo-sub {
  font-size: 0.85rem;
  color: var(--wp--preset--color--muted);
  margin: 0 0 1rem;
}

.phai-convo-chat {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.phai-convo-chat .phai-msg {
  animation: none;
  opacity: 1;
  max-width: 88%;
  font-size: 0.95rem;
}

.phai-convo-day {
  align-self: center;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--wp--preset--color--muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  margin: 0.25rem 0;
}

.phai-convos-hint {
  display: none;
}

@media (max-width: 860px) {
  .phai-convos-hint {
    display: block;
  }

  .phai-convo-card {
    width: 86vw;
  }
}

/* ===== Community platform cards ===== */
.phai-community-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1rem;
  margin: 1.6rem 0 2rem;
}

.phai-community-card {
  display: block;
  padding: 1.5rem;
  border-radius: 18px;
  border: 1px solid var(--phai-border);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015));
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.phai-community-card:hover {
  transform: translateY(-4px);
  border-color: rgba(52, 120, 246, 0.5);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.4);
}

.phai-community-card.primary {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 1.4rem;
  background:
    radial-gradient(500px 200px at 0% 0%, rgba(88, 101, 242, 0.25), transparent 70%),
    linear-gradient(180deg, rgba(88, 101, 242, 0.14), rgba(88, 101, 242, 0.04));
  border-color: rgba(88, 101, 242, 0.45);
}

.phai-cc-badge {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 1.5rem;
  flex: 0 0 auto;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
}

.phai-cc-badge svg {
  width: 30px;
  height: 30px;
  fill: #fff;
}

.phai-community-card h3 {
  margin: 0 0 0.25rem;
  font-size: 1.15rem;
  color: #fff;
}

.phai-community-card p {
  margin: 0;
  color: var(--wp--preset--color--muted);
  font-size: 0.95rem;
}

.phai-community-card.primary .phai-cc-body {
  flex: 1;
}

.phai-cc-cta {
  display: inline-block;
  margin-top: 0.2rem;
  padding: 0.6rem 1.4rem;
  border-radius: 999px;
  background: #5865F2;
  color: #fff !important;
  font-weight: 700;
  font-size: 0.95rem;
  white-space: nowrap;
}

@media (max-width: 800px) {
  .phai-community-cards {
    grid-template-columns: 1fr;
  }

  .phai-community-card.primary {
    flex-direction: column;
    text-align: center;
  }
}

/* Join-the-community band on the landing pages */
.phai-join {
  background:
    radial-gradient(600px 260px at 50% 0%, rgba(88, 101, 242, 0.18), transparent 70%),
    #0B1020;
  border: 1px solid var(--phai-border);
  border-radius: 28px;
  text-align: center;
}

.phai-join-links {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 1.4rem;
}

.phai-join-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  border: 1px solid var(--phai-border);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.phai-join-links a:hover {
  transform: translateY(-2px);
  border-color: rgba(52, 120, 246, 0.6);
}

.phai-join-links a.discord {
  background: #5865F2;
  border-color: #5865F2;
}

.phai-join-links svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* Store badge buttons row */
.phai-badges {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* ============================================================
   Scroll reveal animations (only active on the /animated page,
   since these classes exist only there)
   ============================================================ */
/* Hidden state only applies when JS is active (class set in <head>),
   so no-JS visitors always see the content. */
.js-reveal .reveal {
  opacity: 0;
  transform: translateY(70px);
  filter: blur(10px);
  transition: opacity 0.6s ease,
    transform 0.9s cubic-bezier(0.34, 1.4, 0.5, 1),
    filter 0.6s ease;
  will-change: opacity, transform, filter;
}

.js-reveal .reveal.reveal-left {
  transform: translateX(-120px) translateY(20px);
}

.js-reveal .reveal.reveal-right {
  transform: translateX(120px) translateY(20px);
}

.js-reveal .reveal.reveal-zoom {
  transform: scale(0.78);
}

.js-reveal .reveal.is-visible {
  opacity: 1;
  transform: none;
  filter: blur(0);
}

/* Stronger stagger for feature cards across the 3 columns */
.js-reveal .wp-block-column:nth-child(2) .reveal {
  transition-delay: 0.15s;
}

.js-reveal .wp-block-column:nth-child(3) .reveal {
  transition-delay: 0.3s;
}

/* Floating hero on the animated page */
.phai-anim .phai-hero-banner img {
  animation: phai-float 6s ease-in-out infinite;
}

@keyframes phai-float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-18px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .phai-anim .phai-hero-banner img {
    animation: none;
  }
}

/* App store badges (placeholder) */
.phai-store {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.phai-store.center {
  justify-content: center;
}

.phai-store a {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 1.3rem;
  border-radius: 14px;
  background: #000;
  border: 1px solid var(--phai-border);
  color: #fff;
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.phai-store a:hover {
  border-color: rgba(52, 120, 246, 0.6);
  transform: translateY(-2px);
}

.phai-store .badge-icon {
  font-size: 1.6rem;
  line-height: 1;
}

.phai-store .badge-top {
  display: block;
  font-size: 0.65rem;
  color: var(--phai-muted, #9AA6C0);
  letter-spacing: 0.04em;
}

.phai-store .badge-main {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.1;
}

/* Alternating feature rows */
.phai-rows {
  display: flex;
  flex-direction: column;
  gap: 3.5rem;
}

.phai-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
}

.phai-row .phai-row-media img,
.phai-row .phai-row-media svg {
  width: 100%;
  height: auto;
  border-radius: 20px;
  display: block;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45), 0 0 70px rgba(var(--phai-violet), 0.12);
}

.phai-row.reverse .phai-row-media {
  order: 2;
}

.phai-row.reverse .phai-row-text {
  order: 1;
}

.phai-row-text h3 {
  font-size: 2.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 1rem;
}

.phai-row-text p {
  color: #9AA6C0;
  margin: 0 0 1.2rem;
  font-size: 1.1rem;
  line-height: 1.65;
}

.phai-plan-note {
  font-size: 0.92rem;
  color: var(--wp--preset--color--muted);
  margin: 0.6rem 0 0;
}

.phai-plan-note strong {
  color: #fff;
  font-weight: 700;
}

.phai-style-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.phai-style-tags span {
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--phai-border);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.9rem;
  font-weight: 600;
}

@media (max-width: 800px) {
  .phai-row {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .phai-row.reverse .phai-row-media {
    order: 0;
  }

  .phai-row.reverse .phai-row-text {
    order: 0;
  }

  .phai-row-text h3 {
    font-size: 1.6rem;
  }
}

/* ======================================================
   PHP template extras (replaces wp:columns block layout)
   ====================================================== */

/* White text globally — !important needed to override WP global-styles-inline-css from theme.json */
body {
  color: #ffffff !important;
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: #ffffff;
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  font-weight: 800;
}

p,
label,
div,
span,
summary {
  color: #ffffff;
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* WordPress Block Columns Layout (replaces Gutenberg block-library css for classic PHP template) */
.wp-block-columns {
  display: flex;
  box-sizing: border-box;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.wp-block-columns+.wp-block-columns {
  margin-top: 1.25rem;
}

@media (min-width: 782px) {
  .wp-block-columns {
    flex-wrap: nowrap;
  }
}

.wp-block-column {
  flex-grow: 1;
  flex-basis: 0;
  flex-shrink: 1;
  min-width: 0;
  word-break: break-word;
  overflow-wrap: break-word;
}

@media (max-width: 781px) {
  .wp-block-column {
    flex-basis: 100%;
  }
}

/* Feature cards grid (3 columns, matching source wp:columns 3-col layout) */
.phai-features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 2.5rem;
}

@media (max-width: 860px) {
  .phai-features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .phai-features-grid {
    grid-template-columns: 1fr;
  }
}

/* How it works steps grid (4 columns, matching source wp:columns 4-col layout) */
.phai-steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 2.5rem;
}

.phai-step-col {
  display: flex;
  flex-direction: column;
  align-items: center;
}

@media (max-width: 860px) {
  .phai-steps-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .phai-steps-grid {
    grid-template-columns: 1fr;
  }
}

/* Sticky header for classic PHP template (no block-template-part wrapper) */
header.phai-header {
  position: sticky;
  top: 0;
  z-index: 50;
  /* Override relative positioning from block theme rule */
  position: sticky !important;
}

/* Section container max-widths (replaces Gutenberg contentSize per section) */
.phai-container-1200 {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.phai-container-1120 {
  max-width: 1120px;
  margin-left: auto;
  margin-right: auto;
}

.phai-container-1100 {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

.phai-container-1040 {
  max-width: 1040px;
  margin-left: auto;
  margin-right: auto;
}

.phai-container-860 {
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
}

.phai-container-760 {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.phai-container-720 {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.phai-container-720 {
  max-width: 100%;
}

/* Constrain main layout */
main.phai-anim {
  max-width: 1200px;
  width: min(1200px, calc(100% - 3rem));
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}