/* =========================
   Exulans Enterprises — style.css
   Theme vars
   ========================= */

/* Colors / tokens / layout tuning vars */
:root {
  --primary: #06243a;
  --accent:  #276CAA;
  --bg:      #ffffff;
  --text:    #06243a;
  --footer:  #4381b8;

  /* contact form layout tuning */
  --contact-label-col: 180px;
  --contact-left-nudge: 28px; /* tweak this to shift contact form block left/right on desktop */
}

/* =========================
   Base
   ========================= */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Service (capability) pages: clouds background image */
body.service-page {
  background-color: #E2F5FF; /* fallback color while the image loads */
  background-image: url("/media/flyingthruclouds-poster-1920.jpg");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

/* Video pages (index.php, contact.php): also show clouds
   behind everything below the hero (footer included) */
body.video-page {
  background-color: #E2F5FF;
  background-image: url("/media/flyingthruclouds-poster-1920.jpg");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

/* =====================================
   GLOBAL VIDEO BACKGROUND (index.php)
   =====================================

   .video-bg sits BEHIND the entire page.
   It never scrolls.
   It clips the video so Safari can’t show black bars.
*/
.video-bg {
  position: fixed;
  inset: 0; /* top:0; right:0; bottom:0; left:0 */
  z-index: 0;
  overflow: hidden;

  /* fallback image while video loads / if video can’t play */
  background: center/cover no-repeat url("/media/flyingthruclouds-poster-1920.jpg");

  /* make sure you can still click links, buttons, etc. */
  pointer-events: none;
}

/* the actual <video> inside .video-bg */
.video-bg video {
  position: absolute;
  top: 50%;
  left: 50%;

  /* oversize the video and center it, instead of just 100% x 100%,
     so there’s NEVER letterbox black bars even on very tall windows */
  width: 100vw;
  height: calc(56.25vw + 2px);   /* 56.25% of width = 16:9 */
  min-height: calc(100vh + 2px);
  min-width: 177.78vh;           /* 177.78% of height = 16:9 */

  transform: translate(-50%, -50%);
  object-fit: cover;
  object-position: center center;
}

/* Make sure header / content / footer sit above the video */
.site-header,
.site-main,
.site-footer {
  position: relative;
  z-index: 1;
  background: transparent !important;
}

/* Links */
a, a:visited { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* =========================
   Header & Footer
   ========================= */

/* HEADER (default) */
.site-header {
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  border: 0;
}

/* HEADER when overlaying the hero video/image:
   floats over the hero, transparent, light nav text */
.site-header.overlay {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 2;
  background: transparent !important; /* force transparent over video */
  border: 0 !important;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

/* Nav links when header is overlay mode (over video/hero) */
.site-header.overlay .nav a {
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
  text-decoration: none;
  border-bottom: 0;
}

/* Contact link in overlay header: accent color, no shadow */
.site-header.overlay .nav a[href="contact.php"],
.site-header.overlay .nav a[href="contact.php"]:visited {
  color: var(--accent);
  text-shadow: none;
  text-decoration: none;
  border-bottom: 0;
}

/* Hover in overlay header */
.site-header.overlay .nav a:hover {
  text-decoration: underline;
  text-decoration-color: #fff;
  border-bottom: 0;
}
.site-header.overlay .nav a[href="contact.php"]:hover {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  border-bottom: 0;
}

/* HEADER nav colors in normal (non-overlay) mode */
.nav a {
  color: var(--primary);
  margin-left: 1rem;
  padding-bottom: .2rem; /* you can keep this, it's just spacing */
  text-decoration: none;
  border-bottom: 0;
}

/* Contact link (normal header) in accent */
.nav a[href="contact.php"],
.nav a[href="contact.php"]:visited {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 0;
}

/* Hover state in normal header */
.nav a:hover {
  text-decoration: underline;
  text-decoration-color: currentColor; /* underline matches the text color */
  border-bottom: 0;
}
.nav a[href="contact.php"]:hover {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  border-bottom: 0;
}

/* LOGO */
.logo a {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.logo img {
  height: 64px;
  width: auto;
  display: block;
}

/* FOOTER */
.site-footer {
  text-align: center;
  color: var(--footer);
  background: transparent !important;  /* ensure no box behind footer */
  border: 0 !important;
  padding: .5rem 2rem 1rem;
}

/* mobile footer padding */
@media (max-width: 640px) {
  .site-footer {
    padding: .5rem 1rem 1rem;
  }
}

/* =========================
   Main wrapper
   ========================= */
.site-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem;
}

/* On hero/video pages we don’t want any extra white/black gutter
   under the hero before the footer, so kill ALL padding */
.site-main.no-top {
  padding-top: 0;
  padding-bottom: 0;
  padding-left: 2rem;
  padding-right: 2rem;
}

/* =========================
   HERO (video landing / contact)
   =========================

   Behavior:
   - Hero fills the full viewport height (100vh).
   - The <video> is absolutely positioned and covers the hero.
   - All content (headline, links, contact form) sits above the video.
   - Because the hero is 100vh tall and the video covers 100% of it,
     you don't get a halfway "video vs static" split or a dark seam.
*/
.hero {
  position: relative;
  overflow: hidden;

  /* full-bleed breakout stays the same */
  width: 100vw;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;

  /* instead of 100vh */
  min-height: calc(100vh - 80px);
  height: auto;

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

  padding: 0;
  border: 0;
  background: transparent;
  z-index: 0;
}

/* modern viewport unit on mobile to avoid browser chrome math issues */
@supports (height: 100dvh) {
  .hero {
    min-height: calc(100dvh - 80px);
    height: auto;
  }
}

/* No forced seam between hero and whatever follows */
.hero + * {
  margin-top: 0;
  border-top: 0;
}

/* Content on top of the video */
.hero-overlay {
  position: relative;
  z-index: 1;
  padding: 2rem;
  max-width: 800px;
  background: transparent;
  color: #fff;
  border: 0;
}

/* Headline */
.hero-overlay h1 {
  font-size: clamp(2rem, 6vw, 3.5rem);
  color: var(--primary);
  margin: 0 0 .5rem;
  line-height: 1.2;
}

/* Intro paragraph under headline */
.hero-overlay p {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  color: #363636;
}

/* Highlight brand name in paragraph */
.brand {
  color: var(--accent);
  font-weight: 600;
}

/* =========================
   HERO LINKS ("What we do" tiles)
   ========================= */
.hero-links-heading {
  font-size: 1rem;
  line-height: 1.4;
  font-weight: 700;
  color: var(--primary);
  margin: 2rem 0 .75rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  text-align: center;
}

/* Grid of service links */
.hero-links {
  margin-top: 1.5rem;
  display: grid;
  grid-template-columns: 1fr;
  row-gap: 0.75rem;   /* force vertical space so borders don't merge */
  column-gap: 0.75rem;
  gap: 0.75rem;
}

/* Each tile */
.hero-links a {
  display: block;
  background: rgba(59,135,203,0.40);              
  border: 1px solid rgba(67,129,184,0.4);         /* accent border w/ opacity */
  color: var(--primary);
  text-decoration: none;
  padding: .75rem 1rem;
  line-height: 1.4;
  font-size: .95rem;
  font-weight: 500;
  border-radius: 6px;
  text-align: center;
}

/* Hover state: tinted accent, readable white text */
.hero-links a:hover {
  background: rgba(1,96,180,0.67); /* accent w/ opacity */
  color: #fff;
  text-decoration: none;
  border-color: var(--accent);
}

/* Responsive columns for hero links */
@media (min-width: 600px) {
  .hero-links {
    grid-template-columns: 1fr 1fr;
  }
}
@media (min-width: 960px) {
  .hero-links {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

/* =========================
   Buttons
   ========================= */
.btn {
  display: inline-block;
  border: 1px solid var(--primary);
  background: var(--primary);
  color: #fff;
  padding: .75rem 1.25rem;
  text-decoration: none;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, border-color .15s ease;
  border-radius: 6px;
}
.btn:hover {
  background: #fff;
  color: var(--primary);
}

/* Accent-style buttons inside hero-overlay */
.hero-overlay .btn {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.hero-overlay .btn:hover {
  background: #fff;
  color: var(--accent);
  border-color: var(--accent);
}

/* Disabled state for reCAPTCHA flow */
.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: .5;
  cursor: not-allowed;
}

/* =========================
   CONTACT FORM (in hero-overlay on contact.php)
   ========================= */
.hero-overlay h2.center {
  color: var(--primary);
}

.hero-overlay .contact-form {
  margin: 0 auto;
  width: min(640px, 100%);
  display: grid;
  grid-template-columns: 180px 1fr; /* label / field */
  column-gap: 12px;
  row-gap: 10px;
  align-items: center;
}

/* Labels */
.hero-overlay .contact-form label {
  text-align: right;
  margin: 0;
  color: var(--primary);
}

/* Inputs / textarea */
.hero-overlay .contact-form input,
.hero-overlay .contact-form textarea {
  grid-column: 2;
  background: rgba(255,255,255,0.95);
  border: 1px solid rgba(6,36,58,0.6); /* slightly softer so it doesn't read like a page-wide rule */
  color: var(--primary);
  padding: .6rem;
  width: 100%;
}
.hero-overlay .contact-form textarea {
  resize: vertical;
}

/* reCAPTCHA row */
.hero-overlay .contact-form .captcha-row {
  grid-column: 1 / -1;      /* span both columns */
  justify-self: center;
  margin: .25rem 0 .5rem;
}

/* Send button row: span both columns and center */
.hero-overlay .contact-form .btn {
  grid-column: 1 / -1;
  justify-self: center;
  width: max-content;
  margin-top: .5rem;
}

/* Desktop tuning (>=901px):
   shift the form left visually and then re-center captcha/button */
@media (min-width: 901px) {
  .hero-overlay .contact-form {
    grid-template-columns: var(--contact-label-col) 1fr;
    width: min(640px, 100%);
    margin: 0 auto;
    transform: translateX(
      calc((var(--contact-label-col) / -2) - var(--contact-left-nudge))
    );
  }

  .hero-overlay .contact-form label {
    text-align: right;
  }

  .hero-overlay .contact-form input,
  .hero-overlay .contact-form textarea {
    grid-column: 2;
  }

  .hero-overlay .contact-form .btn,
  .hero-overlay .contact-form .captcha-row {
    transform: translateX(
      calc((var(--contact-label-col) / 2) + var(--contact-left-nudge))
    );
  }
}

/* Mobile layout (<=640px) */
@media (max-width: 640px) {
  /* Give the hero text extra top padding so it clears the logo/nav header */
  .hero-overlay {
    padding-top: 6rem;  /* was 2rem; now ~96px of breathing room */
  }
    
  .hero-overlay .contact-form {
    /* one column instead of 42% / 58% two-column */
    grid-template-columns: 1fr;
    column-gap: 0;
    row-gap: .75rem;

    width: 100%;
    max-width: 100%;
    margin: 0;
    transform: none; /* undo desktop offset */
  }

  /* labels go full width, above the field */
  .hero-overlay .contact-form label {
    grid-column: 1;
    text-align: left;
    font-size: 1rem;
    margin: 0;
  }

  /* inputs and textarea also span full width */
  .hero-overlay .contact-form input,
  .hero-overlay .contact-form textarea {
    grid-column: 1;
    width: 100%;
  }

  /* captcha row */
  .hero-overlay .contact-form .captcha-row {
    grid-column: 1;
    justify-self: center;
    transform: none;
  }

  /* Send button row */
  .hero-overlay .contact-form .btn {
    grid-column: 1;
    justify-self: center;
    width: max-content;
    transform: none;
  }
}

/* Super-narrow tweak for captcha */
@media (max-width: 360px) {
  .hero-overlay .contact-form .captcha-row .g-recaptcha {
    transform: scale(0.9);
    transform-origin: center;
  }
}

/* Honeypot: keep humans from seeing the spam trap */
.hp-label,
.hp-input {
  position: absolute !important;
  left: -9999px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* =========================
   INTERNAL SERVICE PAGES
   ========================= */

.internal-hero {
  background: rgba(6, 36, 58, 0.88); 
  color: #fff;
  padding: 4rem 1rem 3rem;
  border-bottom: 1px solid var(--primary);
}

.internal-hero-content {
  max-width: 1100px;
  margin: 0 auto;
}

.internal-hero h1 {
  margin: 0 0 .75rem;
  font-size: clamp(1.75rem, 2vw, 2.25rem);
  line-height: 1.2;
  color: #fff;
  font-weight: 600;
}

.internal-hero p {
  max-width: 700px;
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.5;
  color: #fff;
}

.service-body {
  max-width: 800px;
  margin: 0 auto;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--primary);

  background: rgba(255, 255, 255, 0.8); /* <-- as requested */
  padding: 2rem 1.5rem 3rem;
  border-radius: 12px;
}

.service-body h2 {
  font-size: 1.3rem;
  line-height: 1.4;
  margin-top: 2rem;
  margin-bottom: .5rem;
  color: var(--primary);
  font-weight: 700;
}

.service-list {
  list-style: none;
  padding-left: 0;
  margin: 1rem 0 2rem;
}
.service-list li {
  padding-left: .75rem;
  margin-bottom: 1rem;
  color: var(--primary);
  font-size: .95rem;
  line-height: 1.5;
}
.service-list li strong {
  font-weight: 600;
  color: var(--accent);
  display: block;
  margin-bottom: .25rem;
}

.service-cta {
  margin: 2.5rem 0 3rem;
  text-align: center;
}
.service-cta .btn {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.service-cta .btn:hover {
  background: #fff;
  color: var(--accent);
  border-color: var(--accent);
}

/* =========================
   LEGACY "PILLARS / WHAT WE DO" TILES (kept for fallback safety)
   ========================= */
.pillars {
  padding: 3rem 1rem;
}
.pillars h2 {
  margin-top: 0;
  text-align: center;
}

.grid {
  list-style: none;
  padding: 0;
  margin: 1rem auto 0;
  max-width: 900px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: .75rem;
}
.grid li {
  border: 1px solid var(--primary);
  background: var(--primary);
  color: #fff;
  padding: .9rem;
  text-align: center;
}

.pillar-card {
  display: block;
  border: 1px solid var(--primary);
  background: var(--primary);
  color: #fff;
  padding: .9rem;
  text-align: center;
  text-decoration: none;
}
.pillar-card:hover {
  text-decoration: underline;
}

/* =========================
   Utilities / responsive tweaks
   ========================= */
img, svg, video {
  max-width: 100%;
  height: auto;
  display: block;
}
.center {
  text-align: center;
}

/* Global small-screen spacing tweaks */
@media (max-width: 640px) {
  .site-header,
  .site-footer {
    padding: .85rem 1rem;
  }

  .nav a {
    margin-left: .75rem;
  }

  .site-main {
    padding: 1.5rem 1rem;
  }

  .site-main.no-top {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .hero-overlay {
    margin: 0 1rem;
  }
}
