:root {
  --ph-font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ph-font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --ph-ink: #0a0f1f;
  --ph-ink-soft: #3f4d6b;
  --ph-line: rgba(99, 102, 241, 0.12);
  --ph-blue: #3b5bfd;
  --ph-blue-deep: #1d4ed8;
  --ph-violet: #7c3aed;
  --ph-fuchsia: #c026d3;
  --ph-cyan: #06b6d4;
  --ph-amber: #f59e0b;
  --ph-sun: #fcd34d;
  --ph-coral: #fb7185;
  --ph-gradient-brand: linear-gradient(135deg, #3b5bfd 0%, #7c3aed 45%, #db2777 100%);
  --ph-gradient-cta: linear-gradient(120deg, #312e81 0%, #5b21b6 35%, #3b5bfd 70%, #0891b2 100%);
  /* Reserve space + anchor offset for floating pill navbar (taller than logo alone) */
  --ph-nav-h: 104px;
}

html {
  font-size: 15px;
  scroll-behavior: smooth;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
  box-shadow: 0 0 0 0.12rem #fff, 0 0 0 0.28rem rgba(124, 58, 237, 0.35);
}

html {
  position: relative;
  min-height: 100%;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* Home index: bright gridded canvas (pairs with wwwroot/css/home.css) */
body.ph-body.ph-body--surface-light {
  color: #0f172a;
  background-color: #f6f7f9;
  background-image:
    linear-gradient(rgba(15, 23, 42, 0.038) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, 0.038) 1px, transparent 1px);
  background-size: 40px 40px;
  animation: none;
}

body.ph-body.ph-body--surface-light::before,
body.ph-body.ph-body--surface-light::after {
  opacity: 0;
  animation: none !important;
}

body.ph-body {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  margin: 0;
  padding-top: var(--ph-nav-h);
  font-family: var(--ph-font);
  color: #dce3f0;
  background-color: #1e2a44;
  background-image:
    radial-gradient(110% 72% at 50% -8%, rgba(129, 140, 248, 0.28), transparent 58%),
    radial-gradient(92% 56% at 100% 32%, rgba(192, 132, 252, 0.16), transparent 52%),
    radial-gradient(82% 52% at 0% 58%, rgba(45, 212, 191, 0.16), transparent 50%),
    radial-gradient(96% 62% at 50% 100%, rgba(30, 41, 59, 0.28), transparent 54%),
    linear-gradient(185deg, #1a2740 0%, #243352 38%, #1f2d48 64%, #1c263c 100%);
  background-size: 100% 100%, 100% 100%, 100% 100%, 100% 100%, 400% 400%;
  animation: ph-body-bg-shift 28s ease-in-out infinite;
  -webkit-font-smoothing: antialiased;
}

/* Slow teal / indigo “aurora” over the base (reference-style depth) */
body.ph-body::before,
body.ph-body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

body.ph-body::before {
  background:
    radial-gradient(ellipse 85% 65% at 22% 42%, rgba(34, 211, 238, 0.22), transparent 58%),
    radial-gradient(ellipse 70% 55% at 88% 72%, rgba(56, 189, 248, 0.12), transparent 52%);
  animation: ph-body-aurora 20s ease-in-out infinite;
}

body.ph-body::after {
  background:
    radial-gradient(ellipse 60% 50% at 75% 18%, rgba(99, 102, 241, 0.18), transparent 50%),
    radial-gradient(ellipse 50% 40% at 10% 85%, rgba(20, 184, 166, 0.1), transparent 48%);
  animation: ph-body-aurora-alt 26s ease-in-out infinite;
  opacity: 0.9;
}

@media (prefers-reduced-motion: reduce) {
  body.ph-body {
    animation: none;
    background-size: 100% 100%, 100% 100%, 100% 100%, 100% 100%, 100% 100%;
  }

  body.ph-body::before,
  body.ph-body::after {
    animation: none;
  }
}

@keyframes ph-body-bg-shift {
  0%,
  100% {
    background-position: 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 30%;
  }
  50% {
    background-position: 0% 0%, 0% 0%, 0% 0%, 0% 0%, 100% 70%;
  }
}

@keyframes ph-body-aurora {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
    opacity: 1;
  }
  33% {
    transform: translate(3%, -2%) scale(1.05);
    opacity: 0.92;
  }
  66% {
    transform: translate(-2%, 2%) scale(1.02);
    opacity: 1;
  }
}

@keyframes ph-body-aurora-alt {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(-4%, 3%) scale(1.08);
  }
}

/* No flex-grow: avoids a tall empty band inside <main> above the footer */
.ph-main {
  flex: 0 1 auto;
  width: 100%;
  min-height: 0;
}

/* Inner pages on dark global background */
.ph-legal h1 {
  color: #f8fafc;
}

.ph-legal {
  color: #cbd5e1;
}

.ph-legal .text-secondary {
  color: #94a3b8 !important;
}

.ph-skip-link {
  position: absolute;
  left: 0.75rem;
  top: 0.5rem;
  z-index: 2000;
  padding: 0.5rem 1rem;
  background: #fff;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
  transform: translateY(-160%);
  transition: transform 0.2s ease;
}

.ph-skip-link:focus {
  transform: translateY(0);
}

/* ——— Header / Nav ——— */
.ph-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1030;
  pointer-events: none;
}

.ph-navbar {
  pointer-events: auto;
  margin: 12px auto 0;
  max-width: 1140px;
  padding: 10px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92) 0%, rgba(248, 250, 255, 0.88) 100%);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow:
    0 4px 24px rgba(59, 91, 253, 0.08),
    0 12px 40px rgba(15, 23, 42, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px) saturate(1.35);
  transition: box-shadow 0.25s ease, border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.ph-navbar.is-scrolled {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.97) 0%, rgba(243, 244, 255, 0.95) 100%);
  box-shadow:
    0 8px 32px rgba(124, 58, 237, 0.12),
    0 20px 50px rgba(15, 23, 42, 0.1);
  border-color: rgba(124, 58, 237, 0.18);
}

.ph-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  /* Must not inherit body’s light text — “Print Hub” stays readable on the glass pill */
  color: #0f172a !important;
}

.ph-brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: var(--ph-gradient-brand);
  box-shadow:
    0 12px 30px rgba(20, 91, 136, 0.42),
    0 4px 12px rgba(11, 47, 79, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
  font-size: 1.1rem;
}

.ph-brand-logo {
  width: 88%;
  height: 88%;
  object-fit: contain;
  object-position: center;
  border-radius: 0;
  transform: none;
  filter: none;
  position: relative;
  z-index: 2;
}

.ph-brand-mark::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.2) 0%, transparent 45%, rgba(11, 47, 79, 0.24) 100%);
  pointer-events: none;
}

.ph-brand-mark::after {
  content: "";
  position: absolute;
  inset: -36%;
  background: radial-gradient(circle at 20% 12%, rgba(154, 219, 243, 0.45), transparent 45%);
  pointer-events: none;
}

.ph-brand-mark-sm {
  width: 40px;
  height: 40px;
  font-size: 1rem;
  border-radius: 12px;
}

.ph-brand-mark-sm .ph-brand-logo {
  width: 88%;
  height: 88%;
  border-radius: 0;
}

.ph-brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.ph-brand-title {
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: #0d1b39;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
}

.ph-brand-tag {
  font-size: 0.72rem;
  font-weight: 600;
  color: #3d5e85;
}

.ph-nav-links .nav-link {
  color: var(--ph-ink-soft) !important;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.5rem 0.65rem !important;
  border-radius: 10px;
  transition: color 0.2s ease, background 0.2s ease;
}

.ph-nav-links .nav-link:hover,
.ph-nav-links .nav-link:focus {
  color: var(--ph-blue-deep) !important;
  background: linear-gradient(135deg, rgba(59, 91, 253, 0.12), rgba(124, 58, 237, 0.1));
}

.ph-nav-cta {
  margin-left: 0.5rem;
  padding-top: 0.35rem;
}

@media (min-width: 992px) {
  .ph-nav-cta {
    padding-top: 0;
    margin-left: 1rem;
  }
}

.ph-nav-toggle {
  border: none;
  padding: 0.35rem 0.55rem;
  border-radius: 12px;
  box-shadow: none !important;
}

.ph-nav-toggle:focus-visible {
  outline: 2px solid var(--ph-blue);
  outline-offset: 2px;
}

/* ——— Buttons (nav + pages without home.css) ——— */
.ph-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.65rem 1.2rem;
  font-weight: 800;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
  text-decoration: none !important;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease, background 0.22s ease, color 0.22s ease;
}

.ph-btn:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.45);
  outline-offset: 2px;
}

.ph-btn-primary {
  color: #fff !important;
  border: none;
  background: linear-gradient(115deg, #3b5bfd 0%, #6366f1 35%, #7c3aed 70%, #a855f7 100%);
  background-size: 180% 180%;
  box-shadow:
    0 12px 32px rgba(59, 91, 253, 0.42),
    0 4px 12px rgba(124, 58, 237, 0.25);
}

.ph-btn-primary:hover {
  color: #fff !important;
  transform: translateY(-2px);
  box-shadow:
    0 16px 40px rgba(99, 102, 241, 0.5),
    0 6px 16px rgba(192, 38, 211, 0.2);
  filter: brightness(1.05);
}

.ph-btn-outline {
  border: 1px solid rgba(15, 23, 42, 0.12);
  color: #0f172a !important;
  background: rgba(255, 255, 255, 0.9);
}

.ph-btn-outline:hover {
  transform: translateY(-2px);
  border-color: rgba(124, 58, 237, 0.35);
  color: #5b21b6 !important;
  background: linear-gradient(180deg, #fff 0%, #f5f3ff 100%);
}

.ph-btn-sm {
  padding: 10px 18px !important;
  font-size: 0.9rem;
  border-radius: 999px !important;
}

/* ——— Footer — slightly deeper than main canvas, still in same family ——— */
.ph-footer {
  flex-shrink: 0;
  width: 100%;
  background:
    radial-gradient(ellipse 100% 85% at 50% -5%, rgba(139, 92, 246, 0.28), transparent 48%),
    radial-gradient(ellipse 70% 55% at 100% 0%, rgba(192, 38, 211, 0.12), transparent 52%),
    radial-gradient(ellipse 55% 45% at 0% 100%, rgba(76, 29, 149, 0.22), transparent 55%),
    linear-gradient(180deg, #252042 0%, #1a1530 52%, #12101f 100%);
  color: rgba(248, 250, 252, 0.92);
  margin-top: 0;
  border-top: 1px solid rgba(167, 139, 250, 0.2);
}

.py-footer {
  padding-top: 3.25rem;
  padding-bottom: 1rem;
}

.ph-footer-brand {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.ph-footer-title {
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: -0.03em;
  color: #ffffff;
  display: block;
  margin-bottom: 0.35rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55), 0 0 1px rgba(0, 0, 0, 0.8);
}

.ph-footer-desc {
  color: rgba(226, 232, 240, 0.75);
  font-size: 0.95rem;
  margin: 0;
  max-width: 28ch;
}

.ph-footer-heading {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  color: rgba(148, 163, 184, 0.95);
  margin-bottom: 0.85rem;
}

.ph-footer-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ph-footer-list li {
  margin-bottom: 0.45rem;
}

.ph-footer-list a {
  color: rgba(248, 250, 252, 0.92) !important;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}

.ph-footer-list a:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.ph-social {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  display: flex;
  gap: 12px;
}

.ph-social a {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: transform 0.2s ease, background 0.2s ease;
}

.ph-social a:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.25), rgba(255, 255, 255, 0.14));
  border-color: rgba(251, 191, 36, 0.45);
  color: #fde68a;
}

.ph-footer-meta {
  font-size: 0.9rem;
  color: rgba(148, 163, 184, 0.95);
}

.ph-footer-meta a {
  color: #fbbf24;
  font-weight: 600;
  text-decoration: none;
}

.ph-footer-meta a:hover {
  text-decoration: underline;
}

.ph-footer-bottom {
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  padding: 1rem 0 1.35rem;
  font-size: 0.85rem;
  color: rgba(148, 163, 184, 0.9);
  text-align: center;
}

@media (max-width: 991px) {
  .ph-navbar {
    border-radius: 18px;
    max-width: calc(100% - 24px);
  }

  .ph-nav-cta {
    margin: 0.75rem 0 0.25rem;
  }

  .ph-nav-cta .btn {
    width: 100%;
  }
}

/* Home: align chrome with blue shade landing palette */
body.ph-body--surface-light .ph-brand-mark {
  background: linear-gradient(135deg, #2a7eb1 0%, #145b88 42%, #0b2f4f 78%, #ec4899 100%);
  box-shadow:
    0 10px 28px rgba(11, 47, 79, 0.4),
    0 4px 12px rgba(20, 91, 136, 0.24),
    0 0 0 1px rgba(236, 72, 153, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

body.ph-body--surface-light .ph-nav-links .nav-link:hover,
body.ph-body--surface-light .ph-nav-links .nav-link:focus {
  color: #145b88 !important;
  background: rgba(83, 181, 221, 0.14);
}

body.ph-body--surface-light .ph-btn-primary {
  background: linear-gradient(115deg, #0b2f4f 0%, #145b88 40%, #2a7eb1 72%, #ec4899 100%);
  background-size: 200% 200%;
  box-shadow:
    0 12px 32px rgba(11, 47, 79, 0.36),
    0 4px 12px rgba(20, 91, 136, 0.22);
}

body.ph-body--surface-light .ph-btn-primary:hover {
  box-shadow:
    0 16px 40px rgba(11, 47, 79, 0.42),
    0 6px 16px rgba(42, 126, 177, 0.22);
}
