/* ============================================================
   LSCare Web Portal - Global Stylesheet
   Design system: Apple / Linear aesthetic (Chapter 5)
   ============================================================ */

/* ── CSS Reset & Box Model ───────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── Design Tokens (CSS Variables) ──────────────────────────────────────── */
:root {
  /* Brand Colors (Chapter 5.1) */
  --primary:       #166C9F;
  --secondary:     #60859D;
  --light-gray:    #D0D6DA;
  --medium-gray:   #9CA6AC;
  --bg:            #F8F9FA;
  --surface:       #FFFFFF;
  --text-dark:     #111827;
  --text-muted:    #6B7280;

  /* Typography */
  --font-sans:     'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Spacing */
  --radius-sm:     8px;
  --radius-md:     12px;
  --radius-lg:     16px;
  --radius-xl:     24px;

  /* Shadows (Linear / Stripe style — soft, multi-layer) */
  --shadow-xs:     0 1px 2px rgba(0,0,0,0.04);
  --shadow-sm:     0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
  --shadow-md:     0 10px 15px -3px rgba(0,0,0,0.07), 0 4px 6px -2px rgba(0,0,0,0.04);
  --shadow-lg:     0 20px 25px -5px rgba(0,0,0,0.08), 0 10px 10px -5px rgba(0,0,0,0.04);

  /* Transitions */
  --transition:    all 0.2s ease-in-out;

  /* Glassmorphism */
  --glass-bg:      rgba(255, 255, 255, 0.7);
  --glass-border:  1px solid rgba(255, 255, 255, 0.3);
}

/* ── Ensure [hidden] always works regardless of display overrides ────────── */
[hidden] { display: none !important; }

/* ── Base ────────────────────────────────────────────────────────────────── */
html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text-dark);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

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

/* ── Layout Helpers ──────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Glassmorphism utility ───────────────────────────────────────────────── */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: var(--glass-border);
  box-shadow: var(--shadow-sm);
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 22px;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: var(--transition);
  white-space: nowrap;
  text-decoration: none;
}

.btn:active {
  transform: scale(0.98);
}

/* Primary — solid blue */
.btn--primary {
  background: var(--primary);
  color: var(--surface);
  box-shadow: 0 1px 3px rgba(22, 108, 159, 0.3);
}
.btn--primary:hover {
  background: #135f8a;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(22, 108, 159, 0.35);
}

/* Outline — secondary */
.btn--outline {
  background: transparent;
  color: var(--primary);
  border: 1.5px solid var(--primary);
}
.btn--outline:hover {
  background: rgba(22, 108, 159, 0.06);
  transform: translateY(-1px);
}

/* Ghost */
.btn--ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1.5px solid var(--light-gray);
}
.btn--ghost:hover {
  background: var(--surface);
  color: var(--text-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* ── Navbar ──────────────────────────────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--glass-bg);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border-bottom: 1px solid rgba(255,255,255,0.2);
  box-shadow: var(--shadow-xs);
  transition: box-shadow 0.3s ease;
}

.navbar.scrolled {
  box-shadow: var(--shadow-sm);
}

.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 24px;
}

.navbar__brand {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-mark {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: -0.02em;
}

.brand-sub {
  font-size: 0.68rem;
  color: var(--medium-gray);
  font-weight: 400;
}

.navbar__links {
  display: flex;
  gap: 28px;
  font-size: 0.88rem;
  font-weight: 500;
}

.navbar__links a:hover {
  color: var(--primary);
}

/* ── Hero ────────────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  padding: 120px 0 100px;
  overflow: hidden;
  text-align: center;
}

.hero__inner {
  position: relative;
  z-index: 2;
}

.hero__badge {
  display: inline-block;
  padding: 4px 14px;
  background: rgba(22, 108, 159, 0.08);
  color: var(--primary);
  border: 1px solid rgba(22, 108, 159, 0.18);
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.hero__headline {
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: var(--text-dark);
  margin-bottom: 20px;
}

.hero__sub {
  font-size: 1.08rem;
  color: var(--text-muted);
  max-width: 540px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.hero__cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Gradient orbs for hero depth */
.hero__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}
.hero__orb--1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(22, 108, 159, 0.12), transparent 70%);
  top: -100px;
  left: -100px;
}
.hero__orb--2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(96, 133, 157, 0.1), transparent 70%);
  bottom: -80px;
  right: -80px;
}

/* ── Section shared styles ───────────────────────────────────────────────── */
.section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text-dark);
  text-align: center;
  margin-bottom: 10px;
}

.section-sub {
  color: var(--text-muted);
  text-align: center;
  font-size: 1rem;
  margin-bottom: 56px;
}

/* ── Card ────────────────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0,0,0,0.04);
  padding: 32px;
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

/* ── Services ────────────────────────────────────────────────────────────── */
.services {
  padding: 80px 0;
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.service-card__icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-md);
  background: rgba(22, 108, 159, 0.08);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.service-card__title {
  font-size: 1.08rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.service-card__body {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 20px;
}

.service-card__tag {
  display: inline-block;
  font-size: 0.73rem;
  font-weight: 500;
  color: var(--secondary);
  background: rgba(96, 133, 157, 0.1);
  border-radius: 100px;
  padding: 3px 10px;
  letter-spacing: 0.03em;
}

/* ── Features ────────────────────────────────────────────────────────────── */
.features {
  padding: 80px 0;
  background: var(--surface);
}

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

.feature-item__number {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}

.feature-item h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.feature-item p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ── CTA Banner ──────────────────────────────────────────────────────────── */
.cta-banner {
  padding: 80px 0;
  background: linear-gradient(135deg, #0f4f75 0%, #166C9F 50%, #1a7db5 100%);
}

.cta-banner__inner {
  text-align: center;
  color: #fff;
}

.cta-banner h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.cta-banner p {
  font-size: 1rem;
  opacity: 0.8;
  margin-bottom: 32px;
}

.cta-banner .btn--primary {
  background: var(--surface);
  color: var(--primary);
}

.cta-banner .btn--primary:hover {
  background: rgba(255,255,255,0.9);
}

/* ── Footer ──────────────────────────────────────────────────────────────── */
.footer {
  background: var(--text-dark);
  color: rgba(255,255,255,0.8);
  padding-top: 64px;
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  flex-wrap: wrap;
  padding-bottom: 48px;
}

.footer__brand .brand-mark {
  color: #fff;
  font-size: 1.2rem;
  margin-bottom: 8px;
  display: block;
}

.footer__brand p {
  font-size: 0.84rem;
  color: rgba(255,255,255,0.45);
  max-width: 220px;
}

.footer__links {
  display: flex;
  gap: 28px;
  font-size: 0.88rem;
}

.footer__links a:hover {
  color: #fff;
}

.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 20px 0;
}

.footer__bottom p {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.3);
}

/* ── Scroll Reveal Animation ─────────────────────────────────────────────── */
.reveal-section {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal-section.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .navbar__links {
    display: none;
  }

  .hero {
    padding: 80px 0 60px;
  }

  .footer__inner {
    flex-direction: column;
  }

  .footer__links {
    flex-wrap: wrap;
    gap: 16px;
  }
}

@media (max-width: 480px) {
  .hero__cta {
    flex-direction: column;
    align-items: center;
  }

  .btn {
    width: 100%;
    max-width: 280px;
  }
}
