/* === S. Anna Developments — Design Tokens === */
:root {
  --navy: #1F2E5D;
  --navy-dark: #0d1530;
  --sand: #C3B59C;
  --white: #FFFFFF;
  --off-white: #f8f7f5;
  --text-light: rgba(255, 255, 255, 0.55);
  --text-muted: rgba(255, 255, 255, 0.35);
  --text-dark: #2a2a2a;
  --text-body: #555;
  --border-light: rgba(255, 255, 255, 0.12);
  --border-dark: rgba(0, 0, 0, 0.08);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --nav-height: 72px;
}

/* === Reset & Base === */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-dark);
  background: var(--white);
  overflow-x: hidden;
}

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

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

/* === Typography === */
h1, h2, h3, h4 {
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: inherit;
}

.eyebrow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--sand);
  margin-bottom: 16px;
  font-weight: 600;
}

/* === Navigation === */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: var(--navy);
  z-index: 100;
  transition: background 0.3s var(--ease-out), backdrop-filter 0.3s var(--ease-out);
}

.nav.scrolled {
  background: rgba(31, 46, 93, 0.92);
  backdrop-filter: blur(12px);
}

.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 40px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
}

.nav-logo img {
  height: 56px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
  align-items: center;
}

.nav-links a {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.65);
  font-weight: 600;
  transition: color 0.2s var(--ease-out);
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--white);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--sand);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  transition: transform 0.3s var(--ease-out), opacity 0.3s var(--ease-out);
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* === Hero === */
.hero {
  min-height: 100dvh;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.hero-bg-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero-noise {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
  background-size: 256px 256px;
}

.hero-gradient {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(to bottom, rgba(31, 46, 93, 0.25) 0%, transparent 40%, rgba(31, 46, 93, 0.7) 80%, rgba(31, 46, 93, 0.9) 100%);
}

.hero-inner {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: calc(var(--nav-height) + 40px) 40px 48px;
}

.hero-headline {
  font-size: clamp(48px, 12vw, 180px);
  font-weight: 800;
  line-height: 0.88;
  letter-spacing: -0.04em;
  color: var(--white);
  text-transform: uppercase;
  margin-bottom: 24px;
  opacity: 0;
  transform: translateY(20px);
}

.hero-bottom {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: end;
}

.hero-bottom-text {
  max-width: 440px;
}

.hero-bottom-text p {
  font-size: clamp(14px, 1.1vw, 16px);
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.6;
  opacity: 0;
  transform: translateY(20px);
}

.hero-ctas {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: flex-end;
  opacity: 0;
  transform: translateY(20px);
}

/* === Page Hero (inner pages) === */
.page-hero {
  background: var(--navy);
  padding: calc(var(--nav-height) + 80px) 40px 80px;
  text-align: center;
  position: relative;
}

.page-hero .eyebrow {
  color: var(--sand);
  opacity: 0;
  transform: translateY(20px);
}

.page-hero h1 {
  font-size: clamp(36px, 5vw, 64px);
  color: var(--white);
  max-width: 700px;
  margin: 0 auto 16px;
  opacity: 0;
  transform: translateY(20px);
}

.page-hero p {
  font-size: 16px;
  color: var(--text-light);
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.7;
  opacity: 0;
  transform: translateY(20px);
}

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: none;
  cursor: pointer;
  transition: transform 160ms var(--ease-out), opacity 160ms var(--ease-out);
  text-decoration: none;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: var(--sand);
  color: var(--navy);
}

.btn-primary:hover {
  opacity: 0.9;
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-outline:hover {
  border-color: rgba(255, 255, 255, 0.4);
}

.btn-outline-dark {
  background: transparent;
  color: var(--navy);
  border: 1px solid rgba(31, 46, 93, 0.2);
}

.btn-outline-dark:hover {
  border-color: var(--navy);
}

/* === Sections === */
.section {
  padding: 100px 40px;
}

.section-navy {
  background: var(--navy);
  color: var(--white);
}

.section-white {
  background: var(--white);
  color: var(--text-dark);
}

.section-off-white {
  background: var(--off-white);
  color: var(--text-dark);
}

.section-inner {
  max-width: 1280px;
  margin: 0 auto;
}

/* === About Snippet (homepage) === */
.about-snippet {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.about-snippet h2 {
  font-size: clamp(28px, 3.5vw, 48px);
  color: var(--navy);
}

.about-snippet p {
  font-size: 16px;
  color: var(--text-body);
  line-height: 1.75;
}

/* === Section Headers === */
.section-header {
  margin-bottom: 48px;
}

.section-header h2 {
  font-size: clamp(28px, 3.5vw, 48px);
}

.section-header.light h2 {
  color: var(--white);
}

.section-header.dark h2 {
  color: var(--navy);
}

/* === Cards === */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.card {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 6px;
  overflow: hidden;
  transition: transform 0.3s var(--ease-out);
}

.card:hover {
  transform: translateY(-4px);
}

.card-image {
  height: 240px;
  background: rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-body {
  padding: 24px;
}

.card-body h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.card-body .card-meta {
  font-size: 13px;
  opacity: 0.5;
}

.section-navy .card-body h3 {
  color: var(--white);
}
.section-navy .card-body .card-meta {
  color: var(--text-muted);
}
.section-white .card-body h3 {
  color: var(--navy);
}
.section-white .card-body .card-meta {
  color: #999;
}

/* === Services Grid === */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.service-item {
  padding: 0;
}

.service-item .service-icon {
  font-size: 28px;
  color: var(--sand);
  margin-bottom: 16px;
  font-weight: 800;
}

.service-item h3 {
  font-size: 20px;
  color: var(--navy);
  margin-bottom: 10px;
}

.service-item p {
  font-size: 15px;
  color: var(--text-body);
  line-height: 1.7;
}

/* === Service Cards (services page) === */
.service-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.service-card {
  background: var(--off-white);
  padding: 40px;
  border-radius: 6px;
  transition: transform 0.3s var(--ease-out);
}

.service-card:hover {
  transform: translateY(-2px);
}

.service-card .service-num {
  font-size: 24px;
  font-weight: 800;
  color: var(--sand);
  margin-bottom: 16px;
}

.service-card h3 {
  font-size: 22px;
  color: var(--navy);
  margin-bottom: 12px;
}

.service-card p {
  font-size: 15px;
  color: var(--text-body);
  line-height: 1.7;
}

.service-link-text {
  display: inline-flex;
  margin-top: 24px;
  color: var(--navy);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* === Service Detail Pages === */
.service-detail-hero {
  min-height: 86dvh;
  padding: calc(var(--nav-height) + 72px) 40px 72px;
  background:
    radial-gradient(circle at 72% 20%, rgba(195, 181, 156, 0.18), transparent 28%),
    linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 58%, #172447 100%);
  color: var(--white);
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(340px, 0.7fr);
  gap: 56px;
  align-items: end;
  position: relative;
  overflow: hidden;
}

.service-detail-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.08;
  background-image: linear-gradient(rgba(255,255,255,0.22) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.22) 1px, transparent 1px);
  background-size: 72px 72px;
}

.service-detail-hero-copy,
.service-detail-hero-media {
  position: relative;
  z-index: 1;
}

.service-detail-hero-copy {
  max-width: 780px;
}

.service-detail-hero h1 {
  font-size: clamp(42px, 6.8vw, 96px);
  line-height: 0.92;
  color: var(--white);
  max-width: 900px;
  margin-bottom: 28px;
}

.service-detail-hero-copy > p:not(.eyebrow) {
  max-width: 620px;
  color: rgba(255,255,255,0.68);
  font-size: clamp(16px, 1.5vw, 20px);
  line-height: 1.65;
  margin-bottom: 32px;
}

.service-detail-hero-media {
  min-height: 520px;
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,0.28);
}

.service-detail-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.service-content-grid {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 72px;
  align-items: start;
}

.service-aside {
  position: sticky;
  top: calc(var(--nav-height) + 32px);
  padding: 32px;
  background: var(--navy);
  color: var(--white);
  border-radius: 8px;
}

.service-aside span {
  display: block;
  color: var(--sand);
  font-size: 34px;
  font-weight: 800;
  margin-bottom: 22px;
}

.service-aside h2 {
  font-size: clamp(26px, 2.5vw, 38px);
  margin-bottom: 18px;
}

.service-aside p {
  color: rgba(255,255,255,0.66);
  line-height: 1.7;
}

.service-copy-stack {
  display: grid;
  gap: 24px;
}

.service-copy-stack p {
  color: var(--text-body);
  font-size: 17px;
  line-height: 1.85;
}

.service-copy-stack p:first-child {
  color: var(--navy);
  font-size: clamp(20px, 2vw, 28px);
  line-height: 1.38;
  font-weight: 700;
}

.service-image-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  margin: 18px 0;
}

.service-image-row img {
  width: 100%;
  height: 340px;
  object-fit: cover;
  border-radius: 8px;
}

.service-panel-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.service-panel-grid > div {
  min-height: 260px;
  padding: 34px;
  border-radius: 8px;
  background: var(--white);
  border: 1px solid var(--border-dark);
}

.service-panel-grid h3 {
  color: var(--navy);
  font-size: 22px;
  margin-bottom: 14px;
}

.service-panel-grid p {
  color: var(--text-body);
  line-height: 1.75;
}

/* === CTA Section === */
.cta-section {
  text-align: center;
}

.cta-section h2 {
  font-size: clamp(28px, 3.5vw, 48px);
  margin-bottom: 16px;
}

.cta-section p {
  font-size: 16px;
  opacity: 0.55;
  max-width: 440px;
  margin: 0 auto 32px;
  line-height: 1.7;
}

.section-navy.cta-section p {
  color: var(--text-light);
}

/* === Footer === */
.footer {
  background: var(--navy-dark);
  padding: 64px 40px 32px;
}

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
}

.footer-brand {
  color: var(--white);
}

.footer-brand .footer-logo {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}

.footer-brand .footer-logo img {
  height: 48px;
  width: auto;
}

.footer-brand p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.35);
  line-height: 1.7;
}

.footer-col h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--white);
  margin-bottom: 16px;
  font-weight: 700;
}

.footer-col ul {
  list-style: none;
  display: grid;
  gap: 8px;
}

.footer-col a {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
  transition: color 0.2s var(--ease-out);
}

.footer-col a:hover {
  color: var(--sand);
}

.footer-bottom {
  max-width: 1280px;
  margin: 48px auto 0;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.25);
}

/* === Contact Form === */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.contact-form {
  display: grid;
  gap: 16px;
}

.form-group {
  display: grid;
  gap: 6px;
}

.form-group label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.section-navy .form-group label {
  color: rgba(255, 255, 255, 0.5);
}
.section-white .form-group label {
  color: #777;
}

.form-group input,
.form-group textarea {
  padding: 14px 16px;
  font-size: 15px;
  font-family: inherit;
  border-radius: 4px;
  border: 1px solid var(--border-light);
  outline: none;
  transition: border-color 0.2s var(--ease-out);
  color: var(--white);
  background: rgba(255, 255, 255, 0.06);
}

.section-white .form-group input,
.section-white .form-group textarea {
  color: var(--text-dark);
  background: var(--white);
  border-color: var(--border-dark);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--sand);
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.contact-details {
  display: grid;
  gap: 24px;
}

.contact-item .contact-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  margin-bottom: 6px;
}

.section-navy .contact-item .contact-label {
  color: rgba(255, 255, 255, 0.35);
}
.section-white .contact-item .contact-label {
  color: #999;
}

.contact-item .contact-value {
  font-size: 16px;
  font-weight: 600;
}

.section-navy .contact-item .contact-value {
  color: var(--white);
}
.section-white .contact-item .contact-value {
  color: var(--navy);
}

/* === Values Grid === */
.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.value-item .value-icon {
  font-size: 32px;
  color: var(--sand);
  margin-bottom: 16px;
  font-weight: 800;
}

.value-item h3 {
  font-size: 20px;
  color: var(--navy);
  margin-bottom: 8px;
}

.value-item p {
  font-size: 15px;
  color: var(--text-body);
  line-height: 1.7;
}

/* === Projects Filter === */
.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.filter-btn {
  padding: 8px 20px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  border: 1px solid var(--border-light);
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.2s var(--ease-out);
}

.filter-btn:hover {
  border-color: rgba(255, 255, 255, 0.3);
  color: var(--white);
}

.filter-btn.active {
  background: var(--sand);
  color: var(--navy);
  border-color: var(--sand);
}

/* === Projects Grid === */
.projects-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-auto-rows: minmax(260px, 28vw);
  gap: 16px;
}

.project-item {
  display: block;
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.2);
  min-height: 260px;
}

.project-item.tall {
  grid-row: span 2;
}

.project-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(31, 46, 93, 0.85) 0%, transparent 50%);
  display: flex;
  align-items: flex-end;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.3s var(--ease-out);
}

.project-item:hover .project-overlay {
  opacity: 1;
}

.project-overlay .project-info h3 {
  font-size: 16px;
  color: var(--white);
  font-weight: 700;
}

.project-overlay .project-info span {
  font-size: 12px;
  color: var(--sand);
}

.project-placeholder {
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.15);
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.2);
  font-size: 14px;
}

.project-detail-hero {
  min-height: 78vh;
  position: relative;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--navy);
}

.project-detail-hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-detail-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(13, 21, 48, 0.92), rgba(31, 46, 93, 0.2));
}

.project-detail-copy {
  position: relative;
  z-index: 2;
  max-width: 1080px;
  padding: calc(var(--nav-height) + 80px) 40px 72px;
  margin: 0 auto;
  width: 100%;
  color: var(--white);
}

.project-detail-copy h1 {
  font-size: clamp(46px, 8vw, 112px);
  text-transform: uppercase;
  max-width: 900px;
}

.project-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 64px;
}

.project-detail-grid h2 {
  font-size: clamp(30px, 4vw, 54px);
  color: var(--navy);
  margin-bottom: 24px;
}

.project-detail-grid p {
  color: var(--text-body);
  line-height: 1.8;
  margin-bottom: 18px;
}

.project-detail-aside {
  padding: 28px;
  background: var(--off-white);
  border: 1px solid var(--border-dark);
  border-radius: 8px;
  align-self: start;
}

.project-detail-aside h3 {
  color: var(--navy);
  margin-bottom: 18px;
}

.project-detail-aside dt {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-body);
  margin-top: 14px;
}

.project-detail-aside dd {
  color: var(--navy);
  font-weight: 700;
  margin-top: 2px;
}

.project-detail-aside .btn {
  margin-top: 24px;
}

.project-detail-gallery-section {
  padding-top: 0;
  background: var(--white);
}

.project-detail-gallery-section .section-header {
  align-items: end;
  margin-bottom: 36px;
}

.project-detail-gallery-section .section-header p:last-child {
  max-width: 420px;
  color: var(--text-body);
  line-height: 1.7;
}

.project-detail-gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 220px;
  gap: 14px;
}

.project-detail-gallery-item {
  position: relative;
  display: block;
  min-height: 0;
  overflow: hidden;
  border-radius: 8px;
  background: var(--navy);
}

.project-detail-gallery-item.is-featured {
  grid-column: span 2;
  grid-row: span 2;
}

.project-detail-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease, filter 0.45s ease;
}

.project-detail-gallery-item:hover img {
  transform: scale(1.04);
  filter: saturate(1.08) contrast(1.04);
}

/* === Gallery Page === */
.gallery-section {
  padding-top: 72px;
}

.gallery-filter-bar {
  justify-content: center;
  margin-bottom: 44px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 220px;
  gap: 16px;
}

.gallery-item {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--white);
  cursor: pointer;
  text-align: left;
}

.gallery-item.tall {
  grid-row: span 2;
}

.gallery-item.wide {
  grid-column: span 2;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.01);
  transition: transform 0.55s var(--ease-out), filter 0.55s var(--ease-out);
}

.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(31, 46, 93, 0.78), transparent 56%);
  opacity: 0;
  transition: opacity 0.3s var(--ease-out);
}

.gallery-item span {
  position: absolute;
  left: 18px;
  bottom: 16px;
  z-index: 2;
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out);
}

.gallery-item:hover img {
  transform: scale(1.06);
  filter: saturate(1.05) contrast(1.03);
}

.gallery-item:hover::after,
.gallery-item:hover span {
  opacity: 1;
}

.gallery-item:hover span {
  transform: translateY(0);
}

.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background: rgba(13, 21, 48, 0.92);
  opacity: 0;
  pointer-events: none;
}

.gallery-lightbox.open {
  pointer-events: auto;
}

.gallery-lightbox-media {
  position: relative;
  width: min(1120px, 92vw);
  max-height: 86vh;
}

.gallery-lightbox-media img {
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

.gallery-lightbox-caption {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-top: 14px;
  color: var(--white);
}

.gallery-lightbox-caption strong {
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.gallery-lightbox-caption span {
  color: rgba(255, 255, 255, 0.55);
  font-size: 14px;
}

.gallery-lightbox-close {
  position: absolute;
  top: 24px;
  right: 24px;
  z-index: 2;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.06);
  color: var(--white);
  border-radius: 999px;
  padding: 10px 18px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

/* === Split Layout (About page) === */
.split-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.split-image {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 6px;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ccc;
  font-size: 14px;
}

/* === Scroll Reveal === */
.reveal {
  opacity: 0;
  transform: translateY(30px);
}

.reveal-stagger > * {
  opacity: 0;
  transform: translateY(24px);
}

/* === Keyframes (JS-disabled fallback) === */

/* === Responsive === */
@media (max-width: 1024px) {
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .projects-grid {
    grid-template-columns: 1fr 1fr;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .project-detail-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .service-detail-hero,
  .service-content-grid,
  .service-panel-grid {
    grid-template-columns: 1fr;
  }

  .service-detail-hero {
    min-height: auto;
    align-items: start;
  }

  .service-detail-hero-media {
    min-height: 420px;
  }

  .service-aside {
    position: static;
  }

  .about-snippet,
  .contact-layout,
  .split-layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  :root {
    --nav-height: 64px;
  }

  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--navy);
    flex-direction: column;
    justify-content: center;
    gap: 28px;
    transform: translateX(100%);
    transition: transform 0.35s var(--ease-out);
  }

  .nav-links.open {
    transform: translateX(0);
  }

  .nav-links a {
    font-size: 16px;
  }

  .nav-toggle {
    display: flex;
  }

  .section {
    padding: 64px 24px;
  }

  .hero-inner {
    padding-left: 24px;
    padding-right: 24px;
  }

  .hero-bottom {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .hero-ctas {
    justify-content: flex-start;
    flex-direction: column;
  }

  .hero-ctas .btn {
    width: 100%;
    text-align: center;
  }

  .page-hero {
    padding-left: 24px;
    padding-right: 24px;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }

  .services-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .service-cards {
    grid-template-columns: 1fr;
  }

  .service-detail-hero {
    padding: calc(var(--nav-height) + 48px) 24px 56px;
    gap: 32px;
  }

  .service-detail-hero-media {
    min-height: 300px;
  }

  .service-content-grid {
    gap: 36px;
  }

  .service-aside {
    padding: 26px;
  }

  .service-copy-stack p {
    font-size: 16px;
  }

  .service-image-row {
    grid-template-columns: 1fr;
  }

  .service-image-row img {
    height: 260px;
  }

  .service-panel-grid > div {
    min-height: auto;
    padding: 28px;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 260px;
  }

  .project-detail-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .project-detail-gallery {
    grid-template-columns: 1fr;
    grid-auto-rows: 260px;
  }

  .project-detail-gallery-item.is-featured {
    grid-column: span 1;
    grid-row: span 1;
  }

  .gallery-item.tall,
  .gallery-item.wide {
    grid-row: span 1;
    grid-column: span 1;
  }

  .gallery-lightbox {
    padding: 18px;
  }

  .gallery-lightbox-caption {
    flex-direction: column;
    gap: 4px;
  }

  .project-item.tall {
    grid-row: span 1;
  }

  .values-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer {
    padding: 48px 24px 24px;
  }

  .hero-ctas {
    flex-direction: column;
  }

  .hero-ctas .btn {
    width: 100%;
    text-align: center;
  }
}

/* === Page Transition Overlay === */
.page-transition {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--navy);
  transform: translateY(0);
  pointer-events: none;
}

/* === Parallax === */
.parallax-bg {
  position: absolute;
  inset: 0;
  will-change: transform;
  pointer-events: none;
}

.hero .parallax-bg {
  background: radial-gradient(ellipse at 70% 50%, rgba(195, 181, 156, 0.06) 0%, transparent 60%);
}

.parallax-layer {
  transition: none;
}

/* === Text Reveal === */
.text-reveal .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(12px);
  will-change: transform, opacity;
}

/* === Reduced Motion === */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  .reveal,
  .reveal-stagger > * {
    opacity: 1;
    transform: none;
  }
}
