/* ── Precision Shopfit — Website Design System ──────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@400;500;600;700;800;900&family=Barlow:wght@300;400;500;600;700&family=Lato:wght@300;400;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --ps-blue:        #2565a0;
  --ps-blue-dark:   #1d527e;
  --ps-blue-50:     #e8f1f8;
  --ps-blue-soft:   #84b3d8;

  --ink:            #2d2d2d;
  --ink-2:          #4a4a4a;
  --ink-3:          #7f8791;
  --ink-4:          #9aa0a6;

  --line:           #d8dce2;
  --line-2:         #e8eaed;

  --paper:          #f8f6f1;
  --paper-2:        #efece5;
  --white:          #ffffff;

  --black:          #0d1f2d;
  --black-2:        #1a3348;

  --nav-h:          88px;

  --accent:         var(--ps-blue);
  --accent-soft:    var(--ps-blue-soft);
  --bg:             var(--paper);
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Lato', sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  /* Fine paper-dot texture */
  background-image: radial-gradient(circle at 1px 1px, rgba(45,45,45,0.038) 1px, transparent 0);
  background-size: 32px 32px;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
img.has-bg { background: var(--paper-2); }

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

/* ── Type ─────────────────────────────────────────────────────── */
.display, h1, h2, h3, .h-1, .h-2, .h-3, .eyebrow, .caption, .step-num {
  font-family: 'Barlow Condensed', sans-serif;
}

h1, .h-display {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900; font-size: clamp(56px, 7.4vw, 132px);
  line-height: 0.92; letter-spacing: 0.005em;
  text-transform: uppercase; color: var(--ink); margin: 0;
}
h1 em, .h-display em {
  font-style: normal; font-weight: 800; color: var(--accent);
}

h2, .h-1 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800; font-size: clamp(40px, 4.6vw, 80px);
  line-height: 0.96; letter-spacing: 0.01em;
  text-transform: uppercase; margin: 0; color: var(--ink);
}
h2 em, .h-1 em { font-style: normal; font-weight: 700; color: var(--accent); }

h3, .h-2 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800; font-size: clamp(28px, 2.6vw, 46px);
  line-height: 1.04; letter-spacing: 0.02em;
  text-transform: uppercase; margin: 0; color: var(--ink);
}

.h-3 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700; font-size: clamp(20px, 1.5vw, 28px);
  line-height: 1.15; letter-spacing: 0.04em;
  text-transform: uppercase; margin: 0; color: var(--ink);
}

.eyebrow {
  font-size: 14px; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--accent); font-weight: 700;
}
.eyebrow.muted { color: var(--ink-3); }
.eyebrow .bar {
  display: inline-block; width: 40px; height: 2px;
  background: var(--accent); vertical-align: middle; margin-right: 14px;
}

.caption {
  font-size: 13px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 600;
}

.step-num {
  font-family: 'JetBrains Mono', 'SF Mono', Menlo, monospace;
  font-size: 13px; letter-spacing: 0.12em;
  color: var(--accent); font-weight: 500;
}

.body, p {
  font-family: 'Lato', sans-serif; font-size: 18px;
  line-height: 1.6; color: var(--ink-2); font-weight: 400;
  margin: 0 0 1em;
}
.body-lg { font-size: 22px; line-height: 1.55; }
.body-sm { font-size: 16px; line-height: 1.55; color: var(--ink-2); }
.body strong, p strong { color: var(--ink); font-weight: 600; }

.lead {
  font-family: 'Lato', sans-serif; font-size: clamp(20px, 1.6vw, 26px);
  line-height: 1.5; color: var(--ink-2); font-weight: 400;
  max-width: 720px;
}

.section-rule {
  display: inline-flex; align-items: center; gap: 16px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 14px; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 700;
}
.section-rule::before {
  content: ""; height: 2px; background: var(--accent); width: 40px;
}

/* ── Layout ───────────────────────────────────────────────────── */
.wrap { max-width: 1440px; margin: 0 auto; padding: 0 64px; }
@media (max-width: 880px) { .wrap { padding: 0 28px; } }

section { padding: 120px 0; }
section.tight { padding: 80px 0; }
section.dark {
  background: var(--black);
  color: #fff;
  background-image: none;
}
section.dark h1, section.dark h2, section.dark h3 { color: #fff; }
section.dark h1 em, section.dark h2 em { color: var(--accent-soft); }
section.dark p, section.dark .body { color: rgba(255,255,255,0.75); }
section.dark .eyebrow { color: var(--accent-soft); }
section.dark .caption { color: rgba(255,255,255,0.5); }
section.dark .section-rule { color: rgba(255,255,255,0.55); }

.divider {
  height: 1px; background: var(--line); width: 100%;
}
.dark .divider { background: rgba(255,255,255,0.18); }

/* ── Header ────────────────────────────────────────────────────── */
.site-header {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 100;
  display: flex; align-items: center;
  padding: 0 64px;
  background: rgba(248, 246, 241, 0);
  transition: background 0.3s ease, border-bottom-color 0.3s ease, backdrop-filter 0.3s ease;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled,
.site-header.always-solid {
  background: rgba(248, 246, 241, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--line);
}
.site-header.on-dark:not(.scrolled) { color: #fff; }
.site-header.on-dark:not(.scrolled) .nav-link { color: rgba(255,255,255,0.85); }
.site-header.on-dark:not(.scrolled) .nav-link.is-active { color: #fff; }
.site-header.on-dark:not(.scrolled) .nav-link.is-active::after { background: var(--accent-soft); }
.site-header.on-dark:not(.scrolled) .nav-cta:not(.primary) { color: #fff; border-color: rgba(255,255,255,0.45); }
.site-header.on-dark:not(.scrolled) .nav-cta:not(.primary):hover { background: #fff; color: var(--ink); }
.site-header.on-dark:not(.scrolled) .logo-mark { filter: brightness(0) invert(1); }
.site-header.on-dark:not(.scrolled) .nav-toggle span,
.site-header.on-dark:not(.scrolled) .nav-toggle span::before,
.site-header.on-dark:not(.scrolled) .nav-toggle span::after { background: #fff; }

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; max-width: 1440px; margin: 0 auto;
}
.logo {
  display: flex; align-items: center; gap: 14px;
  font-family: 'Barlow Condensed', sans-serif;
  letter-spacing: 0.28em; font-weight: 700; font-size: 13px;
  text-transform: uppercase; color: var(--ink);
}
.logo-mark { height: 56px; width: auto; }

.nav {
  display: flex; align-items: center; gap: 44px;
}
.nav-link {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 14px; letter-spacing: 0.24em; text-transform: uppercase;
  font-weight: 600; color: var(--ink-2);
  position: relative; padding: 8px 0;
  transition: color 0.2s ease;
}
.nav-link:hover { color: var(--accent); }
.nav-link.is-active { color: var(--ink); }
.nav-link.is-active::after {
  content: ""; position: absolute; bottom: 0; left: 0; right: 0;
  height: 2px; background: var(--accent);
}
.nav-cta {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 24px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 13px; letter-spacing: 0.24em; text-transform: uppercase;
  font-weight: 700; color: var(--ink);
  border: 1px solid var(--ink);
  background: transparent;
  transition: background 0.2s ease, color 0.2s ease;
  cursor: pointer;
}
.nav-cta:hover { background: var(--ink); color: var(--paper); }
.nav-cta.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.nav-cta.primary:hover { background: var(--ps-blue-dark); border-color: var(--ps-blue-dark); }

.nav-toggle {
  display: none; background: none; border: 0; cursor: pointer;
  width: 40px; height: 40px; align-items: center; justify-content: center;
}
.nav-toggle span {
  display: block; width: 22px; height: 2px; background: var(--ink);
  position: relative;
}
.nav-toggle span::before, .nav-toggle span::after {
  content: ""; position: absolute; left: 0; right: 0; height: 2px; background: var(--ink);
}
.nav-toggle span::before { top: -7px; }
.nav-toggle span::after { top: 7px; }

@media (max-width: 880px) {
  .site-header { padding: 0 24px; }
  .nav { display: none; }
  .nav-toggle { display: inline-flex; }
  .nav-cta { display: none; }
  .site-header.menu-open + .mobile-nav { display: flex; }
}
.mobile-nav {
  display: none;
  position: fixed; top: var(--nav-h); left: 0; right: 0;
  background: var(--paper); border-bottom: 1px solid var(--line);
  padding: 24px; flex-direction: column; gap: 6px;
  z-index: 99;
}
.mobile-nav .nav-link { padding: 14px 0; border-bottom: 1px solid var(--line-2); }

/* ── Buttons ──────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 18px 32px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 14px; letter-spacing: 0.24em; text-transform: uppercase;
  font-weight: 700; color: var(--ink);
  border: 1px solid var(--ink); background: transparent;
  cursor: pointer; transition: all 0.2s ease;
}
.btn:hover { background: var(--ink); color: var(--paper); }
.btn.primary {
  background: var(--accent); color: #fff; border-color: var(--accent);
}
.btn.primary:hover { background: var(--ps-blue-dark); border-color: var(--ps-blue-dark); }
.btn.light { color: #fff; border-color: rgba(255,255,255,0.5); }
.btn.light:hover { background: #fff; color: var(--ink); border-color: #fff; }
.btn .arrow {
  display: inline-block; width: 14px; height: 1px; background: currentColor;
  position: relative; transition: width 0.2s ease;
}
.btn .arrow::after {
  content: ""; position: absolute; right: 0; top: -3px;
  width: 7px; height: 7px;
  border-top: 1px solid currentColor;
  border-right: 1px solid currentColor;
  transform: rotate(45deg);
}
.btn:hover .arrow { width: 22px; }

/* ── Footer ───────────────────────────────────────────────────── */
.site-footer {
  background: var(--black); color: #fff;
  padding: 100px 0 32px;
}
.site-footer .wrap { color: #fff; }
.site-footer h2 em { color: var(--accent-soft); }

/* Footer logo: sit the full-color mark on a paper plate so its
   original steel-blue + slate-grey identity is preserved on dark. */
.footer-logo {
  display: inline-flex;
  padding: 14px 20px;
  background: var(--paper);
  border-radius: 2px;
  align-items: center;
}
.footer-logo .logo-mark { height: 44px; display: block; }
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 64px; padding-bottom: 80px;
  border-bottom: 1px solid rgba(255,255,255,0.18);
}
.footer-grid h4 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 13px; letter-spacing: 0.28em; text-transform: uppercase;
  color: rgba(255,255,255,0.5); font-weight: 700;
  margin: 0 0 20px;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.footer-grid li a, .footer-grid p {
  font-family: 'Lato', sans-serif; font-size: 16px; line-height: 1.6;
  color: rgba(255,255,255,0.75);
  transition: color 0.2s ease;
}
.footer-grid li a:hover { color: var(--accent-soft); }
.footer-meta {
  display: flex; justify-content: space-between; padding-top: 32px;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase;
  color: rgba(255,255,255,0.45); font-weight: 600;
}
@media (max-width: 880px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  .footer-meta { flex-direction: column; gap: 14px; }
}

/* ── Scroll reveals ───────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
}
.reveal.is-in {
  opacity: 1 !important;
  transform: none !important;
  animation: revealUp 0.9s cubic-bezier(.16,.84,.32,1);
  animation-delay: var(--delay, 0ms);
  animation-fill-mode: backwards;
}
.reveal.is-in.instant {
  animation: none;
}
@keyframes revealUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: none; }
}

.reveal.stagger > * {
  opacity: 0; transform: translateY(24px);
}
.reveal.stagger.is-in > * {
  opacity: 1 !important;
  transform: none !important;
  animation: revealUp 0.8s cubic-bezier(.16,.84,.32,1);
  animation-fill-mode: backwards;
}
.reveal.stagger.is-in.instant > * {
  animation: none;
}
.reveal.stagger.is-in > *:nth-child(1) { animation-delay: 0ms; }
.reveal.stagger.is-in > *:nth-child(2) { animation-delay: 80ms; }
.reveal.stagger.is-in > *:nth-child(3) { animation-delay: 160ms; }
.reveal.stagger.is-in > *:nth-child(4) { animation-delay: 240ms; }
.reveal.stagger.is-in > *:nth-child(5) { animation-delay: 320ms; }
.reveal.stagger.is-in > *:nth-child(6) { animation-delay: 400ms; }
.reveal.stagger.is-in > *:nth-child(7) { animation-delay: 480ms; }
.reveal.stagger.is-in > *:nth-child(8) { animation-delay: 560ms; }
.reveal.stagger.is-in > *:nth-child(9) { animation-delay: 640ms; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.stagger > * { opacity: 1; transform: none; animation: none; }
}

/* ── Hero (homepage) ──────────────────────────────────────────── */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: flex-end;
  overflow: hidden;
  color: #fff;
  padding-top: var(--nav-h);
}
.hero-photo {
  position: absolute; inset: 0; z-index: 0;
  background-size: cover; background-position: center;
}
.hero-photo::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(13,31,45,0.5) 0%, rgba(13,31,45,0.15) 30%, rgba(13,31,45,0.85) 95%),
    linear-gradient(90deg, rgba(13,31,45,0.55) 0%, rgba(13,31,45,0.15) 60%);
}
.hero-photo::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--accent); z-index: 2;
}
.hero-content {
  position: relative; z-index: 1;
  width: 100%; padding: 0 64px 80px;
  max-width: 1568px; margin: 0 auto;
}
@media (max-width: 880px) { .hero-content { padding: 0 28px 60px; } }

.hero-meta-top {
  position: absolute; top: 120px; left: 64px; right: 64px;
  display: flex; justify-content: space-between;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 12px; letter-spacing: 0.32em; text-transform: uppercase;
  color: rgba(255,255,255,0.7); font-weight: 600;
  z-index: 1;
}
@media (max-width: 880px) { .hero-meta-top { left: 28px; right: 28px; top: 110px; flex-direction: column; gap: 12px; } }

.hero h1 {
  color: #fff;
  font-size: clamp(56px, 9vw, 168px);
  max-width: 1400px;
  margin-bottom: 32px;
}
.hero h1 em { color: var(--accent-soft); }
.hero .lead {
  color: rgba(255,255,255,0.85);
  max-width: 640px;
  margin: 0 0 40px;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-bottom {
  position: absolute; left: 64px; right: 64px; bottom: 32px;
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 12px; letter-spacing: 0.28em; text-transform: uppercase;
  color: rgba(255,255,255,0.55); font-weight: 600;
  z-index: 1;
  display: none; /* used by scroll cue alt position; hidden on main hero */
}

.scroll-cue {
  position: absolute; right: 64px; bottom: 40px; z-index: 1;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 11px; letter-spacing: 0.32em; text-transform: uppercase;
  color: rgba(255,255,255,0.7); font-weight: 600;
  display: flex; align-items: center; gap: 12px;
}
.scroll-cue::after {
  content: ""; width: 1px; height: 48px;
  background: linear-gradient(180deg, rgba(255,255,255,0.6), rgba(255,255,255,0));
  animation: cue 2.4s ease-in-out infinite;
}
@keyframes cue {
  0%, 100% { transform: scaleY(0.4); opacity: 0.4; transform-origin: top; }
  50% { transform: scaleY(1); opacity: 1; transform-origin: top; }
}
@media (max-width: 880px) { .scroll-cue { display: none; } }

/* ── Page hero (sub pages) ────────────────────────────────────── */
.page-hero {
  padding: calc(var(--nav-h) + 80px) 0 80px;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.page-hero::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--accent);
}
.page-hero .crumbs {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 12px; letter-spacing: 0.28em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 600;
  margin-bottom: 28px;
}
.page-hero .crumbs span { color: var(--ink); }
.page-hero h1 { font-size: clamp(56px, 6.4vw, 124px); }
.page-hero .lead { margin-top: 32px; }

/* ── Project card ─────────────────────────────────────────────── */
.project-card {
  display: block; position: relative;
  background: var(--paper-2);
  overflow: hidden;
  cursor: pointer;
}
.project-card .pc-photo {
  width: 100%; aspect-ratio: 4 / 3;
  background-size: cover; background-position: center;
  transition: transform 1s cubic-bezier(.2,.7,.2,1);
}
.project-card:hover .pc-photo { transform: scale(1.05); }
.project-card .pc-meta {
  padding: 24px 0 4px;
  display: flex; justify-content: space-between; align-items: baseline;
  border-top: 1px solid var(--line);
  margin-top: 0;
}
.project-card .pc-num {
  font-family: 'JetBrains Mono', monospace; font-size: 12px;
  letter-spacing: 0.12em; color: var(--accent); font-weight: 500;
}
.project-card .pc-cat {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 12px; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 600;
}
.project-card .pc-name {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800; font-size: 36px; line-height: 1.0;
  letter-spacing: 0.01em; text-transform: uppercase;
  margin: 14px 0 6px; color: var(--ink);
}
.project-card .pc-loc {
  font-family: 'Lato', sans-serif; font-size: 15px;
  color: var(--ink-3); margin: 0;
}
.project-card .pc-overlay {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 24px;
  background: linear-gradient(180deg, rgba(13,31,45,0) 0%, rgba(13,31,45,0.85) 100%);
  color: #fff;
  transform: translateY(100%);
  transition: transform 0.5s cubic-bezier(.2,.7,.2,1);
  display: flex; justify-content: space-between; align-items: flex-end;
}
.project-card:hover .pc-overlay { transform: translateY(0); }
.project-card .pc-overlay .specs {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 13px; letter-spacing: 0.18em; text-transform: uppercase;
  font-weight: 600;
}
.project-card .pc-overlay .specs strong { display: block; font-size: 22px; letter-spacing: 0.04em; font-weight: 700; }
.project-card .pc-overlay .view {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 12px; letter-spacing: 0.28em; text-transform: uppercase;
  font-weight: 700; color: var(--accent-soft);
  display: flex; align-items: center; gap: 10px;
}
.project-card .pc-photo-wrap {
  position: relative; overflow: hidden;
}

/* ── Stat ─────────────────────────────────────────────────────── */
.stat {
  display: flex; flex-direction: column; gap: 8px;
  padding: 28px 0 0;
  border-top: 1px solid var(--line);
}
.dark .stat { border-color: rgba(255,255,255,0.18); }
.stat .num {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 800; font-size: clamp(56px, 6vw, 104px);
  line-height: 0.9; letter-spacing: 0.005em; color: var(--ink);
}
.dark .stat .num { color: #fff; }
.stat .num .small {
  font-size: 32px; font-weight: 600; vertical-align: top;
  margin-left: 6px; color: var(--ink-3); letter-spacing: 0.04em;
}
.dark .stat .num .small { color: rgba(255,255,255,0.55); }
.stat .lab {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 13px; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--accent); font-weight: 700;
  margin-top: 8px;
}
.dark .stat .lab { color: var(--accent-soft); }
.stat .desc {
  font-family: 'Lato', sans-serif; font-size: 15px;
  color: var(--ink-2); line-height: 1.45; margin-top: 4px;
}
.dark .stat .desc { color: rgba(255,255,255,0.7); }

/* ── Utility ──────────────────────────────────────────────────── */
.grid { display: grid; }
.flex { display: flex; }
.col { display: flex; flex-direction: column; }
.between { justify-content: space-between; }
.center { align-items: center; }
.gap-16 { gap: 16px; } .gap-24 { gap: 24px; } .gap-32 { gap: 32px; }
.gap-48 { gap: 48px; } .gap-64 { gap: 64px; } .gap-80 { gap: 80px; }
.italic { font-style: italic; }
.mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; } .mt-64 { margin-top: 64px; } .mt-80 { margin-top: 80px; }
.mt-100 { margin-top: 100px; }
.mb-16 { margin-bottom: 16px; } .mb-24 { margin-bottom: 24px; } .mb-48 { margin-bottom: 48px; }

.text-mono {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px; letter-spacing: 0.1em;
  color: var(--ink-3);
}
