/* Base reset */
* { box-sizing: border-box; }
html,body { height: 100%; margin: 0; }
body {
  font-family: 'Crimson Text', Georgia, serif;
  background: #efe6d8;
  color: #2b1f15;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* HERO: base layout and background */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh; /* Dynamic viewport height for mobile browsers */
  display: block;
  overflow: hidden;
  color: #fff;
}

/* WebP picture element support for hero backgrounds */
.hero-bg-picture {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  will-change: transform;
}

/* Fallback for hero backgrounds using background-image */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-size: cover;
  background-position: center;
  will-change: transform;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.18), rgba(0,0,0,0.22));
  z-index: 1;
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh; /* Dynamic viewport height for mobile browsers */
  padding: 64px 16px;
}

.hero-copy { max-width: 980px; text-align:center; }

.hero-title { font-family: 'Cinzel', serif; font-size: clamp(32px, 6vw, 64px); margin: 0 0 8px; color: #fff; text-shadow: 0 3px 18px rgba(0,0,0,0.48); }
.hero-sub { font-size: clamp(14px, 2.2vw, 20px); color: rgba(255,255,255,0.92); margin: 10px 0 18px; }



.scroll-indicator { position: absolute; left: 50%; transform: translateX(-50%); bottom: 28px; background: rgba(255,255,255,0.06); color: #efe6d8; border-radius: 40px; padding: 8px 14px; border: 1px solid rgba(255,255,255,0.04); cursor:pointer; display:inline-flex; gap:8px; align-items:center; font-weight:700; backdrop-filter: blur(6px); }
.scroll-indicator { z-index: 3; }
.scroll-indicator .arrow { font-size: 22px; }
.scroll-indicator .hint { font-size: 12px; opacity:0.9; }
@keyframes scroll-bounce { 0%,100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, -6px); } }
.scroll-indicator { animation: scroll-bounce 1.6s infinite; }

/* Services Section */
.services { padding: 0; background: linear-gradient(180deg, #e8dcc8, #e0d4bf); }
.services h2 { font-family: 'Cinzel', serif; font-size: 32px; text-align:center; margin: 0 0 16px; color: #2b1f15; padding: 0 16px; font-weight: 700; letter-spacing: 0.5px; }
.services .lead { text-align:center; margin: 0 auto 48px auto; max-width: 680px; color: #3f2f20; opacity:0.88; padding: 0 16px; font-size: 18px; line-height: 1.6; }
.services-banners { display: flex; flex-direction: column; }
.service-banner { position: relative; min-height: 400px; display: flex; align-items: center; padding: 64px 16px; overflow: hidden; text-decoration: none; cursor: pointer; }
.service-banner:hover::after { opacity: 0.6; }
.service-banner::before { content: ''; position: absolute; inset: 0; background-image: url('images-optimized/hero-image.jpeg'); background-size: cover; background-position: center; opacity: 0.25; z-index: 0; transition: transform 0.5s ease, filter 0.3s ease; }
.service-banner:hover::before { transform: scale(1.08); filter: brightness(1.1); }
.service-banner.origins::before { background-image: url('images-optimized/provenance.jpeg'); opacity: 1; }
.service-banner.retrieval::before { background-image: url('images-optimized/acquisition.jpeg'); opacity: 1; }
.service-banner.field-investigation::before { background-image: url('images-optimized/field-investigation.jpeg'); opacity: 1; background-position: center 65%; }
.service-banner::after { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(255,252,245,0.85), rgba(250,245,235,0.9)); z-index: 1; transition: opacity 0.3s ease; }
.service-banner.origins::after { background: linear-gradient(135deg, rgba(255,252,245,0), rgba(250,245,235,0.05)); }
.service-banner.retrieval::after { background: linear-gradient(225deg, rgba(255,252,245,0), rgba(250,245,235,0.05)); }
.service-banner.field-investigation::after { background: linear-gradient(135deg, rgba(255,252,245,0), rgba(250,245,235,0.05)); }
.service-banner.left { justify-content: flex-start; }
.service-banner.right { justify-content: flex-end; }
.service-banner.right::after { background: linear-gradient(225deg, rgba(255,252,245,0.85), rgba(250,245,235,0.9)); }
.service-banner.right.retrieval::after { background: linear-gradient(225deg, rgba(255,252,245,0), rgba(250,245,235,0.05)); }
.service-banner-content { position: relative; z-index: 2; width: 90%; max-width: 800px; }
.service-icon { font-size: 72px; margin-bottom: 20px; display: inline-block; transition: transform 0.3s ease, color 0.3s ease; color: #d4b896; text-shadow: 0 2px 4px rgba(0,0,0,0.3); font-weight: 400; }
.service-banner:hover .service-icon { transform: scale(1.1) rotate(5deg); color: #e5c9a7; }
.service-banner h3 { font-family: 'Cinzel', serif; font-size: 32px; margin: 0 0 16px; color: #3f352a; text-shadow: 0 1px 3px rgba(255,255,255,0.8); }
.service-banner p { margin: 0; color: #3f352a; line-height: 1.7; font-size: 17px; max-width: 680px; }
.service-banner.origins h3,
.service-banner.origins p { color: #fffef8; text-shadow: 0 2px 8px rgba(0,0,0,0.6); }
.service-banner.retrieval h3,
.service-banner.retrieval p { color: #fffef8; text-shadow: 0 2px 8px rgba(0,0,0,0.6); }
.service-banner.field-investigation h3,
.service-banner.field-investigation p { color: #fffef8; text-shadow: 0 2px 8px rgba(0,0,0,0.6); }

/* Contact CTA Section */
.contact-cta {
  padding: 64px 16px 56px;
  background: linear-gradient(180deg, #f9f6f0, #ede4d4);
  border-top: 1px solid rgba(139,111,71,0.12);
}
.contact-cta-inner {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
  padding-bottom: 0;
}
.contact-cta h3 {
  font-family: 'Cinzel', serif;
  font-size: 28px;
  margin: 0 0 12px;
  color: #3f352a;
}
.contact-cta p {
  font-size: 17px;
  line-height: 1.7;
  color: #5a4a3a;
  margin: 0 0 28px;
}
.btn-contact {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: linear-gradient(180deg, #8b6f47, #6d563a);
  color: #fffef8;
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  font-family: 'Crimson Text', Georgia, serif;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transition: transform 0.18s cubic-bezier(.2,.9,.2,1), box-shadow 0.18s ease, background 0.18s ease;
}
.btn-contact::after {
  content: '✉';
  font-size: 18px;
  opacity: 0.9;
}
.btn-contact:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
  background: linear-gradient(180deg, #9a7d52, #7a614a);
}
.btn-contact:active {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.btn-contact:focus {
  outline: 3px solid #e2c28a;
  outline-offset: 2px;
}

/* Case Studies */
.case-studies { padding: 72px 16px; background: linear-gradient(180deg, rgba(238,230,216,0.9), rgba(238,230,216,0.98)); }
.case-studies h2 { font-family: 'Cinzel', serif; font-size: 36px; text-align:center; margin: 8px 0 6px; color: #3f352a; }
.case-studies .lead { text-align:center; margin: 10px auto 32px auto; max-width: 780px; color: #4a3b2a; opacity:0.95; }
.card-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 22px; max-width:1200px; margin: 18px auto; }
.card { display:block; border-radius: 8px; overflow:hidden; background: linear-gradient(180deg, #fff8ee, #fffaf6); text-decoration:none; color: #23180f; border: 1px solid rgba(47,38,30,0.08); box-shadow: 0 6px 24px rgba(0,0,0,0.08); transition: transform 0.25s ease, box-shadow 0.25s ease; }
.card:hover { transform: translateY(-10px); box-shadow: 0 18px 34px rgba(0,0,0,0.16); }
.card-visual { height: 150px; background-size:cover; background-position:center; }
.card-body { padding: 18px; }
.card-body h3 { margin: 0 0 6px; font-family: 'Cinzel', serif; font-size: 20px; }
.card-body p { margin: 0; color: #524232; line-height: 1.45; }

/* In-view animation for cards */
.card { 
  opacity: 0; 
  transform: translateY(12px); 
  transition: transform 600ms cubic-bezier(.2,.9,.2,1), opacity 600ms ease;
  will-change: transform, opacity;
}
.card.in-view { 
  opacity: 1; 
  transform: translateY(0); 
  will-change: auto;
}

/* Navigation */
.site-nav { position: absolute; top: 0; left: 0; right: 0; z-index: 12; background: transparent; }
.nav-inner { max-width: 1200px; margin: 0 auto; padding: 18px 28px; display:flex; align-items:center; justify-content:space-between; gap: 12px; }
.nav-inner .logo { font-family: 'Cinzel', serif; font-weight: 900; letter-spacing: 1px; font-size: 20px; text-decoration: none; color: #fff; text-shadow: 0 2px 8px rgba(0,0,0,0.4); }
.nav-inner ul { list-style: none; display:flex; gap: 18px; margin: 0; padding: 0; align-items:center; }
.nav-inner ul li { margin: 0; }
.nav-inner ul li a { text-decoration:none; color: #fff; font-weight:600; text-shadow: 0 2px 8px rgba(0,0,0,0.4); }

/* Footer */
footer { border-top: 1px solid rgba(0,0,0,0.03); padding: 32px 16px; background: linear-gradient(180deg, rgba(16,12,10,0.03), rgba(6,4,3,0.01)); }
.foot-inner { display:flex; align-items:center; justify-content:space-between; gap: 16px; color:#5b4a3a; }
.footer-nav a { margin-left: 14px; color: #6a5b4b; text-decoration:none; border-bottom: 1px dotted rgba(0,0,0,0.02); font-weight: 600; }

/* Modal / Contact form */
.modal-overlay { position: fixed; inset: 0; background: rgba(10,8,6,0.6); opacity: 0; visibility: hidden; transition: opacity 220ms ease; z-index: 60; }
.modal { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(0.96); background: linear-gradient(180deg, #fffaf3, #fff5ea); border-radius: 8px; box-shadow: 0 14px 48px rgba(4,4,4,0.6); padding: 22px; width: 92%; max-width: 640px; opacity: 0; visibility: hidden; transition: opacity 260ms ease, transform 320ms cubic-bezier(.2,.9,.2,1); z-index: 70; }
.modal[aria-hidden="false"], .modal.open { opacity: 1; transform: translate(-50%, -50%) scale(1); visibility: visible; }
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal-close { position:absolute; right: 12px; top: 10px; background: transparent; color: #533b27; border: 0; font-size: 18px; cursor:pointer; }
.modal-inner { padding: 4px 12px 12px; color: #3f352a; }
.modal h2 { font-family: 'Cinzel', serif; margin: 8px 0 4px; font-size: 22px; }
.modal p { margin: 0 0 10px; color:#5a4738; }
.modal label { display:block; margin-top: 12px; font-weight: 600; font-size: 13px; color: #3d2c20; }
.modal input[type="email"], .modal input[type="text"], .modal textarea { width: 100%; padding: 8px 10px; border-radius: 6px; border: 1px solid rgba(74,58,44,0.12); margin-top: 6px; font-size: 14px; resize: vertical; }
.modal .cta { 
  margin-top: 12px; 
  padding: 8px 14px;
  background: #fffaf3;
  color: #3f2f20;
  border: 1px solid rgba(74,58,44,0.12);
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  font-family: 'Crimson Text', Georgia, serif;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  transition: transform 0.18s cubic-bezier(.2,.9,.2,1), box-shadow 0.18s ease, background 0.18s ease;
  position: relative;
}
.modal .cta:hover {
  background: rgba(139,111,71,0.08);
  color: #2b1f15;
  box-shadow: 0 3px 8px rgba(0,0,0,0.12);
  transform: translateY(-1px);
}
.modal .form-actions { display:flex; gap:0; align-items:center; }
.modal .cta.secondary { background: linear-gradient(180deg, rgba(115,140,155,0.12), rgba(55,65,75,0.08)); color: #111; border: 1px solid rgba(0,0,0,0.06); box-shadow:none; }

/* Split button email menu */
.email-menu-wrapper { position: relative; display:inline-flex; }
.email-main { 
  border-radius: 4px 0 0 4px; 
  border-right: 1px solid rgba(74,58,44,0.18); 
}
.email-dropdown-toggle { 
  border-radius: 0 4px 4px 0; 
  padding: 8px 0;
  min-width: auto;
  margin-top: 12px;
  border-left: none;
  width: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.email-dropdown-toggle:hover {
  background: rgba(139,111,71,0.08);
  color: #2b1f15;
  box-shadow: 0 3px 8px rgba(0,0,0,0.12);
  transform: translateY(-1px);
}

.email-options { position:absolute; left:0; right:auto; top:110%; background: #fffaf3; border-radius:6px; box-shadow: 0 10px 28px rgba(0,0,0,0.18); padding:8px; display:none; width: 100%; z-index:999; margin-top: 4px; }
.email-options[aria-hidden="false"] { display:block; }
.email-option { display:block; width:100%; text-align:left; padding: 10px 12px; background:transparent; border:0; font-weight:600; color:#3f2f20; border-radius:4px; cursor:pointer; font-family: 'Crimson Text', Georgia, serif; font-size: 15px; }
.email-option:hover { background: rgba(139,111,71,0.08); color: #2b1f15; }

/* Focus states for accessibility */
.email-option:focus { outline: 2px solid #e2c28a; outline-offset: 2px; background: rgba(139,111,71,0.06); }
.email-dropdown-toggle:focus { outline: 2px solid #e2c28a; outline-offset: 2px; }

@media(max-width: 560px) {
  .modal { max-width: 95%; padding: 14px; }
}

@media(max-width: 760px) {
  .hero-inner { flex-direction: column; gap: 12px; text-align:center; padding-top: 70px; }
  .nav-inner { padding: 12px 18px; }
  .nav-inner a { font-size: 14px; }
  .hero-sub { font-size: 16px; }
  .foot-inner { flex-direction: column; text-align:center; gap:8px; }
}

/* Article */
.case-study { max-width:900px; margin: 48px auto 120px; padding: 0 24px; color: #3f352a; }
.case-study h2 { font-family: 'Cinzel', serif; font-size: 28px; }
.case-study h3 { font-family: 'Cinzel', serif; font-size: 20px; }
.case-study ul { color: #4a3b2a; }

/* Case study imagery */
.case-images { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 20px 0 8px; }
.case-figure { background: linear-gradient(180deg, #fff8ee, #fffaf6); border: 1px solid rgba(47,38,30,0.08); border-radius: 8px; overflow: hidden; box-shadow: 0 6px 18px rgba(0,0,0,0.08); }
.case-figure a.image-lightbox { display: block; position: relative; overflow: hidden; cursor: zoom-in; }
.case-figure a.image-lightbox::after { content: '🔍'; position: absolute; top: 12px; right: 12px; background: rgba(0,0,0,0.7); color: #fff; padding: 8px 12px; border-radius: 4px; font-size: 16px; opacity: 0; transition: opacity 0.3s ease; pointer-events: none; }
.case-figure a.image-lightbox:hover::after { opacity: 1; }
.case-figure a.image-lightbox img { display:block; width: 100%; height: auto; transition: transform 0.4s ease, filter 0.3s ease; }
.case-figure a.image-lightbox:hover img { transform: scale(1.05); filter: brightness(1.1); }
.case-figure figcaption { padding: 10px 12px; font-size: 14px; color: #5a4a3a; line-height: 1.5; }

/* Image Lightbox */
.lightbox-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.92); z-index: 9999; display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease; cursor: pointer; }
.lightbox-overlay.active { opacity: 1; visibility: visible; }
.lightbox-content { max-width: 90vw; max-height: 90vh; text-align: center; position: relative; z-index: 10000; cursor: default; }
.lightbox-image { max-width: 100%; max-height: 85vh; height: auto; width: auto; display: block; margin: 0 auto; border-radius: 4px; box-shadow: 0 10px 50px rgba(0,0,0,0.5); }
.lightbox-caption { color: #fff; font-size: 16px; margin-top: 20px; padding: 0 20px; line-height: 1.6; max-width: 800px; margin-left: auto; margin-right: auto; }

@media(max-width: 760px) {
  .case-images { grid-template-columns: 1fr; }
}

/* Service Detail Pages */
.small-hero { min-height: 40vh; background-size: cover; background-position: center; }
.content-section { padding: 72px 16px; background: linear-gradient(180deg, rgba(238,230,216,0.9), rgba(238,230,216,0.98)); }
.back-link-wrap { 
  text-align: center; 
  margin: 56px 0 0; 
  padding-top: 48px;
  border-top: 1px solid rgba(139,111,71,0.15);
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 28px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  color: #6a5b4b;
  background: linear-gradient(180deg, #fff8ee, #fffaf6);
  border: 1px solid rgba(47,38,30,0.08);
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  transition: transform 0.18s cubic-bezier(.2,.9,.2,1), box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
}
.back-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.14);
  background: linear-gradient(180deg, #fffaf6, #fffdf9);
  color: #3f352a;
}
.back-link:focus { outline: 3px solid #e2c28a; outline-offset: 2px; }
.service-detail { max-width: 900px; margin: 0 auto; color: #3f352a; }
.service-icon-large { font-size: 96px; margin-bottom: 24px; text-align: center; color: #8b6f47; text-shadow: 0 3px 6px rgba(0,0,0,0.15); font-weight: 400; }
.service-detail h2 { font-family: 'Cinzel', serif; font-size: 36px; text-align: center; margin: 0 0 32px; color: #3f352a; }
.service-detail h3 { font-family: 'Cinzel', serif; font-size: 24px; margin: 40px 0 16px; color: #3f352a; }
.service-detail p { line-height: 1.8; margin-bottom: 16px; font-size: 17px; }
.service-detail .lead { font-size: 19px; font-style: italic; margin-bottom: 40px; text-align: center; color: #5a4a3a; }
.service-list { margin: 16px 0 24px; padding-left: 24px; line-height: 1.8; }
.service-list li { margin-bottom: 12px; color: #4a3b2a; }
.service-list li strong { color: #3f352a; }
.cta-section { background: rgba(255,252,245,0.6); padding: 40px; border-radius: 8px; margin-top: 56px; text-align: center; border: 1px solid rgba(139,111,71,0.2); }
.cta-section h3 { margin-top: 0; font-size: 26px; }
.cta-section p { margin-bottom: 24px; }
.btn-primary { display: inline-block; background: #8b6f47; color: #fffef8; padding: 14px 32px; text-decoration: none; border-radius: 4px; font-size: 16px; font-weight: 500; transition: background 0.3s ease, transform 0.2s ease; }
.btn-primary:hover { background: #6d563a; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.2); }

/* Case study back link styling */
.case-back-wrap { text-align: center; margin: 40px 0 0; }
.case-back {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  color: #6a5b4b;
  background: linear-gradient(180deg, #fff8ee, #fffaf6);
  border: 1px solid rgba(47,38,30,0.08);
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  transition: transform 0.18s cubic-bezier(.2,.9,.2,1), box-shadow 0.18s ease, background 0.18s ease;
}
.case-back::after { content: none; }
.case-back:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0,0,0,0.14); background: linear-gradient(180deg, #fffaf6, #fffdf9); color: #3f352a; }
.case-back:focus { outline: 3px solid #e2c28a; outline-offset: 2px; }

/* Subtle parchment texture using CSS noise pattern fallback */
body::before { content:""; position: fixed; inset: 0; pointer-events:none; background-image: radial-gradient(rgba(0,0,0,0.01) 1px, transparent 1px); background-size: 5px 5px; opacity: 0.35; mix-blend-mode:multiply; }
