/* Philosophy page — page-scoped; do not load on other site pages. */

@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/geist/geist-sans-400.woff2") format("woff2");
}

@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/geist/geist-sans-500.woff2") format("woff2");
}

@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/geist/geist-sans-600.woff2") format("woff2");
}

@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/geist/geist-mono-400.woff2") format("woff2");
}

@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/geist/geist-mono-500.woff2") format("woff2");
}

@font-face {
  font-family: "Geist Mono";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/geist/geist-mono-600.woff2") format("woff2");
}

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

body.ph {
  margin: 0;
  background: #fafafa;
  color: #1c1d1f;
  font-family: "Geist", system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.ph a {
  color: #1c1d1f;
  text-decoration: none;
}

.ph a:hover {
  color: #606168;
}

.ph-skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 8px 12px;
  background: #1c1d1f;
  color: #fff;
  font-size: 13px;
}

.ph .ph-skip:hover {
  color: #fff;
}

.ph-skip:focus {
  left: 12px;
  top: 12px;
}

.ph-page {
  min-height: 100vh;
  background: #fafafa;
}

/* -- Header -- */
.ph-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(250, 250, 250, 0.62);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.075);
}

.ph-header-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.ph-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: calc(-1 * min(36px, max(0px, (100vw - 1112px) / 2)));
}

.ph-back {
  display: grid;
  place-items: center;
  width: 28px;
  height: 30px;
  border-radius: 8px;
  color: #606168;
  transition: background 0.12s, color 0.12s, transform 0.12s;
}

.ph .ph-back:hover {
  background: #fff;
  color: #1c1d1f;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.075), 0 1px 2px rgba(0, 0, 0, 0.05);
  transform: translateX(-2px);
}

.ph-title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.ph-header-end {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 16px;
}

/* -- QR popover -- */
.ph-qr {
  position: relative;
}

.ph-qr-btn {
  appearance: none;
  background: transparent;
  border: 0;
  color: #606168;
  cursor: pointer;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 2px;
  height: 1.5em;
  border-radius: 5px;
  font: inherit;
  line-height: 1;
}

.ph-qr-btn:hover,
.ph-qr-btn[aria-expanded="true"] {
  color: #1c1d1f;
}

.ph-qr-btn svg {
  display: block;
}

.ph-qr-underline {
  position: absolute;
  left: 2px;
  right: 2px;
  bottom: -2px;
  height: 2px;
  background: #1c1d1f;
  border-radius: 3px;
  transform: scaleX(0);
  transform-origin: left center;
  opacity: 0;
  transition: opacity 130ms ease-in-out, transform 320ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.ph-qr-btn:hover .ph-qr-underline,
.ph-qr-btn[aria-expanded="true"] .ph-qr-underline {
  opacity: 1;
  transform: scaleX(1);
}

.ph-qr-pop {
  position: absolute;
  top: calc(100% + 12px);
  right: -8px;
  z-index: 42;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05), 0 16px 48px rgba(0, 0, 0, 0.12);
  padding: 1.6rem 1.7rem 1.5rem;
}

.ph-qr-pop[hidden] {
  display: none;
}

.ph-qr-pop::before {
  content: "";
  position: absolute;
  top: -0.7rem;
  right: calc(8px + 0.5rem);
  border: 0.7rem solid transparent;
  border-bottom-color: #fff;
}

.ph-qr-link {
  display: block;
}

.ph-qr-pop img {
  display: block;
  width: 10rem;
  height: 10rem;
  image-rendering: pixelated;
}

.ph-qr-close {
  display: none;
  appearance: none;
  background: transparent;
  border: 0;
  color: #9b9ca2;
  cursor: pointer;
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  padding: 0.4rem;
}

/* -- Main -- */
.ph-main {
  max-width: 1160px;
  margin: 0 auto;
  padding: 88px 24px 40px;
  display: flex;
  flex-direction: column;
  gap: 56px;
}

.ph-main:focus {
  outline: none;
}

.ph-main h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 52px);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.ph-article {
  max-width: 680px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.ph-article section {
  padding: 0 0 28px;
}

.ph-article p {
  margin: 0;
  font-size: 18px;
  line-height: 1.7;
  color: #33343a;
  text-wrap: pretty;
}

.ph-article section:last-child p {
  color: #1c1d1f;
}

/* -- Footer -- */
.ph-footer {
  max-width: 1160px;
  margin: 0 auto;
  padding: 100px 24px 40px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.ph-footer-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 24px;
  font-size: 13px;
  max-width: 520px;
  border-top: 1px solid rgba(0, 0, 0, 0.075);
  padding-top: 32px;
}

.ph-footer-col {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.ph-footer-col > span:first-child {
  font: 500 10.5px "Geist Mono", monospace;
  letter-spacing: 0.06em;
  color: #9b9ca2;
}

.ph-footer-col .is-soon {
  color: #9b9ca2;
  cursor: not-allowed;
}

.ph-copy {
  font: 11px "Geist Mono", monospace;
  color: #9b9ca2;
}

@media (prefers-reduced-motion: reduce) {
  .ph-back,
  .ph-qr-underline {
    transition: none;
  }
}

@media (max-width: 720px) {
  .ph-brand {
    margin-left: 0;
  }

  .ph-header-end {
    gap: 12px;
  }

  .ph-qr-pop {
    position: fixed;
    top: 5%;
    left: 15%;
    right: 15%;
    padding: 3rem;
  }

  .ph-qr-pop::before {
    display: none;
  }

  .ph-qr-close {
    display: block;
  }

  .ph-qr-pop img {
    width: 100%;
    height: auto;
    max-width: 14rem;
    margin: 0 auto;
  }

  .ph-main {
    padding-top: 64px;
  }

  .ph-footer {
    padding-top: 80px;
  }
}
