/* ST Construction Portfolio — base styles
   Brand navy sampled from the ST Construction logo (rgb 0,51,98). */

:root {
  --pf-accent: #003362;          /* ST Construction navy (from logo) */
  --pf-accent-dark: #002544;     /* hover/active shade */
  --pf-ink: #1a1a1a;
  --pf-muted: #6b7280;
  --pf-line: #e5e7eb;
  --pf-bg: #ffffff;
  --pf-bg-soft: #f7f7f5;
  --pf-radius: 10px;
  --pf-maxw: 1200px;
  --pf-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* Scope everything under .pf-* so it is safe to embed in Squarespace without
   colliding with the theme. Avoid styling bare html/body in embed mode. */
.pf-wrap { max-width: var(--pf-maxw); margin: 0 auto; padding: 0 20px; }
.pf-header { padding: 40px 0 8px; }
.pf-logo { display: block; height: 60px; width: auto; margin: 0 0 18px; }
.pf-title { font-family: var(--pf-font); font-size: clamp(28px, 4vw, 44px); color: var(--pf-ink); margin: 0 0 6px; letter-spacing: -0.01em; }
.pf-subtitle { font-family: var(--pf-font); color: var(--pf-muted); margin: 0; font-size: 16px; }
.pf-loading { font-family: var(--pf-font); color: var(--pf-muted); padding: 40px 0; }

/* Filter bar */
.pf-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 28px; }
.pf-filter {
  font-family: var(--pf-font); font-size: 14px; cursor: pointer;
  border: 1px solid var(--pf-line); background: var(--pf-bg); color: var(--pf-ink);
  padding: 8px 14px; border-radius: 999px; transition: all .15s ease;
}
.pf-filter:hover { border-color: var(--pf-accent); }
.pf-filter[aria-pressed="true"] { background: var(--pf-accent); border-color: var(--pf-accent); color: #fff; }

/* Grid */
.pf-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 56px; }
@media (max-width: 900px) { .pf-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .pf-grid { grid-template-columns: 1fr; } }

.pf-card {
  position: relative; display: block; border-radius: var(--pf-radius); overflow: hidden;
  background: var(--pf-bg-soft); text-decoration: none; color: inherit; aspect-ratio: 4 / 3;
}
.pf-card img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.pf-card:hover img { transform: scale(1.05); }
.pf-card-overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 18px; color: #fff; font-family: var(--pf-font);
  background: linear-gradient(to top, rgba(0,0,0,.72) 0%, rgba(0,0,0,.12) 55%, rgba(0,0,0,0) 100%);
  transition: background .35s ease;
}
/* Hover: navy brand wash fades in over the whole tile */
.pf-card:hover .pf-card-overlay {
  background: linear-gradient(to top, rgba(0,37,68,.95) 0%, rgba(0,51,98,.88) 100%);
}
.pf-card-type { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; opacity: .92; }
.pf-card-name { font-size: 19px; font-weight: 600; margin: 3px 0 0; line-height: 1.25; }
/* Services line + CTA stay hidden until hover, then reveal */
.pf-card-meta {
  font-size: 13px; color: rgba(255,255,255,.85); margin-top: 0;
  max-height: 0; opacity: 0; overflow: hidden;
  transition: max-height .35s ease, opacity .3s ease, margin-top .35s ease;
}
.pf-card:hover .pf-card-meta { max-height: 64px; opacity: 1; margin-top: 7px; }
.pf-card-cta {
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
  font-size: 13px; font-weight: 600; letter-spacing: .02em;
  margin-top: 14px; padding: 9px 16px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.85); color: #fff;
  opacity: 0; transform: translateY(8px);
  transition: opacity .3s ease, transform .3s ease, background .2s ease, border-color .2s ease;
}
.pf-card:hover .pf-card-cta { opacity: 1; transform: none; }
.pf-card-cta:hover { background: #fff; border-color: #fff; color: var(--pf-accent); }
.pf-card-cta .pf-arrow { transition: transform .25s ease; }
.pf-card:hover .pf-card-cta .pf-arrow { transform: translateX(3px); }

@media (prefers-reduced-motion: reduce) {
  .pf-card img, .pf-card-overlay, .pf-card-meta, .pf-card-cta, .pf-card-cta .pf-arrow { transition: none; }
}

/* Detail */
.pf-back { font-family: var(--pf-font); display: inline-block; margin: 28px 0 18px; color: var(--pf-accent); text-decoration: none; font-weight: 600; font-size: 14px; }
.pf-detail-hero { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--pf-radius); }
.pf-detail-head { display: grid; grid-template-columns: 2fr 1fr; gap: 32px; margin: 28px 0; }
@media (max-width: 760px) { .pf-detail-head { grid-template-columns: 1fr; gap: 16px; } }
.pf-detail-title { font-family: var(--pf-font); font-size: clamp(24px, 3vw, 34px); margin: 0 0 10px; color: var(--pf-ink); }
.pf-detail-desc { font-family: var(--pf-font); color: #333; line-height: 1.6; font-size: 16px; }
.pf-meta { font-family: var(--pf-font); border: 1px solid var(--pf-line); border-radius: var(--pf-radius); padding: 18px; align-self: start; }
.pf-meta dt { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--pf-muted); margin-top: 12px; }
.pf-meta dt:first-child { margin-top: 0; }
.pf-meta dd { margin: 2px 0 0; color: var(--pf-ink); font-size: 15px; }

.pf-video { position: relative; aspect-ratio: 16 / 9; margin: 8px 0 32px; border-radius: var(--pf-radius); overflow: hidden; background: #000; }
.pf-video iframe, .pf-video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.pf-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 48px; }
@media (max-width: 560px) { .pf-gallery { grid-template-columns: repeat(2, 1fr); } }
.pf-gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px; cursor: zoom-in; }

.pf-prevnext { display: flex; justify-content: space-between; border-top: 1px solid var(--pf-line); padding: 20px 0 60px; font-family: var(--pf-font); }
.pf-prevnext a { color: var(--pf-accent); text-decoration: none; font-weight: 600; }

/* Per-project contact CTA */
.pf-cta {
  font-family: var(--pf-font); color: #fff; border-radius: 18px; overflow: hidden;
  margin: 12px 0 52px;
  background:
    radial-gradient(120% 150% at 100% 0%, rgba(58,116,170,.5) 0%, rgba(0,51,98,0) 55%),
    linear-gradient(155deg, #013a6b 0%, var(--pf-accent) 48%, var(--pf-accent-dark) 100%);
  box-shadow: 0 28px 64px -30px rgba(0,37,68,.75);
}
.pf-cta-inner { display: grid; grid-template-columns: 1fr 1.1fr; gap: 46px; padding: 50px 50px 54px; }
@media (max-width: 820px) { .pf-cta-inner { grid-template-columns: 1fr; gap: 26px; padding: 34px 24px 40px; } }
.pf-cta-copy, .pf-cta-form { min-width: 0; }   /* let grid columns shrink instead of overflowing */
.pf-cta-copy { align-self: center; }
.pf-cta-eyebrow { font-size: 12px; text-transform: uppercase; letter-spacing: .15em; font-weight: 600; color: rgba(255,255,255,.7); }
.pf-cta-heading { font-size: clamp(24px, 3vw, 33px); line-height: 1.13; letter-spacing: -0.01em; margin: 12px 0 12px; }
.pf-cta-text { font-size: 15.5px; line-height: 1.6; color: rgba(255,255,255,.82); margin: 0; max-width: 40ch; }

.pf-cta-form { display: flex; flex-direction: column; gap: 14px; }
.pf-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 480px) { .pf-field-row { grid-template-columns: 1fr; } }
.pf-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: rgba(255,255,255,.85); }
.pf-field em { font-style: normal; font-weight: 400; color: rgba(255,255,255,.55); }
.pf-field input, .pf-field textarea {
  font: inherit; font-weight: 400; color: #fff; background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.22); border-radius: 10px; padding: 12px 14px; resize: vertical;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.pf-field input::placeholder, .pf-field textarea::placeholder { color: rgba(255,255,255,.45); }
.pf-field input:focus, .pf-field textarea:focus {
  outline: none; border-color: #fff; background: rgba(255,255,255,.14); box-shadow: 0 0 0 3px rgba(255,255,255,.16);
}
.pf-hp { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.pf-cta-submit {
  align-self: flex-start; margin-top: 4px; display: inline-flex; align-items: center; gap: 9px;
  font: inherit; font-weight: 700; cursor: pointer; color: var(--pf-accent);
  background: #fff; border: 0; border-radius: 999px; padding: 13px 26px;
  box-shadow: 0 10px 24px -10px rgba(0,0,0,.5);
  transition: transform .15s ease, box-shadow .2s ease, opacity .2s ease;
}
.pf-cta-submit:hover { transform: translateY(-1px); box-shadow: 0 16px 32px -12px rgba(0,0,0,.6); }
.pf-cta-submit:disabled { opacity: .6; cursor: default; transform: none; }
.pf-cta-submit .pf-arrow { transition: transform .25s ease; }
.pf-cta-submit:hover .pf-arrow { transform: translateX(3px); }
.pf-form-status { margin: 2px 0 0; font-size: 14px; min-height: 1.1em; line-height: 1.4; }
.pf-form-status.ok { color: #b8f5cc; }
.pf-form-status.err { color: #ffd6d6; }

@media (prefers-reduced-motion: reduce) {
  .pf-field input, .pf-field textarea, .pf-cta-submit, .pf-cta-submit .pf-arrow { transition: none; }
}

/* Lightbox */
.pf-lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.9); display: none; align-items: center; justify-content: center; z-index: 9999; }
.pf-lightbox.open { display: flex; }
.pf-lightbox img { max-width: 92vw; max-height: 88vh; border-radius: 6px; }
.pf-lightbox-close, .pf-lightbox-nav { position: absolute; color: #fff; background: none; border: 0; font-size: 34px; cursor: pointer; padding: 10px 18px; }
.pf-lightbox-close { top: 10px; right: 14px; }
.pf-lightbox-nav.prev { left: 8px; top: 50%; transform: translateY(-50%); }
.pf-lightbox-nav.next { right: 8px; top: 50%; transform: translateY(-50%); }
