/* ============================================================
   Todoli · Shared Design System v2
   todo-li.com
   ============================================================ */

/* ---- Reset ---- */
*,*::before,*::after { box-sizing: border-box; }
html,body { margin: 0; padding: 0; }
h1,h2,h3,h4,h5,h6,p,figure,blockquote { margin: 0; }
ul,ol { margin: 0; padding: 0; list-style: none; }
a { text-decoration: none; color: inherit; }
img,svg { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; padding: 0; }
input,textarea { font: inherit; }
* { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
html { scroll-behavior: smooth; }

/* ---- Design Tokens ---- */
:root {
  /* Brand */
  --deep:   #0F4C81;
  --blue:   #1868B0;
  --sky:    #67AFE9;
  --action: #1888E0;
  --action-bright: #2391EB;
  --action-dark:   #1372C2;

  /* Canvas */
  --canvas:      #E7ECF2;
  --canvas-deep: #D7DEE7;
  --canvas-card: rgba(255,255,255,.65);
  --canvas-card-hover: rgba(255,255,255,.82);

  /* Text */
  --ink:   #13243A;
  --muted: #5C6B7E;
  --faint: #8898AA;

  /* AI Accent — iridescent orb */
  --ai-start: #8B5CF6;
  --ai-mid:   #6366F1;
  --ai-end:   #2DD4BF;

  /* State */
  --success: #22C55E;
  --success-bg: rgba(34,197,94,.12);
  --urgent:  #EF4444;
  --urgent-bg: rgba(239,68,68,.10);
  --warn:    #F59E0B;
  --warn-bg: rgba(245,158,11,.12);

  /* Card */
  --card-border: rgba(255,255,255,.78);
  --card-shadow: 0 1px 0 rgba(255,255,255,.65) inset,
                 0 20px 60px -20px rgba(15,76,129,.28);

  /* Easing */
  --ease:      cubic-bezier(.22,.68,0,1.2);
  --ease-soft: cubic-bezier(.4,0,.2,1);
}

/* ---- Base ---- */
body {
  font-family: 'Assistant', system-ui, -apple-system, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background:
    radial-gradient(1400px 1100px at 88% -22%, rgba(139,92,246,.32), transparent 48%),
    radial-gradient(1200px 900px at -8%  2%,  rgba(99,175,233,.26),  transparent 52%),
    radial-gradient(900px  700px at 50%  60%, rgba(45,212,191,.07),   transparent 55%),
    linear-gradient(180deg, #ECF0FA 0%, #E7ECF2 38%, var(--canvas-deep) 100%);
  background-attachment: fixed;
  overflow-x: hidden;
  min-height: 100vh;
}

h1,h2,h3,h4,h5,h6,.font-display {
  font-family: 'Rubik', system-ui, -apple-system, sans-serif;
  line-height: 1.2;
}

:focus-visible {
  outline: 3px solid var(--action);
  outline-offset: 3px;
  border-radius: 8px;
}

/* ---- Layout ---- */
.wrap        { width: min(1200px, 92vw); margin-inline: auto; }
.wrap--mid   { width: min(900px, 92vw);  margin-inline: auto; }
.wrap--narrow{ width: min(720px, 92vw);  margin-inline: auto; }

/* ---- Navbar ---- */
.navbar {
  position: relative;
  z-index: 200;
  padding: .8rem 1rem;
}
/* The .wrap inside the navbar becomes the floating pill card */
.navbar .wrap {
  position: relative;
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(28px) saturate(200%);
  -webkit-backdrop-filter: blur(28px) saturate(200%);
  border: 1px solid rgba(255,255,255,.92);
  border-radius: 18px;
  box-shadow: 0 6px 36px rgba(15,76,129,.13), 0 1px 0 rgba(255,255,255,.85) inset;
  padding: .1rem 1.4rem;
}
.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.navbar__logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.navbar__logo-img {
  height: 40px;
  width: auto;
  display: block;
  object-fit: contain;
  /* Slight drop-shadow to help on any background */
  filter: drop-shadow(0 1px 4px rgba(15,76,129,.15));
  transition: filter .2s;
}
.navbar__logo:hover .navbar__logo-img {
  filter: drop-shadow(0 2px 8px rgba(15,76,129,.25));
}
/* Fallback dot (used in footer brand logo) */
.navbar__logo-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ai-start), var(--action));
  flex-shrink: 0;
  box-shadow: 0 0 8px rgba(139,92,246,.5);
}
.navbar__links {
  display: flex;
  align-items: center;
  gap: .1rem;
  flex: 1;
  justify-content: center;
}
.navbar__links a {
  font-size: .92rem;
  font-weight: 500;
  color: var(--muted);
  padding: .42rem .85rem;
  border-radius: 9px;
  transition: color .15s, background .15s;
  white-space: nowrap;
}
.navbar__links a:hover { color: var(--deep); background: rgba(24,136,224,.08); }
.navbar__links a.active { color: var(--action); background: rgba(24,136,224,.1); font-weight: 600; }
.navbar__cta {
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-shrink: 0;
}
.btn-nav {
  display: inline-flex;
  align-items: center;
  font-family: 'Rubik', sans-serif;
  font-size: .9rem;
  font-weight: 700;
  color: #fff;
  background: var(--action);
  padding: .48rem 1.15rem;
  border-radius: 10px;
  transition: background .15s, box-shadow .15s, transform .15s;
  box-shadow: 0 2px 10px rgba(24,136,224,.38);
  white-space: nowrap;
  letter-spacing: .01em;
}
.btn-nav:hover {
  background: var(--action-bright);
  box-shadow: 0 4px 16px rgba(24,136,224,.48);
  transform: translateY(-1px);
}
.menu-toggle {
  display: none;
  padding: .45rem;
  border-radius: 9px;
  color: var(--ink);
  transition: background .15s;
  flex-shrink: 0;
}
.menu-toggle:hover { background: rgba(0,0,0,.06); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  font-family: 'Rubik', sans-serif;
  font-weight: 700;
  border-radius: 13px;
  padding: .8rem 1.6rem;
  font-size: 1rem;
  cursor: pointer;
  border: 0;
  text-decoration: none;
  white-space: nowrap;
  transition: all .22s var(--ease-soft);
  letter-spacing: .01em;
}
.btn--action {
  background: var(--action);
  color: #fff;
  box-shadow: 0 4px 18px rgba(24,136,224,.42);
}
.btn--action:hover {
  background: var(--action-bright);
  transform: translateY(-2px);
  box-shadow: 0 8px 26px rgba(24,136,224,.52);
}
.btn--action:active { transform: translateY(0); }
.btn--outline {
  background: rgba(255,255,255,.72);
  color: var(--deep);
  border: 1.5px solid rgba(24,136,224,.28);
  backdrop-filter: blur(8px);
}
.btn--outline:hover {
  background: rgba(255,255,255,.94);
  border-color: var(--action);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(24,136,224,.18);
}
.btn--ghost { background: transparent; color: var(--muted); padding-inline: .8rem; }
.btn--ghost:hover { color: var(--action); }
.btn--large { font-size: 1.1rem; padding: 1rem 2.2rem; border-radius: 15px; }

/* ---- Cards ---- */
.card {
  background: var(--canvas-card);
  backdrop-filter: blur(20px) saturate(150%);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid var(--card-border);
  box-shadow: var(--card-shadow);
  border-radius: 22px;
  transition: box-shadow .2s, transform .2s;
}
.card:hover {
  box-shadow: 0 1px 0 rgba(255,255,255,.65) inset, 0 28px 70px -20px rgba(15,76,129,.35);
  transform: translateY(-2px);
}

/* ---- Badges / Chips ---- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .78rem;
  font-weight: 600;
  padding: .25rem .7rem;
  border-radius: 20px;
  letter-spacing: .02em;
}
.badge--action { background: rgba(24,136,224,.12); color: var(--action); border: 1px solid rgba(24,136,224,.2); }
.badge--ai     { background: rgba(139,92,246,.12); color: var(--ai-start); border: 1px solid rgba(139,92,246,.2); }
.badge--success{ background: var(--success-bg); color: var(--success); border: 1px solid rgba(34,197,94,.2); }
.badge--urgent { background: var(--urgent-bg); color: var(--urgent); border: 1px solid rgba(239,68,68,.2); }

/* ---- Section Spacing ---- */
.section { padding: clamp(3.5rem,7vw,5.5rem) 0; }
.section--tight { padding: clamp(2rem,4vw,3rem) 0; }
.section--wide  { padding: clamp(5rem,10vw,8rem) 0; }

/* ---- Page Hero ---- */
.page-hero {
  text-align: center;
  padding: clamp(3.5rem,8vw,6rem) 0 clamp(2rem,4vw,3.5rem);
}
.page-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .83rem;
  font-weight: 700;
  color: var(--action);
  background: rgba(24,136,224,.09);
  padding: .28rem .9rem;
  border-radius: 20px;
  margin-bottom: 1.1rem;
  border: 1px solid rgba(24,136,224,.18);
  letter-spacing: .04em;
  text-transform: uppercase;
}
.page-hero__title {
  font-size: clamp(2.1rem,5vw,3.4rem);
  font-weight: 800;
  color: var(--deep);
  margin-bottom: 1.1rem;
  letter-spacing: -.02em;
}
.page-hero__title em {
  font-style: normal;
  background: linear-gradient(135deg, var(--ai-start), var(--action));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.page-hero__sub {
  font-size: clamp(1.05rem,2vw,1.22rem);
  color: var(--muted);
  max-width: 580px;
  margin-inline: auto;
  line-height: 1.75;
}

/* ---- AI Orb ---- */
.ai-orb {
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #c4b5fd, var(--ai-start) 40%, var(--ai-mid) 65%, var(--ai-end));
  box-shadow: 0 0 40px rgba(139,92,246,.45), 0 0 90px rgba(45,212,191,.22);
  animation: orb-pulse 3.5s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes orb-pulse {
  0%,100% {
    box-shadow: 0 0 40px rgba(139,92,246,.45), 0 0 90px rgba(45,212,191,.22);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 60px rgba(139,92,246,.65), 0 0 120px rgba(45,212,191,.35);
    transform: scale(1.04);
  }
}

/* ---- Sparkle ---- */
.sparkle-wrap { position: relative; display: inline-block; }
.sparkle {
  position: absolute;
  pointer-events: none;
  animation: sparkle-pop var(--dur,1.4s) ease-out var(--delay,0s) infinite both;
}
.sparkle::before {
  content: '✦';
  font-size: var(--sz,12px);
  color: var(--col, #F59E0B);
  opacity: 0;
  display: block;
  animation: sparkle-fade var(--dur,1.4s) ease-out var(--delay,0s) infinite both;
}
@keyframes sparkle-fade {
  0%   { opacity: 0; transform: scale(0) rotate(0deg); }
  40%  { opacity: 1; transform: scale(1) rotate(90deg); }
  100% { opacity: 0; transform: scale(.3) rotate(200deg); }
}

/* ---- Footer ---- */
.footer {
  padding: 4.5rem 0 2rem;
  border-top: 1px solid rgba(255,255,255,.65);
  background: rgba(215,222,231,.5);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.footer__grid {
  display: grid;
  grid-template-columns: 2.2fr 1fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(15,76,129,.08);
  margin-bottom: 2rem;
}
.footer__brand-logo {
  display: flex; align-items: center; gap: .45rem;
  font-family: 'Rubik', sans-serif; font-weight: 800; font-size: 1.2rem;
  color: var(--deep); margin-bottom: .7rem;
}
.footer__brand-logo .navbar__logo-dot { margin: 0; }
.footer__tagline { color: var(--muted); font-size: .95rem; line-height: 1.65; max-width: 240px; margin-bottom: 1.6rem; }
.footer__col-title { font-family: 'Rubik', sans-serif; font-weight: 700; font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin-bottom: .9rem; }
.footer__links { display: flex; flex-direction: column; gap: .55rem; }
.footer__links a { font-size: .94rem; color: var(--ink); opacity: .65; transition: opacity .15s, color .15s; }
.footer__links a:hover { opacity: 1; color: var(--action); }
.footer__bottom {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
}
.footer__copy { font-size: .87rem; color: var(--muted); }
.footer__legal { display: flex; gap: 1.4rem; }
.footer__legal a { font-size: .87rem; color: var(--muted); transition: color .15s; }
.footer__legal a:hover { color: var(--action); }

/* ---- CTA Bottom Block ---- */
.cta-block {
  text-align: center;
  padding: clamp(3rem,7vw,5rem) clamp(1.5rem,4vw,3rem);
  background: var(--canvas-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  border-radius: 26px;
  box-shadow: var(--card-shadow);
  margin-block: clamp(3rem,6vw,5rem);
}
.cta-block__title { font-size: clamp(1.6rem,3.5vw,2.4rem); font-weight: 800; color: var(--deep); margin-bottom: .75rem; }
.cta-block__sub { color: var(--muted); font-size: 1.05rem; max-width: 500px; margin-inline: auto; margin-bottom: 2rem; line-height: 1.7; }
.cta-block__btns { display: flex; align-items: center; justify-content: center; gap: 1rem; flex-wrap: wrap; }

/* ---- Dividers ---- */
.divider { height: 1px; background: rgba(15,76,129,.08); border: 0; margin-block: 0; }

/* ---- Responsive ---- */
@media (max-width: 960px) {
  .navbar__links { display: none; flex-direction: column; align-items: stretch; }
  .navbar__links.open {
    display: flex;
    position: absolute; top: calc(100% + 6px); right: 0; left: 0;
    background: rgba(245,248,252,.97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    padding: .6rem 1rem 1rem;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,.82);
    box-shadow: 0 12px 36px rgba(15,76,129,.14);
    z-index: 200;
  }
  .navbar__links.open a { padding: .7rem 1rem; border-radius: 10px; }
  .menu-toggle { display: flex; }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}
@media (max-width: 600px) {
  .footer__grid { grid-template-columns: 1fr; }
  .footer__bottom { flex-direction: column; text-align: center; }
  .footer__legal { justify-content: center; }
  .btn--large { font-size: 1rem; padding: .85rem 1.6rem; }
}
