/* landing.css — Full 1:1 port of legacy landing page styles.
   Combines legacy theme.css :root vars + dashboard-layout.css nav header
   + base-reset.css buttons + base-landing.css sections.
   All rules are scoped under #landingPage so nothing leaks into the
   dashboard panels. */

#landingPage {
  /* Legacy theme variables, localized (prefixed l- to avoid clash).
     Light theme defaults — dark overrides below via
     @media (prefers-color-scheme: dark) AND [data-theme="dark"]. */
  --l-primary: #0a6e5c;
  --l-primary-dark: #084d40;
  --l-primary-light: #e6f5f1;
  --l-accent: #2196a6;

  --l-bg-body: #f4f6f9;
  --l-bg-surface: #ffffff;
  --l-bg-subtle: #f8fafb;

  --l-text: #1a2332;
  --l-text-light: #5a6a7a;
  --l-white: #ffffff;
  --l-card-bg: #ffffff;
  --l-nav-link: rgba(255, 255, 255, 0.85);
  --l-nav-link-hover: #ffffff;

  --l-border: #eef1f4;
  --l-gray-50: #f8fafb;
  --l-gray-100: #eef1f4;

  --l-header-bg: #0a6e5c;
  --l-shadow-md: rgba(0, 0, 0, 0.08);
  --l-shadow-lg: rgba(0, 0, 0, 0.12);

  --l-hero-gradient: linear-gradient(135deg, var(--l-primary-light) 0%, var(--l-white) 50%, #e8f4f8 100%);

  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
  color: var(--l-text);
  background: var(--l-bg-body);
  line-height: 1.6;
  min-height: 100vh;
  position: relative;
}
#landingPage * { box-sizing: border-box; }
#landingPage p { margin: 0 0 1rem; }
#landingPage h1, #landingPage h2, #landingPage h3 { color: var(--l-text); line-height: 1.25; margin: 0; }

/* When landing is visible, force the page background to match so there's
   no dark bleed-through above the fold. */
body:has(#landingPage) { background: var(--l-bg-body); }

/* ── Nav header ── */
#landingPage > nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: var(--l-header-bg);
  color: white;
  display: flex;
  align-items: center;
  padding: 0 2rem;
  z-index: 1000;
  box-shadow: 0 2px 8px var(--l-shadow-lg);
}
#landingPage > nav .nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px;
}
#landingPage > nav .logo {
  color: white;
  font-size: 1.4rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: -0.5px;
}
#landingPage > nav .logo span { color: #80d4c8; }
#landingPage > nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
  margin: 0;
  padding: 0;
  align-items: center;
}
#landingPage > nav a {
  text-decoration: none;
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}
#landingPage > nav a:hover { color: white; }

#landingPage .mobile-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: white;
}
/* Higher specificity (2 classes inside #landingPage) so this wins over
   the later-defined .btn-primary block on the same element. */
#landingPage > nav .nav-login-btn,
#landingPage .nav-login-btn.button-ok {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 0.4rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: background 0.2s;
  font-weight: 500;
  font-family: inherit;
  text-transform: none;
  box-shadow: none;
  transform: none;
}
#landingPage > nav .nav-login-btn:hover,
#landingPage .nav-login-btn.button-ok:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: none;
  box-shadow: none;
}

/* ── Buttons ── */
#landingPage .btn {
  display: inline-block;
  padding: 0.8rem 2rem;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
  font-family: inherit;
}
#landingPage .btn-primary {
  background: var(--l-primary);
  color: var(--l-white);
}
#landingPage .btn-primary:hover {
  background: var(--l-primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(10, 110, 92, 0.3);
}
#landingPage .button-alt {
  background: transparent;
  color: var(--l-primary);
  border: 2px solid var(--l-primary);
  margin-left: 1rem;
}
#landingPage .button-alt:hover {
  background: var(--l-primary);
  color: var(--l-white);
}

/* ── Sections ── */
#landingPage section { padding: 5rem 2rem; }
#landingPage .section-title { text-align: center; margin-bottom: 3rem; }
#landingPage .section-title h2 { font-size: 2rem; font-weight: 700; margin-bottom: 0.5rem; }
#landingPage .section-title p { color: var(--l-text-light); font-size: 1rem; }
#landingPage .container { max-width: 1100px; margin: 0 auto; }

/* ── Hero ── */
#landingPage .hero {
  padding: 8rem 2rem 4rem;
  background: var(--l-hero-gradient);
}
#landingPage .hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
#landingPage .hero-text { text-align: left; }
#landingPage .hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.2rem;
  color: var(--l-text);
}
#landingPage .hero h1 span { color: var(--l-primary); }
#landingPage .hero p {
  font-size: 1.15rem;
  color: var(--l-text-light);
  max-width: 600px;
  margin-bottom: 2rem;
}
#landingPage .hero-illustration {
  display: flex;
  justify-content: center;
  align-items: center;
}
#landingPage .hero-illustration svg {
  width: 100%;
  max-width: 460px;
  height: auto;
  filter: drop-shadow(0 4px 20px rgba(10, 110, 92, 0.10));
}
@keyframes slow-rotate { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* ── Features ── */
#landingPage #features { background: var(--l-gray-50); }
#landingPage .services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}
#landingPage .service-card {
  background: var(--l-card-bg);
  border-radius: 10px;
  padding: 2rem;
  border: 1px solid var(--l-gray-100);
  transition: transform 0.2s, box-shadow 0.2s;
}
#landingPage .service-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px var(--l-shadow-md);
}
#landingPage .service-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: var(--l-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1rem;
}
#landingPage .service-card h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }
#landingPage .service-card p { color: var(--l-text-light); font-size: 0.92rem; }

/* ── About ── */
#landingPage #about { background: var(--l-white); }
#landingPage .about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}
#landingPage .about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 2rem;
}
#landingPage .stat {
  background: var(--l-primary-light);
  border-radius: 8px;
  padding: 1.2rem;
  text-align: center;
}
#landingPage .stat .number {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--l-primary);
}
#landingPage .stat .label {
  font-size: 0.82rem;
  color: var(--l-text-light);
  margin-top: 0.2rem;
}
#landingPage .about-text h2 { font-size: 2rem; font-weight: 700; margin-bottom: 1rem; }
#landingPage .about-text p { color: var(--l-text-light); margin-bottom: 1rem; }

/* ── How It Works ── */
#landingPage #how-it-works { background: var(--l-gray-50); }
#landingPage .team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}
#landingPage .team-card {
  background: var(--l-white);
  border-radius: 10px;
  padding: 2rem;
  text-align: center;
  border: 1px solid var(--l-gray-100);
}
#landingPage .team-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--l-header-bg);
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--l-white);
  font-size: 1.6rem;
  font-weight: 700;
}
#landingPage .team-card h3 { font-size: 1.05rem; margin-bottom: 0.2rem; }
#landingPage .team-card .role {
  color: var(--l-primary);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
#landingPage .team-card p { color: var(--l-text-light); font-size: 0.85rem; }

/* ── Contact ── */
#landingPage #contact { background: var(--l-white); }
#landingPage .contact-info h2 { font-size: 2rem; font-weight: 700; margin-bottom: 1rem; }
#landingPage .contact-info p { color: var(--l-text-light); margin-bottom: 2rem; }
#landingPage .contact-detail {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1rem;
  color: var(--l-text-light);
  font-size: 0.95rem;
  justify-content: center;
}
#landingPage .contact-detail .icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--l-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ── Footer ── */
#landingPage footer {
  background: var(--l-header-bg);
  color: rgba(255, 255, 255, 0.6);
  height: 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
}
#landingPage footer .logo {
  color: white;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.2rem;
}
#landingPage footer .logo span { color: #80d4c8; }

/* ── Responsive ── */
@media (max-width: 860px) {
  #landingPage .hero-inner,
  #landingPage .about-grid { grid-template-columns: 1fr; }
  #landingPage > nav ul { display: none; }
  #landingPage .mobile-toggle { display: block; }
  #landingPage > nav ul.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--l-header-bg);
    padding: 1rem 2rem;
    gap: 1rem;
    align-items: flex-start;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  }
}

/* ───────────────────────────────────────────────────────────────────
   Dark theme overrides — picks up prefers-color-scheme AND an explicit
   data-theme="dark" attribute on <html> (legacy convention).
   ─────────────────────────────────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
  #landingPage {
    --l-primary: #34d399;
    --l-primary-dark: #6ee7b7;
    --l-primary-light: #064e3b;
    --l-accent: #67e8f9;

    --l-bg-body: #0f172a;
    --l-bg-surface: #1e293b;
    --l-bg-subtle: #1a2332;

    --l-text: #e2e8f0;
    --l-text-light: #94a3b8;
    --l-white: #1e293b;
    --l-card-bg: #1e293b;

    --l-border: #334155;
    --l-gray-50: #1a2332;
    --l-gray-100: #334155;

    --l-header-bg: #0a6e5c;
    --l-shadow-md: rgba(0, 0, 0, 0.3);
    --l-shadow-lg: rgba(0, 0, 0, 0.45);

    --l-hero-gradient: linear-gradient(135deg, #0a3830 0%, #0f172a 50%, #0e1a2a 100%);
  }
  html:has(#landingPage) { background: #0f172a; }
  #landingPage .service-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  }
  #landingPage .hero h1 { color: var(--l-text); }
  #landingPage .hero h1 span { color: var(--l-primary); }
}

/* Explicit data-theme="dark" (overrides media query if both apply) */
html[data-theme="dark"] #landingPage {
  --l-primary: #34d399;
  --l-primary-dark: #6ee7b7;
  --l-primary-light: #064e3b;
  --l-accent: #67e8f9;

  --l-bg-body: #0f172a;
  --l-bg-surface: #1e293b;
  --l-bg-subtle: #1a2332;

  --l-text: #e2e8f0;
  --l-text-light: #94a3b8;
  --l-white: #1e293b;
  --l-card-bg: #1e293b;

  --l-border: #334155;
  --l-gray-50: #1a2332;
  --l-gray-100: #334155;

  --l-header-bg: #0a6e5c;
  --l-shadow-md: rgba(0, 0, 0, 0.3);
  --l-shadow-lg: rgba(0, 0, 0, 0.45);

  --l-hero-gradient: linear-gradient(135deg, #0a3830 0%, #0f172a 50%, #0e1a2a 100%);
}
html[data-theme="dark"]:has(#landingPage) { background: #0f172a; }

/* Explicit light override — for users whose OS is dark but who pinned light */
html[data-theme="light"] #landingPage {
  --l-primary: #0a6e5c;
  --l-primary-dark: #084d40;
  --l-primary-light: #e6f5f1;
  --l-accent: #2196a6;

  --l-bg-body: #f4f6f9;
  --l-bg-surface: #ffffff;
  --l-bg-subtle: #f8fafb;

  --l-text: #1a2332;
  --l-text-light: #5a6a7a;
  --l-white: #ffffff;
  --l-card-bg: #ffffff;

  --l-border: #eef1f4;
  --l-gray-50: #f8fafb;
  --l-gray-100: #eef1f4;

  --l-header-bg: #0a6e5c;
  --l-shadow-md: rgba(0, 0, 0, 0.08);
  --l-shadow-lg: rgba(0, 0, 0, 0.12);

  --l-hero-gradient: linear-gradient(135deg, var(--l-primary-light) 0%, var(--l-white) 50%, #e8f4f8 100%);
}
html[data-theme="light"]:has(#landingPage) { background: #f4f6f9; }
