/* ==========================================================================
   Project pages: the shared parts of each project's landing page
   (projects/<slug>/). "pp" stands for project page.

   Builds on style.css (bar, blurred wallpaper, 0xProto, glass cards) and adds
   the hero, sections, colored-note cards, a note-file card, download tiles
   and a reading column for policies. Each page adds its own stylesheet for
   its showcase pieces, and can change the accent by overriding the --accent
   tokens on body.pp-page.
   ========================================================================== */

.pp-page {
  --accent: #ab92ff;                      /* text and lines */
  --accent-rgb: 124, 92, 235;             /* glows, hazes and hover fills */
  --accent-fill: #7c5ceb;                 /* fills under white text */
  --accent-fill-hover: #8a6cf2;
  --accent-line: rgba(171, 146, 255, 0.34);

  /* note colors, the same names and values as Note Pin's palette */
  --red: #e5484d;
  --orange: #f2832b;
  --yellow: #f2c94c;
  --green: #4caf6e;
  --blue: #3d8ef0;
  --purple: #9b6cf0;
  --gray: #8e8e93;
  --black: #3a3a3c;
  --white: #e8e8e8;
}
.c-red { --c: var(--red); }
.c-orange { --c: var(--orange); }
.c-yellow { --c: var(--yellow); }
.c-green { --c: var(--green); }
.c-blue { --c: var(--blue); }
.c-purple { --c: var(--purple); }
.c-gray { --c: var(--gray); }
.c-black { --c: var(--black); }
.c-white { --c: var(--white); }

.pp-page ::selection { background: rgba(var(--accent-rgb), 0.45); color: #fff; }
.pp-page :focus-visible { outline-color: var(--accent); }

.pp-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.pp-nowrap { white-space: nowrap; }

/* a haze of the accent over the wallpaper, behind the hero */
.pp-haze {
  position: absolute;
  inset: 0 0 auto;
  z-index: 0;
  height: 150vh;
  pointer-events: none;
  background:
    radial-gradient(40% 36% at 76% 32%, rgba(var(--accent-rgb), 0.28), transparent 72%),
    radial-gradient(34% 30% at 8% 4%, rgba(var(--accent-rgb), 0.12), transparent 72%);
}

.pp {
  position: relative;
  z-index: 1;
  max-width: calc(1180px + 2 * var(--pad));
  margin-inline: auto;
  padding: 104px var(--pad) 0;
}
.pp .sub__back { margin-bottom: 0; }

.pp-link {
  color: var(--glow);
  text-decoration-color: var(--accent-line);
  text-underline-offset: 3px;
  transition: color 0.2s, text-decoration-color 0.2s;
}
.pp-link[href]:hover { color: var(--accent); text-decoration-color: var(--accent); }

/* ==========================================================================
   Hero
   ========================================================================== */

.pp-hero {
  display: grid;
  gap: clamp(56px, 8vw, 96px);
  align-items: center;
  padding-block: clamp(40px, 7vh, 72px) clamp(80px, 13vh, 140px);
}
@media (min-width: 960px) {
  .pp-hero {
    grid-template-columns: minmax(0, 1.15fr) minmax(330px, 0.85fr);
    min-height: calc(100vh - 150px);
    min-height: calc(100svh - 150px);
  }
}

.pp-kind {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: var(--fs-xs);
  color: var(--fog);
}
.pp-kind img {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  box-shadow: 0 8px 22px -6px rgba(var(--accent-rgb), 0.7);
}
.pp-kind b { font-weight: 400; color: var(--accent); }

.pp-title {
  margin-top: 30px;
  font-size: clamp(3.25rem, 8.6vw, 7rem);
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.pp-tagline {
  max-width: 24ch;
  margin-top: 0.85em;
  font-size: clamp(1.25rem, 2.2vw, 1.75rem);
  line-height: 1.35;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.pp-hero .lede { max-width: 50ch; }

.pp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}
.pp-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(10, 18, 34, 0.45);
  font-size: var(--fs-s);
  color: var(--glow);
  text-decoration: none;
  transition: border-color 0.25s, background-color 0.25s;
}
.pp-btn:hover { border-color: var(--accent-line); background-color: rgba(var(--accent-rgb), 0.12); }
.pp-btn svg { width: 16px; height: 16px; transition: transform 0.3s var(--ease-out); }
.pp-btn--primary {
  border-color: transparent;
  background: var(--accent-fill);
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 12px 32px -10px rgba(var(--accent-rgb), 0.8);
}
.pp-btn--primary:hover { border-color: transparent; background-color: var(--accent-fill-hover); }
.pp-btn--primary:hover svg { transform: translateY(2px); }

.pp-facts { margin-top: 28px; }

/* the showcase beside the hero text, with an optional "try it" hint */
.pp-demo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.pp-hint { font-size: var(--fs-xs); color: var(--fog); text-align: center; }

/* ==========================================================================
   Sections
   ========================================================================== */

.pp-section {
  padding-block: clamp(72px, 12vh, 136px);
  border-top: 1px solid var(--line);
}
.pp-head {
  max-width: 46rem;
  margin-bottom: clamp(36px, 6vh, 64px);
}
.pp-kicker {
  margin-bottom: 14px;
  font-size: var(--fs-xs);
  color: var(--accent);
}
.pp-h2 {
  font-size: clamp(2rem, 4.4vw, 3.5rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.045em;
  text-wrap: balance;
}
.pp-aside {
  margin-top: 32px;
  font-size: var(--fs-xs);
  color: var(--fog);
}

/* --- features, drawn like colored notes ------------------------------------- */

.pp-notes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: clamp(12px, 1.4vw, 18px);
}
.pp-note {
  padding: 22px 22px 24px 24px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--c);
  border-radius: 18px;
  background: rgba(12, 19, 38, 0.62);
  background: linear-gradient(180deg, color-mix(in oklab, var(--c) 13%, rgba(16, 24, 46, 0.62)), rgba(8, 13, 26, 0.66));
  -webkit-backdrop-filter: blur(16px) saturate(130%);
  backdrop-filter: blur(16px) saturate(130%);
  transition: border-color 0.35s, transform 0.4s var(--ease-out);
}
.pp-note:hover {
  border-color: color-mix(in oklab, var(--c) 45%, transparent);
  border-left-color: var(--c);
  transform: translateY(-2px);
}
.pp-note__icon { display: block; width: 22px; height: 22px; color: var(--c); }
.pp-note__title {
  margin-top: 18px;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.02em;
}
.pp-note__meta { margin-top: 4px; font-size: var(--fs-xs); color: var(--accent); }
.pp-note__text {
  margin-top: 12px;
  font-size: var(--fs-s);
  line-height: 1.6;
  color: var(--fog);
}

/* --- two lists side by side -------------------------------------------------- */

.pp-split {
  display: grid;
  gap: 40px;
  margin-top: clamp(48px, 8vh, 80px);
}
@media (min-width: 760px) {
  .pp-split { grid-template-columns: 1fr 1fr; gap: 56px; }
}
.pp-list__title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-size: var(--fs-m);
  font-weight: 700;
  letter-spacing: -0.02em;
}
.pp-list__title svg { width: 20px; height: 20px; color: var(--accent); }
.pp-list li {
  position: relative;
  padding: 11px 0 11px 22px;
  border-top: 1px solid var(--line);
  font-size: var(--fs-s);
  line-height: 1.6;
  color: var(--fog);
}
/* each bullet is a note color, in palette order */
.pp-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: calc(11px + 0.55em);
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--orange);
}
.pp-list li:nth-child(5n + 2)::before { background: var(--yellow); }
.pp-list li:nth-child(5n + 3)::before { background: var(--green); }
.pp-list li:nth-child(5n + 4)::before { background: var(--blue); }
.pp-list li:nth-child(5n + 5)::before { background: var(--purple); }

/* --- points beside a card ------------------------------------------------------ */

.pp-private {
  display: grid;
  gap: clamp(40px, 6vw, 80px);
  align-items: start;
}
@media (min-width: 900px) {
  .pp-private { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
.pp-points li { padding: 18px 0 20px; border-top: 1px solid var(--line); }
.pp-points h3 { font-size: var(--fs-m); font-weight: 700; letter-spacing: -0.02em; }
.pp-points p {
  margin-top: 6px;
  font-size: var(--fs-s);
  line-height: 1.65;
  color: var(--fog);
}
.pp-points code { font: inherit; color: var(--accent); }

/* --- a note file, its strip in the color its own properties give it ----------- */

.pp-file {
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-left: 4px solid var(--c);
  border-radius: 18px;
  background: rgba(6, 10, 20, 0.72);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}
.pp-file__name {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  font-size: var(--fs-xs);
  color: var(--fog);
}
.pp-file__name svg { width: 16px; height: 16px; }
.pp-file pre {
  margin: 0;
  padding: 20px 22px 24px;
  overflow-x: auto;
  font: inherit;
  font-size: clamp(0.75rem, 1.15vw, 0.875rem);
  line-height: 1.8;
  color: var(--glow);
}
.pp-file pre:focus-visible { outline-offset: -4px; }
.pp-file .k { color: var(--accent); }
.pp-file .d { color: var(--fog); opacity: 0.6; }
.pp-file .t { color: var(--fog); }

/* --- get it ----------------------------------------------------------------- */

.pp-get {
  display: grid;
  gap: clamp(14px, 1.6vw, 22px);
}
@media (min-width: 880px) {
  .pp-get { grid-template-columns: 1fr 1fr; }
}
.pp-step {
  display: flex;
  flex-direction: column;
  padding: clamp(22px, 2.4vw, 32px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(22, 34, 64, 0.58), rgba(8, 13, 26, 0.66));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  -webkit-backdrop-filter: blur(16px) saturate(130%);
  backdrop-filter: blur(16px) saturate(130%);
}
.pp-step__num { font-size: var(--fs-xs); color: var(--accent); }
.pp-step__title {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
  font-size: clamp(1.375rem, 1.7vw, 1.625rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
}
.pp-tile {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 11px;
  border: 1px solid rgba(var(--accent-rgb), 0.45);
  background: radial-gradient(120% 120% at 25% 15%, rgba(var(--accent-rgb), 0.45), var(--navy) 72%);
}
.pp-tile img { width: 24px; height: 24px; }
.pp-tile--app { border: 0; box-shadow: 0 8px 22px -8px rgba(var(--accent-rgb), 0.7); }
.pp-step__text {
  margin-top: 14px;
  font-size: var(--fs-s);
  line-height: 1.65;
  color: var(--fog);
}
.pp-path { color: var(--glow); }

.pp-stores {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr));
  gap: 10px;
  margin-top: auto;
  padding-top: 28px;
}
.pp-store {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 64px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(4, 7, 14, 0.35);
  color: var(--glow);
  text-decoration: none;
  transition: border-color 0.25s, background-color 0.25s;
}
.pp-store > svg,
.pp-store > img { width: 22px; height: 22px; flex: none; color: var(--accent); }
.pp-store > img { border-radius: 6px; }
.pp-store__text { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.pp-store__name { font-size: var(--fs-s); }
.pp-store__sub,
.pp-store__soon { font-size: 0.75rem; color: var(--fog); }
.pp-store__soon { display: none; }
.pp-store > .pp-store__go {
  width: 16px;
  height: 16px;
  margin-left: auto;
  color: var(--fog);
  transition: transform 0.3s var(--ease-out), color 0.25s;
}
.pp-store[href]:hover { border-color: var(--accent-line); background-color: rgba(var(--accent-rgb), 0.12); }
.pp-store[href]:hover .pp-store__go { color: var(--glow); transform: translate(2px, -2px); }

/* No href yet: the store page doesn't exist, so the link is hidden.
   To publish a link, rename its data-href to href. To show unpublished
   links again as "Coming soon", delete the display: none rule below. */
.pp-store:not([href]) { display: none; }
.pp-store:not([href]) { border-style: dashed; cursor: default; }
.pp-store:not([href]) > svg,
.pp-store:not([href]) .pp-store__name { opacity: 0.55; }
.pp-store:not([href]) .pp-store__sub,
.pp-store:not([href]) .pp-store__go { display: none; }
.pp-store:not([href]) .pp-store__soon {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--accent);
}
.pp-store:not([href]) .pp-store__soon::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 10px currentColor;
}

.pp-support {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 32px;
  margin-top: clamp(28px, 4vh, 40px);
  font-size: var(--fs-s);
  color: var(--fog);
}
.pp-support a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 3px;
  font-size: clamp(1.0625rem, 1.5vw, 1.25rem);
  letter-spacing: -0.02em;
  color: var(--glow);
  text-decoration: none;
  background: linear-gradient(var(--accent), var(--accent)) 0 100% / 0 1px no-repeat;
  transition: background-size 0.4s var(--ease-out), color 0.2s;
}
.pp-support a svg { width: 20px; height: 20px; color: var(--accent); }
.pp-support a:hover,
.pp-support a:focus-visible { color: var(--accent); background-size: 100% 1px; }

.pp-foot {
  padding-block: 28px max(28px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
}

/* ==========================================================================
   Policy pages: one reading column
   ========================================================================== */

.pp-doc { max-width: calc(46rem + 2 * var(--pad)); }
.pp-doc__head { padding-block: clamp(40px, 7vh, 72px) clamp(32px, 5vh, 48px); }
.pp-doc__title {
  margin-top: 28px;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.045em;
}
.pp-doc__date { margin-top: 18px; font-size: var(--fs-xs); color: var(--fog); }

.pp-doc__short {
  padding: 22px 24px 24px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--c);
  border-radius: 18px;
  background: rgba(12, 19, 38, 0.62);
  background: linear-gradient(180deg, color-mix(in oklab, var(--c) 13%, rgba(16, 24, 46, 0.62)), rgba(8, 13, 26, 0.66));
  -webkit-backdrop-filter: blur(16px) saturate(130%);
  backdrop-filter: blur(16px) saturate(130%);
  font-size: var(--fs-m);
  line-height: 1.7;
}
.pp-doc__short .pp-kicker { margin-bottom: 8px; }

.pp-doc section { padding-top: clamp(36px, 6vh, 52px); }
.pp-doc h2 {
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.025em;
}
.pp-doc section p,
.pp-doc section li {
  font-size: var(--fs-s);
  line-height: 1.75;
  color: var(--fog);
}
.pp-doc section p { margin-top: 14px; }
.pp-doc section ul { margin-top: 14px; }
.pp-doc section li {
  position: relative;
  padding: 8px 0 8px 22px;
}
.pp-doc section li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: calc(8px + 0.6em);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}
.pp-doc strong { font-weight: 400; color: var(--glow); }
.pp-doc code { font: inherit; color: var(--accent); }
.pp-doc section a { color: var(--glow); text-decoration-color: var(--accent-line); text-underline-offset: 3px; }
.pp-doc section a:hover { color: var(--accent); text-decoration-color: var(--accent); }
.pp-doc .pp-foot { margin-top: clamp(56px, 10vh, 96px); }
