/* PF International LLC — site stylesheet
   ---------------------------------------------------------------------------
   Palette rule: the house is neutral. The only chroma on the page is borrowed
   from the products, and each color stays inside its own territory — ember
   (#F0691E) appears only in Pyreva's panels, indigo (#5B5BF0) only in Envoz's
   panels and in links. Nothing decorative is tinted.
   --------------------------------------------------------------------------- */

:root {
  --paper: #eeefea;
  --paper-2: #e6e7e1;
  --ink: #14161a;
  --ink-2: #565a63;
  --ink-3: #83878f;
  --rule: #d6d7d0;

  --ember: #f0691e;
  --indigo: #5b5bf0;

  --pyreva-bg: #0b0a12;
  --envoz-bg: #0a0a12;

  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "IBM Plex Sans", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --gutter: 2rem;
  --measure: 62ch;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--indigo);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--indigo);
  outline-offset: 3px;
}

/* ---------------------------------------------------------------- structure */

.wrap {
  max-width: 74rem;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 10;
  background: var(--ink);
  color: var(--paper);
  padding: 0.6rem 1rem;
}

/* The left rail carries mono labels; content sits in the wide column. On
   narrow screens the rail collapses to an inline eyebrow above the content. */
.rail {
  display: grid;
  grid-template-columns: 10rem 1fr;
  gap: 0 3rem;
  align-items: start;
}

.rail__label {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding-top: 0.5rem;
  line-height: 1.5;
}

.rail__body > *:first-child {
  margin-top: 0;
}

.rail__body > *:last-child {
  margin-bottom: 0;
}

/* ------------------------------------------------------------------- header */

.masthead {
  border-bottom: 1px solid var(--rule);
  position: sticky;
  top: 0;
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(8px);
  z-index: 5;
}

.masthead__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1rem;
  flex-wrap: wrap;
}

.logo {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.logo__mark {
  width: 1.375rem;
  height: 1.375rem;
  flex: none;
}

.nav {
  display: flex;
  gap: 1.5rem;
  font-size: 0.9375rem;
  flex-wrap: wrap;
}

.nav a {
  color: var(--ink-2);
  text-decoration: none;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--ink);
}

.nav a[aria-current="page"] {
  text-decoration: underline;
  text-underline-offset: 0.35em;
}

/* --------------------------------------------------------------------- type */

.eyebrow {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 1.25rem;
}

.display {
  font-family: var(--display);
  font-optical-sizing: auto;
  font-weight: 400;
  font-variation-settings: "SOFT" 20, "WONK" 1;
  line-height: 1.06;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
}

.display--xl {
  font-size: clamp(2.5rem, 6.2vw, 4.5rem);
}

.display--l {
  font-size: clamp(2rem, 4vw, 2.875rem);
}

.display--m {
  font-size: clamp(1.5rem, 2.6vw, 1.9rem);
  line-height: 1.15;
}

.lede {
  font-size: clamp(1.125rem, 1.6vw, 1.3125rem);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: var(--measure);
  margin: 1.75rem 0 0;
  text-wrap: pretty;
}

.prose {
  max-width: var(--measure);
}

.prose p {
  margin: 0 0 1.25rem;
  color: var(--ink-2);
  text-wrap: pretty;
}

.prose p strong {
  color: var(--ink);
  font-weight: 600;
}

.prose h3 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.25rem;
  margin: 2.5rem 0 0.75rem;
  color: var(--ink);
}

.prose ul {
  margin: 0 0 1.25rem;
  padding-left: 1.1rem;
  color: var(--ink-2);
}

.prose li {
  margin-bottom: 0.5rem;
}

/* ------------------------------------------------------------------ section */

.section {
  padding-block: clamp(3.5rem, 8vw, 6.5rem);
  border-top: 1px solid var(--rule);
}

.section--flush {
  border-top: 0;
}

.section--tint {
  background: var(--paper-2);
}

.hero {
  padding-block: clamp(4rem, 11vw, 8.5rem) clamp(3rem, 6vw, 4.5rem);
}

.hero__meta {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  margin: 2.5rem 0 0;
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

/* ------------------------------------------------------- the lit panels     */
/* The signature element: against bone paper, each product appears as a lit
   window in a quiet building, rendered in that product's own world. */

.panels {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
  gap: 1.5rem;
}

.panel {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 4px;
  overflow: hidden;
  color: #f2f2f8;
  text-decoration: none;
  isolation: isolate;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.panel:hover {
  transform: translateY(-3px);
  color: #f2f2f8;
}

.panel--pyreva {
  background: radial-gradient(120% 90% at 50% 8%, #241422 0%, var(--pyreva-bg) 62%);
  box-shadow: 0 1px 0 rgba(240, 105, 30, 0.22), 0 18px 46px -28px rgba(240, 105, 30, 0.5);
}

.panel--pyreva:hover {
  box-shadow: 0 1px 0 rgba(240, 105, 30, 0.4), 0 26px 60px -28px rgba(240, 105, 30, 0.62);
}

.panel--envoz {
  background: radial-gradient(120% 90% at 50% 8%, #1d1d3a 0%, var(--envoz-bg) 62%);
  box-shadow: 0 1px 0 rgba(91, 91, 240, 0.22), 0 18px 46px -28px rgba(91, 91, 240, 0.5);
}

.panel--envoz:hover {
  box-shadow: 0 1px 0 rgba(91, 91, 240, 0.4), 0 26px 60px -28px rgba(91, 91, 240, 0.62);
}

.panel__body {
  padding: 2.25rem 2rem 1.5rem;
}

.panel__kicker {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0 0 1rem;
}

.panel--pyreva .panel__kicker {
  color: var(--ember);
}

.panel--envoz .panel__kicker {
  color: #8f8ffb;
}

.panel__name {
  font-family: var(--display);
  font-weight: 500;
  font-size: 2rem;
  line-height: 1;
  margin: 0 0 0.5rem;
  color: #fff;
}

.panel--envoz .panel__name {
  font-family: var(--sans);
  font-weight: 700;
  letter-spacing: -0.03em;
  display: inline-flex;
  align-items: center;
}

.panel__tag {
  font-size: 0.9375rem;
  color: rgba(242, 242, 248, 0.62);
  margin: 0 0 1.25rem;
}

.panel__desc {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: rgba(242, 242, 248, 0.8);
  margin: 0;
}

.panel__foot {
  margin-top: auto;
  padding: 1.25rem 2rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: rgba(242, 242, 248, 0.5);
  flex-wrap: wrap;
}

.panel__link {
  color: #fff;
}

.panel--pyreva .panel__link {
  color: var(--ember);
}

.panel--envoz .panel__link {
  color: #8f8ffb;
}

/* flex: none and min-height: 0 are load-bearing. As a column flex item the image
   would otherwise take its automatic minimum size (its full intrinsic height)
   and aspect-ratio would never apply. */
.panel__shot {
  width: 100%;
  height: auto; /* beats the img height attribute, so aspect-ratio can apply */
  /* The medallion occupies roughly the middle 40% of a 9:16 screenshot. Cover
     scales to the panel width, so the box has to be squarer than 4:3 or the
     glyph's top and bottom points get clipped. */
  aspect-ratio: 6 / 5;
  flex: none;
  min-height: 0;
  object-fit: cover;
  object-position: 50% 57%; /* centres the medallion, not the caption */
  opacity: 0.95;
}

/* Envoz's home screen puts its subject in the upper third, not the middle: the
   wordmark, the greeting, and the lit "pick up where you left off" card. At 57%
   the crop lands on the learner cards instead. */
.panel__shot--envoz {
  object-position: 50% 20%;
}

.envoz-o {
  width: 0.72em;
  height: 0.9em;
  margin: 0 -0.04em;
  transform: translateY(0.08em);
  align-self: center;
}

/* ------------------------------------------------------------ project entry */
/* Work page: each product gets a full record, screenshots included. */

.entry {
  border-top: 1px solid var(--rule);
  padding-block: clamp(3rem, 6vw, 4.5rem);
}

.entry:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.shots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 1rem;
  margin: 2rem 0 0;
}

.shots img {
  border-radius: 3px;
  border: 1px solid var(--rule);
}

.figcaption {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 2rem 0 0;
}

.factlist {
  border-top: 1px solid var(--rule);
  margin: 2.25rem 0 0;
  padding: 0;
  font-size: 0.9375rem;
}

.factlist div {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--rule);
}

.factlist dt {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding-top: 0.25rem;
}

.factlist dd {
  margin: 0;
  color: var(--ink-2);
}

/* --------------------------------------------------------------- capability */

/* Four capabilities, so pair them 2x2 rather than letting the fourth orphan
   onto a row of its own. */
.cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(26rem, 1fr));
  gap: 3rem;
}

.col h3 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.3125rem;
  margin: 0 0 0.6rem;
  line-height: 1.2;
}

.col p {
  margin: 0;
  color: var(--ink-2);
  font-size: 0.9375rem;
  line-height: 1.6;
}

/* --------------------------------------------------------------- chronology */
/* A real record, not decoration: the years the company has been operating. */

.chrono {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 1px solid var(--rule);
}

.chrono li {
  position: relative;
  padding: 0 0 2rem 2rem;
}

.chrono li::before {
  content: "";
  position: absolute;
  left: -3.5px;
  top: 0.6rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink-3);
}

.chrono li[data-mark="ember"]::before {
  background: var(--ember);
}

.chrono li[data-mark="indigo"]::before {
  background: var(--indigo);
}

.chrono__year {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--ink-3);
  display: block;
  margin-bottom: 0.2rem;
}

.chrono__what {
  margin: 0;
  color: var(--ink-2);
  max-width: 46ch;
}

.chrono__what strong {
  color: var(--ink);
  font-weight: 600;
}

/* ------------------------------------------------------------------ contact */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 2.5rem 3rem;
}

.contact-card h3 {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 0.6rem;
  font-weight: 500;
}

.contact-card p {
  margin: 0 0 0.4rem;
  color: var(--ink-2);
  font-size: 0.9375rem;
}

.mailto {
  font-family: var(--display);
  font-size: clamp(1.5rem, 3.4vw, 2.25rem);
  font-weight: 400;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
  display: inline-block;
  line-height: 1.2;
  word-break: break-word;
}

.mailto:hover {
  color: var(--indigo);
  border-bottom-color: var(--indigo);
}

/* ------------------------------------------------------------------- footer */

.footer {
  border-top: 1px solid var(--rule);
  padding-block: 3rem 4rem;
  font-size: 0.875rem;
  color: var(--ink-3);
}

.footer__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 2rem 3rem;
  margin-bottom: 2.5rem;
}

.footer h4 {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 0.8rem;
  font-weight: 500;
}

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

.footer li {
  margin-bottom: 0.4rem;
}

.footer a {
  color: var(--ink-2);
  text-decoration: none;
}

.footer a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.footer__legal {
  border-top: 1px solid var(--rule);
  padding-top: 1.5rem;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.05em;
  line-height: 1.9;
  color: var(--ink-3);
}

.footer__legal p {
  margin: 0;
  max-width: 70ch;
}

/* ------------------------------------------------------------------- motion */

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    animation: rise 0.7s cubic-bezier(0.22, 0.7, 0.3, 1) backwards;
  }

  .reveal--2 {
    animation-delay: 0.09s;
  }

  .reveal--3 {
    animation-delay: 0.18s;
  }

  .reveal--4 {
    animation-delay: 0.27s;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .panel {
    transition: none;
  }
  .panel:hover {
    transform: none;
  }
}

/* ------------------------------------------------------------------ narrow  */

@media (max-width: 46rem) {
  :root {
    --gutter: 1.25rem;
  }

  .rail {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .rail__label {
    padding-top: 0;
  }

  .factlist div {
    grid-template-columns: 1fr;
    gap: 0.1rem;
  }

  .masthead {
    position: static;
  }

  .masthead__inner {
    gap: 0.75rem;
  }
}
