/* ===========================
   Bat Cave Solutions — Site CSS
   =========================== */

/* --- Tokens --- */
:root {
  --bg:         #f8fafc;
  --ink:        #0f172a;
  --muted:      #64748b;
  --panel:      #ffffff;
  --brand:      #1d4ed8;
  --brand-dark: #1e40af;
  --dark:       #070a14;
  --line:       #e2e8f0;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: 'Inter', 'IBM Plex Sans', sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: 'Space Grotesk', sans-serif;
  line-height: 1.15;
  margin: 0 0 0.75rem;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.4rem); font-weight: 700; }
h3 { font-size: 1.1rem; font-weight: 600; }

p { margin: 0 0 1rem; }
a { text-decoration: none; }

.container { width: min(1120px, 92vw); margin: 0 auto; }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* NAV */
.site-nav {
  position: sticky; top: 0; z-index: 200;
  background: rgba(248, 250, 252, 0.93);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow 0.2s;
}
.site-nav.scrolled { box-shadow: 0 2px 16px rgba(0,0,0,0.08); }

.nav-inner {
  display: flex; align-items: center; gap: 2rem;
  padding: 0.35rem 0; position: relative;
}
.nav-brand { flex-shrink: 0; }
.nav-logo  { height: 192px; width: auto; display: block; }

.nav-links {
  display: flex; list-style: none; margin: 0; padding: 0;
  gap: 2rem; flex: 1; justify-content: center;
}
.nav-link {
  color: var(--ink); font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding-bottom: 3px; border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.nav-link:hover  { color: var(--brand); border-bottom-color: var(--brand); }
.nav-link.active { color: var(--brand); border-bottom-color: var(--brand); }

.nav-cta-desktop { flex-shrink: 0; margin-left: auto; }
.nav-cta-mobile  { display: none; }

.nav-toggle {
  display: none; flex-direction: column; justify-content: center;
  gap: 5px; background: none; border: none; cursor: pointer;
  padding: 6px; margin-left: auto;
}
.nav-toggle span {
  display: block; height: 2px; width: 22px;
  background: var(--ink); border-radius: 2px;
  transition: transform 0.25s, opacity 0.2s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* BUTTONS */
.btn {
  display: inline-block; text-decoration: none;
  padding: 0.7rem 1.35rem; border-radius: 0.5rem;
  font-weight: 600; font-size: 0.875rem; border: 2px solid transparent;
  cursor: pointer; transition: transform 0.15s, background-color 0.15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn-ghost  { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); }

.btn-submit {
  background: #2563eb; color: #fff; border: none; border-radius: 0.45rem;
  padding: 0.7rem 1.3rem; font-family: inherit; font-weight: 700;
  font-size: 0.75rem; letter-spacing: 0.07em; text-transform: uppercase;
  cursor: pointer; white-space: nowrap; flex-shrink: 0;
  transition: background 0.15s, transform 0.15s;
}
.btn-submit:hover { background: #1d4ed8; transform: translateY(-1px); }

/* HERO — text only, centred */
.hero {
  padding: 5.5rem 0 4rem; text-align: center;
  background:
    radial-gradient(ellipse 70% 55% at 80% 20%, rgba(219,234,254,0.5) 0%, transparent 60%),
    radial-gradient(ellipse 55% 65% at 15% 85%, rgba(220,252,231,0.25) 0%, transparent 55%),
    var(--bg);
}
.hero .container { max-width: 780px; }
.hero h1 { margin-bottom: 1.25rem; }

.lead {
  font-size: 1.05rem; color: var(--muted); max-width: 52ch;
  margin: 0 auto 2rem; line-height: 1.7;
}
.hero-cta { display: flex; gap: 0.85rem; justify-content: center; flex-wrap: wrap; }

/* MASCOT SECTION */
.mascot-section {
  padding: 0 0 5rem; background: var(--bg);
  display: flex; justify-content: center;
}
.mascot-visual  { width: min(540px, 92vw); }
.network-svg    { width: 100%; height: auto; filter: drop-shadow(0 8px 32px rgba(0,0,0,0.07)); }

/* INTERIOR PAGE HERO */
.page-hero {
  padding: 5rem 0 4rem;
  background:
    radial-gradient(ellipse 60% 50% at 80% 30%, rgba(219,234,254,0.45) 0%, transparent 60%),
    var(--bg);
  border-bottom: 1px solid var(--line);
}
.page-hero-kicker {
  display: inline-block; font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--brand); margin-bottom: 1rem;
}
.page-hero h1   { max-width: 16em; margin-bottom: 1rem; }
.page-hero .lead { margin: 0; text-align: left; max-width: 54ch; }

/* WHY / SERVICE CARDS */
.why-section {
  padding: 5rem 0; background: #f1f5f9;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.why-heading {
  text-align: center; font-size: clamp(0.8rem, 1.8vw, 1rem); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--ink); margin-bottom: 2.5rem;
}
.service-cards { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.25rem; }
.service-card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 0.85rem; padding: 1.6rem;
  display: flex; flex-direction: column; gap: 0.5rem;
}
.card-icon {
  width: 44px; height: 44px; display: flex;
  align-items: center; justify-content: center;
  color: var(--ink); margin-bottom: 0.25rem;
}
.service-card h3 { color: var(--ink); margin: 0; }
.service-card p  { color: var(--muted); font-size: 0.9rem; margin: 0; flex: 1; }
.card-link {
  display: inline-block; margin-top: 0.75rem;
  color: var(--ink); font-size: 0.875rem; font-weight: 600;
  padding-bottom: 2px; border-bottom: 1.5px solid currentColor;
  transition: color 0.15s;
}
.card-link:hover { color: var(--brand); }

/* SERVICES DETAIL */
.services-section { padding: 5rem 0; }
.services-section + .services-section { border-top: 1px solid var(--line); padding-top: 4rem; }
.service-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.service-detail.reverse { direction: rtl; }
.service-detail.reverse > * { direction: ltr; }
.service-detail-text h2 { margin-bottom: 1rem; }
.service-detail-text p  { color: var(--muted); margin-bottom: 1.25rem; }
.service-detail-text ul { list-style: none; padding: 0; margin: 0 0 1.5rem; display: flex; flex-direction: column; gap: 0.5rem; }
.service-detail-text ul li { padding-left: 1.4rem; position: relative; color: var(--muted); font-size: 0.95rem; }
.service-detail-text ul li::before {
  content: ''; position: absolute; left: 0; top: 0.55em;
  width: 8px; height: 8px; border-radius: 50%; background: var(--brand);
}
.service-detail-visual {
  background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%);
  border: 1px solid var(--line); border-radius: 1.25rem;
  padding: 3rem 2rem; display: flex; align-items: center;
  justify-content: center; min-height: 220px;
}
.service-detail-visual svg { opacity: 0.5; }

/* PROCESS */
.process-section { padding: 5rem 0; background: #f1f5f9; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.process-steps { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.5rem; margin-top: 2.5rem; }
.process-step { background: var(--panel); border: 1px solid var(--line); border-radius: 0.85rem; padding: 1.75rem; }
.step-number { font-size: 2rem; font-weight: 700; font-family: 'Space Grotesk',sans-serif; color: var(--brand); margin-bottom: 0.5rem; line-height: 1; }
.process-step h3 { margin-bottom: 0.5rem; }
.process-step p  { color: var(--muted); font-size: 0.9rem; margin: 0; }

/* PORTFOLIO */
.portfolio-section { padding: 5rem 0; }
.portfolio-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.5rem; margin-top: 2.5rem; }
.portfolio-card { background: var(--panel); border: 1px solid var(--line); border-radius: 1rem; overflow: hidden; display: flex; flex-direction: column; }
.portfolio-thumb {
  background: linear-gradient(135deg, #dbeafe 0%, #dcfce7 100%);
  height: 180px; display: flex; align-items: center;
  justify-content: center; border-bottom: 1px solid var(--line);
}
.portfolio-thumb svg { opacity: 0.4; }
.portfolio-card-body { padding: 1.35rem; flex: 1; display: flex; flex-direction: column; gap: 0.4rem; }
.portfolio-tag { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--brand); }
.portfolio-card-body h3 { margin: 0; font-size: 1rem; }
.portfolio-card-body p  { color: var(--muted); font-size: 0.875rem; margin: 0; flex: 1; }

/* ABOUT */
.about-section { padding: 5rem 0; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; align-items: start; }
.about-text h2 { margin-bottom: 1rem; }
.about-text p  { color: var(--muted); }
.values-list { list-style: none; padding: 0; margin: 2rem 0 0; display: flex; flex-direction: column; gap: 1rem; }
.values-list li { background: var(--panel); border: 1px solid var(--line); border-radius: 0.75rem; padding: 1rem 1.25rem; }
.values-list li strong { display: block; font-family: 'Space Grotesk',sans-serif; margin-bottom: 0.25rem; }
.values-list li span   { color: var(--muted); font-size: 0.9rem; }
.about-mascot { display: flex; justify-content: center; align-items: flex-start; padding-top: 2rem; }
.about-mascot img { width: min(320px, 100%); height: auto; filter: drop-shadow(0 12px 32px rgba(0,0,0,0.1)); }

/* DARK CTA */
.dark-section { background: var(--dark); color: #fff; padding: 5.5rem 0; }
.dark-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.dark-cta h2 { color: #fff; font-size: clamp(1.75rem,4vw,3rem); line-height: 1.15; margin: 0; }

/* CONTACT FORM */
.contact-form-wrap {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 1rem; padding: 2rem;
}
.contact-form-wrap h3 { color: #fff; font-size: 1rem; font-weight: 600; margin-bottom: 1.25rem; }
.contact-form { display: flex; flex-direction: column; gap: 0.85rem; }
.form-field { display: flex; flex-direction: column; }
.form-row { flex-direction: row; gap: 0.75rem; align-items: stretch; }
.form-control {
  width: 100%; padding: 0.75rem 1rem;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 0.5rem; color: #fff; font-size: 0.9rem;
  font-family: inherit; outline: none;
  transition: border-color 0.2s; appearance: none; -webkit-appearance: none;
}
.form-control::placeholder { color: rgba(255,255,255,0.4); }
.form-control:focus        { border-color: rgba(255,255,255,0.45); }
select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='rgba(255,255,255,0.5)' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.85rem center;
  padding-right: 2.5rem; cursor: pointer;
}
select.form-control option { background: #111827; color: #fff; }
textarea.form-control { resize: vertical; min-height: 90px; }
.form-row .form-control { flex: 1; min-width: 0; }

/* FOOTER */
.site-footer { background: var(--dark); border-top: 1px solid rgba(255,255,255,0.07); padding: 1.5rem 0 2rem; }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 0.85rem; text-align: center; }
.footer-nav   { display: flex; gap: 2rem; }
.footer-nav a { color: rgba(255,255,255,0.55); font-size: 0.875rem; font-weight: 500; transition: color 0.15s; }
.footer-nav a:hover { color: #fff; }
.footer-copy  { color: rgba(255,255,255,0.3); font-size: 0.8rem; margin: 0; }

/* SCROLL-REVEAL */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.55s ease, transform 0.55s ease; }
.reveal.revealed { opacity: 1; transform: translateY(0); }

/* RESPONSIVE */
@media (max-width: 900px) {
  .nav-cta-desktop { display: none; }
  .nav-toggle      { display: flex; }
  .nav-cta-mobile  { display: block; padding-top: 0.5rem; }
  .nav-links {
    display: none; position: absolute; top: calc(100% + 1px);
    left: -4vw; right: -4vw; background: var(--panel);
    border-bottom: 1px solid var(--line); flex-direction: column;
    padding: 1rem 1.5rem 1.25rem; gap: 0.85rem;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  }
  .nav-links.open { display: flex; }
  .service-cards, .process-steps, .portfolio-grid { grid-template-columns: 1fr; }
  .service-detail, .service-detail.reverse, .dark-grid, .about-grid { grid-template-columns: 1fr; direction: ltr; gap: 2rem; }
  .why-section, .dark-section, .services-section, .portfolio-section,
  .about-section, .process-section { padding: 3.5rem 0; }
  .hero { padding: 3.5rem 0 2.5rem; }
  .page-hero { padding: 3.5rem 0 3rem; }
  .mascot-section { padding: 0 0 3rem; }
}

@media (max-width: 540px) {
  .form-row { flex-direction: column; align-items: stretch; }
  .btn-submit { width: 100%; text-align: center; }
  .footer-nav { gap: 1.25rem; }
  .nav-logo { height: 110px; }
}
