/* =====================================================
   LifeQualityMetrics.com — styles.css
   Hero | Tableau | YouTube | Substack | LinkedIn | Contact
   Includes: Off-canvas mobile menu + overlay
   ===================================================== */

/* ===== Reset ===== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

img {
  max-width: 100%;
  display: block;
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ===== Variables ===== */
:root {
  /* Brand */
  --primary-color: #2563eb;      /* main blue */
  --secondary-color: #1d4ed8;    /* darker hover */
  --tertiary-color: #60a5fa;     /* light accent on dark bg */
  --quaternary-color: #0ea5e9;   /* optional accent */

  /* Surfaces */
  --bg-main: #f4f5f7;            /* page background */
  --bg-card: #ffffff;           /* cards/panels */

  /* Text */
  --text-primary: #111827;
  --text-secondary: #6b7280;

  /* Navbar + mobile drawer */
  --navbar-bg: #0b1220;          /* deep navy */
  --navbar-text: #ffffff;

  /* UI */
  --border-color: #e5e7eb;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);

  /* Radii */
  --radius-lg: 20px;
  --radius-md: 12px;
  --radius-pill: 999px;
}

html,
body {
  font-family:
    "Inter",
    "Open Sans",
    system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Arial,
    sans-serif;
  background: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.6;
  scroll-behavior: smooth;
}

/* ===== Utilities ===== */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: 6rem 0;
}

.section__header {
  max-width: 760px;
  margin: 0 auto 3rem;
  text-align: center;
}

.section__title {
  font-size: clamp(1.8rem, 3vw, 2.3rem);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.section__subtitle {
  color: var(--text-secondary);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.8rem;
  border-radius: var(--radius-pill);
  font-weight: 700;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn--primary {
  background: var(--primary-color);
  color: #fff;
}

.btn--primary:hover {
  background: var(--secondary-color);
}

.btn--secondary {
  background: transparent;
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.btn--secondary:hover {
  background: var(--primary-color);
  color: #fff;
}

/* =====================================================
   Navbar
   ===================================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1200;
  padding: 0.5rem 0;
  background: transparent;
  transition: background-color 0.3s ease;
}

.navbar--scroll {
  background: rgba(31, 41, 51, 0.92);
  backdrop-filter: blur(10px);
}

.navbar__container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar__logo img {
  width: 120px;
  height: 32px;
}

.navbar__menu-list {
  display: flex;
  gap: 2rem;
  font-weight: 700;
}

.navbar__menu-link {
  color: var(--text-primary);
}

.navbar--scroll .navbar__menu-link {
  color: #fff;
}

/* ===== Mobile Menu (desktop defaults) ===== */
.navbar__mobile-menu {
  display: none;
}

.navbar__mobile-menu-toggle {
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  box-shadow: none;
  cursor: pointer;
  color: #111827; /* default icon color */
}

.navbar__mobile-menu-toggle:focus-visible {
  outline: 2px solid var(--tertiary-color);
  outline-offset: 6px;
  border-radius: var(--radius-pill);
}

/* Off-canvas panel (kept offscreen by default) */
.navbar__mobile-menu-items {
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  width: min(320px, 82vw);
  background: var(--navbar-bg);
  color: var(--navbar-text);
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
  transform: translateX(100%);
  transition: transform 0.28s ease;
  z-index: 1100;
  padding: 5rem 1.5rem 2rem;
  pointer-events: none;
}

.navbar__mobile-menu-items.active {
  transform: translateX(0);
  pointer-events: auto;
}

.navbar__mobile-menu-list {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  font-size: 1.05rem;
  font-weight: 800;
  text-align: left;
}

.navbar__mobile-menu-link {
  color: var(--navbar-text);
  display: inline-block;
  padding: 0.4rem 0.6rem;
  border-radius: 10px;
}

.navbar__mobile-menu-link:hover {
  color: var(--tertiary-color);
  background: rgba(255, 255, 255, 0.08);
}

/* Overlay behind the off-canvas menu */
.mobile-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 1050;
}

.mobile-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

body.mobile-menu-open {
  overflow: hidden;
}

/* =====================================================
   Hero
   ===================================================== */
.hero {
  padding: 9rem 0 6rem;
  background: var(--bg-main);
}

.hero__container {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero__eyebrow {
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--primary-color);
  margin-bottom: 0.75rem;
}

.hero__title {
  font-size: clamp(2.2rem, 4vw, 3.3rem);
  line-height: 1.15;
  margin-bottom: 1.25rem;
}

.hero__subtitle {
  color: var(--text-secondary);
  max-width: 520px;
  margin-bottom: 2rem;
}

.hero__actions {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.hero__meta {
  display: flex;
  gap: 1.25rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  flex-wrap: wrap;
}

.hero__media-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--shadow);
}

/* =====================================================
   Tableau
   ===================================================== */
.tableau {
  background: var(--bg-card);
}

.tableau__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.tableau__card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--shadow);
}

.tableau__embed-placeholder {
  background: var(--bg-main);
  border-radius: 10px;
  padding: 3rem;
  text-align: center;
  color: var(--text-secondary);
}

/* =====================================================
   YouTube
   ===================================================== */
.youtube {
  background: var(--bg-main);
}

.youtube__grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
}

.youtube__video-frame {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
}

.youtube__video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 12px;
}

/* =====================================================
   Substack
   ===================================================== */
.substack {
  background: var(--bg-card);
}

.substack__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
}

.substack__card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 2rem;
  box-shadow: var(--shadow);
}

/* =====================================================
   LinkedIn
   ===================================================== */
.linkedin {
  background: var(--bg-main);
}

.linkedin__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.linkedin__card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 2rem;
  box-shadow: var(--shadow);
}

/* =====================================================
   Contact
   ===================================================== */
.contact {
  background: var(--bg-card);
}

.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.contact__input,
.contact__textarea {
  width: 100%;
  padding: 1rem;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  margin-bottom: 1rem;
  font-family: inherit;
}

/* =====================================================
   Footer
   ===================================================== */
.footer {
  background: var(--navbar-bg);
  color: rgba(255, 255, 255, 0.75);
  padding: 4rem 0;
}

.footer__container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 3rem;
}

.footer__title {
  color: #fff;
  margin-bottom: 0.5rem;
}

/* =====================================================
   Responsive
   ===================================================== */
@media (max-width: 900px) {
  .hero__container,
  .youtube__grid,
  .contact__grid {
    grid-template-columns: 1fr;
  }

  .hero__actions {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  /* Hide desktop links; show hamburger wrapper */
  .navbar__menu {
    display: none;
  }

  .navbar__mobile-menu {
    display: block;
  }

  /* Hamburger colour behaviour on mobile:
    - before scroll (transparent navbar over light hero): dark
    - after scroll (navbar--scroll on dark background); white
  */
  .navbar__mobile-menu-toggle {
    color: #111827;
  }

  .navbar--scroll .navbar__mobile-menu-toggle {
    color: #ffffff;
  }
}
