/* Apex Facility Solutions — dark, professional commercial/janitorial theme */

:root {
  --ink: #0b1220;
  --panel: #111b2e;
  --panel-2: #16233b;
  --steel: #2c3e57;
  --gold: #f2b544;
  --gold-dark: #d99a2b;
  --paper: #f4f6f8;
  --card: #ffffff;
  --line: #e4e8ee;
  --muted: #6b7789;
  --radius: 12px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: 'Space Grotesk', 'Inter', sans-serif; font-weight: 600; line-height: 1.15; margin: 0 0 0.5em; }

a { color: inherit; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 1.5rem; }
.center-head { text-align: center; max-width: 620px; margin: 0 auto 2.5rem; }
.light-head h2, .light-head p.eyebrow { color: #fff; }
.eyebrow { display: block; color: var(--gold-dark); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.8rem; margin-bottom: 0.5rem; }
.section-title { font-size: 2.05rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.85rem 1.75rem; border-radius: 6px; background: var(--gold); color: #14202f;
  text-decoration: none; font-weight: 700; border: none; cursor: pointer; font-size: 1rem;
  transition: background 0.15s ease, transform 0.15s ease;
}
.btn:hover { background: #ffc861; transform: translateY(-1px); }
.btn-outline-light { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,0.35); }
.btn-outline-light:hover { background: rgba(255,255,255,0.1); border-color: #fff; }
.btn-lg { padding: 1.05rem 2.25rem; font-size: 1.05rem; }
.btn-full { width: 100%; }

/* ---------- header ---------- */
.site-header { background: var(--ink); border-bottom: 1px solid rgba(255,255,255,0.08); position: sticky; top: 0; z-index: 50; }
body.is-editable .site-header { top: 44px; }
.header-inner { max-width: 1180px; margin: 0 auto; padding: 1rem 1.5rem; display: flex; align-items: center; justify-content: space-between; }
.logo { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; }
.logo-text { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 1.15rem; color: #fff; }
.main-nav { display: flex; align-items: center; gap: 2rem; }
.main-nav ul { list-style: none; display: flex; gap: 1.75rem; margin: 0; padding: 0; }
.main-nav ul a { color: rgba(255,255,255,0.7); text-decoration: none; font-weight: 500; font-size: 0.92rem; }
.main-nav ul a:hover { color: var(--gold); }
.nav-cta-row { display: flex; align-items: center; gap: 1.25rem; }
.phone-link { display: flex; align-items: center; gap: 0.4rem; color: #fff; text-decoration: none; font-weight: 600; }

.hamburger { display: none; flex-direction: column; justify-content: center; gap: 5px; width: 34px; height: 34px; background: none; border: none; cursor: pointer; padding: 0; }
.hamburger span { display: block; height: 2px; width: 100%; background: #fff; transition: transform 0.2s ease, opacity 0.2s ease; }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- hero (full-bleed photo, dark scrim) ---------- */
.hero { position: relative; min-height: 620px; display: flex; align-items: flex-end; overflow: hidden; }
.hero-media { position: absolute; inset: 0; z-index: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; display: block; animation: obtKenBurns 22s ease-in-out infinite alternate; }
@keyframes obtKenBurns { from { transform: scale(1); } to { transform: scale(1.08); } }
.hero-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(11,18,32,0.55) 0%, rgba(11,18,32,0.72) 55%, rgba(11,18,32,0.94) 100%);
}
.hero-inner { position: relative; z-index: 1; color: #fff; padding: 4rem 1.5rem 4.5rem; max-width: 760px; }
.hero-pill {
  display: inline-flex; align-items: center; gap: 0.5rem; background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.25); color: #fff; padding: 0.45rem 0.95rem; border-radius: 999px;
  font-size: 0.82rem; font-weight: 600; margin-bottom: 1.25rem; backdrop-filter: blur(6px);
}
.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: #47d16c; box-shadow: 0 0 0 0 rgba(71,209,108,0.7); animation: obtPulse 1.8s infinite; }
@keyframes obtPulse {
  0% { box-shadow: 0 0 0 0 rgba(71,209,108,0.6); }
  70% { box-shadow: 0 0 0 8px rgba(71,209,108,0); }
  100% { box-shadow: 0 0 0 0 rgba(71,209,108,0); }
}
.hero h1 { font-size: 2.9rem; max-width: 680px; }
.hero-sub { color: rgba(255,255,255,0.75); font-size: 1.08rem; max-width: 540px; margin-top: 1rem; }
.hero-actions { display: flex; gap: 1rem; margin-top: 2rem; flex-wrap: wrap; }

/* ---------- stats ---------- */
.stats { background: var(--panel); padding: 3rem 0; border-bottom: 1px solid rgba(255,255,255,0.08); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; text-align: center; }
.stat-item { display: flex; flex-direction: column; gap: 0.3rem; }
.stat-number { font-family: 'Space Grotesk', sans-serif; font-size: 2.4rem; font-weight: 700; color: var(--gold); }
.stat-label { color: rgba(255,255,255,0.6); font-size: 0.85rem; font-weight: 500; }

/* ---------- services ---------- */
.services { padding: 5.5rem 0; }
.services-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
.service-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease; }
body.is-editable .service-card { position: relative; padding-top: 2.75rem; }
body.is-editable .obt-service-toggle { position: absolute; top: 0.85rem; right: 0.85rem; z-index: 2; }
.service-card:hover { transform: translateY(-3px); box-shadow: 0 16px 32px -16px rgba(11,18,32,0.2); border-color: var(--gold); }
.service-card h3 { font-size: 1rem; margin-bottom: 0.4rem; }
.service-card p { color: var(--muted); font-size: 0.88rem; margin: 0; }

/* ---------- why us / badges (dark) ---------- */
.why-us { background: var(--ink); padding: 5rem 0; }
.badge-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
.badge-card {
  display: flex; flex-direction: column; align-items: center; gap: 0.75rem; text-align: center;
  background: var(--panel); border: 1px solid rgba(255,255,255,0.08); border-radius: var(--radius); padding: 1.75rem 1rem;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.badge-card:hover { transform: translateY(-3px); border-color: var(--gold); }
.badge-card span { color: #fff; font-weight: 600; font-size: 0.92rem; }

/* scroll reveal */
.reveal { opacity: 0; transform: translateY(22px); }
.reveal.is-visible { animation: obtReveal 0.6s ease forwards; animation-delay: var(--reveal-delay, 0s); }
@keyframes obtReveal { to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .hero-media img { animation: none; }
  .reveal { opacity: 1; transform: none; }
  .pulse-dot { animation: none; }
}

/* ---------- gallery ---------- */
.gallery { padding: 5.5rem 0; }
.gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.gallery-item { border-radius: var(--radius); overflow: hidden; box-shadow: 0 16px 36px -16px rgba(11,18,32,0.25); }
.gallery-item img { width: 100%; height: 320px; object-fit: cover; display: block; }
.gallery-item figcaption { padding: 0.9rem 1.1rem; font-weight: 600; font-size: 0.92rem; background: var(--card); border-top: 1px solid var(--line); }

/* ---------- quote ---------- */
.quote { padding: 5.5rem 0 6rem; background: var(--paper); }
.quote-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
.quote-sub { color: var(--muted); }
.quote-contact-cards { display: flex; flex-direction: column; gap: 0.85rem; margin-top: 1.5rem; }
.contact-card { display: flex; align-items: center; gap: 0.75rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 0.9rem 1.1rem; text-decoration: none; color: var(--ink); font-weight: 600; }
.contact-card svg { color: var(--gold-dark); flex-shrink: 0; }
.map-frame { margin-top: 1.5rem; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }

.quote-form { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 2rem; }
.form-row { margin-bottom: 1.25rem; }
.form-row--split { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
label { display: block; font-weight: 600; margin-bottom: 0.4rem; font-size: 0.9rem; }
input[type=text], input[type=tel], input[type=email], select, textarea {
  width: 100%; padding: 0.7rem 0.85rem; border: 1.5px solid var(--line); border-radius: 8px;
  font-size: 1rem; font-family: inherit; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold-dark); }
fieldset { border: none; padding: 0; margin: 0; }
legend { font-weight: 600; margin-bottom: 0.5rem; padding: 0; }
.checkbox-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
.checkbox-item { font-weight: 400; display: flex; align-items: center; gap: 0.5rem; font-size: 0.92rem; }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: rgba(255,255,255,0.65); padding: 3rem 0 1.5rem; }
.footer-inner { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 2rem; padding-bottom: 2rem; border-bottom: 1px solid rgba(255,255,255,0.1); }
.footer-brand .logo-text { color: #fff; }
.footer-col h4 { color: #fff; font-family: 'Space Grotesk', sans-serif; font-size: 1rem; margin-bottom: 0.75rem; }
.footer-col p { margin: 0 0 0.5rem; }
.footer-col a { color: rgba(255,255,255,0.65); text-decoration: none; }
.footer-col a:hover { color: #fff; }
.footer-bottom { padding-top: 1.5rem; font-size: 0.85rem; text-align: center; }

/* ---------- responsive ---------- */
.nav-close { display: none; }
.nav-backdrop { display: none; }
@media (max-width: 900px) {
  .quote-inner { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 2rem 1.5rem; }
  .services-grid { grid-template-columns: 1fr 1fr; }
  .badge-grid, .gallery-grid { grid-template-columns: 1fr 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 1.5rem; }
  .main-nav ul, .nav-cta-row .phone-link span { display: none; }
  .hamburger { display: flex; }
  .main-nav {
    position: fixed; top: 0; right: -100%; height: 100vh; width: 78%; max-width: 320px;
    background: var(--ink); flex-direction: column; align-items: flex-start; padding: 5rem 2rem 2rem;
    transition: right 0.25s ease; z-index: 70; overflow-y: auto;
  }
  .main-nav.open { right: 0; }
  .main-nav.open ul { display: flex; flex-direction: column; gap: 1.25rem; }
  .main-nav ul a { color: rgba(255,255,255,0.85); }
  body.is-editable .main-nav { top: 44px; height: calc(100vh - 44px); }

  .nav-close {
    display: flex; align-items: center; justify-content: center;
    position: absolute; top: 1.25rem; right: 1.25rem;
    width: 2.25rem; height: 2.25rem; border-radius: 50%;
    background: var(--panel); border: none; color: #fff;
    font-size: 1.5rem; line-height: 1; cursor: pointer;
  }
  .nav-close:hover { background: var(--steel); }

  .nav-backdrop {
    display: block; position: fixed; inset: 0; background: rgba(0,0,0,0.6);
    z-index: 65; opacity: 0; visibility: hidden; transition: opacity 0.25s ease;
  }
  .nav-backdrop.open { opacity: 1; visibility: visible; }
}
@media (max-width: 600px) {
  .hero { min-height: 520px; }
  .hero h1 { font-size: 2.1rem; }
  .hero-inner { padding: 3rem 1.25rem 3rem; }
  .stats-grid, .services-grid, .badge-grid, .gallery-grid { grid-template-columns: 1fr; }
  .form-row--split, .checkbox-grid { grid-template-columns: 1fr; }
}
