/* ==========================================================================
   Stonehill Communities — stonehillcommunities.com
   Brand colors sampled from Stonehill-Communities-1346283-Tan-Blue-RGB.png:
     blue  #4C5E83
     tan   #D9C6A3
   ========================================================================== */

:root {
  --brand-blue: #4C5E83;
  --brand-blue-dark: #3A4A69;
  --brand-tan: #D9C6A3;
  --brand-tan-light: #EDE4D3;
  --brand-gold: #9A7B3D;
  --ink: #1C2331;
  --ink-soft: #4A5160;
  --paper: #FFFFFF;
  --paper-warm: #F8F5EF;
  --line: #E3DED2;
  --font-heading: "Montserrat", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-body: "Source Sans 3", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --nav-height: 6.5rem;
}

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

html { scroll-behavior: smooth; }

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

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

a { color: var(--brand-blue); text-decoration: none; }
a:hover, a:focus-visible { color: var(--brand-blue-dark); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--brand-tan); outline-offset: 2px; }

h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
  color: var(--ink);
  line-height: 1.2;
  margin: 0 0 0.5em;
}

.caps { text-transform: uppercase; letter-spacing: 0.08em; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 1rem; top: -4rem;
  background: var(--brand-blue); color: #fff;
  padding: 0.6rem 1.2rem; z-index: 300;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 1rem; color: #fff; }

/* --------------------------------------------------------------------------
   Top bar
   -------------------------------------------------------------------------- */
#main-nav {
  position: relative;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 6.5rem 1.25rem 2rem; /* right space reserved for the fixed hamburger */
  min-height: var(--nav-height);
}

#main-nav .brand img { width: auto; height: 6.5rem; }

#main-nav .page-heading {
  font-size: clamp(1.4rem, 3.5vw, 2.2rem);
  font-weight: 700;
  letter-spacing: 0.12em;
  margin: 0 auto;
  color: var(--brand-blue);
}

/* Home variant: bar floats over video */
.home-page #main-nav {
  position: absolute;
  top: 0; left: 0; right: 0;
  background: transparent;
}
.home-page #main-nav .brand img { height: 9rem; }

/* Mobile inner-page nav: shrink the bar and keep the logo from being
   squished next to the page title (home nav is left untouched). */
@media (max-width: 700px) {
  body:not(.home-page) #main-nav { padding: 0.85rem 5rem 0.85rem 1.25rem; min-height: 0; }
  body:not(.home-page) #main-nav .brand { flex-shrink: 0; }
  body:not(.home-page) #main-nav .brand img { height: 4rem; }
  body:not(.home-page) #main-nav .page-heading { font-size: 1.05rem; min-width: 0; }
}

/* --------------------------------------------------------------------------
   Hamburger + fullscreen menu
   -------------------------------------------------------------------------- */
.hamburger {
  position: fixed;
  top: 1.75rem; right: 2rem;
  z-index: 120;
  width: 3rem; height: 3rem;
  padding: 0.5rem;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.hamburger-inner,
.hamburger-inner::before,
.hamburger-inner::after {
  content: "";
  display: block;
  width: 2rem; height: 3px;
  background: var(--brand-blue);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease, background 0.2s ease;
}
.home-page .hamburger-inner,
.home-page .hamburger-inner::before,
.home-page .hamburger-inner::after { background: #fff; }
.hamburger-inner { position: relative; }
.hamburger-inner::before { position: absolute; top: -9px; }
.hamburger-inner::after { position: absolute; top: 9px; }

body.nav-open .hamburger-inner { background: transparent !important; }
body.nav-open .hamburger-inner::before { transform: translateY(9px) rotate(45deg); background: #fff; }
body.nav-open .hamburger-inner::after { transform: translateY(-9px) rotate(-45deg); background: #fff; }

#main-nav-container {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  background: var(--brand-blue);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
body.nav-open #main-nav-container { opacity: 1; visibility: visible; }
body.nav-open { overflow: hidden; }

#main-nav-container a {
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 5vw, 2.6rem);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  padding: 0.35rem 1rem;
}
#main-nav-container a:hover,
#main-nav-container a:focus-visible { color: var(--brand-tan); }
#main-nav-container a.active { color: var(--brand-tan); }

/* --------------------------------------------------------------------------
   Home: video hero + tagline
   -------------------------------------------------------------------------- */
.video-section {
  position: relative;
  height: 100svh;
  overflow: hidden;
  background: var(--ink);
}
.video-section iframe {
  position: absolute;
  top: 50%; left: 50%;
  width: 100vw; height: 56.25vw;       /* 16:9 */
  min-height: 100svh; min-width: 177.78svh;
  transform: translate(-50%, -50%);
  border: 0;
  pointer-events: none;
}
.jump-down {
  position: absolute;
  bottom: 2.5rem; left: 50%;
  transform: translateX(-50%);
  z-index: 10;
}
.jump-down svg { width: 3.2rem; height: auto; }
.jump-down .jump-arrow { display: block; animation: bob 2.4s ease-in-out infinite; }
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(0.5rem); }
}
@media (prefers-reduced-motion: reduce) {
  .jump-down .jump-arrow { animation: none; }
  html { scroll-behavior: auto; }
}

.tagline-section {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 55svh;
  padding: 5rem 2rem;
  background: var(--paper-warm);
  text-align: center;
}
.tagline-section h2 {
  max-width: 60ch;
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
}
.tagline-section h2 a { color: var(--brand-blue); }
.tagline-section h2 a:hover { color: var(--brand-blue-dark); }
.tagline-section h2 .line { display: block; }

/* --------------------------------------------------------------------------
   Content blocks (About)
   -------------------------------------------------------------------------- */
.content-block {
  max-width: 72rem;
  margin: 0;
  padding: 3rem 2rem;
}
.content-block .lead {
  font-size: clamp(1.2rem, 2.4vw, 1.55rem);
  line-height: 1.55;
  max-width: 56ch;
}
.content-block h2.block-title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--brand-blue);
}

.triplet-block {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  max-width: 72rem;
  margin: 0;
  padding: 1rem 2rem 4rem;
}
.triplet-block strong {
  display: block;
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--brand-blue);
  margin-bottom: 0.4rem;
}
@media (max-width: 800px) {
  .triplet-block { grid-template-columns: 1fr; gap: 1.5rem; }
}

/* --------------------------------------------------------------------------
   Gallery (About page slider)
   -------------------------------------------------------------------------- */
.gallery-block { position: relative; overflow: hidden; }
.gallery { display: flex; transition: transform 0.5s ease; }
.gallery .slide { flex: 0 0 100%; }
.gallery .slide img { width: 100%; height: clamp(20rem, 60vh, 42rem); object-fit: cover; }
.gallery-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 3rem; height: 3rem;
  border: 0; border-radius: 50%;
  background: rgba(255,255,255,0.85);
  color: var(--brand-blue);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
.gallery-btn:hover { background: #fff; }
.gallery-btn.prev { left: 1.25rem; }
.gallery-btn.next { right: 1.25rem; }

/* --------------------------------------------------------------------------
   Team
   -------------------------------------------------------------------------- */
.team-container {
  max-width: 78rem;
  margin: 0;
  padding: 2rem 2rem 4rem;
  display: flex;
  flex-direction: column;
  gap: 4rem;
}
.team-member {
  display: grid;
  grid-template-columns: minmax(16rem, 26rem) 1fr;
  gap: 3rem;
  align-items: start;
}
.team-member-image img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: top; /* keep faces in frame when the 2:3 source crops to 4:5 */
}
.team-member-name {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--brand-blue);
}
.team-member-role {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  color: var(--brand-tan);
  filter: brightness(0.72);        /* keeps tan readable on white */
  margin-bottom: 1rem;
}
.team-member-description p { margin: 0 0 1em; }
@media (max-width: 760px) {
  .team-member { grid-template-columns: 1fr; gap: 1.5rem; }
  .team-member-image img { max-width: 24rem; }
}

/* --------------------------------------------------------------------------
   Projects: featured
   -------------------------------------------------------------------------- */
.featured-projects {
  display: flex;
  flex-direction: column;
}
.featured-project {
  display: grid;
  grid-template-columns: minmax(16rem, 1fr) 2fr;
  align-items: center;
  gap: 2rem;
  padding: 2rem;
  border-bottom: 1px solid var(--line);
}
.featured-project .left h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--brand-blue);
}
.featured-project .left .location {
  display: block;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0.4rem 0 1rem;
}
.featured-project .view-link {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border-bottom: 2px solid var(--brand-tan);
  padding-bottom: 0.2rem;
}
.featured-project .right a { display: block; overflow: hidden; }
.featured-project .right img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
/* Zoom-settle as each featured image scrolls into view */
.home-featured .featured-project .right img {
  transform: scale(1.06);
  transition: transform 1.5s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.home-featured .featured-project.in-view .right img { transform: scale(1); }
@media (prefers-reduced-motion: reduce) {
  .home-featured .featured-project .right img { transform: none; transition: none; }
}
@media (max-width: 760px) {
  .featured-project { grid-template-columns: 1fr; gap: 1rem; }
}

/* --------------------------------------------------------------------------
   Projects: archive grid / list
   -------------------------------------------------------------------------- */
/* Projects page — compact featured card grid (distinct from home's rows) */
.featured-cards {
  max-width: 78rem;
  margin: 0 auto;
  padding: 2.5rem 2rem 1rem;
}
.featured-cards-head h2 {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--ink);
  margin: 0 0 1.5rem;
}
.featured-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.feat-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  background: var(--paper);
  color: inherit;
  text-decoration: none;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.feat-card:hover, .feat-card:focus-visible {
  box-shadow: 0 10px 26px rgba(28, 35, 49, 0.13);
  transform: translateY(-3px);
}
.feat-card-media { overflow: hidden; }
.feat-card-media img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.feat-card:hover .feat-card-media img { transform: scale(1.05); }
.feat-card-body { padding: 0.9rem 1.1rem 1.15rem; }
.feat-card-name {
  display: block;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.08em;
  color: var(--brand-blue);
}
.feat-card-loc {
  display: block;
  margin-top: 0.3rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
}
.feat-card-meta {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.feat-card.static:hover, .feat-card.static:focus-visible { box-shadow: none; transform: none; }
.feat-card.static:hover .feat-card-media img { transform: none; }
@media (max-width: 900px) { .featured-card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .featured-card-grid { grid-template-columns: 1fr; } }

.project-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  max-width: 78rem;
  margin: 0 auto;
  padding: 3rem 2rem 1.5rem;
}
.project-nav h2 {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  margin: 0;
  color: var(--ink);
}
.project-nav .controls {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.project-nav label {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.project-nav select {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
}
.view-toggle { display: flex; gap: 0.5rem; }
.view-toggle button {
  border: 1px solid var(--line);
  background: #fff;
  padding: 0.45rem 0.6rem;
  cursor: pointer;
  color: var(--ink-soft);
}
.view-toggle button[aria-pressed="true"] {
  background: var(--brand-blue);
  border-color: var(--brand-blue);
  color: #fff;
}
.view-toggle svg { display: block; width: 1.3rem; height: auto; fill: currentColor; }

.project-grid {
  max-width: 78rem;
  margin: 0 auto;
  padding: 0 2rem 4rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
  gap: 1.5rem;
}
.project-item {
  position: relative;
  background-size: cover;
  background-position: center;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}
.project-item[hidden] { display: none; }
.project-meta {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.1rem;
  padding: 1.1rem;
  color: #fff;
  background: linear-gradient(to top, rgba(28, 35, 49, 0.88) 0%, rgba(28, 35, 49, 0.25) 55%, rgba(28, 35, 49, 0) 100%);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.project-item:hover .project-meta,
.project-item:focus-within .project-meta { opacity: 1; }
.project-name {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: 0.06em;
  font-size: 1.05rem;
}
.project-location, .project-units, .project-date, .project-client {
  font-size: 0.9rem;
  color: var(--brand-tan-light);
}

/* List view */
.project-grid.list-view { display: block; }
.project-grid.list-view .project-item {
  aspect-ratio: auto;
  background-image: none !important;
  border-bottom: 1px solid var(--line);
}
.project-grid.list-view .project-meta {
  position: static;
  display: grid;
  grid-template-columns: 2fr 1.2fr 0.8fr 0.6fr 1.4fr;
  align-items: baseline;
  gap: 1rem;
  padding: 0.85rem 0.25rem;
  opacity: 1;
  background: none;
  color: var(--ink);
}
.project-grid.list-view .project-location,
.project-grid.list-view .project-units,
.project-grid.list-view .project-date,
.project-grid.list-view .project-client { color: var(--ink-soft); }
@media (max-width: 700px) {
  .project-grid.list-view .project-meta { grid-template-columns: 1fr 1fr; }
}

/* Touch devices: overlay always readable */
@media (hover: none) {
  .project-meta { opacity: 1; }
}

/* --------------------------------------------------------------------------
   Project detail pages
   -------------------------------------------------------------------------- */
.project-hero img {
  /* Show the full image: never crop the subject, never upscale past native size */
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 72svh;
  margin: 0 auto;
}
.project-details-section {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 3rem;
  max-width: 78rem;
  margin: 0 auto;
  padding: 3rem 2rem 4rem;
}
.project-details-section .description p { margin: 0 0 1em; }
.project-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem 2rem;
  align-content: start;
}
.project-info-block h3 {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--brand-blue);
  margin-bottom: 0.2rem;
}
.project-info-block span { color: var(--ink-soft); }
@media (max-width: 760px) {
  .project-details-section { grid-template-columns: 1fr; gap: 2rem; }
}

.detail-extra {
  max-width: 78rem;
  margin: 0 auto;
  padding: 0 2rem 3rem;
}
.detail-extra h2 {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--brand-blue);
}
.detail-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 1.25rem;
  padding: 1rem 0 2rem;
}
.detail-gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */
.contact-page #content {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
}
.contact-section {
  width: 100%;
  max-width: 58rem;
  margin: 0 auto;
  padding: 3.5rem 2rem;
  text-align: center;
}
.contact-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
}
.contact-col { padding: 0.5rem 2.5rem; }
.contact-col + .contact-col { border-left: 1px solid var(--line); }
.contact-label {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand-blue);
  margin: 0 0 1.1rem;
}
.contact-col .address { margin-bottom: 1.1rem; color: var(--ink-soft); }
.contact-col .address span { display: block; }
.reach-phone, .reach-email {
  display: block;
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: 0.03em;
  margin-bottom: 0.7rem;
  overflow-wrap: normal;
  white-space: nowrap;
}
.reach-phone { font-size: 1.5rem; }
.reach-email { font-size: 1.05rem; }
@media (max-width: 640px) {
  .contact-cols { grid-template-columns: 1fr; }
  .contact-col { padding: 0.5rem 1rem; }
  .contact-col + .contact-col { border-left: 0; border-top: 1px solid var(--line); margin-top: 2rem; padding-top: 2rem; }
  /* Keep the email on a single line, scaling down to fit narrow screens */
  .reach-email { font-size: clamp(0.72rem, 3.6vw, 1rem); white-space: nowrap; overflow-wrap: normal; }
}

/* Contact page footer — center the minimal footer so it isn't floating */
.contact-page #main-footer .row { justify-content: center; text-align: center; }
.contact-page #main-footer .footer-logo { display: flex; justify-content: center; width: 100%; }
.contact-page #main-footer .copyright { text-align: center; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
#main-footer {
  background: var(--brand-blue);
  color: #fff;
  padding: 3rem 2rem;
}
#main-footer .row {
  max-width: 78rem;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
}
#main-footer .address span { display: block; }
#main-footer .address { margin-bottom: 1.25rem; }
#main-footer a { color: var(--brand-tan-light); }
#main-footer a:hover { color: #fff; }
#main-footer .phone-number {
  font-family: var(--font-heading);
  font-weight: 600;
  letter-spacing: 0.06em;
}
#main-footer .footer-logo img { height: 5.5rem; width: auto; }
#main-footer .copyright {
  width: 100%;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  font-size: 0.9rem;
  color: var(--brand-tan-light);
}

/* ==========================================================================
   V2 home additions — original palette/fonts
   ========================================================================== */

/* Scroll reveal */
.will-reveal {
  opacity: 0;
  transform: translateY(2rem);
  transition: opacity 0.8s cubic-bezier(0.22, 0.61, 0.36, 1), transform 0.8s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.will-reveal.in-view { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .will-reveal { opacity: 1; transform: none; transition: none; }
}

/* Hero overlay — headline only, user scrolls for the rest */
.video-section::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(28, 35, 49, 0.35) 0%, rgba(28, 35, 49, 0.1) 45%, rgba(28, 35, 49, 0.55) 100%);
}
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 1.5rem;
}
.hero-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(2rem, 6vw, 4.4rem);
  line-height: 1.12;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 2px 24px rgba(28, 35, 49, 0.45);
  margin: 0;
  max-width: 22ch;
}
.hero-title .line {
  display: block;
  opacity: 0;
  animation: heroRise 1.1s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}
.hero-title .line:nth-child(1) { animation-delay: 0.4s; }
.hero-title .line:nth-child(2) { animation-delay: 0.65s; }
@keyframes heroRise {
  from { opacity: 0; transform: translateY(2rem); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-title .line { animation: none; opacity: 1; }
}

/* Home nav: solid brand blue once scrolled past the video */
.home-page #main-nav {
  position: fixed;
  transition: background 0.35s ease, box-shadow 0.35s ease;
}
.home-page #main-nav.scrolled {
  background: rgba(76, 94, 131, 0.96);
  box-shadow: 0 8px 24px rgba(28, 35, 49, 0.25);
}
.home-page #main-nav .brand img { transition: height 0.3s ease; }
.home-page #main-nav.scrolled .brand img { height: 5rem; }

/* Stats band */
.stats-band {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 2.5rem;
  max-width: 74rem;
  margin: 0 auto;
  padding: 5.5rem 2rem;
  text-align: center;
}
.stat-number {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: clamp(2.4rem, 5.5vw, 3.8rem);
  color: var(--brand-blue);
  line-height: 1;
  display: block;
}
.stat-label {
  display: block;
  margin-top: 0.7rem;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* Home featured (vertical, same look as the projects page) */
.home-featured { padding: 1rem 0 3rem; }
.home-featured .section-heading {
  margin: 0 0 1.5rem;
  padding: 3rem 2rem 1rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
}
.home-featured .section-heading h2 {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  margin: 0;
  color: var(--ink);
}
.home-featured .all-link {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border-bottom: 2px solid var(--brand-tan);
  padding-bottom: 0.2rem;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Lightbox (detail-page galleries)
   -------------------------------------------------------------------------- */
.detail-gallery img { cursor: zoom-in; transition: opacity 0.2s ease; }
.detail-gallery img:hover { opacity: 0.88; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(28, 35, 49, 0.94);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox img {
  max-width: min(92vw, 110rem);
  max-height: 86svh;
  width: auto; height: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.lightbox button {
  position: absolute;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.2rem; height: 3.2rem;
  border: 1px solid rgba(237, 228, 211, 0.5);
  border-radius: 50%;
  background: rgba(28, 35, 49, 0.6);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.lightbox button:hover { background: var(--brand-tan); color: var(--ink); }
.lightbox-close { top: 1.5rem; right: 1.75rem; }
.lightbox-prev { left: 1.5rem; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 1.5rem; top: 50%; transform: translateY(-50%); }
@media (max-width: 700px) {
  .lightbox-prev { left: 0.6rem; }
  .lightbox-next { right: 0.6rem; }
  .lightbox img { max-width: 96vw; }
}

/* Back to Top — quiet centered link at the end of the Projects page */
.back-to-top-wrap {
  text-align: center;
  padding: 1.5rem 2rem 4.5rem;
}
.back-to-top {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--brand-blue);
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0.5rem;
}
.back-to-top:hover, .back-to-top:focus-visible { color: var(--brand-blue-dark); }
.back-to-top svg { display: block; }
.back-to-top:hover, .back-to-top:focus-visible { text-decoration: underline; text-underline-offset: 6px; }

/* Back to Projects — floating pill, top-left below nav (detail pages) */
.project-back {
  position: absolute;
  left: 1.1rem;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.55rem 1rem 0.55rem 0.7rem;
  border: 1px solid rgba(76, 94, 131, 0.25);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 2px 10px rgba(28, 35, 49, 0.12);
  font-family: var(--font-heading);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--brand-blue);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.project-back svg { display: block; width: 15px; height: 15px; }
.project-back:hover, .project-back:focus-visible {
  background: var(--brand-blue);
  border-color: var(--brand-blue);
  color: #fff;
}
@media (max-width: 700px) {
  .project-back { left: 0.5rem; font-size: 0.62rem; padding: 0.45rem 0.8rem 0.45rem 0.55rem; }
}

/* --------------------------------------------------------------------------
   Small-screen fixes: keep long links from cropping
   -------------------------------------------------------------------------- */
.home-featured .section-heading { flex-wrap: wrap; }
#main-footer .center { min-width: 0; }
#main-footer .center a,
.contact-section .reach a { overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .home-featured .section-heading { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
  .home-featured .all-link { font-size: 0.78rem; letter-spacing: 0.14em; }
  .contact-section .reach a { font-size: 1.05rem; letter-spacing: 0.04em; }
  #main-footer .center a { font-size: 0.95rem; }
}

/* --------------------------------------------------------------------------
   About variants (about-2 team grid, about-3 story)
   -------------------------------------------------------------------------- */
.about-hero {
  max-width: 72rem;
  padding: 4rem 2rem 1rem;
}
.about-hero .kicker {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--brand-blue);
  margin: 0 0 1rem;
}
.about-hero h2 {
  font-size: clamp(1.8rem, 4.4vw, 3.2rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  max-width: 24ch;
  margin: 0 0 1.5rem;
}
.about-hero p { max-width: 62ch; color: var(--ink-soft); }

/* Team face grid */
.team-grid {
  max-width: 78rem;
  margin: 0;
  padding: 2rem 2rem 5rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: 1.75rem;
}
.person-card {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font: inherit;
}
.person-card .photo { overflow: hidden; }
.person-card img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: top;
  transition: transform 0.6s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.person-card:hover img, .person-card:focus-visible img { transform: scale(1.05); }
.person-card .person-name {
  display: block;
  margin-top: 0.9rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand-blue);
}
.person-card .person-role {
  display: block;
  font-size: 0.9rem;
  color: var(--ink);
}
.person-card .person-more {
  display: inline-block;
  margin-top: 0.4rem;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border-bottom: 2px solid var(--brand-tan);
  padding-bottom: 0.15rem;
  color: var(--ink);
}

/* Bio overlay */
.bio-overlay {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(28, 35, 49, 0.72);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.bio-overlay.open { opacity: 1; visibility: visible; }
.bio-panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(12rem, 18rem) 1fr;
  gap: 2rem;
  width: min(58rem, 100%);
  max-height: 86svh;
  overflow-y: auto;
  background: var(--paper);
  padding: 2.5rem;
}
.bio-panel img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: top;
}
.bio-panel h3 {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-blue);
  margin: 0 0 0.2rem;
}
.bio-panel .bio-role {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brand-gold);
  margin: 0 0 1.2rem;
}
.bio-panel .bio-text p { margin: 0 0 1em; color: var(--ink-soft); }
.bio-close {
  position: absolute;
  top: 1rem; right: 1rem;
  width: 2.6rem; height: 2.6rem;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}
.bio-close:hover { background: var(--brand-blue); color: #fff; border-color: var(--brand-blue); }
@media (max-width: 700px) {
  .bio-panel { grid-template-columns: 1fr; padding: 1.75rem; }
  .bio-panel img { max-width: 14rem; }
}

/* About-3 story layout */
.story-section {
  display: grid;
  grid-template-columns: minmax(10rem, 16rem) 1fr;
  gap: 2.5rem;
  max-width: 76rem;
  margin: 0;
  padding: 3.5rem 2rem;
  border-top: 1px solid var(--line);
}
.story-section:first-of-type { border-top: 0; }
.story-label .num {
  display: block;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.2em;
  color: var(--brand-tan);
}
.story-label h2 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--brand-blue);
  margin: 0.3rem 0 0;
}
.story-body { max-width: 60ch; }
.story-body p { margin: 0 0 1em; color: var(--ink-soft); }
.story-body .big {
  font-size: clamp(1.25rem, 2.6vw, 1.7rem);
  line-height: 1.5;
  color: var(--ink);
}
.story-image { padding: 0; }
.story-image img { width: 100%; height: clamp(18rem, 55vh, 38rem); object-fit: cover; }
.story-team-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2rem;
  padding-top: 0.5rem;
}
.story-team-strip a {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}
.story-team-strip img {
  width: 3.4rem; height: 3.4rem;
  border-radius: 50%;
  object-fit: cover;
  object-position: top;
}
.story-team-strip .strip-name {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--ink);
}
.story-team-strip .strip-role {
  display: block;
  font-size: 0.78rem;
  color: var(--ink-soft);
}
@media (max-width: 760px) {
  .story-section { grid-template-columns: 1fr; gap: 1rem; }
}

/* --------------------------------------------------------------------------
   About page — editorial top half (lede + collage + feature rows + strategies)
   -------------------------------------------------------------------------- */
.about-lede {
  max-width: 78rem;
  margin: 0;
  padding: 3.5rem 2rem 2rem;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 3rem;
  align-items: stretch;
}
.about-lede h2.block-title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--brand-blue);
  margin: 0 0 1rem;
}
.about-lede p {
  color: var(--ink-soft);
  margin: 0;
}
.about-lede-media { display: flex; }
.about-lede-media img { width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
/* 2x2 photo grid variant beside The Platform text */
.about-lede-media.about-lede-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 0.6rem;
}
.about-lede-media.about-lede-grid img {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: cover;
  min-height: 0;
}
@media (max-width: 800px) {
  .about-lede { grid-template-columns: 1fr; gap: 1.5rem; padding-top: 2.5rem; }
  /* Deterministic image heights so the 2x2 grid can't overflow into "Our Team" (iOS Safari) */
  .about-lede-media.about-lede-grid { grid-template-rows: auto auto; }
  .about-lede-media.about-lede-grid img { aspect-ratio: 4 / 3; height: auto; }
}

.about-strip {
  max-width: 78rem;
  margin: 0;
  padding: 0.5rem 2rem 2rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}
.about-strip img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
@media (max-width: 700px) {
  .about-strip { grid-template-columns: repeat(2, 1fr); }
}

.about-feature {
  max-width: 78rem;
  margin: 0;
  padding: 2.5rem 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: stretch;
}
.about-feature-media { display: flex; }
.about-feature-media img { width: 100%; height: 100%; aspect-ratio: 16 / 11; object-fit: cover; }
.about-feature h2.block-title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--brand-blue);
  margin: 0 0 1rem;
}
.about-feature p { color: var(--ink-soft); margin: 0; }
/* Warm text-box backgrounds (same tone as the slogan band) */
.about-lede-text,
.about-feature-text {
  background: var(--paper-warm);
  padding: 2.25rem 2.25rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.about-us-page .content-block { background: var(--paper-warm); }
.about-feature.flip .about-feature-media { order: 2; }
@media (max-width: 800px) {
  .about-feature { grid-template-columns: 1fr; gap: 1.5rem; padding: 1.5rem 2rem; }
  .about-feature.flip .about-feature-media { order: 0; }
}

.about-strategies {
  max-width: 78rem;
  margin: 0;
  padding: 1rem 2rem 4rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.strategy-card {
  border: 1px solid var(--line);
  background: var(--paper-warm);
  display: flex;
  flex-direction: column;
}
.strategy-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.strategy-card .strategy-body { padding: 1.25rem 1.25rem 1.5rem; }
.strategy-card h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--brand-blue);
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}
.strategy-card p { color: var(--ink-soft); margin: 0; font-size: 0.98rem; }
@media (max-width: 800px) {
  .about-strategies { grid-template-columns: 1fr; }
}

/* Center the About Us content column on wide screens */
.about-us-page .about-lede,
.about-us-page .about-strip,
.about-us-page .about-feature,
.about-us-page .about-devshots,
.about-us-page .about-strategies,
.about-us-page .content-block,
.about-us-page .team-grid { margin-left: auto; margin-right: auto; }

/* Development photo band (images only, no captions) */
.about-devshots {
  max-width: 78rem;
  margin: 0;
  padding: 0.5rem 2rem 2.5rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.about-devshots img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
@media (max-width: 800px) {
  .about-devshots { grid-template-columns: 1fr; }
}

