/* ================================================================
   CONVORITHM — MAIN STYLESHEET
   Design System: Colors, Typography, Layout, Utilities
   ================================================================ */

/* ── 1. GOOGLE FONTS ───────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

/* ── 2. CSS DESIGN TOKENS ─────────────────────────────────────── */
:root {
  /* Brand Colors */
  --primary:        #1A73E8;
  --primary-dark:   #1557B0;
  --primary-light:  #E8F0FE;
  --primary-glow:   rgba(26, 115, 232, 0.25);
  --accent:         #FF6B35;
  --accent-light:   #FFF0EB;

  /* Neutral Palette */
  --text-dark:   #0D1B2A;
  --text-body:   #374151;
  --text-muted:  #6B7280;
  --text-light:  #9CA3AF;
  --border:      #E5E7EB;
  --border-light:#F3F4F6;

  /* Backgrounds */
  --bg-white:    #FFFFFF;
  --bg-light:    #F8FAFF;
  --bg-muted:    #F1F5F9;
  --bg-dark:     #0A1628;
  --bg-darker:   #060E1A;

  /* Typography Scale */
  --font:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --h1:      clamp(2.2rem, 5vw, 3.8rem);
  --h2:      clamp(1.8rem, 3.5vw, 2.6rem);
  --h3:      1.35rem;
  --h4:      1.1rem;
  --body:    1rem;
  --small:   0.875rem;
  --xs:      0.75rem;

  /* Spacing */
  --section-py:  100px;
  --container:   1180px;
  --gap:         1.5rem;

  /* Effects */
  --shadow-sm:   0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow:      0 4px 24px rgba(26, 115, 232, 0.10);
  --shadow-md:   0 8px 40px rgba(26, 115, 232, 0.16);
  --shadow-dark: 0 20px 60px rgba(0, 0, 0, 0.25);
  --radius-sm:   8px;
  --radius:      14px;
  --radius-lg:   20px;
  --radius-xl:   28px;
  --transition:  all 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── 3. RESET & BASE ──────────────────────────────────────────── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  font-size: var(--body);
  color: var(--text-body);
  background: var(--bg-white);
  line-height: 1.7;
  overflow-x: hidden;
}

img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

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

ul, ol { list-style: none; }

button {
  cursor: pointer;
  font-family: var(--font);
  border: none;
  background: none;
}

/* ── 4. TYPOGRAPHY ────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font);
  color: var(--text-dark);
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 { font-size: var(--h1); font-weight: 800; }
h2 { font-size: var(--h2); }
h3 { font-size: var(--h3); }
h4 { font-size: var(--h4); }

p { line-height: 1.75; color: var(--text-body); }

/* ── 5. LAYOUT UTILITIES ─────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.section {
  padding-block: var(--section-py);
}

.section--light { background: var(--bg-light); }
.section--dark  { background: var(--bg-dark);  }
.section--muted { background: var(--bg-muted); }

.section__header {
  text-align: center;
  max-width: 680px;
  margin-inline: auto;
  margin-bottom: 3.5rem;
}

.section__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: var(--xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 100px;
  margin-bottom: 1rem;
}

.section__title {
  font-size: var(--h2);
  color: var(--text-dark);
  margin-bottom: 1rem;
}

.section__title span {
  color: var(--primary);
}

.section__subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.8;
}

/* Dark section text overrides */
.section--dark .section__badge {
  background: rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.85);
}
.section--dark .section__title { color: #fff; }
.section--dark .section__subtitle { color: rgba(255,255,255,0.60); }
.section--dark p { color: rgba(255,255,255,0.70); }

/* ── 6. BUTTONS ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0.85rem 2rem;
  border-radius: 100px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: var(--font);
  letter-spacing: 0.01em;
  transition: var(--transition);
  white-space: nowrap;
  cursor: pointer;
  border: 2px solid transparent;
  text-decoration: none;
}

.btn--primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 20px var(--primary-glow);
}

.btn--primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--primary-glow);
}

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

.btn--outline:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-2px);
}

.btn--white {
  background: #fff;
  color: var(--primary);
  box-shadow: var(--shadow-dark);
}

.btn--white:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
}

.btn--ghost-white {
  border-color: rgba(255,255,255,0.45);
  color: #fff;
}

.btn--ghost-white:hover {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.7);
}

.btn--lg {
  padding: 1rem 2.4rem;
  font-size: 1rem;
}

/* ── 7. GRID SYSTEM ─────────────────────────────────────────── */
.grid-2  { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--gap); }
.grid-3  { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.grid-4  { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap); }
.grid-6  { display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--gap); }

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

/* ── 8. CARD BASE ────────────────────────────────────────────── */
.card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: var(--transition);
}

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

/* ── 9. HIGHLIGHT TEXT ──────────────────────────────────────── */
.highlight {
  background: linear-gradient(135deg, var(--primary), #5BA4FF);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── 10. DIVIDER LINE ───────────────────────────────────────── */
.divider {
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), #5BA4FF);
  border-radius: 100px;
  margin: 1rem auto;
}

/* ── 11. SCROLL TOP BUTTON ──────────────────────────────────── */
#scrollTopBtn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 48px;
  height: 48px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 1.1rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  box-shadow: var(--shadow-md);
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
}

#scrollTopBtn.visible {
  opacity: 1;
  visibility: visible;
}

#scrollTopBtn:hover {
  background: var(--primary-dark);
  transform: translateY(-3px);
}

/* ── 12. BREADCRUMB ─────────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--small);
  color: rgba(255,255,255,0.70);
  margin-bottom: 1.5rem;
}
.breadcrumb a { color: rgba(255,255,255,0.85); }
.breadcrumb a:hover { color: #fff; }
.breadcrumb span { color: rgba(255,255,255,0.45); }

/* ── 13. RESPONSIVE BREAKPOINTS ─────────────────────────────── */
@media (max-width: 1024px) {
  :root { --section-py: 80px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-6 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  :root { --section-py: 64px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-6 { grid-template-columns: repeat(2, 1fr); }
  .section__header { margin-bottom: 2.5rem; }
}

@media (max-width: 480px) {
  :root { --section-py: 52px; }
  .grid-4, .grid-6 { grid-template-columns: 1fr; }
  .btn { padding: 0.75rem 1.5rem; font-size: 0.9rem; }
}
