/*
  Copyright (c) 2025 American Geospatial™
  All rights reserved.
*/

/* =========================================================
   Global
   ========================================================= */

:root {
  --header-h: 56px; /* fixed top bar height target */
  --content-top-pad: calc(var(--header-h) + 24px);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  color: #ffffff;
  background-color: #000000;
  line-height: 1.5;
}

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

/* Default footer behavior (normal flow; page-specific overrides as needed) */
footer {
  position: static;
  text-align: center;
  font-size: 0.75rem;
  color: #cccccc;

  margin: 2rem auto;   /* vertical breathing room */
  padding: 0 1.5rem;   /* align with page gutters */
}

/* =========================================================
   Header + Navigation (Top Bar)
   ========================================================= */

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  min-height: var(--header-h);
  padding: 0.9rem 1.1rem;
  z-index: 1000;

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;

  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-logo {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
}

.brand-text {
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 0.92rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Hamburger */
.hamburger-menu {
  width: 30px;
  height: 20px;
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
}

.hamburger-menu .bar {
  width: 100%;
  height: 3px;
  background-color: #ffffff;
}

/* Nav dropdown */
.nav-menu {
  display: none;
  position: absolute;
  top: calc(var(--header-h) + 8px);
  right: 1.1rem;

  background-color: rgba(0, 0, 0, 0.85);
  padding: 0.5rem;
  border-radius: 6px;
  border: 1px solid #333;
}

.nav-menu.active {
  display: block;
}

.nav-menu ul {
  list-style: none;
}

.nav-menu li {
  margin: 0;
}

.nav-menu a {
  display: block;
  padding: 0.6rem 0.8rem;
  border-radius: 6px;
}

.nav-menu a:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* =========================================================
   Shared Layout Wrappers
   ========================================================= */

.content-wrapper {
  min-height: calc(100vh - var(--header-h));
  padding-top: var(--content-top-pad);
  padding-bottom: 2rem;
}

.content-container {
  width: min(1100px, 100%);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.content-container h1 {
  font-size: 2.25rem;
  margin-bottom: 1.25rem;
}

.content-container h2 {
  font-size: 1.6rem;
  margin-bottom: 0.75rem;
}

.content-container p {
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.7;
}

/* =========================================================
   Buttons
   ========================================================= */

/* Shared CTA/Button class */
.button,
.hero-button,
.about-button,
.service-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 0.85rem 1.1rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);

  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;

  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;

  transition: background 160ms ease, transform 160ms ease, border-color 160ms ease;
}

.button:hover,
.hero-button:hover,
.about-button:hover,
.service-link:hover {
  background: rgba(255, 255, 255, 0.10);
  transform: translateY(-1px);
  border-color: rgba(255, 255, 255, 0.22);
}

.hero-button.primary,
.button.primary {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.22);
}

.hero-button.primary:hover,
.button.primary:hover {
  background: rgba(255, 255, 255, 0.20);
}

.service-link {
  padding: 0.75rem 1rem;
  border-radius: 12px;
}

/* =========================================================
   About Page (and Cemetery Mapping page)
   ========================================================= */

.content-container.about {
  padding-bottom: 2rem;
}

.about-hero {
  padding-top: 6px;
  padding-bottom: 20px;
}

.about-eyebrow {
  font-weight: 800;
  letter-spacing: 0.12em;
  font-size: 0.8rem;
  opacity: 0.85;
  margin-bottom: 10px;
}

.about-lede {
  margin-top: 14px;
  max-width: 80ch;
}

.about-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.about-metrics .metric {
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 14px;
  padding: 14px 12px;
  background: rgba(255, 255, 255, 0.02);
}

.about-metrics .metric-value {
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.01em;
}

.about-metrics .metric-label {
  margin-top: 4px;
  font-size: 12px;
  opacity: 0.8;
}

.about-section {
  margin-top: 34px;
}

.about-cards {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.about-card {
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 16px;
  padding: 16px 14px;
  background: rgba(255, 255, 255, 0.03);
}

.about-card h3 {
  margin-bottom: 8px;
  font-size: 1.05rem;
}

.about-card p {
  opacity: 0.9;
}

.about-steps {
  margin-top: 14px;
  padding-left: 18px;
  display: grid;
  gap: 10px;
}

.about-steps li {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  align-items: start;
}

.step-title {
  font-weight: 800;
}

.step-text {
  opacity: 0.9;
}

/* CTA */
.about-cta {
  margin-top: 56px;
  padding-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.10);
}

.about-cta-inner {
  border-radius: 18px;
  padding: 22px 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.06),
    rgba(255, 255, 255, 0.02)
  );
  text-align: center;
}

.about-cta-inner h2 {
  margin: 0 0 10px 0;
}

.about-cta-inner p {
  margin: 0 auto 14px;
  opacity: 0.9;
  line-height: 1.65;
  max-width: 75ch;
}

/* About responsive */
@media (max-width: 760px) {
  .about-cards {
    grid-template-columns: 1fr;
  }

  .about-steps li {
    grid-template-columns: 1fr;
  }

  .about-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* =========================================================
   Home Page (Full-page scroll snap sections)
   ========================================================= */

html,
body {
  height: 100%;
}

body.home-page {
  height: 100%;
  overflow: hidden; /* prevents the outer scrollbar */
}

/* Page is its own scroll container */
body.home-page .snap-page {
  height: 100vh;
  overflow-y: auto;
  scroll-snap-type: y proximity; /* gentle snap */
  -webkit-overflow-scrolling: touch;
}

/* Snap sections */
body.home-page .snap-section {
  position: relative;
  scroll-snap-align: start;
  scroll-snap-stop: always;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: var(--content-top-pad) 1.5rem 2.5rem;
  background: #000;
}

/* Hero (peek on desktop/tablet; mobile overrides below) */
body.home-page .hero-snap {
  height: 90vh;
  overflow: hidden;
  text-align: center;
}

/* Service sections */
body.home-page .service-section {
  height: auto;
  min-height: 0;
  flex-direction: column;
  padding-top: calc(var(--content-top-pad) + 1rem);
  padding-bottom: 3rem;
}

/* Hero video */
body.home-page .hero-video {
  display: none; /* Hide the video element */
}

.hero-snap.hero-image-background {
  background-image: url('/img/hero/AG-Hero-Totalstation-V2.webp') !important;
  background-size: cover !important;
  background-position: right center !important;
}

/* Hero overlay */
body.home-page .hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.55),
    rgba(0, 0, 0, 0.35) 40%,
    rgba(0, 0, 0, 0.65)
  );
  z-index: 1;
}

/* Hero content */
.hero-content {
  max-width: 1100px;
  width: 100%;
  padding: 0 1.5rem;
}

body.home-page .hero-snap .hero-content {
  position: relative;
  z-index: 2;

  /* Option 2: readable panel */
  width: min(980px, 100%);
  padding: 2.25rem 2.25rem;

  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.55);
}
body.home-page .hero-headline {
  margin: 0 auto 0.75rem;
  max-width: 24ch;

  font-size: clamp(2.4rem, 4.2vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 800;
}

body.home-page .hero-subhead {
  margin: 0 auto 1.35rem;
  max-width: 58ch;

  font-size: clamp(1.05rem, 1.55vw, 1.35rem);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.86);
}


/* Typography (company-name kept for legacy, but safe to not use in hero) */
.company-name {
  font-size: 2.5rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  margin-bottom: 1.5rem;
}

.tagline {
  font-size: 1.25rem;
  font-weight: 400;
  max-width: 760px;
  margin: 0 auto 1.75rem;
}

.tagline span {
  display: block;
}

/* Hero actions */
.hero-actions {
  margin-top: 1.1rem;
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Hero metrics (tiles only — no container background) */
.hero-metrics {
  margin: 1.6rem auto 0;
  max-width: 1100px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.75rem;
  text-align: center;
}

.hero-metrics .metric {
  padding: 1.25rem 1.1rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.06),
    rgba(255, 255, 255, 0.02)
  );
}

.hero-metrics .metric-value {
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 0.25rem;
}

.hero-metrics .metric-label {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: #ffffff;
}

.hero-metrics .metric-note {
  font-size: 0.85rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.75);
}

/* Subtle scroll indicator */
body.home-page .hero-snap::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 18px;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.65);
  animation: heroDot 1.4s ease-in-out infinite;
  z-index: 3;
}

@keyframes heroDot {
  0% {
    transform: translate(-50%, 0);
    opacity: 0.25;
  }
  50% {
    transform: translate(-50%, -10px);
    opacity: 0.85;
  }
  100% {
    transform: translate(-50%, 0);
    opacity: 0.25;
  }
}

/* Service card layout */
body.home-page .service-inner {
  width: min(1100px, 100%);
  margin: 0 auto;

  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 2rem;
  align-items: center;

  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  padding: 1.5rem;
}

body.home-page .service-media {
  border-radius: 12px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.35);
}

body.home-page .service-media img {
  width: 100%;
  height: 100%;
  max-height: 70vh;
  display: block;
  object-fit: cover;
}

body.home-page .service-copy {
  text-align: left;
}

body.home-page .service-copy h2 {
  font-size: 1.9rem;
  margin-bottom: 0.75rem;
}

body.home-page .service-copy p {
  font-size: 1.1rem;
  color: #e0e0e0;
  line-height: 1.65;
  margin-bottom: 1.25rem;
  max-width: 62ch;
}

/* Footer after last section / contact section */
body.home-page .home-footer {
  width: min(1100px, 100%);
  margin: 1.75rem auto 1.75rem; /* breathing room above the viewport bottom */
  text-align: center;
  font-size: 0.75rem;
  color: #cccccc;
}

/* Home responsive */
@media (max-width: 1024px) {
  .company-name {
    font-size: 2rem;
  }

  body.home-page .service-inner {
    grid-template-columns: 1fr;
  }

  body.home-page .service-copy {
    text-align: center;
  }

  body.home-page .service-media img {
    max-height: 42vh;
  }

  .hero-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
  }
}
@media (max-width: 760px) {
  body.home-page .hero-snap .hero-content {
    padding: 1.4rem 1.15rem;
    border-radius: 18px;
  }

body.home-page .hero-headline {
  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial,
    sans-serif;

  font-weight: 600;
}


  body.home-page .hero-metrics {
    gap: 1rem;
  }
}


/* =========================================================
   Mobile: keep same snap feel, allow tall content (no overlap)
   ========================================================= */

@media (max-width: 640px) {
  .company-name {
    font-size: 1.5rem;
  }

  .tagline {
    font-size: 1.05rem;
    margin-bottom: 1.25rem;
  }

  /* Allow sections to grow naturally while keeping gentle snap */
  body.home-page .snap-section {
    height: auto;
    min-height: 100vh;
    scroll-snap-stop: normal;
    padding-top: var(--content-top-pad);
    padding-bottom: 2.75rem;
  }

  /* Remove hero peek constraints on mobile */
  body.home-page .hero-snap {
    height: auto;
    min-height: 100vh;
  }

  .hero-metrics {
    grid-template-columns: 1fr;
    margin-top: 1.25rem;
    gap: 1rem;
  }

  .hero-metrics .metric-value {
    font-size: 1.9rem;
  }

  body.home-page .service-media img {
    max-height: 34vh;
  }
}

/* =========================================================
   Netlify Contact Form (shared)
   ========================================================= */

.hidden {
  display: none;
}

form[data-netlify="true"] {
  width: 100%;
  display: grid;
  gap: 18px;
  margin-top: 1.25rem;
}

.form-label {
  display: grid;
  gap: 10px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.01em;
  text-align: left;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 14px 16px;

  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(0, 0, 0, 0.55);

  color: #ffffff;
  font-size: 1rem;
  outline: none;

  transition: border-color 160ms ease, background 160ms ease;
}

.form-input:focus,
.form-textarea:focus {
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(0, 0, 0, 0.65);
}

/* Dark-mode friendly autofill (Safari/Chrome) */
input:-webkit-autofill,
textarea:-webkit-autofill,
select:-webkit-autofill {
  -webkit-text-fill-color: #ffffff;
  transition: background-color 5000s ease-in-out 0s;
}

/* =========================================================
   Contact Page
   ========================================================= */

body.contact-page .contact-container {
  width: min(700px, 100%);
  margin: 0 auto;
}

body.home-page .hero-headline {
  margin: 0 auto 0.85rem;
  max-width: 26ch;

  font-size: clamp(2.4rem, 4.2vw, 3.4rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  font-weight: 400;

  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial,
    sans-serif;
}
body.home-page .hero-subhead {
  margin: 0 auto 1.4rem;
  max-width: 58ch;

  font-size: clamp(1.05rem, 1.55vw, 1.35rem);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.86);
}

.thanks-actions {
  margin-top: 1.25rem;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

