/*
 * Copyright 2023–2026 T&G Consulting and Design LLC
 * Proprietary and Confidential.
 */

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }

body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  background: #0f172a;
  color: #f8fafc;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

/* Background Overlay - Desktop uses fixed background image on overlay element */
.overlay {
  position: fixed;
  inset: 0;
  background:
    linear-gradient(rgba(15, 23, 42, 0.75), rgba(15, 23, 42, 0.75)),
    url('/sf-aerial.jpg') center/cover no-repeat;
  z-index: 0;
}

header {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 2rem;
  max-width: 64rem;
  width: 100%;
  margin: 0 auto;
}

header a {
  color: #e2e8f0;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color 0.15s ease;
}

header a:hover, header a.active {
  color: #93c5fd;
  text-decoration: underline;
}

.logo {
  font-weight: 700;
  font-size: 1.1rem;
  color: #f8fafc;
  text-decoration: none;
  letter-spacing: -0.01em;
}

/* SaaS login link — pinned to top-right on desktop */
.saas-login {
  margin-left: auto;
  font-weight: 600;
  font-size: 0.9rem;
  color: #93c5fd;
  border: 1px solid rgba(147, 197, 253, 0.35);
  border-radius: 6px;
  padding: 0.35rem 0.85rem;
  transition: background 0.15s ease, color 0.15s ease;
}
.saas-login:hover {
  background: rgba(147, 197, 253, 0.12);
  color: #bfdbfe;
  text-decoration: none !important;
}

nav {
  display: flex;
  gap: 1.5rem;
}

main {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 2.5rem 1.5rem;
}

.message {
  max-width: 54rem;
  line-height: 1.7;
  font-size: 1.05rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  text-align: left;
}

.message p { margin: 0 0 1.1rem; }
.message p:last-child { margin-bottom: 0; }
.message a {
  color: #93c5fd;
  text-decoration: underline;
}
.message a:hover {
  color: #bfdbfe;
}
.message .lead {
  font-size: 1.15rem;
  font-weight: 500;
  margin-bottom: 1.4rem;
}

.group {
  margin-top: 2rem;
}
.group:first-child {
  margin-top: 0;
}
.group-title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #e0f2fe;
  margin: 0 0 0.65rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid rgba(147, 197, 253, 0.35);
}

.subgroups {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding-left: 0.35rem;
  border-left: 2px solid rgba(147, 197, 253, 0.25);
}

.subhead {
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #93c5fd;
  margin: 0.85rem 0 0.35rem;
}
.subgroups .subhead:first-of-type {
  margin-top: 0;
}

.buildspace-cta {
  margin-top: 0.85rem;
  padding: 0.85rem 1rem;
  border-left: 3px solid #38bdf8;
  background: rgba(56, 189, 248, 0.08);
  border-radius: 0 6px 6px 0;
}

.survey-link {
  color: #f97316 !important;
  font-weight: 600;
  text-decoration: none !important;
}

.survey-link:hover {
  color: #fb923c !important;
  text-decoration: underline !important;
}

/* Contact Form */
.contact-form {
  margin-top: 1.25rem;
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(147, 197, 253, 0.25);
  border-radius: 8px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-row {
  display: flex;
  gap: 1rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
}

.form-conditional {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-conditional[hidden] {
  display: none !important;
}

.turnstile-wrap {
  min-height: 0;
}

.turnstile-wrap[hidden] {
  display: none !important;
}

.form-field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #93c5fd;
}

.form-field input,
.form-field select,
.form-field textarea {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(147, 197, 253, 0.25);
  border-radius: 6px;
  padding: 0.65rem 0.85rem;
  color: #f8fafc;
  font-family: inherit;
  font-size: 0.9rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}

.form-field select option {
  background: #0f172a;
  color: #f8fafc;
}

.btn-submit {
  align-self: flex-start;
  background: #0284c7;
  color: #ffffff;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.65rem 1.5rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}
.btn-submit:hover {
  background: #0369a1;
}
.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.form-status {
  font-size: 0.85rem;
  font-weight: 500;
  margin-top: 0.25rem;
}
.form-status.success { color: #4ade80; }
.form-status.error { color: #f87171; }

.form-disclaimer {
  font-size: 0.78rem;
  color: #94a3b8;
  line-height: 1.4;
  margin-top: 0.85rem;
}

/* Supported Vendors Marquee */
.vendor-marquee {
  width: 100%;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.4);
  border-top: 1px solid rgba(147, 197, 253, 0.15);
  border-bottom: 1px solid rgba(147, 197, 253, 0.15);
  padding: 0.75rem 0;
  margin-top: 2rem;
  position: relative;
}

.vendor-marquee-track {
  display: flex;
  gap: 3rem;
  width: max-content;
  animation: marquee-scroll 25s linear infinite;
}

.vendor-marquee:hover .vendor-marquee-track {
  animation-play-state: paused;
}

@keyframes marquee-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Footer */
footer {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.25rem;
  padding: 1.75rem 1.5rem 1.25rem;
  font-size: 0.875rem;
  color: #cbd5e1;
  border-top: 1px solid rgba(147, 197, 253, 0.2);
  background: rgba(15, 23, 42, 0.4);
}

.footer-groups {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 3rem;
  width: 100%;
}

.footer-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.4rem;
}

.footer-title {
  font-weight: 700;
  font-size: 0.825rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #93c5fd;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}

.footer-links a {
  color: #cbd5e1;
  text-decoration: none;
}
.footer-links a:hover {
  color: #93c5fd;
  text-decoration: underline;
}

.footer-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: #94a3b8;
}

.footer-bottom .contact a {
  color: #93c5fd;
  text-decoration: underline;
}

/* ── Mobile Optimizations for iOS / Android ── */
@media (max-width: 640px) {
  header {
    padding: 0.85rem 1rem;
    justify-content: center;
  }
  
  /* Apply the background image to the fixed overlay instead of the body.
     This safely simulates fixed attachment on iOS Safari without zooming/stretching. */
  body {
    background: #0f172a;
  }
  
  .overlay {
    position: fixed;
    inset: 0;
    background: 
      linear-gradient(rgba(15, 23, 42, 0.75), rgba(15, 23, 42, 0.75)),
      url('/sf-aerial.jpg') center/cover no-repeat;
    z-index: 0;
  }

  main {
    padding: 1.25rem 1.25rem 2.5rem;
  }

  .message {
    font-size: 0.975rem;
    line-height: 1.6;
    max-width: 100%;
  }

  .message .lead {
    font-size: 1.05rem;
  }

  .contact-form {
    padding: 1.15rem 1rem;
    margin-top: 0.5rem;
  }

  .form-row {
    flex-direction: column;
    gap: 0.85rem;
  }

  .form-field input, 
  .form-field select, 
  .form-field textarea {
    font-size: 16px; /* Prevents automatic iOS Safari zoom when tapping inputs */
    padding: 0.75rem 0.85rem;
  }

  .btn-submit {
    width: 100%;
    min-height: 44px;
    font-size: 1rem;
    text-align: center;
  }

  .footer-groups {
    gap: 1.5rem 2rem;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.35rem;
  }
}
