/* ==========================================================================
   Cornerstone Quantity Surveying Ltd — site stylesheet v3
   Editorial serif/sans design system. Dependency-free, mobile-first.
   v3 adds: elevation/shadow system, tactile micro-interactions, a soft
   hero Ken Burns effect, staggered reveal-on-scroll, and refined form,
   card and footer detailing. All animation is gated so content is never
   hidden if JS fails, and is disabled under prefers-reduced-motion.
   ========================================================================== */

:root {
  --color-navy: #0D354C;
  --color-ink: #0A2233;
  --color-navy-soft: #3E6377;
  --color-stone: #F7F4EE;
  --color-stone-deep: #EFE8DA;
  --color-white: #FFFFFF;
  --color-charcoal: #52504B;
  --color-charcoal-soft: #83807A;
  --color-line: #DBD3C2;
  --color-line-on-dark: rgba(247, 244, 238, 0.22);

  --font-display: "Bebas Neue", "Arial Narrow", Impact, sans-serif;
  --font-sans: "Poppins", -apple-system, BlinkMacSystemFont, sans-serif;

  --max-width: 1280px;
  --measure: 50rem;
  --radius: 0px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.33, 1, 0.68, 1);

  --shadow-sm: 0 1px 2px rgba(10, 34, 51, 0.05), 0 2px 8px -4px rgba(10, 34, 51, 0.12);
  --shadow-md: 0 18px 40px -22px rgba(10, 34, 51, 0.38);
  --shadow-lg: 0 28px 64px -24px rgba(10, 34, 51, 0.4);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: 16px;
  color: var(--color-charcoal);
  background: var(--color-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

::selection { background: var(--color-navy); color: var(--color-stone); }

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

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--color-navy); color: var(--color-white);
  padding: 12px 18px; z-index: 1000; font-family: var(--font-sans); font-size: 14px;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 2px solid var(--color-navy-soft); outline-offset: 3px; }

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 28px;
}

/* ---------- Scroll progress ----------
   A hairline indicator of reading position. Pure visual enhancement: it
   starts at width 0 and simply never grows if its controlling script
   doesn't run, so there is nothing to hide and nothing that can break. */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: var(--color-navy-soft);
  z-index: 2000;
  transition: width 0.1s linear;
}
@media (prefers-reduced-motion: reduce) { .scroll-progress { transition: none; } }

/* ---------- Type ---------- */
.eyebrow {
  display: block;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-navy-soft);
  margin: 0 0 18px;
}
.eyebrow--on-dark { color: rgba(247,244,238,0.75); }

.heading {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  color: var(--color-ink);
  margin: 0 0 20px;
  letter-spacing: 0.015em;
}
.heading--on-dark { color: var(--color-white); }
.heading em { font-style: normal; color: var(--color-navy-soft); }
.heading--on-dark em { color: var(--color-stone-deep); }

h1.heading { font-size: clamp(34px, 6vw, 64px); line-height: 1.1; }
h2.heading { font-size: clamp(26px, 4vw, 38px); line-height: 1.16; }
h3.heading { font-size: 22px; line-height: 1.3; margin-bottom: 14px; letter-spacing: 0.02em; }
h4.heading { font-size: 17px; line-height: 1.35; margin-bottom: 8px; letter-spacing: 0.02em; }
h1.heading, h2.heading, h3.heading { text-wrap: balance; }

p { margin: 0 0 18px; font-size: 16px; line-height: 1.75; color: var(--color-charcoal); }
p:last-child { margin-bottom: 0; }
.lede { line-height: 1.75; color: var(--color-charcoal); }

ul.bullet-list { margin: 0 0 18px; padding-left: 0; list-style: none; font-size: 16px; line-height: 1.7; }
ul.bullet-list li {
  margin-bottom: 10px;
  padding-left: 22px;
  position: relative;
}
ul.bullet-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 11px;
  width: 8px; height: 1px;
  background: var(--color-navy-soft);
  transition: width 0.3s var(--ease);
}
ul.bullet-list li:hover::before { width: 14px; }

/* ---------- Buttons / links ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background-color: var(--color-navy);
  color: var(--color-white);
  padding: 18px 38px;
  text-decoration: none;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--color-navy);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background-color 0.3s var(--ease), border-color 0.3s var(--ease),
              color 0.3s var(--ease), transform 0.3s var(--ease-soft), box-shadow 0.3s var(--ease-soft);
}
.btn:hover, .btn:focus-visible {
  background-color: var(--color-ink);
  border-color: var(--color-ink);
  color: var(--color-white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.btn:active {
  transform: translateY(0) scale(0.98);
  box-shadow: var(--shadow-sm);
  transition-duration: 0.1s;
}
.btn--ghost {
  background: transparent;
  color: var(--color-white);
  border-color: rgba(247,244,238,0.55);
  box-shadow: none;
}
.btn--ghost:hover, .btn--ghost:focus-visible {
  background: rgba(247,244,238,0.12);
  border-color: var(--color-white);
  box-shadow: none;
}
.btn[disabled] { opacity: 0.6; cursor: progress; transform: none; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--color-navy);
  padding-bottom: 6px;
  border-bottom: 1px solid var(--color-line);
  transition: border-color 0.25s var(--ease), color 0.25s var(--ease);
}
.link-arrow svg { transition: transform 0.3s var(--ease-soft); }
.link-arrow:hover, .link-arrow:focus-visible { border-color: var(--color-navy); }
.link-arrow:hover svg, .link-arrow:focus-visible svg { transform: translateX(5px); }

/* ---------- Header / navigation ---------- */
.site-header { position: relative; }

.site-header--hero { background-color: var(--color-ink); }

.hero-media {
  position: relative;
  min-height: 640px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.hero-media__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-media__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.85) contrast(1.02);
  transform: scale(1);
  animation: heroKenBurns 26s var(--ease-soft) infinite alternate;
}
.hero-media__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(10,34,51,0.72) 0%, rgba(10,34,51,0.38) 38%, rgba(10,34,51,0.86) 100%);
}
.hero-media > .container,
.hero-media > .hero-copy { position: relative; z-index: 2; }

@keyframes heroKenBurns {
  from { transform: scale(1); }
  to { transform: scale(1.08); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-media__bg img { animation: none; }
}

.nav-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 30px 0;
}

.nav-bar__logo { display: inline-block; transition: opacity 0.25s var(--ease); }
.nav-bar__logo:hover, .nav-bar__logo:focus-visible { opacity: 0.72; }
.nav-bar__logo img { max-width: 178px; }

.nav-bar__links {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 42px;
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
}

.nav-bar__links a {
  font-size: 13px;
  letter-spacing: 0.06em;
  text-decoration: none;
  padding: 11px 2px;
  position: relative;
}
.nav-bar__links a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: 2px;
  height: 1px;
  background: currentColor;
  transition: right 0.3s var(--ease-soft);
}
.nav-bar__links a:hover::after,
.nav-bar__links a:focus-visible::after,
.nav-bar__links a[aria-current="page"]::after {
  right: 0;
}

.hero-copy {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px 0 96px;
}
.hero-copy .container { max-width: 900px; }
.hero-copy h1 { font-size: clamp(38px, 6.4vw, 70px); }
.hero-copy p { color: rgba(247,244,238,0.82); max-width: 40em; margin-top: 6px; }
.hero-actions { margin-top: 34px; display: flex; gap: 16px; flex-wrap: wrap; }

/* Hero entrance: a gentle fade+rise on load, staggered. Pure CSS, scoped to
   html.js-reveal (added synchronously in <head>) so a page with JS blocked
   simply shows the hero at rest — nothing is ever hidden without it. */
html.js-reveal .hero-copy .eyebrow,
html.js-reveal .hero-copy h1,
html.js-reveal .hero-copy p,
html.js-reveal .hero-actions {
  opacity: 0;
  transform: translateY(16px);
  animation: fadeRiseIn 0.9s var(--ease-soft) forwards;
}
html.js-reveal .hero-copy .eyebrow { animation-delay: 0.05s; }
html.js-reveal .hero-copy h1 { animation-delay: 0.16s; }
html.js-reveal .hero-copy p { animation-delay: 0.32s; }
html.js-reveal .hero-actions { animation-delay: 0.46s; }

@keyframes fadeRiseIn {
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  html.js-reveal .hero-copy .eyebrow,
  html.js-reveal .hero-copy h1,
  html.js-reveal .hero-copy p,
  html.js-reveal .hero-actions { animation: none; opacity: 1; transform: none; }
}

/* Simple (non-hero) page header */
.site-header--plain {
  background: var(--color-white);
  border-bottom: 1px solid var(--color-line);
  position: sticky;
  top: 0;
  z-index: 50;
  transition: box-shadow 0.3s var(--ease);
}
.site-header--plain .nav-bar__links a { color: var(--color-navy); }
.site-header--plain.is-scrolled { box-shadow: 0 12px 24px -20px rgba(10,34,51,0.35); }

.page-banner {
  padding: 64px 0 40px;
  text-align: center;
}
.page-banner .eyebrow { display: flex; justify-content: center; }
.page-banner h1 { max-width: 18em; margin-left: auto; margin-right: auto; }

/* ---------- Layout sections ---------- */
.section { padding: 104px 0; }
.section--tight { padding: 60px 0; }
.section--narrow .container { max-width: 760px; }
.section--stone { background: var(--color-stone); }
.section--center { text-align: center; }
.section-top-rule { border-top: 1px solid var(--color-line); }

.banner-photo-wrap {
  overflow: hidden;
  background: var(--color-stone-deep);
}
.banner-photo {
  width: 100%;
  max-height: 440px;
  object-fit: cover;
  object-position: top;
}

.intro p { max-width: var(--measure); margin-left: auto; margin-right: auto; text-align: center; }

/* Photography treatment: muted, editorial */
.photo {
  filter: grayscale(85%) contrast(1.04) brightness(1.01);
  transition: filter 0.6s var(--ease-soft), transform 0.6s var(--ease-soft);
}
a:hover .photo,
.service-card:hover .photo,
.detail-row:hover .photo {
  filter: grayscale(0%) contrast(1.02);
}

/* ---------- Services grid ---------- */
.services-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 56px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--color-line);
}
.services-head .eyebrow, .services-head .heading { margin-bottom: 10px; }
.services-head p { margin-bottom: 0; max-width: var(--measure); }

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: 64px;
  row-gap: 72px;
}
@media (max-width: 780px) { .card-grid { grid-template-columns: 1fr; } }

.service-card {
  display: block;
  text-decoration: none;
  color: inherit;
  border-radius: var(--radius);
  transition: transform 0.4s var(--ease-soft), box-shadow 0.4s var(--ease-soft);
}
.service-card:hover, .service-card:focus-visible {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}
.service-card:hover .heading, .service-card:focus-visible .heading { color: var(--color-navy); }
.service-card .heading { transition: color 0.3s var(--ease); }

.service-card__index {
  font-family: var(--font-sans);
  font-style: normal;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-navy-soft);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.service-card__index::after {
  content: "";
  display: inline-block;
  width: 28px;
  height: 1px;
  background: var(--color-navy-soft);
}
.service-card__media { overflow: hidden; margin-bottom: 28px; background: var(--color-stone-deep); }
.service-card__media img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
  transform: scale(1.0);
}
.service-card:hover .service-card__media img,
.service-card:focus-visible .service-card__media img { transform: scale(1.05); }
.service-card p { padding: 0 6px; }
.service-card .heading { padding: 0 6px; }

/* ---------- Services detail rows (services.html) ----------
   Each service is its own full-bleed band (alternating tint) rather than
   one continuous scroll, so every section reads as a distinct, deliberate
   statement instead of a repeating pattern. */
.service-section { padding: 80px 0; }
.service-section--alt { background: var(--color-stone); }

.detail-row {
  display: grid;
  grid-template-columns: 0.9fr 1.4fr;
  gap: 64px;
  align-items: stretch;
  scroll-margin-top: 110px;
}
.detail-row__media {
  overflow: hidden;
  background: var(--color-stone-deep);
  position: relative;
  min-height: 420px;
  box-shadow: var(--shadow-md);
}
.detail-row__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-soft);
}
.detail-row:hover .detail-row__media img { transform: scale(1.04); }
/* Reversing a row flips which grid track each item auto-places into (not
   just paint order), so the column widths must be swapped to match —
   otherwise the photo silently becomes the wide column on every other
   row instead of staying a consistent width throughout. */
.detail-row--reverse { grid-template-columns: 1.4fr 0.9fr; }
.detail-row--reverse .detail-row__media { order: 2; }
.detail-row--reverse .detail-row__body { order: 1; }

/* Oversized numeral: a quiet graphic anchor behind the heading, giving
   each section real presence without competing with the copy. */
.detail-row__body { position: relative; padding-top: 46px; }
.detail-row__body > *:not(.detail-row__index) { position: relative; z-index: 1; }
.detail-row__index {
  position: absolute;
  top: -26px;
  left: -3px;
  z-index: 0;
  font-family: var(--font-display);
  font-size: 116px;
  line-height: 1;
  letter-spacing: 0;
  text-transform: none;
  color: rgba(13, 53, 76, 0.07);
  pointer-events: none;
  user-select: none;
}

/* Spec panel: turns the "service includes" list into a distinct checklist
   card instead of letting it blend into the surrounding prose. */
.service-spec {
  background: var(--color-stone);
  border: 1px solid var(--color-line);
  padding: 30px 32px;
  margin: 28px 0;
}
.service-section--alt .service-spec { background: var(--color-white); }
.service-spec__label {
  display: block;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-navy);
  margin-bottom: 16px;
}
.service-spec .bullet-list { margin-bottom: 0; }

.detail-row__cta { margin-top: 30px; }

@media (max-width: 860px) {
  .service-section { padding: 56px 0; }
  .detail-row { grid-template-columns: 1fr; gap: 28px; }
  .detail-row__media { min-height: 300px; }
  .detail-row--reverse .detail-row__media { order: 1; }
  .detail-row--reverse .detail-row__body { order: 2; }
  .detail-row__index { font-size: 76px; top: -16px; }
  .detail-row__body { padding-top: 34px; }
  .service-spec { padding: 24px 22px; }
}

/* ---------- About split ---------- */
.about-split {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 64px;
  align-items: start;
}
.about-split__media { overflow: hidden; background: var(--color-stone-deep); }
@media (max-width: 780px) {
  .about-split { grid-template-columns: 1fr; }
  .about-split__media { max-width: 320px; margin: 0 auto; }
}

/* Portrait card: a photo with a navy nameplate band fused to its base,
   so a lone headshot reads as a professional bio credential rather than
   a floating, caption-less portrait. */
.portrait-card {
  position: relative;
  overflow: hidden;
  background: var(--color-stone-deep);
  box-shadow: var(--shadow-md);
}
.portrait-card img { aspect-ratio: 700 / 848; object-fit: cover; width: 100%; display: block; }
.portrait-card__plate {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  background: linear-gradient(180deg, rgba(13,53,76,0) 0%, rgba(13,53,76,0.78) 48%, rgba(13,53,76,0.96) 100%);
  padding: 56px 26px 22px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.portrait-card__name {
  font-family: var(--font-display);
  font-size: 25px;
  line-height: 1.05;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--color-white);
}
.portrait-card__role {
  font-family: var(--font-sans);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(247,244,238,0.85);
}

.contact-line {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 0 0 20px;
  font-size: 15.5px;
}
.contact-line .icon { color: var(--color-navy); flex-shrink: 0; transition: transform 0.3s var(--ease-soft); }
.contact-line .icon svg { width: 20px; height: 20px; display: block; }
.contact-line:hover .icon { transform: scale(1.12); }
.contact-line a { text-decoration: none; }
.contact-line a:hover { text-decoration: underline; }
.contact-line a, .contact-line span:last-child { min-width: 0; overflow-wrap: anywhere; }

/* ---------- Trust / credentials strip ---------- */
.credentials {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: 36px;
  row-gap: 38px;
}
.credentials li {
  list-style: none;
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 0;
  margin: 0;
  min-width: 0;
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.015em;
  text-transform: uppercase;
  line-height: 1.5;
  color: var(--color-ink);
  overflow-wrap: break-word;
}
.credentials__badge {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  margin-top: 2px;
  background: var(--color-navy);
  color: var(--color-white);
  transform: rotate(45deg);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: background-color 0.3s var(--ease), transform 0.3s var(--ease-soft);
}
.credentials__badge svg { width: 16px; height: 16px; transform: rotate(-45deg); }
.credentials li:hover .credentials__badge { background: var(--color-ink); transform: rotate(45deg) scale(1.1); }
@media (max-width: 860px) {
  .credentials { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 32px; column-gap: 28px; }
}

/* Stagger: items that share a viewport batch fade in as a gentle cascade
   rather than all at once. Delay only — does not fight the base reveal
   rule's specificity, since transition-delay is independent. */
.card-grid > [data-reveal]:nth-child(1) { transition-delay: 0s; }
.card-grid > [data-reveal]:nth-child(2) { transition-delay: 0.08s; }
.card-grid > [data-reveal]:nth-child(3) { transition-delay: 0.16s; }
.card-grid > [data-reveal]:nth-child(4) { transition-delay: 0.24s; }

.credentials > [data-reveal]:nth-child(1) { transition-delay: 0s; }
.credentials > [data-reveal]:nth-child(2) { transition-delay: 0.07s; }
.credentials > [data-reveal]:nth-child(3) { transition-delay: 0.14s; }
.credentials > [data-reveal]:nth-child(4) { transition-delay: 0.21s; }

.about-split > [data-reveal]:nth-child(1) { transition-delay: 0s; }
.about-split > [data-reveal]:nth-child(2) { transition-delay: 0.12s; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--color-ink); color: var(--color-stone); }
.cta-band .heading, .cta-band p { color: var(--color-stone); }
.cta-band p { color: rgba(247,244,238,0.78); }

/* ---------- FAQ list (location pages) ---------- */
.faq-list { margin-top: 4px; }
.faq-item { padding: 26px 0; border-top: 1px solid var(--color-line); }
.faq-item:first-child { border-top: none; padding-top: 0; }
.faq-item .heading { margin-bottom: 10px; }
.faq-item p:last-child { margin-bottom: 0; }

/* ---------- Location hub grid (locations.html) ---------- */
.location-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 32px;
  row-gap: 32px;
  margin-top: 8px;
}
@media (max-width: 780px) { .location-grid { grid-template-columns: 1fr; } }
.location-card {
  display: block;
  min-width: 0;
  background: var(--color-white);
  border: 1px solid var(--color-line);
  padding: 32px 30px;
  text-decoration: none;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease), transform 0.3s var(--ease-soft);
}
.location-card:hover, .location-card:focus-visible {
  border-color: var(--color-navy);
  box-shadow: var(--shadow-sm);
  transform: translateY(-3px);
}
.location-card .heading { margin-bottom: 10px; transition: color 0.3s var(--ease); }
.location-card:hover .heading, .location-card:focus-visible .heading { color: var(--color-navy); }
.location-card p { margin-bottom: 0; }
.location-cluster__intro { margin-bottom: 28px; }
.location-cluster + .location-cluster { margin-top: 56px; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-ink);
  color: rgba(247,244,238,0.72);
  padding: 72px 0 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.1fr 1.3fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--color-line-on-dark);
}
.footer-grid > * { min-width: 0; }
@media (max-width: 780px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :last-child { grid-column: 1 / -1; }
}
.footer-grid .eyebrow { color: rgba(247,244,238,0.55); margin-bottom: 20px; }
.footer-grid nav ul { list-style: none; margin: 0; padding: 0; }
.footer-grid nav a {
  display: inline-block;
  margin-bottom: 14px;
  font-size: 14.5px;
  text-decoration: none;
  color: rgba(247,244,238,0.85);
  transition: color 0.25s var(--ease), transform 0.25s var(--ease-soft);
}
.footer-grid nav a:hover, .footer-grid nav a:focus-visible { color: var(--color-white); transform: translateX(3px); }

.footer-address p { font-size: 14.5px; line-height: 1.9; margin: 0; color: rgba(247,244,238,0.85); overflow-wrap: anywhere; }
.footer-address a { text-decoration: none; color: inherit; transition: color 0.25s var(--ease); }
.footer-address a:hover { color: var(--color-white); text-decoration: underline; }

.footer-legal img { max-width: 150px; margin-bottom: 18px; }
.footer-legal p { font-size: 12.5px; line-height: 1.8; margin: 0; color: rgba(247,244,238,0.55); }

.footer-base {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 28px;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: rgba(247,244,238,0.45);
}

/* ---------- Contact form ---------- */
.contact-form { max-width: 640px; margin: 0 auto; }
.field { margin-bottom: 22px; }
.field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-navy);
  margin-bottom: 8px;
}
.field { position: relative; }
.field input,
.field textarea {
  width: 100%;
  padding: 13px 4px;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  border: none;
  border-bottom: 1px solid var(--color-line);
  border-radius: 0;
  color: var(--color-ink);
  background: transparent;
  transition: border-color 0.2s var(--ease);
  position: relative;
}
.field::after {
  content: "";
  position: absolute;
  left: 0; right: 100%;
  bottom: 0;
  height: 1px;
  background: var(--color-navy);
  transition: right 0.35s var(--ease-soft);
}
.field:focus-within::after { right: 0; }
.field input:focus, .field textarea:focus { outline: none; }
.field textarea { min-height: 150px; resize: vertical; }
.honeypot-field { position: absolute; left: -5000px; }
.form-submit { margin-top: 12px; }
.form-status { margin-top: 18px; font-size: 14px; color: var(--color-navy-soft); }
.form-status[hidden] { display: none; }

/* ---------- Scroll reveal ----------
   Progressive enhancement only: content is fully visible by default. The
   hidden starting state is scoped to html.js-reveal, a class added by a
   tiny inline script in <head>. If JavaScript is blocked or fails, that
   class is never added and every section simply stays visible. */
html.js-reveal [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease-soft), transform 0.7s var(--ease-soft);
}
html.js-reveal [data-reveal].is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  html.js-reveal [data-reveal] { opacity: 1; transform: none; transition: none; }
  .photo, .link-arrow svg, .service-card, .service-card__media img, .detail-row__media img,
  .btn, .footer-grid nav a, .contact-line .icon, .credentials__badge { transition: none; }
}
