/* ─────────────────────────────────────────
   Insight Unleashed — shared stylesheet
   ───────────────────────────────────────── */

/* ─── Variables ─── */
:root {
  --bg:           #fafaf9;
  --hero:         #0f172a;
  --surface:      #ffffff;
  --border:       rgba(15, 23, 42, 0.08);
  --text:         #0f172a;
  --muted:        #64748b;
  --accent:       #4f46e5;
  --accent-light: rgba(79, 70, 229, 0.09);
  --accent-mid:   rgba(79, 70, 229, 0.18);
  --emerald:      #10b981;
  --amber:        #d97706;
  --sky:          #0ea5e9;
  --shadow-sm:    0 2px 8px rgba(15, 23, 42, 0.06);
  --shadow:       0 8px 32px rgba(15, 23, 42, 0.1);
  --shadow-lg:    0 24px 64px rgba(15, 23, 42, 0.14);
  --radius:       18px;
  --max:          1140px;
}

/* ─── Reset ─── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Sora, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }

/* ─── Layout ─── */
.wrap {
  width: min(calc(100% - 2.5rem), var(--max));
  margin: 0 auto;
}

/* ─── Header ─── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(49, 46, 129, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.1rem 0;
  gap: 1rem;
}

.brand {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
}

.brand > div {
  display: flex;
  flex-direction: column;
}

.brand-logo {
  height: 38px;
  width: 38px;
  border-radius: 8px;
  flex-shrink: 0;
}

.brand-mark {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: white;
}

.brand-name {
  font-size: 1rem;
  font-weight: 700;
  color: white;
  letter-spacing: -0.02em;
}

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

.nav-links a:not(.btn) {
  text-decoration: none;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.9rem;
  transition: color 0.2s;
}
.nav-links a:not(.btn):hover { color: white; }

/* ─── Nav dropdown ─── */
.nav-dropdown {
  position: relative;
}
.dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.9rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: color 0.2s;
}
.nav-dropdown:hover .dropdown-toggle { color: white; }
.dropdown-menu {
  position: absolute;
  top: calc(100% + 0.85rem);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  background: rgba(30, 27, 75, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 0.4rem;
  min-width: 220px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, transform 0.2s;
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  z-index: 200;
}
.dropdown-menu::before {
  content: '';
  position: absolute;
  top: -0.85rem;
  left: 0;
  right: 0;
  height: 0.85rem;
}
.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.dropdown-item {
  display: block;
  padding: 0.65rem 1rem;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}
.dropdown-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: white;
}
.dropdown-item-label {
  display: block;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.38);
  margin-top: 0.15rem;
  font-weight: 400;
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.7rem 1.25rem;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 4px 16px rgba(79, 70, 229, 0.3);
}
.btn-primary:hover {
  background: #4338ca;
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(79, 70, 229, 0.4);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.85);
  border-color: rgba(255, 255, 255, 0.12);
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.13);
  color: white;
}

.btn-outline {
  background: white;
  color: var(--text);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}
.btn-outline:hover {
  border-color: rgba(15, 23, 42, 0.18);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.btn-white {
  background: white;
  color: #3730a3;
  border-color: white;
  font-weight: 700;
}
.btn-white:hover {
  background: #e0e7ff;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.btn-lg     { padding: 1rem 1.75rem; font-size: 1rem; }
.btn-cta-lg { padding: 1rem 2rem;    font-size: 1rem; }

/* ─── Section common ─── */
section { padding: 4.5rem 0; }

.section-tag {
  display: inline-flex;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.65rem;
}

h2 {
  margin: 0 0 0.55rem;
  font-size: clamp(1.8rem, 3vw, 2.55rem);
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.section-intro {
  color: var(--muted);
  max-width: 58ch;
  margin: 0 0 2.5rem;
  font-size: 1rem;
  line-height: 1.65;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1.1rem;
}

.tag {
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.05);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
}

/* ─── Footer ─── */
footer {
  background: var(--hero);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 1.5rem 0;
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.84rem;
}
footer a {
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  transition: color 0.2s;
}
footer a:hover { color: white; }

.cookie-manage {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.38);
  font-size: inherit;
  font-family: inherit;
  cursor: pointer;
  padding: 0;
  transition: color 0.2s;
}
.cookie-manage:hover { color: rgba(255, 255, 255, 0.7); }

/* ─── Scroll animations ─── */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.fade-up.visible {
  opacity: 1;
  transform: none;
}

/* ─── Cookie consent banner ─── */
.cookie-banner {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  width: min(calc(100% - 2rem), 700px);
  background: var(--hero);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  padding: 1.2rem 1.5rem;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  animation: cookie-in 0.4s ease;
}
.cookie-banner.hidden { display: none; }

@keyframes cookie-in {
  from { opacity: 0; transform: translateX(-50%) translateY(14px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.cookie-text {
  flex: 1;
  min-width: 220px;
  font-size: 0.86rem;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.55;
}
.cookie-text strong {
  display: block;
  color: white;
  margin-bottom: 0.2rem;
  font-size: 0.9rem;
}
.cookie-actions { display: flex; gap: 0.6rem; flex-shrink: 0; }

@media (max-width: 560px) {
  .cookie-banner {
    bottom: 0;
    left: 0;
    right: 0;
    transform: none;
    width: 100%;
    border-radius: 18px 18px 0 0;
  }
  @keyframes cookie-in {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
  }
}
