/* ==========================================================================
   PixHaste — core design system
   Palette is taken straight from the logo: violet #7c3aed, pink #f43f9e,
   ink #111827. The store runs dark by default because the only art we own is
   publisher cover art, and a dark ground lets that art carry the page.
   ========================================================================== */

:root {
  /* Brand */
  --ph-violet: #7c3aed;
  --ph-violet-400: #9a6bf5;
  --ph-violet-600: #6a2fd4;
  --ph-pink: #f43f9e;
  --ph-pink-400: #f767b4;
  --ph-pink-600: #d92a85;

  /* Ink scale, built up from the logo's #111827 */
  --ph-bg: #080b14;
  --ph-bg-2: #0d1220;
  --ph-surface: #111827;
  --ph-surface-2: #161f33;
  --ph-surface-3: #1d2740;
  --ph-line: rgba(255, 255, 255, .09);
  --ph-line-2: rgba(255, 255, 255, .15);

  /* Text */
  --ph-text: #eef1f8;
  --ph-text-2: #a8b2c7;
  --ph-text-3: #6f7b93;

  /* Status */
  --ph-success: #22c55e;
  --ph-warning: #f5a524;
  --ph-danger: #ef4444;

  /* Gradients */
  --ph-grad: linear-gradient(135deg, var(--ph-violet) 0%, var(--ph-pink) 100%);
  --ph-grad-soft: linear-gradient(135deg, rgba(124, 58, 237, .16) 0%, rgba(244, 63, 158, .16) 100%);

  /* Shape */
  --ph-r-sm: 8px;
  --ph-r: 14px;
  --ph-r-lg: 20px;
  --ph-r-xl: 28px;

  /* Elevation */
  --ph-shadow: 0 4px 24px rgba(0, 0, 0, .35);
  --ph-shadow-lg: 0 18px 50px rgba(0, 0, 0, .5);
  --ph-glow: 0 0 0 1px rgba(124, 58, 237, .4), 0 12px 40px rgba(124, 58, 237, .28);

  /* Layout */
  --ph-container: 1280px;
  --ph-gutter: 24px;
  --ph-header-h: 72px;

  /* Type */
  --ph-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ph-font-display: "Outfit", var(--ph-font);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ph-bg);
  color: var(--ph-text);
  font-family: var(--ph-font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }

h1, h2, h3, h4, h5 {
  font-family: var(--ph-font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.02em;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2rem, 4.5vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.35rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }
p { margin: 0 0 1em; }

::selection { background: var(--ph-violet); color: #fff; }

:focus-visible {
  outline: 2px solid var(--ph-pink);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Scrollbar — keep it in-theme rather than a bright OS default on dark. */
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--ph-bg-2); }
::-webkit-scrollbar-thumb { background: var(--ph-surface-3); border-radius: 99px; border: 3px solid var(--ph-bg-2); }
::-webkit-scrollbar-thumb:hover { background: var(--ph-violet-600); }

/* -------------------------------------------------------------- layout -- */
.ph-container {
  width: 100%;
  max-width: var(--ph-container);
  margin-inline: auto;
  padding-inline: var(--ph-gutter);
}
.ph-section { padding-block: clamp(48px, 7vw, 88px); }
.ph-section--tight { padding-block: clamp(32px, 4vw, 52px); }

.ph-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;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--ph-violet); color: #fff; padding: 12px 20px; border-radius: 0 0 var(--ph-r-sm) 0;
}
.skip-link:focus { left: 0; }

/* -------------------------------------------------- section furniture --- */
.ph-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ph-pink-400); margin-bottom: 14px;
}
.ph-eyebrow::before {
  content: ""; width: 22px; height: 2px; border-radius: 2px; background: var(--ph-grad);
}

.ph-section-head { margin-bottom: 36px; }
.ph-section-head--center { text-align: center; max-width: 720px; margin-inline: auto; }
.ph-section-head--center .ph-eyebrow::before { display: none; }
.ph-section-head p { color: var(--ph-text-2); margin: 0; font-size: 1.05rem; }

.ph-section-head--split {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}

.ph-grad-text {
  background: var(--ph-grad);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}

/* ------------------------------------------------------------- buttons -- */
.ph-btn {
  --btn-bg: var(--ph-surface-2);
  --btn-fg: var(--ph-text);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 26px; border-radius: 99px; border: 1px solid var(--ph-line-2);
  background: var(--btn-bg); color: var(--btn-fg);
  font-weight: 600; font-size: .95rem; cursor: pointer;
  transition: transform .18s ease, box-shadow .25s ease, background .25s ease, border-color .25s ease;
  text-align: center; white-space: nowrap;
}
.ph-btn:hover { transform: translateY(-2px); }
.ph-btn:active { transform: translateY(0); }

.ph-btn--primary {
  border-color: transparent;
  background: var(--ph-grad);
  color: #fff;
  box-shadow: 0 6px 22px rgba(124, 58, 237, .38);
}
.ph-btn--primary:hover { box-shadow: 0 12px 34px rgba(244, 63, 158, .42); }

.ph-btn--ghost { background: rgba(255, 255, 255, .04); }
.ph-btn--ghost:hover { background: rgba(255, 255, 255, .09); border-color: var(--ph-violet-400); }

.ph-btn--lg { padding: 16px 34px; font-size: 1.02rem; }
.ph-btn--sm { padding: 9px 18px; font-size: .85rem; }
.ph-btn--block { display: flex; width: 100%; }

/* --------------------------------------------------------------- cards -- */
.ph-card {
  background: linear-gradient(180deg, var(--ph-surface) 0%, var(--ph-bg-2) 100%);
  border: 1px solid var(--ph-line);
  border-radius: var(--ph-r-lg);
  overflow: hidden;
}

/* --------------------------------------------------------------- chips -- */
.ph-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: 99px;
  background: rgba(255, 255, 255, .06); border: 1px solid var(--ph-line);
  font-size: .76rem; font-weight: 600; color: var(--ph-text-2);
  white-space: nowrap;
}
.ph-chip--violet { background: rgba(124, 58, 237, .16); border-color: rgba(124, 58, 237, .4); color: #c4a9fb; }
.ph-chip--pink { background: rgba(244, 63, 158, .14); border-color: rgba(244, 63, 158, .4); color: #f9a3ce; }
.ph-chip--success { background: rgba(34, 197, 94, .14); border-color: rgba(34, 197, 94, .38); color: #6ee7a0; }
.ph-chip svg { width: 13px; height: 13px; }

/* ================================================== store notice banner == */
/* The store is a showcase right now: nothing is fulfilled. This bar is the
   first thing on the page so a visiting company cannot miss it. */
.ph-notice-bar {
  position: relative; z-index: 60;
  background: var(--ph-grad);
  color: #fff;
  font-size: .86rem; font-weight: 600;
  text-align: center;
}
.ph-notice-bar__inner {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 9px var(--ph-gutter); flex-wrap: wrap;
}
.ph-notice-bar svg { width: 16px; height: 16px; flex: none; }
.ph-notice-bar strong { font-weight: 800; }
.ph-notice-bar__sep { opacity: .5; }

/* ======================================================== site header === */
.ph-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(8, 11, 20, .72);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--ph-line);
  transition: background .3s ease, border-color .3s ease;
}
.ph-header.is-stuck { background: rgba(8, 11, 20, .94); box-shadow: 0 8px 30px rgba(0, 0, 0, .45); }

.ph-header__inner {
  display: flex; align-items: center; gap: 22px;
  min-height: var(--ph-header-h);
}

.ph-logo { display: flex; align-items: center; gap: 10px; flex: none; }
.ph-logo img, .ph-logo svg { height: 34px; width: auto; }
.ph-logo__mark { height: 34px; width: 34px; }
.ph-logo__word {
  font-family: var(--ph-font-display); font-weight: 800; font-size: 1.3rem;
  letter-spacing: -.03em; color: var(--ph-text);
}
.ph-logo__word em { font-style: normal; background: var(--ph-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Primary nav */
.ph-nav { flex: 1; }
.ph-nav ul { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.ph-nav li { position: relative; }
.ph-nav a {
  display: block; padding: 9px 14px; border-radius: 99px;
  font-size: .92rem; font-weight: 500; color: var(--ph-text-2);
  white-space: nowrap;
  transition: color .2s ease, background .2s ease;
}
.ph-nav a:hover, .ph-nav .current-menu-item > a, .ph-nav .current_page_item > a {
  color: var(--ph-text); background: rgba(255, 255, 255, .06);
}

/* Dropdowns */
.ph-nav ul ul {
  position: absolute; top: calc(100% + 10px); left: 0; z-index: 20;
  display: block; min-width: 220px; padding: 8px;
  background: var(--ph-surface); border: 1px solid var(--ph-line-2);
  border-radius: var(--ph-r); box-shadow: var(--ph-shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s;
}
.ph-nav li:hover > ul, .ph-nav li:focus-within > ul { opacity: 1; visibility: visible; transform: translateY(0); }
.ph-nav ul ul li { width: 100%; }
.ph-nav ul ul a { border-radius: var(--ph-r-sm); padding: 9px 12px; }

/* Header actions */
.ph-header__actions { display: flex; align-items: center; gap: 8px; flex: none; }

.ph-icon-btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--ph-line); background: rgba(255, 255, 255, .04);
  color: var(--ph-text-2); cursor: pointer;
  transition: color .2s ease, background .2s ease, border-color .2s ease, transform .2s ease;
}
.ph-icon-btn:hover { color: #fff; background: rgba(255, 255, 255, .1); border-color: var(--ph-violet-400); transform: translateY(-2px); }
.ph-icon-btn svg { width: 19px; height: 19px; }

.ph-cart-count {
  position: absolute; top: -3px; right: -3px;
  min-width: 19px; height: 19px; padding: 0 5px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 99px; background: var(--ph-pink); color: #fff;
  font-size: .68rem; font-weight: 800; line-height: 1;
  border: 2px solid var(--ph-bg);
}

/* Header search */
.ph-header__search { flex: 1; max-width: 420px; }
.ph-search-form { position: relative; display: flex; }
.ph-search-form input[type="search"], .ph-search-form input[type="text"] {
  width: 100%; padding: 11px 44px 11px 18px;
  border-radius: 99px; border: 1px solid var(--ph-line-2);
  background: rgba(255, 255, 255, .05); color: var(--ph-text);
  font-size: .9rem; transition: border-color .2s ease, background .2s ease;
}
.ph-search-form input::placeholder { color: var(--ph-text-3); }
.ph-search-form input:focus { outline: none; border-color: var(--ph-violet); background: rgba(255, 255, 255, .08); }
.ph-search-form button {
  position: absolute; right: 5px; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; border: 0; border-radius: 50%;
  background: var(--ph-grad); color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.ph-search-form button svg { width: 16px; height: 16px; }

/* Mobile toggle */
.ph-burger { display: none; }

/* Mobile drawer */
.ph-drawer {
  position: fixed; inset: 0; z-index: 100;
  visibility: hidden; pointer-events: none;
}
.ph-drawer.is-open { visibility: visible; pointer-events: auto; }
.ph-drawer__scrim {
  position: absolute; inset: 0; background: rgba(0, 0, 0, .65);
  opacity: 0; transition: opacity .3s ease;
  backdrop-filter: blur(3px);
}
.ph-drawer.is-open .ph-drawer__scrim { opacity: 1; }
.ph-drawer__panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(86vw, 340px);
  background: var(--ph-bg-2); border-left: 1px solid var(--ph-line-2);
  padding: 20px; overflow-y: auto;
  transform: translateX(100%); transition: transform .32s cubic-bezier(.4, 0, .2, 1);
  display: flex; flex-direction: column; gap: 18px;
}
.ph-drawer.is-open .ph-drawer__panel { transform: translateX(0); }
.ph-drawer__head { display: flex; align-items: center; justify-content: space-between; }
.ph-drawer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.ph-drawer > .ph-drawer__panel > ul > li > a { font-size: 1.05rem; font-weight: 600; }
.ph-drawer a {
  display: block; padding: 11px 14px; border-radius: var(--ph-r-sm);
  color: var(--ph-text-2); transition: background .2s ease, color .2s ease;
}
.ph-drawer a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.ph-drawer ul ul { padding-left: 12px; border-left: 1px solid var(--ph-line); margin-left: 12px; }
.ph-drawer ul ul a { font-size: .9rem; }

body.ph-no-scroll { overflow: hidden; }

@media (max-width: 1023px) {
  .ph-nav, .ph-header__search { display: none; }
  .ph-burger { display: inline-flex; }
  .ph-header__inner { justify-content: space-between; }
}

/* ======================================================== site footer === */
.ph-footer {
  position: relative;
  margin-top: clamp(48px, 7vw, 90px);
  background: linear-gradient(180deg, var(--ph-bg-2) 0%, #05070d 100%);
  border-top: 1px solid var(--ph-line);
}
.ph-footer::before {
  content: ""; position: absolute; top: -1px; left: 50%; transform: translateX(-50%);
  width: min(560px, 80%); height: 1px;
  background: linear-gradient(90deg, transparent, var(--ph-violet), var(--ph-pink), transparent);
}

.ph-footer__top { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 40px; padding-block: 56px 44px; }
.ph-footer__brand p { color: var(--ph-text-2); font-size: .92rem; max-width: 34ch; }
.ph-footer__brand .ph-logo { margin-bottom: 16px; }

.ph-footer h4 {
  font-size: .8rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ph-text); margin-bottom: 16px; font-family: var(--ph-font);
}
.ph-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.ph-footer ul a { color: var(--ph-text-2); font-size: .91rem; transition: color .2s ease, padding-left .2s ease; }
.ph-footer ul a:hover { color: var(--ph-pink-400); padding-left: 4px; }

.ph-footer__address {
  font-style: normal; color: var(--ph-text-2); font-size: .88rem; line-height: 1.75;
}
.ph-footer__address a { color: var(--ph-violet-400); }
.ph-footer__address a:hover { color: var(--ph-pink-400); }

.ph-footer__bottom {
  border-top: 1px solid var(--ph-line);
  padding-block: 22px;
  display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  color: var(--ph-text-3); font-size: .84rem;
}
.ph-footer__legal-links { display: flex; gap: 18px; flex-wrap: wrap; }
.ph-footer__legal-links a { color: var(--ph-text-3); }
.ph-footer__legal-links a:hover { color: var(--ph-text); }

/* Trademark / non-affiliation line — required by the legal set. */
.ph-footer__disclaimer {
  padding-bottom: 26px; color: var(--ph-text-3); font-size: .78rem; line-height: 1.7; max-width: 100ch;
}

@media (max-width: 900px) {
  .ph-footer__top { grid-template-columns: 1fr 1fr; gap: 32px; }
  .ph-footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .ph-footer__top { grid-template-columns: 1fr; }
  .ph-footer__bottom { flex-direction: column; align-items: flex-start; }
}

/* ========================================================= page shell === */
.ph-page-hero {
  position: relative;
  padding-block: clamp(40px, 6vw, 72px) clamp(28px, 4vw, 44px);
  border-bottom: 1px solid var(--ph-line);
  background:
    radial-gradient(900px 340px at 15% -10%, rgba(124, 58, 237, .28), transparent 65%),
    radial-gradient(700px 300px at 85% 0%, rgba(244, 63, 158, .2), transparent 65%),
    var(--ph-bg-2);
  overflow: hidden;
}
.ph-page-hero h1 { margin-bottom: 10px; }
.ph-page-hero p { color: var(--ph-text-2); margin: 0; max-width: 68ch; }

.ph-breadcrumb {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: .82rem; color: var(--ph-text-3); margin-bottom: 16px;
}
.ph-breadcrumb a { color: var(--ph-text-2); }
.ph-breadcrumb a:hover { color: var(--ph-pink-400); }
.ph-breadcrumb .sep { opacity: .5; }

/* -------------------------------------------------------- prose/legal -- */
.ph-prose { color: var(--ph-text-2); font-size: 1rem; line-height: 1.78; max-width: 78ch; }
.ph-prose h2 {
  color: var(--ph-text); margin-top: 2.1em; margin-bottom: .55em;
  font-size: clamp(1.35rem, 2.2vw, 1.75rem); scroll-margin-top: 100px;
}
.ph-prose h2:first-child { margin-top: 0; }
.ph-prose h3 { color: var(--ph-text); margin-top: 1.7em; margin-bottom: .45em; font-size: 1.12rem; }
.ph-prose a { color: var(--ph-violet-400); text-decoration: underline; text-underline-offset: 3px; }
.ph-prose a:hover { color: var(--ph-pink-400); }
.ph-prose ul, .ph-prose ol { padding-left: 1.3em; margin: 0 0 1.2em; }
.ph-prose li { margin-bottom: .55em; }
.ph-prose strong { color: var(--ph-text); font-weight: 650; }
.ph-prose hr { border: 0; border-top: 1px solid var(--ph-line); margin: 2.4em 0; }
.ph-prose blockquote {
  margin: 1.6em 0; padding: 16px 22px;
  border-left: 3px solid var(--ph-violet);
  background: var(--ph-grad-soft); border-radius: 0 var(--ph-r) var(--ph-r) 0;
  color: var(--ph-text-2);
}
.ph-prose table { width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: .92rem; }
.ph-prose th, .ph-prose td { padding: 11px 14px; border: 1px solid var(--ph-line); text-align: left; }
.ph-prose th { background: var(--ph-surface); color: var(--ph-text); font-weight: 650; }

/* Legal layout with sticky table of contents */
.ph-legal { display: grid; grid-template-columns: 250px 1fr; gap: 56px; align-items: start; }
.ph-legal__toc { position: sticky; top: calc(var(--ph-header-h) + 24px); }
.ph-legal__toc h4 {
  font-size: .74rem; letter-spacing: .13em; text-transform: uppercase;
  color: var(--ph-text-3); margin-bottom: 12px;
}
.ph-legal__toc ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.ph-legal__toc a {
  display: block; padding: 7px 12px; border-radius: var(--ph-r-sm);
  font-size: .85rem; color: var(--ph-text-2); border-left: 2px solid transparent;
  transition: all .2s ease;
}
.ph-legal__toc a:hover, .ph-legal__toc a.is-active {
  color: var(--ph-text); background: rgba(255, 255, 255, .05); border-left-color: var(--ph-pink);
}
.ph-legal__meta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: 99px; margin-bottom: 28px;
  background: var(--ph-grad-soft); border: 1px solid rgba(124, 58, 237, .32);
  font-size: .82rem; color: var(--ph-text-2);
}
@media (max-width: 900px) {
  .ph-legal { grid-template-columns: 1fr; gap: 28px; }
  .ph-legal__toc { position: static; }
  .ph-legal__toc ul { flex-direction: row; flex-wrap: wrap; }
}

/* ----------------------------------------------------------- reveal ----- */
/* Progressive enhancement: JS adds .is-in when the element scrolls into view.
   Without JS the element simply stays visible. */
.ph-js .ph-reveal {
  opacity: 0; transform: translateY(22px);
  transition: opacity .6s ease, transform .6s cubic-bezier(.4, 0, .2, 1);
}
.ph-js .ph-reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important; scroll-behavior: auto !important;
  }
  .ph-js .ph-reveal { opacity: 1; transform: none; }
}
