/*
Theme Name: Slashforward
Theme URI: https://slashforward.design
Author: Slashforward
Author URI: https://slashforward.design
Description: Custom theme for Slashforward — a brand & product strategy agency site. Built from the Penpot "Home" design.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: slashforward
*/

/* ==========================================================================
   Design tokens (Penpot "Home")
   ========================================================================== */
:root {
  --color-ink: #000000;
  --color-ink-soft: #231f20;
  --color-white: #ffffff;
  --color-accent: #3bde97;
  --color-accent-dark: #1fb272;
  --color-tint-mint: #e5f5f2;
  --color-tint-blue: #e5eef5;
  --color-tint-peach: #ffe1d7;
  --color-neutral: #d9d9d9;
  --color-accent-purple: #dfa0ed;
  --color-accent-cyan: #3fd5e3;
  --color-nav-green: #61c08e;
  --color-circle-elevate: #197c4d;
  --color-circle-energize: #277ead;
  --color-circle-eliminate: #dd4d53;
  --color-showcase-circle: #393939;
  --color-showcase-plate: #d9d9d9;

  --font-base: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --content-max: 1728px;
  --gutter: 60px;
  --gutter-mobile: 24px;
}

@media (max-width: 1200px) {
  :root {
    --gutter: 40px;
  }
}

@media (max-width: 900px) {
  :root {
    --gutter: var(--gutter-mobile);
  }
}

@media (max-width: 420px) {
  :root {
    --gutter: 20px;
  }
}

/* ==========================================================================
   Reset and base
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: var(--font-base);
  font-weight: 300;
  line-height: 1.5;
  color: var(--color-ink);
  background: var(--color-white);
}

/* Form controls do not inherit the font by default. */
button,
input,
textarea,
select {
  font-family: inherit;
}

h1,
h2,
h3,
h4,
p,
li,
address,
blockquote {
  overflow-wrap: break-word;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 700;
}

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

a {
  color: inherit;
  text-decoration: none;
}

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

.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
}

/* ==========================================================================
   Header
   ========================================================================== */
/* Fixed; 70% of the design: Home transparent (padding 34/13), other pages
   green bar 106px, after scroll 59px. */
.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  padding: 34px 0 13px;
  color: var(--color-white);
  background: transparent;
  transition:
    background 0.3s ease,
    padding 0.3s ease,
    min-height 0.3s ease,
    box-shadow 0.3s ease;
}

body:not(.home) .site-header {
  min-height: 106px;
  padding: 0;
  color: var(--color-ink);
  background: var(--color-nav-green);
}

.site-header.scrolled,
body:not(.home) .site-header.scrolled {
  min-height: 59px;
  padding: 0;
  box-shadow: 0 2px 12px rgb(0 0 0 / 0.2);
}

.home .site-header.scrolled {
  background: var(--color-ink);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

/* Logo 223px (70% of 319), mobile 158px; inline SVG follows header color. */
.site-logo {
  display: block;
  line-height: 0;
  color: inherit;
}

.site-logo svg {
  display: block;
  width: clamp(158px, 12.92vw, 223px);
  height: auto;
  fill: currentColor;
  transition: width 0.3s ease;
}

.site-header.scrolled .site-logo svg {
  width: 140px;
}

.header-right {
  margin-left: auto;
}

/* Hamburger 39x28 (70% of 55x40), 4px bars; mobile 37x27; open = X. */
.nav-toggle {
  --bar: 4px;
  --bar-shift: 12px;

  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 39px;
  height: 28px;
  padding: 0;
  border: 0;
  color: inherit;
  background: none;
  cursor: pointer;
  transition:
    width 0.3s ease,
    height 0.3s ease;
}

.nav-toggle::before {
  content: "";
  position: absolute;
  inset: -12px;
}

.nav-toggle:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 8px;
}

.nav-toggle .bar {
  display: block;
  width: 100%;
  height: var(--bar);
  background: currentColor;
  transition:
    transform 0.25s ease,
    opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] .bar:nth-child(1) {
  transform: translateY(var(--bar-shift)) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .bar:nth-child(3) {
  transform: translateY(calc(-1 * var(--bar-shift))) rotate(-45deg);
}

/* Open menu: dark bar below the header, links right-aligned. */
.primary-nav {
  display: none;
}

.primary-nav.is-open {
  position: absolute;
  top: 100%;
  right: 0;
  left: 0;
  z-index: 200;
  display: block;
  max-height: calc(100dvh - 59px);
  padding: 24px 0 32px;
  overflow-y: auto;
  background: var(--color-ink-soft);
  border-top: 1px solid var(--color-accent);
  box-shadow: 0 12px 24px rgb(0 0 0 / 0.25);
}

.primary-nav.is-open ul {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.primary-nav.is-open a {
  display: block;
  padding: 8px 0;
  font-size: 2rem; /* 32px */
  font-weight: 300;
  line-height: 1.3;
  letter-spacing: 0.05em;
  white-space: nowrap;
  color: var(--color-white);
  transition: color 0.2s ease;
}

.primary-nav.is-open .current-menu-item > a,
.primary-nav.is-open a[aria-current="page"] {
  font-weight: 700;
  color: var(--color-accent);
}

.primary-nav.is-open a:hover,
.primary-nav.is-open a:focus-visible {
  color: var(--color-accent);
}

/* Header sits below the fixed WP admin bar. */
.admin-bar .site-header {
  top: 32px;
}

@media screen and (max-width: 782px) {
  .admin-bar .site-header {
    top: 46px;
  }
}

@media screen and (max-width: 600px) {
  .admin-bar .site-header.scrolled {
    top: 0;
  }
}

@media (min-width: 901px) {
  .site-header.scrolled .nav-toggle {
    --bar: 3px;
    --bar-shift: 9.5px;

    width: 31px;
    height: 22px;
  }
}

@media (max-width: 900px) {
  /* Mobile bar 84px (Home black, other pages green), logo 158px. */
  .site-header,
  body:not(.home) .site-header {
    min-height: 84px;
    padding: 0;
  }

  .home .site-header {
    background: var(--color-ink);
  }

  .site-header.scrolled .site-logo svg {
    width: 158px;
  }

  .nav-toggle {
    --bar: 4px;
    --bar-shift: 11.5px;

    width: 37px;
    height: 27px;
  }

  .primary-nav.is-open a {
    font-size: 1.5rem; /* 24px */
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-header {
    transition: none;
  }
}

/* ==========================================================================
   Inner page hero (Portfolio, page.php, index.php)
   ========================================================================== */
/* Penpot: title 52,287 96/200; intro 57,489 18/300 max-w 1204; corners 94x107
   at (60,629) and (1581,996). Hero height 1103 = 63.83% of width. */
.page-hero {
  position: relative;
  height: min(63.83vw, 1103px);
  min-height: 620px;
  overflow: hidden;
  color: var(--color-ink);
  background: var(--color-white);
}

.page-hero .container {
  position: static;
  max-width: none;
  margin: 0;
  padding: 0;
}

.page-hero h1,
.page-hero .page-intro {
  position: absolute;
  z-index: 2;
  text-align: left;
}

.page-hero h1 {
  top: 26.02%; /* 287/1103 */
  left: 3.009%; /* 52/1728 */
  font-size: clamp(3rem, 5.55vw, 6rem); /* 96px @1728 */
  font-weight: 200;
  line-height: 1;
}

.page-hero .page-intro {
  top: 44.33%; /* 489/1103 */
  left: 3.299%; /* 57/1728 */
  max-width: 69.68%; /* 1204/1728 */
  margin: 0;
  font-size: clamp(0.95rem, 1.04vw, 1.125rem); /* 18px @1728 */
  font-weight: 300;
  line-height: 1.5;
}

/* Corner marks 94x107. */
.hero-corner {
  position: absolute;
  z-index: 2;
  width: 5.44%; /* 94/1728 */
  max-width: 94px;
  aspect-ratio: 94 / 107;
  pointer-events: none;
}

.hero-corner--tl {
  top: 28.55%;
  left: 3.472%;
  border-top: 2px solid var(--color-white);
  border-left: 2px solid var(--color-white);
}

.hero-corner--br {
  top: 59.91%;
  right: 3.096%;
  border-right: 2px solid var(--color-white);
  border-bottom: 2px solid var(--color-white);
}

.page-hero .hero-corner {
  border-color: var(--color-ink);
  border-width: 1px;
}

.page-hero .hero-corner--tl {
  top: 30.99%; /* 629/1103 */
}

.page-hero .hero-corner--br {
  top: 49.05%; /* 996/1103 */
}

.page-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 80px 0;
}

.page-content p {
  margin-bottom: 24px;
}

@media (max-width: 900px) {
  /* Title and intro back in normal flow: 48/200 and 16/300. */
  .page-hero {
    height: auto;
    min-height: 0;
    padding: 32px 0 0;
  }

  .page-hero .container {
    max-width: var(--content-max);
    margin: 0 auto;
    padding: 0 var(--gutter);
  }

  .page-hero h1,
  .page-hero .page-intro {
    position: relative;
    top: auto;
    right: auto;
    left: auto;
    max-width: 100%;
  }

  .page-hero h1 {
    font-size: clamp(2.25rem, 12.2vw, 3rem); /* 48px */
    font-weight: 200;
    line-height: 1.2;
  }

  .page-hero .page-intro {
    max-width: none;
    margin-top: 20px;
    font-size: 1rem; /* 16px */
    line-height: 1.5;
  }

  .hero-corner {
    display: none;
  }
}

/* ==========================================================================
   Portfolio
   ========================================================================== */
/* Penpot "Portfolio" (1728x10055) and "iPhone 16 - 2" (393x9166) 1:1: each
   section keeps the design aspect ratio; layers are absolute at --x/--y/--w/--h
   (desktop) and --mx/--my/--mw/--mh (mobile). --u / --mu = 1 design px. */
.portfolio-gallery {
  position: relative;
  container-type: inline-size;
  overflow-x: clip;
  background: var(--color-white);
}

/* White sections stay transparent so overlapping layers remain visible. */
.portfolio-project {
  position: relative;
}

.portfolio-project--tinted {
  background-color: var(--bg);
}

.portfolio-body--mobile {
  display: none;
}

.portfolio-project-text {
  position: absolute;
  z-index: 1;
}

.portfolio-project-text h3 {
  margin: 0;
  font-weight: 300;
  color: var(--color-ink);
}

.portfolio-project-text p {
  margin: 0;
  font-weight: 400;
  color: var(--color-ink);
}

/* "BACK TO TOP" 32/300 in a 288 box, arrow 111.8x58.9. */
.back-to-top {
  position: absolute;
  margin: 0;
  padding: 0;
  text-align: center;
}

.back-to-top a {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  font-weight: 300;
  line-height: 1.03125;
  text-transform: uppercase;
  color: var(--color-ink);
}

.back-to-top a:hover {
  color: var(--color-accent-dark);
}

.back-to-top img {
  display: block;
  height: auto;
}

@media (min-width: 901px) {
  .portfolio-gallery {
    --u: min(calc(100cqw / 1728), 1px);
    --off: calc((100cqw - 1728 * var(--u)) / 2);
  }

  .portfolio-project {
    height: calc(var(--h) * var(--u));
  }

  .portfolio-item--mobile-only {
    display: none;
  }

  .portfolio-item,
  .portfolio-project-text {
    position: absolute;
    top: calc(var(--y) * var(--u));
    left: calc(var(--off) + var(--x) * var(--u));
    width: calc(var(--w) * var(--u));
  }

  .portfolio-item {
    height: calc(var(--h) * var(--u));
    max-width: none;
    object-fit: cover;
  }

  /* Deco SVGs keep their ratio; Figma frames do not always match. */
  .portfolio-item--deco {
    object-fit: contain;
  }

  /* Figma: 33px line for all parts - title 32/300, blank line (33px margin),
     body 20/400. Minimum sizes keep it readable below ~1200px. */
  .portfolio-project-text h3 {
    margin-bottom: calc(33 * var(--u));
    font-size: max(1.25rem, calc(32 * var(--u)));
    line-height: 1.03125; /* 33/32 */
  }

  .portfolio-project-text p {
    font-size: max(0.875rem, calc(20 * var(--u)));
    line-height: 1.65; /* 33/20 */
  }

  /* Penpot: arrow 841,8989; box 753,9070 w 288; gallery starts at y 1160. */
  .back-to-top {
    top: calc((8989 - 1160) * var(--u));
    left: calc(var(--off) + 753 * var(--u));
    width: calc(288 * var(--u));
  }

  .back-to-top a {
    gap: calc(22.1 * var(--u));
    font-size: max(1rem, calc(32 * var(--u)));
  }

  .back-to-top img {
    width: calc(111.8 * var(--u));
  }

  /* Portfolio hero 0..1160, aligned in Penpot px instead of percentages. */
  .page-template-page-portfolio .page-hero {
    --u: min(calc(100cqw / 1728), 1px);
    --off: calc((100cqw - 1728 * var(--u)) / 2);

    height: calc(1160 * var(--u));
    min-height: 0;
    container-type: inline-size;
  }

  .page-template-page-portfolio .page-hero h1 {
    top: calc(287 * var(--u));
    left: calc(var(--off) + 52 * var(--u));
    font-size: max(3rem, calc(96 * var(--u)));
  }

  .page-template-page-portfolio .page-hero .page-intro {
    top: calc(489 * var(--u));
    left: calc(var(--off) + 57 * var(--u));
    max-width: calc(1204 * var(--u));
    font-size: max(0.95rem, calc(18 * var(--u)));
  }

  .page-template-page-portfolio .page-hero .hero-corner {
    width: calc(94 * var(--u));
    max-width: none;
  }

  .page-template-page-portfolio .page-hero .hero-corner--tl {
    top: calc(629 * var(--u));
    left: calc(var(--off) + 60 * var(--u));
  }

  .page-template-page-portfolio .page-hero .hero-corner--br {
    top: calc(996 * var(--u));
    right: auto;
    left: calc(var(--off) + 1581 * var(--u));
  }

  /* Penpot "Group 7": 4x3 squares grid, 1193,743 w 284. */
  .page-hero-squares {
    position: absolute;
    top: calc(743 * var(--u));
    left: calc(var(--off) + 1193 * var(--u));
    z-index: 1;
    width: calc(284 * var(--u));
    height: auto;
  }
}

@media (max-width: 900px) {
  /* Mobile board 393: full width up to 600px, centered 600px column up to
     900px (--moff); tinted bands still bleed edge to edge. */
  .portfolio-gallery {
    --mu: calc(min(100cqw, 600px) / 393);
    --moff: calc((100cqw - 393 * var(--mu)) / 2);
  }

  .portfolio-project {
    height: calc(var(--mh) * var(--mu));
    background: transparent;
  }

  /* Band is shorter than the section (images overflow it), drawn as ::before. */
  .portfolio-project--tinted::before {
    content: "";
    position: absolute;
    top: calc(var(--mband-y) * var(--mu));
    right: 0;
    left: 0;
    height: calc(var(--mband-h) * var(--mu));
    background: var(--bg);
  }

  .portfolio-item {
    position: absolute;
    top: calc(var(--my) * var(--mu));
    left: calc(var(--moff) + var(--mx) * var(--mu));
    width: calc(var(--mw) * var(--mu));
    height: calc(var(--mh) * var(--mu));
    max-width: none;
    object-fit: cover;
  }

  .portfolio-item--desktop-only {
    display: none;
  }

  .portfolio-project-text {
    top: calc(var(--my) * var(--mu));
    left: calc(var(--moff) + var(--mx) * var(--mu));
    width: calc(var(--mw) * var(--mu));
  }

  /* Figma (iPhone 16 - 2): 33px line - title 32/300, 20px blank line,
     body 20/400. La Radio and AppGuru have no blank line. */
  .portfolio-project-text h3 {
    margin: 0 0 calc(33 * var(--mu));
    font-size: calc(32 * var(--mu));
    line-height: 1.03125; /* 33/32 */
  }

  .portfolio-project--mobile-nogap .portfolio-project-text h3 {
    margin-bottom: 0;
  }

  .portfolio-project-text .portfolio-body--desktop {
    display: none;
  }

  .portfolio-project-text .portfolio-body--mobile {
    display: block;
  }

  .portfolio-project-text p {
    font-size: calc(20 * var(--mu));
    line-height: 1.65; /* 33/20 */
  }

  /* Penpot: arrow 135.1,8255; box 47,8336 w 288; gallery starts at y 448. */
  .back-to-top {
    top: calc((8255 - 448) * var(--mu));
    left: calc(var(--moff) + 47 * var(--mu));
    width: calc(288 * var(--mu));
  }

  .back-to-top a {
    gap: calc(22.1 * var(--mu));
    font-size: calc(32 * var(--mu));
  }

  .back-to-top img {
    width: calc(111.8 * var(--mu));
  }

  /* Hero (84px header overlaps the top): title 21,101 48/200; intro 24,176
     w 352 16/300; squares 196,315 (151.8x108); top-left corner 32,369 (47x54).
     Intro at line-height 1.5 ends at 344, so squares/corner moved down 48
     (363 / 417) and the hero grew from 448 to 496. */
  .page-template-page-portfolio .page-hero {
    --mu: calc(min(100cqw, 600px) / 393);
    --moff: calc((100cqw - 393 * var(--mu)) / 2);

    padding: 0;
    container-type: inline-size;
  }

  /* Board height lives on a pseudo-element: cqw would not resolve on the hero itself. */
  .page-template-page-portfolio .page-hero::after {
    content: "";
    display: block;
    height: calc(496 * var(--mu));
  }

  .page-template-page-portfolio .page-hero .container {
    position: static;
    max-width: none;
    margin: 0;
    padding: 0;
  }

  .page-template-page-portfolio .page-hero h1,
  .page-template-page-portfolio .page-hero .page-intro {
    position: absolute;
    margin: 0;
  }

  .page-template-page-portfolio .page-hero h1 {
    top: calc(101 * var(--mu));
    left: calc(var(--moff) + 21 * var(--mu));
    width: auto;
    font-size: calc(48 * var(--mu));
    font-weight: 200;
    line-height: 1.2;
  }

  .page-template-page-portfolio .page-hero .page-intro {
    top: calc(176 * var(--mu));
    left: calc(var(--moff) + 24 * var(--mu));
    width: calc(352 * var(--mu));
    max-width: none;
    font-size: calc(16 * var(--mu));
    font-weight: 300;
    line-height: 1.5;
  }

  .page-template-page-portfolio .page-hero .hero-corner--tl {
    top: calc(417 * var(--mu));
    left: calc(var(--moff) + 32 * var(--mu));
    display: block;
    width: calc(47 * var(--mu));
    max-width: none;
    aspect-ratio: 47 / 54;
    border-width: 1px 0 0 1px;
  }

  .page-template-page-portfolio .page-hero .hero-corner--br {
    display: none;
  }

  .page-template-page-portfolio .page-hero-squares {
    position: absolute;
    top: calc(363 * var(--mu));
    left: calc(var(--moff) + 196 * var(--mu));
    display: block;
    width: calc(151.8 * var(--mu));
    height: auto;
  }
}

/* ==========================================================================
   Penpot canvas (Home, Services, Process, Contact, footer)
   ========================================================================== */
/* The page is one canvas: every element is absolute at design coordinates
   the template writes as custom properties (design px):
     --x --y --w [--eh]                    desktop board (1728)
     --mx --my --mw [--meh]                mobile board (393)
     --fs --fw --lh / --mfs --mfw --mlh    typography
   --u = 1 design px scaled to the width (.pf-page is the container).
   Desktop (>900px): board 1728. Mobile (<=900px): board 393, full width up
   to 600px, centered 600px column above (--off); .pf-bleed spans edge to
   edge. The header overlays the canvas as in the design. */
.pf-page {
  container-type: inline-size;
  overflow-x: clip;
  background: var(--color-white);
}

.pf-canvas {
  position: relative;
}

.pf-group {
  display: contents;
}

.pf-el {
  position: absolute;
  margin: 0;
  padding: 0;
  font-weight: var(--fw, 400);
  line-height: var(--lh, 1.2);
  color: var(--color-ink);
}

.pf-el p,
.pf-el li {
  margin: 0;
}

img.pf-el {
  max-width: none;
}

.pf-el > svg {
  display: block;
  width: 100%;
  height: 100%;
}

.pf-el a:hover {
  color: var(--color-accent-dark);
}

/* Utilities. */
.pf-center {
  text-align: center;
}

.pf-nowrap {
  white-space: nowrap;
}

.pf-white {
  color: var(--color-white);
}

.pf-accent {
  color: var(--color-accent-dark);
}

/* Penpot: letter-spacing 1.6/32, 1.4/28, 1.2/24 = 0.05em. */
.pf-ls {
  letter-spacing: 0.05em;
}

.pf-round {
  border-radius: 50%;
}

.pf-clip {
  overflow: hidden;
}

.pf-cover {
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}

.pf-cover-img {
  object-fit: cover;
}

.pf-contain {
  object-fit: contain;
}

/* Design surfaces. */
.pf-fill {
  background: var(--bg);
}

.pf-plate,
.pf-bar-white {
  background: var(--color-white);
}

.pf-mint {
  background: var(--color-tint-mint);
}

.pf-band-peach {
  background: var(--color-tint-peach);
}

.pf-gray-bar {
  background: var(--color-neutral);
}

.pf-bar-green {
  background: var(--color-nav-green);
}

.pf-circle {
  background: var(--color-nav-green);
  border-radius: 50%;
}

/* Mobile hero: image fades to black (Penpot "Rectangle 66"). */
.pf-fade-black {
  background: linear-gradient(to bottom, rgb(0 0 0 / 0), var(--color-ink));
}

/* Hero corner marks (Penpot "Vector 1/2": 1px black; Home 5px white). */
.pf-corner-tl {
  border-top: 1px solid var(--color-ink);
  border-left: 1px solid var(--color-ink);
}

.pf-corner-br {
  border-right: 1px solid var(--color-ink);
  border-bottom: 1px solid var(--color-ink);
}

.pf-corner-tl.pf-corner--hero,
.pf-corner-br.pf-corner--hero {
  border-color: var(--color-white);
  border-width: 5px;
}

/* Quote: name 700, role italic 300, company 400; blank line before. */
.pf-quote cite {
  display: block;
  margin-top: 1lh;
  font-style: normal;
}

.pf-quote cite span {
  display: block;
}

.pf-quote-name {
  font-weight: 700;
}

.pf-quote-role {
  font-style: italic;
  font-weight: 300;
}

/* Home showcase (Penpot "Group 23"): image under a white plate with a
   circular cut-out (SVG, evenodd). Same proportions on both boards. */
.pf-showcase {
  display: block;
  opacity: var(--op, 1);
}

.pf-showcase img {
  position: absolute;
  top: 2.1908%; /* 31/1415 */
  left: 7.4855%; /* 142/1897 */
  width: 83.658%; /* 1587/1897 */
  height: 83.18%; /* 1177/1415 */
  max-width: none;
  object-fit: cover;
}

.pf-showcase svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  fill: var(--color-white); /* Figma "Subtract": white plate */
}

/* Paragraph aligned to the box bottom (Services/Process "ALL ABOUT THE TRAJECTORY"). */
.pf-rt--bottom {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

/* ==========================================================================
   Footer (Penpot "Group 58" 1728x883 at 3/4 height, mobile 393x720)
   ========================================================================== */
/* overflow: hidden instead of clip from .pf-page, hence the double selector. */
.site-footer.pf-page--footer {
  position: relative;
  overflow: hidden;
  background: var(--color-ink);
}

.pf-footer-address {
  font-style: normal;
}

.pf-footer-address span {
  display: block;
}

.pf-footer-address span + span {
  margin-top: 1lh;
}

/* Penpot: field 292x59 #d9d9d9, button 64x59 #61c08e with 37x37 glass. */
.pf-footer-input {
  padding: 0 16px;
  border: 0;
  border-radius: 0;
  color: var(--color-ink);
  background: var(--color-showcase-plate);
  appearance: none;
}

.pf-footer-button {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 0;
  color: var(--color-ink-soft);
  background: var(--color-nav-green);
  cursor: pointer;
  transition: background 0.2s ease;
}

.pf-footer-button:hover,
.pf-footer-button:focus-visible {
  background: var(--color-accent-dark);
}

.pf-footer-button svg {
  display: block;
  width: 57.8%; /* 37/64 */
  height: auto;
  fill: currentColor;
}

/* Penpot "Line 1": 1px green line on top of the bottom black bar. */
.pf-footer-bar {
  border-top: 1px solid var(--color-nav-green);
}

/* --------------------------------------------------------------------------
   Canvas: desktop board 1728
   -------------------------------------------------------------------------- */
@media (min-width: 901px) {
  /* Scale stops at the design width: above 1728px nothing grows, the board is
     centered (--off) and only .pf-bleed surfaces span the full width. */
  .pf-page {
    --u: min(calc(100cqw / 1728), 1px);
    --off: calc((100cqw - 1728 * var(--u)) / 2);
  }

  .pf-canvas {
    height: calc(var(--h) * var(--u));
  }

  .pf-el {
    top: calc(var(--y) * var(--u));
    left: calc(var(--off) + var(--x) * var(--u));
    width: calc(var(--w) * var(--u));
    font-size: max(0.8125rem, calc(var(--fs, 16) * var(--u)));
  }

  /* .pf-bleed spans the viewport on both boards, .pf-bleed-d on the desktop board only. */
  .pf-el.pf-bleed,
  .pf-el.pf-bleed-d {
    left: 0;
    width: 100%;
  }

  .pf-el--h {
    height: calc(var(--eh) * var(--u));
  }

  .pf-s {
    font-size: calc(var(--s) * var(--u));
  }

  .pf-m-only {
    display: none;
  }
}

/* --------------------------------------------------------------------------
   Canvas: mobile board 393
   -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .pf-page {
    --u: calc(min(100cqw, 600px) / 393);
    --off: calc((100cqw - 393 * var(--u)) / 2);
  }

  .pf-canvas {
    height: calc(var(--mh) * var(--u));
  }

  .pf-el {
    top: calc(var(--my) * var(--u));
    left: calc(var(--off) + var(--mx) * var(--u));
    width: calc(var(--mw) * var(--u));
    font-size: calc(var(--mfs, var(--fs, 16)) * var(--u));
    font-weight: var(--mfw, var(--fw, 400));
    line-height: var(--mlh, var(--lh, 1.2));
  }

  .pf-el--h {
    height: calc(var(--meh) * var(--u));
  }

  .pf-s {
    font-size: calc(var(--ms, var(--s)) * var(--u));
  }

  .pf-el.pf-bleed {
    left: 0;
    width: 100%;
  }

  .pf-m-right {
    text-align: right;
  }

  /* Mobile: hero black surface and cards sit above the blue band. */
  .pf-m-z1 {
    z-index: 1;
  }

  .pf-m-z2 {
    z-index: 2;
  }

  .pf-d-only {
    display: none;
  }
}

/* ==========================================================================
   Scroll interactions from Figma comments (Home, Services, Process)
   ========================================================================== */
/* nav.js writes --progress 0..1 on [data-scroll-progress] while the element
   travels through the viewport, and --reveal (a step from data-steps).
   Without JS or with prefers-reduced-motion the final state applies. */

/* Figma #3: the hero image scrolls with the page, the typography on it
   ([data-parallax]: text and corners) lags by 25% of the scroll, so the image
   moves faster. --sf-hero-h = hero height 2029 (mobile 833). Scroll-driven
   where supported, nav.js sets the transform elsewhere. */
.pf-page--home {
  --sf-hero-h: calc(2029 * var(--u));
}

@media (max-width: 900px) {
  .pf-page--home {
    --sf-hero-h: calc(833 * var(--u));
  }
}

@media (prefers-reduced-motion: no-preference) {
  [data-parallax] {
    will-change: transform;
  }

  @supports (animation-timeline: scroll()) {
    [data-parallax] {
      animation: sf-hero-lag linear both;
      animation-timeline: scroll(root block);
      animation-range: 0 var(--sf-hero-h);
    }
  }
}

@keyframes sf-hero-lag {
  to {
    transform: translate3d(0, calc(0.25 * var(--sf-hero-h)), 0);
  }
}

/* Figma #4: contact bar rotates from 12 (-90deg) to 3 o'clock (0deg) around
   the circle center; --ox/--oy (mobile --mox/--moy) = center offset in design px. */
.pf-dial {
  transform: rotate(calc(-90deg + 90deg * var(--progress, 1)));
  transform-origin: calc(var(--ox) * var(--u)) calc(var(--oy) * var(--u));
}

/* Figma #7: layer revealed left to right in steps. */
.pf-reveal {
  clip-path: inset(0 calc((1 - var(--reveal, 1)) * 100%) 0 0);
  transition: clip-path 0.6s ease;
}

.pf-reveal--layer {
  position: absolute;
  inset: 0;
}

.pf-reveal--layer > svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* Figma #1 / #8: wide image scrolls horizontally on mobile; --iw = content
   width in design px. JS ties scrollLeft to --progress. */
.pf-hscroll {
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

.pf-hscroll > svg {
  display: block;
  width: calc(var(--iw) * var(--u));
  height: 100%;
  max-width: none;
}

/* Scrolled content with a .pf-reveal--layer stacked on the image. */
.pf-hscroll__inner {
  position: relative;
  width: calc(var(--iw) * var(--u));
  height: 100%;
}

.pf-hscroll__inner > svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* Figma #5 / #6: client list - the track slides one panel at a time
   (--slide from JS, --n = panel count). Desktop: 3 boards 1728x407, logos at
   --lx/--ly/--lw/--lgh in design px. Mobile: one logo in a 243/393 box. */
.pf-clients {
  overflow: hidden;
}

.pf-clients__track {
  display: flex;
  width: calc(var(--n) * 100%);
  height: 100%;
  transition: transform 0.8s ease;
  transform: translateX(calc(var(--slide, 0) * -100% / var(--n)));
}

/* Snap from the cloned last panel back to the first one without animating. */
.pf-clients__track.is-snapping {
  transition: none;
}

.pf-clients__panel {
  position: relative;
  flex: 0 0 calc(100% / var(--n));
  height: 100%;
}

.pf-clients__logo {
  position: absolute;
  top: calc(var(--ly) / 407 * 100%);
  left: calc(var(--lx) / 1728 * 100%);
  width: calc(var(--lw) / 1728 * 100%);
  height: calc(var(--lgh) / 407 * 100%);
  object-fit: contain;
}

.pf-clients__logo--m {
  position: absolute;
  top: 0;
  left: 19.08%; /* 75/393 */
  width: 61.83%; /* 243/393 */
  height: 100%;
  object-fit: contain;
}

@media (max-width: 900px) {
  /* Mobile: same rotation around the (off-canvas) circle center, compressed to
     62% of the progress range so it finishes while the circle is on screen;
     the green half fades to white meanwhile. */
  .pf-dial {
    --dial-done: min(1, var(--progress, 1) * 1.6);

    transform: rotate(calc(-90deg + 90deg * var(--dial-done)));
    transform-origin: calc(var(--mox) * var(--u)) calc(var(--moy) * var(--u));
  }

  .pf-dial.pf-bar-green {
    background: color-mix(in srgb, var(--color-white) calc(var(--dial-done) * 100%), var(--color-nav-green));
  }

  /* Mobile timeline: 110px labels stay, stages scroll beside them. Scoped to
     mobile so it cannot override .pf-m-only on desktop. */
  .pf-timeline-m {
    display: flex;
  }

  .pf-timeline-m__labels {
    flex: 0 0 calc(110 * var(--u));
  }

  .pf-timeline-m__labels > svg {
    display: block;
    width: 100%;
    height: auto;
  }

  .pf-timeline-m .pf-hscroll {
    flex: 1 1 auto;
  }

  /* Contact CTA: 16px on two lines. */
  .pf-cta {
    line-height: 1.4;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pf-reveal,
  .pf-clients__track {
    transition: none;
  }
}

/* ==========================================================================
   Contact form (Figma "Contact" / "iPhone 16 - 7", comments #12 and #13)
   ========================================================================== */
/* nav.js writes --done (filled fields / all fields) on the canvas. */
@property --done {
  syntax: "<number>";
  inherits: true;
  initial-value: 0;
}

/* Field: 49px text box (33px line at its bottom), then 17px (mobile 7px) to the 1px line. */
.pf-field {
  padding: calc(16 * var(--u)) 0 calc(17 * var(--u));
  border: 0;
  border-bottom: 1px solid var(--color-ink);
  border-radius: 0;
  text-transform: uppercase;
  background: var(--color-white);
  appearance: none;
}

.pf-field::placeholder {
  color: var(--color-neutral);
  opacity: 1;
}

/* Message: four ruled rows of --row design px, the line --rule px into each row. */
.pf-field--rows {
  --r: calc(var(--row) * var(--u));
  --o: calc(var(--rule) * var(--u));

  padding: 0;
  border-bottom: 0;
  line-height: var(--r);
  background: repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--r) - 1px), var(--color-ink) calc(var(--r) - 1px), var(--color-ink) var(--r)) 0 calc(var(--o) - var(--r) + 1px) local;
  resize: none;
}

/* A field box reaches up behind its label, so the focus ring is drawn by the
   sibling box that starts where the label line ends. */
.pf-field:focus-visible {
  outline: 0;
}

.pf-field-ring {
  pointer-events: none;
}

.pf-field:focus-visible + .pf-field-ring {
  outline: 2px solid var(--color-ink);
  outline-offset: 2px;
}

/* Figma "Rectangle 70": grey until every field is filled, then black. */
.pf-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: var(--color-white);
  background: var(--color-ink);
  transition: background 0.2s ease;
  cursor: pointer;
}

.pf-submit:disabled {
  background: var(--color-neutral);
  cursor: not-allowed;
}

.pf-submit:not(:disabled):hover,
.pf-submit:focus-visible {
  background: var(--color-accent-dark);
}

.pf-submit:focus-visible {
  outline: 2px solid var(--color-ink);
  outline-offset: 4px;
}

@media (min-width: 901px) {
  /* Black sweep clockwise from 3 o'clock, a quarter per filled field; the bar leads it. */
  .pf-form-sweep {
    background: conic-gradient(from 90deg, var(--color-ink) calc(var(--done, 0) * 360deg), transparent 0);
  }

  .pf-form-dial {
    transform: rotate(calc(var(--done, 0) * 360deg));
    transform-origin: calc(var(--ox) * var(--u)) calc(var(--oy) * var(--u));
  }

  /* Check mark at the right end of the line of a filled field (states "1/4 done" - "done"). */
  .pf-field.is-filled {
    background: url("assets/images/contact-check.svg") right calc(100% - 20 * var(--u)) / calc(30 * var(--u)) calc(18 * var(--u)) no-repeat var(--color-white);
  }

  .pf-field--rows.is-filled {
    background:
      url("assets/images/contact-check.svg") right calc(100% - 20 * var(--u)) / calc(30 * var(--u)) calc(18 * var(--u)) no-repeat,
      repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--r) - 1px), var(--color-ink) calc(var(--r) - 1px), var(--color-ink) var(--r)) 0 calc(var(--o) - var(--r) + 1px) local;
  }
}

@media (min-width: 901px) and (prefers-reduced-motion: no-preference) {
  .pf-page--contact .pf-canvas {
    transition: --done 0.6s ease;
  }
}

@media (max-width: 900px) {
  .pf-field {
    padding-bottom: calc(7 * var(--u));
  }

  .pf-field--rows {
    --r: calc(var(--mrow) * var(--u));
    --o: calc(var(--mrule) * var(--u));

    padding-bottom: 0;
  }
}

/* Rich text as in Penpot (see slashforward_pf_rich): the paragraph has
   font-size 0 and one line-height, each part (.pf-s) its own size. Placed
   after the media blocks to override .pf-el font-size without !important. */
.pf-rt {
  font-size: 0;
  white-space: break-spaces;
}
