/*
 * LoopLogic – Refreshed Static Site Styles (Dark Theme)
 *
 * This stylesheet defines a modern, brand-aligned dark theme for
 * LoopLogic’s marketing pages. It uses the signature dark blues, teals,
 * and ambers from the microsite designs to create a cohesive and
 * professional brand identity.
 */

/* Colour palette */
:root {
  --bg: #0f172a;
  --bg-soft: #111827;
  --text: #e5e7eb;
  --muted: #9fb1bf;
  --primary: #10b2d5; /* Bright teal/cyan */
  --accent-start: #0ea5e9;
  --accent-end: #16d3e7;
  --card-bg: #111827;
  --card-border: #1f2937;
  --cta-bg: #facc15; /* yellow for primary CTAs */
  --cta-text: #111111;
  --header-bg: rgba(15, 23, 42, 0.85);
  --header-border: #0b1220;
  --secondary: #22d3ee; /* cyan accent used in services headings */
}

/* Global reset */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', sans-serif;
  color: var(--text);
  line-height: 1.6;
  background-color: var(--bg);
}

a {
  color: var(--primary);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* Container */
.container {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* Header */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: var(--header-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--header-border);
}

header .nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-links a {
  font-weight: 500;
  color: var(--text);
  transition: color 0.2s ease;
}
.nav-links a:hover {
  color: var(--primary);
}

/* Make the CONTACT button in the nav use black text */
.nav-links a.btn-primary { 
  color: var(--cta-text);          /* e.g., #111111 */
}
.nav-links a.btn-primary:hover {
  color: var(--cta-text);          /* keep it black on hover */
}

.btn-primary {
  display: inline-block;
  padding: 0.75rem 1.25rem;
  border-radius: 0.5rem;
  background-color: var(--cta-bg);
  color: var(--cta-text);
  font-weight: 600;
  transition: background-color 0.3s ease;
}
.btn-primary:hover {
  background-color: #eab308; /* slightly darker on hover */
}

.btn-secondary {
  display: inline-block;
  padding: 0.75rem 1.25rem;
  border-radius: 0.5rem;
  background-color: transparent;
  color: var(--text);
  font-weight: 600;
  border: 1px solid var(--text);
  transition: background-color 0.3s ease, color 0.3s ease;
}
.btn-secondary:hover {
  background-color: var(--text);
  color: var(--bg);
}


/* Hero */
/* HERO keeps your gradient as a fallback if images fail */
.hero {
  position: relative;
  min-height: 68vh;
  background: linear-gradient(180deg, #0891b2 0%, #0ea5e9 100%);
  overflow: hidden;
}

/* the responsive background image sits behind content */
.hero__bg {
  position: absolute;
  inset: 0;
  display: block;
  z-index: 0;            /* below text */
}
.hero__bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* contrast overlay so white headings are always readable */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0,0,0,.35) 0%,
    rgba(0,0,0,.25) 40%,
    rgba(0,0,0,.20) 100%
  );
  pointer-events: none;
  z-index: 1;
}

/* ensure hero text sits above overlay */
.hero .container {
  position: relative;
  z-index: 2;
}


/* Sections */
section {
  padding: 4rem 0;
}

.section-title {
  font-size: 2.25rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 0.5rem;
  color: var(--text);
}
.section-intro {
  text-align: center;
  margin-bottom: 2rem;
  font-size: 1rem;
  color: var(--muted);
}

/* Services */
.services {
  background-color: var(--bg-soft);
}
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
}
.service-card {
  background-color: var(--card-bg);
  border-radius: 0.75rem;
  padding: 2rem;
  border: 1px solid var(--card-border);
  transition: transform 0.3s ease, border-color 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  height: 100%;
}
.service-card:hover {
  transform: translateY(-6px);
  border-color: var(--primary);
}
.service-card .icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}
.service-card .icon svg {
  width: 28px;
  height: 28px;
  color: #ffffff;
}
.service-card h3 {
  font-size: 1.25rem;
  color: var(--text);
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-weight: 700;
}
.service-card p {
  flex-grow: 1;
  color: var(--muted);
  margin-bottom: 1rem;
  font-size: 0.95rem;
  line-height: 1.4;
}
.service-card .price {
  font-weight: 600;
  color: var(--primary);
}
.service-detail { 
  scroll-margin-top: 150px; /* adjust if your header height changes */
}
/* About section */
.about {
  background-color: var(--bg);
}
.about p {
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  color: var(--muted);
  line-height: 1.5;
}

/* Testimonials */
.testimonials {
  background-color: var(--bg-soft);
}
.testimonial {
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  font-style: italic;
  border-left: 4px solid var(--primary);
  padding-left: 1.5rem;
  color: var(--text);
}
.testimonial cite {
  display: block;
  margin-top: 1rem;
  font-weight: 600;
  color: var(--text);
  font-style: normal;
}

/* Contact CTA */
.contact-cta {
  background: linear-gradient(160deg, #0b2230 0%, #0d2f3f 30%, #093344 100%);
  text-align: center;
}
.contact-cta p {
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 2rem;
  color: var(--muted);
  line-height: 1.5;
}
.contact-cta .small-text {
  font-size: 0.85rem;
  color: var(--muted);
}

/* Footer */
footer {
  background-color: var(--header-border);
  color: var(--muted);
  padding: 2rem 0;
  text-align: center;
}
footer .footer-links {
  margin-bottom: 1rem;
}
footer .footer-links a {
  margin: 0 0.75rem;
  color: var(--text);
  font-weight: 500;
  transition: opacity 0.2s ease;
}
footer .footer-links a:hover {
  opacity: 0.8;
}
footer p {
  margin: 0.3rem 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .nav-links {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
  }
  .hero h1 {
    font-size: 2.25rem;
  }
  .hero .lead {
    font-size: 1rem;
  }
}

/* Partner portal and extended components from old file - kept for compatibility */
.badge-partner {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  border-radius: 9999px;
  background-color: rgba(16, 178, 213, 0.1);
  border: 1px solid rgba(16, 178, 213, 0.3);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
}
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}
.kpi-card {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 0.75rem;
  padding: 1.5rem;
  text-align: center;
}
.kpi-card b {
  display: block;
  font-size: 1.75rem;
  color: var(--text);
  margin-bottom: 0.25rem;
}
.kpi-card span {
  color: var(--muted);
  font-size: 0.9rem;
}
.partner-section {
  padding: 4rem 0;
}
.partner-section h2 {
  font-size: 2rem;
  color: var(--text);
  margin-bottom: 1rem;
  font-weight: 700;
}
html { scroll-padding-top: 150px; }  /* adjust if your header height changes */

.partner-table {
  width: 100%;
  border-collapse: collapse;
  color: var(--muted);
  margin-bottom: 1rem;
}
.partner-table th,
.partner-table td {
  padding: 0.5rem;
  border-bottom: 1px solid var(--card-border);
  text-align: left;
}
.partner-table th {
  color: var(--text);
  font-weight: 600;
}
.svg-wrap {
  background-color: var(--bg-soft);
  border: 1px solid var(--card-border);
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin-top: 1rem;
}
/* === HERO BACKGROUND (simple & reliable) === */

/* 2a) Set the default (light) and dark URLs ONCE with CSS variables */
:root {
  /* Use your best general-purpose desktop size here */
  --hero-light: url('assets/images/hero/hero-light-1920.webp');
  --hero-dark:  url('assets/images/hero/hero-dark-1920.webp');
}

/* 2b) Make the image the background of .hero, with a gradient overlay on top */
.hero {
  position: relative;
  min-height: 68vh;          /* keep your existing hero height */
  overflow: hidden;

  /* First layer is the overlay, second is the image */
  background-image:
    linear-gradient(180deg, rgba(0,0,0,.35) 0%, rgba(0,0,0,.25) 40%, rgba(0,0,0,.20) 100%),
    var(--hero-light);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* 2c) Swap to dark image automatically if the OS is in dark mode */
@media (prefers-color-scheme: dark) {
  .hero {
    background-image:
      linear-gradient(180deg, rgba(0,0,0,.35) 0%, rgba(0,0,0,.25) 40%, rgba(0,0,0,.20) 100%),
      var(--hero-dark);
  }
}

