:root {
  --navy: #022556;
  --navy-2: #0a336b;
  --red: #C20E1E;
  --red-d: #9e0b18;
  --white: #ffffff;
  --paper: #f4f6f8;
  --ink: #022556;
  --muted: #4a5c73;
  --line: rgba(2, 37, 86, 0.12);
  --line-strong: rgba(2, 37, 86, 0.22);
  --shadow: 0 10px 30px rgba(2, 37, 86, 0.08);
  --max: 1140px;
  --sans: "Montserrat", Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  font-weight: 400;
  color: var(--ink);
  background: var(--white);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); }
a:hover { color: var(--red); }
:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

.wrap {
  width: min(var(--max), calc(100% - 48px));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 80px;
  padding: 10px 0;
}
.brand img {
  width: 210px;
  height: auto;
}
.nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.nav a {
  text-decoration: none;
  color: var(--navy);
  font-weight: 600;
  font-size: 0.86rem;
  letter-spacing: 0.04em;
}
.nav a:hover { color: var(--red); }
.nav-cta {
  background: var(--navy) !important;
  color: #fff !important;
  padding: 10px 16px;
  border-radius: 2px;
  letter-spacing: 0.03em;
}
.nav-cta:hover { background: var(--red) !important; }
.menu-btn {
  display: none;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
}
.menu-btn span,
.menu-btn span::before,
.menu-btn span::after {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--navy);
  position: relative;
  transition: 0.2s;
}
.menu-btn span::before,
.menu-btn span::after {
  content: "";
  position: absolute;
  left: 0;
}
.menu-btn span::before { top: -7px; }
.menu-btn span::after { top: 7px; }

/* Hero */
.hero {
  padding: 72px 0 88px;
  border-bottom: 1px solid var(--line);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center;
  gap: 56px;
}
.hero-logo {
  width: 100%;
  max-width: 560px;
  height: auto;
}
.eyebrow {
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red);
  margin: 0 0 12px;
}
h1, h2, h3 {
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 16px;
  color: var(--navy);
}
h1 {
  font-size: clamp(2.05rem, 4.2vw, 3.1rem);
  max-width: none;
  letter-spacing: -0.03em;
}
h2 { font-size: clamp(1.7rem, 3.2vw, 2.25rem); }
h3 { font-size: 1.15rem; letter-spacing: -0.01em; margin-bottom: 8px; }
.lead {
  font-size: 1.12rem;
  color: var(--muted);
  max-width: 58ch;
  margin: 0 0 16px;
}
.hero-ai {
  margin: 0 0 20px;
  max-width: 58ch;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.5;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-promise {
  margin: 0 0 28px;
  max-width: 58ch;
  font-weight: 600;
  font-size: 1.05rem;
  line-height: 1.45;
  color: var(--navy);
  padding-left: 14px;
  border-left: 3px solid var(--red);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.03em;
  padding: 13px 22px;
  border-radius: 2px;
  border: 1.5px solid transparent;
  cursor: pointer;
  font-family: inherit;
}
.btn-primary { background: var(--navy); color: #fff !important; }
.btn-primary:hover { background: var(--red); }
.btn-ghost {
  background: transparent;
  color: var(--navy) !important;
  border-color: var(--navy);
}
.btn-ghost:hover { border-color: var(--red); color: var(--red) !important; }

/* Sections */
section { padding: 88px 0; }
.section-head { margin-bottom: 40px; max-width: 680px; }
.section-head p { color: var(--muted); margin: 0; }
.paper { background: var(--paper); }

/* Services */
.services-list,
.service-groups {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.service,
.service-group {
  padding: 28px 26px 30px;
  border: 1px solid var(--line);
  background: var(--white);
}
.service-num {
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  color: var(--red);
  margin-bottom: 10px;
}
.service p,
.service-group p { margin: 0; color: var(--muted); }
.service-group ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.service-group li {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
  padding: 10px 0 0;
  margin: 10px 0 0;
  border-top: 1px solid var(--line);
}
.service-group li:first-child {
  border-top: 0;
  margin-top: 0;
  padding-top: 0;
}
.service-group li strong {
  color: var(--navy);
  font-weight: 700;
}
.service-featured {
  background: var(--navy);
  color: #fff;
  padding: 32px 36px 34px;
  margin: 0 0 20px;
  border: 0;
  border-top: 4px solid var(--red);
}
.service-featured h3 {
  color: #fff;
  font-size: 1.45rem;
  margin: 0 0 10px;
}
.service-featured p {
  margin: 0;
  max-width: 42em;
  color: rgba(255,255,255,0.9);
}
.service-featured .service-num {
  color: #ffb3b8;
}

/* Our Approach process graphic */
.approach-graphic {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.approach-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px 24px;
  position: relative;
}
.approach-steps::before {
  content: "";
  position: absolute;
  top: 19px;
  left: 16.666%;
  right: 16.666%;
  height: 2px;
  background: var(--navy);
  z-index: 0;
}
.approach-step {
  margin: 0;
  padding: 0 8px 8px;
  text-align: center;
  position: relative;
  z-index: 1;
}
.approach-num {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  box-shadow: 0 0 0 6px var(--white);
  position: relative;
  z-index: 1;
}
.approach-step-adapt .approach-num {
  background: var(--red);
}
.approach-step-plan-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 3px solid var(--red);
  border-radius: 2px;
  padding: 0 16px 18px;
}
.approach-step-plan-card .approach-num {
  box-shadow: 0 0 0 6px var(--paper);
  margin-top: -3px;
}
.approach-step h3 {
  font-size: 1.05rem;
  margin: 0 0 8px;
}
.approach-step p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.approach-feed,
.approach-loop {
  position: relative;
  height: 72px;
  margin: 0 0 8px;
}
.approach-feed-svg,
.approach-loop-svg {
  display: block;
  width: 100%;
  height: 72px;
  overflow: visible;
}
.approach-feed-label,
.approach-loop-label,
.approach-cycle-label {
  margin: 0;
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red);
}
.approach-feed-label {
  position: absolute;
  left: 52%;
  top: 46px;
}
.approach-loop-label {
  position: absolute;
  left: 50%;
  top: 46px;
  transform: translateX(-50%);
  white-space: nowrap;
  background: var(--white);
  padding: 0 8px;
}

.approach-cycle {
  position: relative;
  border: 1.5px solid rgba(2, 37, 86, 0.18);
  border-radius: 6px;
  padding: 28px 16px 8px;
  margin-top: 12px;
  background: var(--white);
}
.approach-cycle-label {
  position: absolute;
  top: -10px;
  left: 24px;
  background: var(--white);
  padding: 0 10px;
}
.approach-cycle .approach-num {
  box-shadow: 0 0 0 6px var(--white);
}

/* Service Standards */
.standards-tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.standard-stat-text {
  letter-spacing: -0.03em;
}
.standard-tile {
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 4px solid var(--red);
  padding: 28px 30px 30px;
}
.standard-stat {
  font-weight: 700;
  font-size: clamp(2.8rem, 5vw, 3.6rem);
  letter-spacing: -0.04em;
  line-height: 0.95;
  margin: 0 0 16px;
  color: var(--navy);
  display: flex;
  align-items: baseline;
  gap: 0.06em;
}
.standard-prefix {
  color: var(--red);
  font-size: 0.78em;
  letter-spacing: -0.06em;
}
.standard-unit {
  font-size: 1.05rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
  margin-left: 0.28em;
  color: var(--navy);
}
.standard-tile h3 {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

/* Why Valor */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.pillar {
  background: var(--white);
  border: 1px solid var(--line);
  padding: 28px 26px 32px;
  box-shadow: var(--shadow);
}
.pillar h3 { margin-top: 0; }
.pillar p { margin: 0; color: var(--muted); }
.rule {
  width: 36px;
  height: 3px;
  background: var(--red);
  margin-bottom: 18px;
}

/* Work / cases */
.cases { display: flex; flex-direction: column; gap: 28px; }
.case {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  align-items: center;
  background: var(--white);
  border: 1px solid var(--line);
  padding: 32px 36px;
  box-shadow: var(--shadow);
}
.case-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 140px;
  padding: 16px;
}
.case-logo img { width: 100%; max-height: 130px; object-fit: contain; }
.case-logo.dark {
  background: #000;
  border-radius: 4px;
  padding: 22px 18px;
}
.case-logo.dark img { max-height: 96px; }
.case-meta {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--muted);
  margin: 0 0 12px;
}
.case-body p { margin: 0 0 12px; color: var(--muted); }
.case-body p:last-child { margin-bottom: 0; }
.case h3 { font-size: 1.4rem; margin-bottom: 4px; }
.case-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 20px;
  margin-top: 18px;
}
.site-link {
  font-weight: 700;
  text-decoration: none;
  color: var(--navy);
  font-size: 0.95rem;
}
.site-link:hover { color: var(--red); }
.socials {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  color: var(--navy);
  text-decoration: none;
}
.socials a:hover {
  border-color: var(--red);
  color: var(--red);
  background: #fff;
}
.socials svg { width: 16px; height: 16px; fill: currentColor; display: block; }

/* Flagship case */
.case-flagship {
  grid-template-columns: 1fr;
  gap: 26px;
  padding: 40px 42px 34px;
  align-items: stretch;
  border-color: rgba(2, 37, 86, 0.16);
  position: relative;
}
.case-flagship::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--red);
}
.case-flagship-top {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) minmax(220px, 250px);
  gap: 28px 32px;
  align-items: start;
}
.case-result {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}
.case-stat {
  background: var(--navy);
  color: #fff;
  text-align: center;
  padding: 20px 18px 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
}
.case-stat-value {
  font-weight: 700;
  font-size: clamp(2.6rem, 4.2vw, 3.5rem);
  letter-spacing: -0.04em;
  line-height: 0.95;
  margin: 0 0 10px;
  color: #fff;
}
.case-stat-caption {
  margin: 0 auto;
  max-width: 13em;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.02em;
  color: rgba(255,255,255,0.88);
}
.sales-chart {
  margin: 0;
  padding: 10px 10px 8px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 0;
}
.sales-chart figcaption {
  margin: 0 0 2px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--navy);
  text-align: left;
}
.sales-chart-plot { width: 100%; }
.sales-chart-plot svg {
  display: block;
  width: 100%;
  height: auto;
}
.case-flagship .case-logo {
  min-height: 0;
  padding: 8px 16px 8px 0;
}
.case-flagship .case-logo img {
  max-height: 120px;
}
.case-flagship h3 { font-size: 1.7rem; margin-bottom: 4px; }
.case-flagship .eyebrow { margin-bottom: 8px; }
.case-flagship .case-meta { margin-bottom: 10px; }
.case-flagship-top p:last-child { margin: 0; color: var(--muted); }

.deliverables {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 28px;
  list-style: none;
  margin: 0;
  padding: 22px 0 0;
  border-top: 1px solid var(--line);
}
.deliverables li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.45;
  margin: 0;
}
.deliverables .ico {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  margin-top: 1px;
  border-radius: 2px;
  background: var(--paper);
  color: var(--navy);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.deliverables .ico svg { width: 15px; height: 15px; fill: currentColor; display: block; }
.deliverable-strategy {
  grid-column: 1 / -1;
  background: var(--paper);
  padding: 14px 16px;
  border-left: 3px solid var(--red);
  margin-top: 4px;
  align-items: flex-start;
}
.case-flagship .case-links { margin-top: 4px; }

/* About */
.about-grid {
  display: grid;
  grid-template-columns: minmax(240px, 0.78fr) minmax(0, 1.22fr);
  gap: 28px 64px;
  align-items: center;
}
.about-photo {
  margin: 0;
  position: relative;
  max-width: 420px;
}
.about-photo::before {
  content: "";
  position: absolute;
  inset: 16px -14px -14px 16px;
  border-radius: 16px;
  background: var(--red);
  z-index: 0;
}
.about-photo-frame {
  position: relative;
  z-index: 1;
  border-radius: 14px;
  overflow: hidden;
  border: 3px solid var(--navy);
  background: var(--navy);
  box-shadow: var(--shadow);
}
.about-photo-frame img {
  width: 100%;
  height: auto;
  display: block;
  vertical-align: middle;
}
.about-copy p { color: var(--muted); margin: 0 0 16px; }
.about-copy p:last-child { margin-bottom: 0; }
.about-name {
  font-weight: 700;
  color: var(--navy);
  font-size: 1.05rem;
  margin-bottom: 2px !important;
}
.about-title { color: var(--red) !important; font-weight: 600; margin-bottom: 18px !important; }

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
  align-items: stretch;
}
form {
  display: grid;
  gap: 14px;
}
label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 600;
  font-size: 0.86rem;
}
input, textarea {
  font: inherit;
  font-weight: 400;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  background: #fff;
  color: var(--ink);
  width: 100%;
}
input:focus, textarea:focus {
  outline: 2px solid var(--navy);
  outline-offset: 0;
  border-color: var(--navy);
}
textarea { min-height: 140px; resize: vertical; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.form-note { font-size: 0.86rem; color: var(--muted); margin: 4px 0 0; }
.contact-aside {
  background: var(--navy);
  color: #fff;
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.contact-aside h2, .contact-aside p { color: #fff; }
.contact-aside p { opacity: 0.9; }
.contact-aside a { color: #fff; font-weight: 700; }
.contact-aside a:hover { color: #ffd4d7; }
.mail-link { font-size: 1.02rem; overflow-wrap: anywhere; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 36px 0 40px;
  background: var(--white);
}
.footer-in {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 28px;
}
.footer-brand img { width: 160px; }
.footer-meta {
  color: var(--muted);
  font-size: 0.82rem;
  margin: 0;
}
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.footer-nav a {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--navy);
}
.footer-nav a:hover { color: var(--red); }

/* Utility / thanks / 404 */
.simple {
  min-height: calc(100vh - 200px);
  padding: 80px 0;
}
.simple h1 { max-width: none; }

/* Responsive */
@media (max-width: 1100px) {
  .standards-tiles { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .pillars, .about-grid, .contact-grid, .case, .hero-grid {
    grid-template-columns: 1fr;
  }
  .hero-grid { gap: 28px; }
  .about-photo {
    max-width: 360px;
    margin: 0 auto 8px;
  }
  .about-photo::before {
    inset: 12px -10px -10px 12px;
  }
  .case { padding: 24px; gap: 12px; }
  .case-logo { min-height: 110px; }
  .case-flagship { padding: 28px 22px 24px; }
  .case-flagship-top, .deliverables {
    grid-template-columns: 1fr;
  }
  .case-flagship-top { display: flex; flex-direction: column; }
  .case-flagship-top .case-logo { order: 0; }
  .case-flagship-top .case-flagship-intro { order: 1; }
  .case-flagship-top .case-result { order: 2; }
  .case-stat { min-height: 0; padding: 22px 18px; }
  .case-flagship .case-logo {
    max-width: 200px;
    padding: 0;
    margin: 0 auto;
  }
  .deliverable-strategy { grid-column: auto; }
  .services-list,
  .service-groups { grid-template-columns: 1fr; gap: 14px; }
  .service,
  .service-group { grid-column: auto; }
  .service-featured { padding: 28px 24px 30px; }
  .approach-steps { grid-template-columns: 1fr; gap: 0; }
  .approach-steps::before {
    left: 19px;
    right: auto;
    top: 20px;
    bottom: 20px;
    width: 2px;
    height: auto;
  }
  .approach-step {
    display: grid;
    grid-template-columns: 40px 1fr;
    grid-template-rows: auto auto;
    column-gap: 18px;
    text-align: left;
    padding: 12px 0 20px;
  }
  .approach-num {
    grid-row: 1 / span 2;
    margin: 0;
  }
  .approach-step h3,
  .approach-step p { grid-column: 2; }
  .approach-step-plan-card {
    padding: 12px 16px 18px;
    margin: 8px 0;
  }
  .approach-step-plan-card .approach-num { margin-top: 0; }
  .approach-steps-plan > .approach-step:nth-child(2)::after {
    content: "↓  Key inputs to the plan";
    grid-column: 2;
    display: block;
    margin-top: 12px;
    font-weight: 700;
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--red);
    border-left: 3px solid var(--red);
    padding-left: 12px;
    line-height: 1.4;
  }
  .approach-feed { display: none; }
  .approach-loop {
    height: auto;
    margin: 0 0 8px 58px;
  }
  .approach-loop-svg { display: none; }
  .approach-loop-label {
    position: static;
    left: auto;
    top: auto;
    transform: none;
    white-space: normal;
    background: transparent;
    padding: 0 0 0 12px;
    border-left: 3px solid var(--red);
    line-height: 1.4;
  }
  .approach-feed-label::before {
    content: "↓ ";
    letter-spacing: 0;
  }
  .approach-loop-label::before {
    content: "↺ ";
    letter-spacing: 0;
  }
  .approach-cycle {
    padding: 28px 16px 16px;
  }
  .approach-cycle .approach-steps::before {
    left: 19px;
  }
  .standards-tiles { grid-template-columns: 1fr; }
  section { padding: 64px 0; }
  .hero { padding: 48px 0 64px; }
}
@media (max-width: 780px) {
  .wrap { width: min(var(--max), calc(100% - 36px)); }
  .menu-btn { display: block; }
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 24px 24px;
    gap: 16px;
  }
  .nav.open { display: flex; }
  .nav-cta { align-self: flex-start; }
  .brand img { width: 168px; }
  .header-in { min-height: 68px; }
  h1 { max-width: none; }
  .hero-grid { grid-template-columns: 1fr; gap: 24px; }
  .socials a { width: 30px; height: 30px; }
  .socials { gap: 6px; }
  .mail-link { font-size: 0.92rem; }
}

@media (max-width: 600px) {
  .service,
  .service-group { padding: 24px 22px 26px; }
  .approach-loop-label { white-space: normal; }
  .standards-tiles { grid-template-columns: 1fr; }
  .standard-tile { padding: 24px 22px 26px; }
}

.optional { font-weight: 400; color: var(--muted); }


/* PHJ case logo sits on the site navy, not flat black */
.case-logo.phj {
  background: #0f1e36;
  border-radius: 4px;
  padding: 22px 18px;
}

/* Portfolio */
#portfolio { padding: 72px 0 80px; }
.portfolio-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 36px;
}
.portfolio-filters button {
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--navy);
  background: transparent;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  line-height: 1.2;
}
.portfolio-filters button:hover { border-color: var(--navy); }
.portfolio-filters button.is-active {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}
.portfolio-group { margin: 0 0 48px; min-width: 0; }
.portfolio-group:last-child { margin-bottom: 0; }
.portfolio-group h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 16px;
  color: var(--navy);
}
.portfolio-group-lead {
  margin: -8px 0 16px;
  color: var(--muted);
  font-size: 0.95rem;
  max-width: 40em;
}
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 22px 20px;
  min-width: 0;
}
.portfolio-tile {
  margin: 0;
  min-width: 0;
}
.portfolio-tile.tile-phone {
  max-width: 260px;
}
.portfolio-open {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.tile-caption, .portfolio-tile figcaption, .portfolio-tile .caption-open {
  display: block;
  margin-top: 10px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.35;
}
.portfolio-tile .caption-open {
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
  font: inherit;
}
.portfolio-tile .caption-open:hover, .portfolio-open:hover .tile-caption { color: var(--red); }
.tile-note {
  display: block;
  margin: 4px 0 0;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.35;
}

.frame-browser {
  display: block;
  background: #e6ebf1;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  overflow: hidden;
  min-width: 0;
}
.browser-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding: 0 10px;
  background: #d4dbe4;
}
.browser-bar span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #b4bec9;
}
.frame-browser img {
  width: 100%;
  height: auto;
  aspect-ratio: 1440 / 900;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.frame-phone {
  display: block;
  background: #111827;
  border-radius: 28px;
  padding: 12px 10px 18px;
  box-shadow: 0 8px 24px rgba(2, 37, 86, 0.16);
  max-width: 260px;
}
.frame-phone::before {
  content: "";
  display: block;
  width: 36px;
  height: 5px;
  border-radius: 99px;
  background: #374151;
  margin: 0 auto 8px;
}
.frame-phone img,
.frame-phone video {
  width: 100%;
  height: auto;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  object-position: center top;
  display: block;
  border-radius: 16px;
  background: #000;
  max-width: 100%;
}
.coming-soon {
  aspect-ratio: 9 / 16;
  border-radius: 16px;
  background: var(--navy);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.frame-plain {
  display: block;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  min-width: 0;
}
.frame-plain img {
  width: 100%;
  height: auto;
  max-height: 280px;
  object-fit: contain;
  object-position: center;
  display: block;
  margin: 0 auto;
  background: #fff;
}

/* Lightbox */
.lightbox[hidden] { display: none; }
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}
.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 37, 86, 0.72);
}
.lightbox-dialog {
  position: relative;
  z-index: 1;
  max-width: min(960px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  background: #fff;
  border-radius: 12px;
  padding: 44px 20px 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.28);
  min-width: 0;
}
.lightbox-close {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  color: var(--navy);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}
.lightbox-close:hover { color: var(--red); }
.lightbox-media { min-width: 0; }
.lightbox-media img,
.lightbox-media video {
  display: block;
  max-width: 100%;
  height: auto;
  max-height: calc(100vh - 160px);
  margin: 0 auto;
  background: #0b1220;
}
.lightbox-media video.lightbox-video-vertical {
  max-height: calc(100vh - 160px);
  max-width: min(100%, 360px);
}
.lightbox-caption {
  margin: 12px 0 0;
  text-align: center;
  font-weight: 600;
  color: var(--navy);
  font-size: 0.95rem;
}

@media (max-width: 900px) {
  #portfolio { padding: 56px 0 64px; }
  .portfolio-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; }
  .portfolio-tile.tile-phone { max-width: 220px; }
}
@media (max-width: 600px) {
  .portfolio-grid { grid-template-columns: 1fr 1fr; }
  .portfolio-filters button { font-size: 0.75rem; padding: 7px 11px; }
  .lightbox-dialog { padding: 40px 12px 16px; }
}
@media (max-width: 420px) {
  .portfolio-grid { grid-template-columns: 1fr; }
  .portfolio-tile.tile-phone { max-width: 260px; margin-left: auto; margin-right: auto; }
}

.frame-social img {
  max-height: 420px;
  object-fit: contain;
  object-position: top center;
}

.portfolio-grid > .tile-break {
  grid-column-start: 1;
}
