/* =========================================================
   Apex Data Labs — Consulting-grade Styles (Palette 3)
   S3-friendly, responsive, logo-ready
   ========================================================= */

/* ----- Brand Tokens (Palette 3) ----- */
:root{
  --bg: #F8FAFC;          /* Snow */
  --text: #111827;        /* Charcoal */
  --muted: #475569;       /* Slate-ish for secondary text */
  --border: #E2E8F0;      /* Light border */
  --card: #FFFFFF;

  --primary: #0F172A;     /* Midnight Blue */
  --secondary: #0D9488;   /* Deep Teal */
  --accent: #67E8F9;      /* Soft Cyan (use sparingly) */

  --maxw: 1120px;
  --radius: 14px;
  --shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
}

/* ----- Base / Reset ----- */
*{ box-sizing: border-box; }

html{ scroll-behavior: smooth; }

body{
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a{ color: inherit; text-decoration: none; }
a:hover{ text-decoration: none; }

p{
  margin: 0 0 14px 0;
  color: var(--muted);
  font-size: 16px;
}

h1, h2, h3{
  margin: 0 0 12px 0;
  color: var(--text);
  letter-spacing: -0.02em;
}

h1{
  font-size: clamp(30px, 4.2vw, 44px);
  line-height: 1.12;
  color: #FFFFFF;
}

h2{
  font-size: clamp(22px, 2.8vw, 30px);
  line-height: 1.2;
}

h3{
  font-size: 18px;
  line-height: 1.25;
}

/* ----- Layout ----- */
.container{
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 20px;
}

/* ----- Header ----- */
.site-header{
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(248, 250, 252, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 110px;
  gap: 16px;
}

/* Logo anchor (image-only logo) */
.logo{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  text-decoration: none;
  color: var(--primary);
  padding-right: 24px;
}

/* Logo tagline */
.logo-tagline{
  display: block;
  margin-top: 2px;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--muted);
}

/* Logo image sizing */
.logo-img{
  height: 64px;
  width: auto;
  display: block;
}

/* Nav */
.nav{
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.nav a{
  font-size: 13px;
  color: var(--text);
  opacity: 0.75;
  padding: 8px 10px;
  border-radius: 10px;
  transition: opacity 140ms ease, background 140ms ease;
}

.nav a:hover{
  opacity: 1;
  background: rgba(15, 23, 42, 0.05);
}

.nav-cta{
  border: 1px solid rgba(13, 148, 136, 0.35);
  color: var(--secondary) !important;
  opacity: 1 !important;
}

/* ----- Hero ----- */
.hero{
  background: var(--primary);
  padding: 72px 0 56px 0;
}

.hero-subtitle{
  margin-top: 14px;
  max-width: 860px;
  color: rgba(203, 213, 225, 0.95);
  font-size: 18px;
}

.hero-cta{
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 26px;
}

.hero-tagline{
  display: none;
  margin-top: 8px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: rgba(203, 213, 225, 0.9);
}

/* ----- Sections ----- */
.section{
  padding: 64px 0;
}

.section-alt{
  background: #FFFFFF;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-intro{
  margin-top: 8px;
  max-width: 820px;
  color: var(--muted);
}

/* CTA row under sections */
.section-cta{
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 22px;
}

/* ----- Why Apex Data Labs ----- */
#why-apex{
  background: linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%);
}

#why-apex h2{
  margin-bottom: 12px;
}

#why-apex .section-intro{
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
}

#why-apex p{
  max-width: 820px;
}

#why-apex p + p{
  margin-top: 16px;
}

/* ----- Grids ----- */
.grid-4{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 22px;
}

.grid-3{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 22px;
}

.grid-2{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  margin-top: 22px;
}

/* ----- Cards ----- */
.card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 18px 16px 18px;
  box-shadow: 0 0 0 rgba(0,0,0,0);
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.card p{
  margin: 8px 0 0 0;
  font-size: 15px;
}

.card:hover{
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  border-color: rgba(13, 148, 136, 0.20);
}

/* ----- Buttons ----- */
.btn-primary,
.btn-secondary,
.btn-tertiary{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 16px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.01em;
  border: 1px solid transparent;
  transition: transform 140ms ease, opacity 140ms ease, background 140ms ease, border-color 140ms ease;
}

/* Primary (Teal) */
.btn-primary{
  background: var(--secondary);
  color: #06231F;
}
.btn-primary:hover{
  opacity: 0.95;
  transform: translateY(-1px);
}

/* Secondary (Outline) — defaults for dark hero */
.btn-secondary{
  background: transparent;
  color: #FFFFFF;
  border-color: rgba(103, 232, 249, 0.35);
}
.btn-secondary:hover{
  background: rgba(103, 232, 249, 0.08);
  transform: translateY(-1px);
}

/* Tertiary (Capability Statement) — defaults for dark hero */
.btn-tertiary{
  border-color: rgba(103, 232, 249, 0.35);
  background: rgba(103, 232, 249, 0.08);
  color: #E6FBFF;
}
.btn-tertiary:hover{
  transform: translateY(-1px);
  opacity: 0.96;
}

/* Secondary + Tertiary variants in light sections */
.section .btn-secondary,
.section-alt .btn-secondary{
  color: var(--secondary);
  border-color: rgba(13, 148, 136, 0.35);
}
.section .btn-secondary:hover,
.section-alt .btn-secondary:hover{
  background: rgba(13, 148, 136, 0.08);
}

.section .btn-tertiary,
.section-alt .btn-tertiary{
  color: var(--primary);
  border-color: rgba(15, 23, 42, 0.14);
  background: rgba(15, 23, 42, 0.04);
}
.section .btn-tertiary:hover,
.section-alt .btn-tertiary:hover{
  background: rgba(15, 23, 42, 0.06);
  transform: translateY(-1px);
}

/* ----- Lists ----- */
ul{
  margin: 10px 0 0 18px;
  padding: 0;
  color: var(--muted);
}

li{ margin: 6px 0; }

/* ----- Contact Form ----- */
.contact-form{
  margin-top: 18px;
  max-width: 560px;
  display: grid;
  gap: 14px;
}

.contact-form label{
  display: inline-block;
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 6px;
  color: var(--text);
}

.contact-form input,
.contact-form textarea{
  width: 100%;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #FFFFFF;
  color: var(--text);
  outline: none;
  font-size: 14px;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.contact-form textarea{ resize: vertical; }

.contact-form input:focus,
.contact-form textarea:focus{
  border-color: rgba(13, 148, 136, 0.45);
  box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.12);
}

.form-status{
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}

/* ----- Footer ----- */
.site-footer{
  padding: 26px 0;
  background: var(--primary);
  color: rgba(203, 213, 225, 0.95);
}

.site-footer p{
  margin: 0;
  color: rgba(203, 213, 225, 0.95);
  font-size: 14px;
}

/* ----- Responsive ----- */
@media (max-width: 980px){
  .grid-4{ grid-template-columns: repeat(2, 1fr); }
  .grid-3{ grid-template-columns: 1fr; }
}

@media (max-width: 640px){
  .logo-img{ height: 56px; }

  .header-inner{
    flex-direction: column;
    align-items: flex-start;
    padding: 10px 0;
    min-height: 90px;
  }

  .nav{ gap: 10px; }

  .hero{ padding: 58px 0 46px 0; }

  .logo-tagline{
    display: none;
  }

  .hero-tagline{
    display: block;
  }

  .grid-2{ grid-template-columns: 1fr; }
  .grid-4{ grid-template-columns: 1fr; }
}