/* =====================================================================
   KayScience — Common CSS (design tokens + header + footer + buttons)
   Reusable across the homepage and other redesigned pages.
   ===================================================================== */

/* ---------- Design tokens ---------- */
:root {
  --ks-navy:        #4848a8;  /* primary text / brand */
  --ks-navy-dark:   #3a3a8f;
  --ks-navy-soft:   #5d5d92;  /* body copy */
  --ks-teal:        #5cc4b7;  /* mint-green accent */
  --ks-teal-light:  #8fdccf;
  --ks-blue:        #7bb8e0;  /* blue accent */
  --ks-purple:      #8f86d6;  /* lilac accent */
  --ks-purple-deep: #6f66c9;

  --ks-ink:         #3d3d70;  /* headings */
  --ks-muted:       #6b6b93;

  --ks-grad-btn:    linear-gradient(90deg, #9a8ce4 0%, #77d3c7 100%);
  --ks-grad-hero:   linear-gradient(115deg, #ffffff 0%, #e7f0fb 45%, #d0efe6 100%);
  --ks-grad-footer: linear-gradient(135deg, #6157b8 0%, #4848a8 55%, #3f3f96 100%);

  --ks-shadow-sm:   0 6px 18px rgba(72, 72, 168, .08);
  --ks-shadow-md:   0 16px 40px rgba(72, 72, 168, .12);
  --ks-shadow-lg:   0 26px 60px rgba(72, 72, 168, .16);

  --ks-radius:      18px;
  --ks-radius-lg:   26px;
  --ks-container:   1200px;
  --ks-font:        'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* ---------- Base ---------- */
.ks-scope,
.ks-scope * { box-sizing: border-box; }

.ks-scope {
  margin: 0;
  font-family: var(--ks-font);
  color: var(--ks-navy-soft);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background: #ffffff;
}
.ks-scope img { max-width: 100%; display: block; }
.ks-scope a { text-decoration: none; color: inherit; }

/* The header is position:absolute and floats over the page, so page content
   must start below it (header height + a little breathing gap). The homepage
   hero is the deliberate exception — its gradient/pill is designed to sit
   *under* the floating menu bar — so it opts out via :has(). */
.ks-scope main { padding-top: 92px; }
/* Full-bleed background pages (homepage hero, auth stage) fill up to the very
   top so their background shows *under* the floating menu bar — just like the
   homepage. They reserve the header space with their own inner padding instead. */
.ks-scope main:has(.ks-hero),
.ks-scope main:has(.ks-auth) { padding-top: 0; }

.ks-container {
  width: 100%;
  max-width: var(--ks-container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Shared buttons ---------- */
.ks-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  cursor: pointer;
  font-family: var(--ks-font);
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  font-size: 13px;
  line-height: 1;
  padding: 15px 30px;
  border-radius: 40px;
  color: #fff;
  background: var(--ks-grad-btn);
  box-shadow: 0 10px 24px rgba(122, 108, 214, .28);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
  white-space: nowrap;
}
.ks-btn:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(122, 108, 214, .38); filter: brightness(1.03); }
.ks-btn--lg { padding: 18px 40px; font-size: 14px; }
.ks-btn--white {
  background: #fff;
  color: var(--ks-navy);
  box-shadow: var(--ks-shadow-sm);
}
.ks-btn--white:hover { box-shadow: var(--ks-shadow-md); }
.ks-btn--outline {
  background: transparent;
  color: var(--ks-navy);
  border: 1.5px solid rgba(72,72,168,.28);
  box-shadow: none;
}

/* ---------- Section heading helper ---------- */
.ks-eyebrow {
  text-transform: uppercase;
  letter-spacing: .16em;
  font-weight: 600;
  font-size: 13px;
  color: var(--ks-teal);
  margin: 0 0 14px;
}
.ks-h2 {
  font-weight: 600;
  font-size: clamp(28px, 3.6vw, 42px);
  line-height: 1.2;
  color: var(--ks-navy);
  margin: 0 0 18px;
}
.ks-h2 .a-teal   { color: var(--ks-teal); }
.ks-h2 .a-purple { color: var(--ks-purple); }
.ks-h2 .a-blue   { color: var(--ks-blue); }
/* "mixed" gradient accent word (purple -> teal), as in the PDF headings */
.a-mix {
  background: linear-gradient(95deg, #8b7fd6 0%, #7cc7d0 55%, #6fd0c8 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.ks-lead { color: var(--ks-navy-soft); font-size: 17px; }

/* =====================================================================
   HEADER
   ===================================================================== */
.ks-header {
  /* overlays the top of the page so the page background image shows through
     the (translucent) pill and around it — like the login card */
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 50;
  background: transparent;
  padding: 9px 26px;
}
.ks-header__inner {
  max-width: 1300px;
  margin: 0 auto;
  padding: 5px 12px 5px 20px;
  display: flex;
  align-items: center;
  gap: 24px;
  /* floating rounded-pill menu bar with fully curved (capsule) ends,
     translucent glass so the page background shows through it */
  background: linear-gradient(90deg, rgba(255,255,255,.58) 0%, rgba(255,255,255,.30) 60%, rgba(255,255,255,.18) 100%);
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 999px;
  box-shadow: 0 8px 26px rgba(72, 72, 168, .12);
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
}
.ks-logo { display: flex; align-items: center; gap: 2px; }
/* Logo image is rendered large, but negative vertical margins keep it from
   stretching the pill — the bar height stays slim while the logo looks bigger.
   (The logotype PNG has transparent padding, so it doesn't visually overflow.) */
.ks-logo__img { height: 76px; width: auto; object-fit: contain; display: block; margin: -16px 0; }

.ks-nav {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-left: auto;
}
.ks-nav a {
  font-weight: 500;
  font-size: 15px;
  color: var(--ks-navy);
  transition: color .15s ease;
  white-space: nowrap;
}
.ks-nav a:hover { color: var(--ks-purple); }

.ks-header__actions { display: flex; align-items: center; gap: 22px; }
.ks-header__login { font-weight: 500; font-size: 15px; color: var(--ks-navy); }
.ks-header__login:hover { color: var(--ks-purple); }
.ks-header__signup {
  font-weight: 700;
  font-size: 15px;
  color: var(--ks-navy);
  background: #ffffff;
  padding: 10px 26px;
  border-radius: 40px;
  box-shadow: 0 8px 22px rgba(72, 72, 168, .12);
  transition: transform .18s ease, box-shadow .18s ease;
}
.ks-header__signup:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(72, 72, 168, .2); }

.ks-nav-toggle {
  display: none;
  margin-left: auto;
  width: 46px; height: 46px;
  border: 0; background: transparent; cursor: pointer;
  color: var(--ks-navy);
}
.ks-nav-toggle svg { width: 26px; height: 26px; }

/* =====================================================================
   FOOTER
   ===================================================================== */
.ks-footer {
  position: relative;
  overflow: hidden;
  background: var(--ks-grad-footer);
  color: #dfe0f5;
}
.ks-footer::before,
.ks-footer::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.ks-footer::before {
  background:
    radial-gradient(1200px 600px at 15% -20%, rgba(255,255,255,.10), transparent 60%),
    radial-gradient(900px 500px at 95% 120%, rgba(150,120,220,.28), transparent 60%);
}
.ks-footer__inner {
  position: relative;
  max-width: 1240px;
  margin: 0 auto;
  padding: 66px 26px 30px;
  display: grid;
  grid-template-columns: 1.1fr 1fr 1.2fr 1.5fr;
  gap: 30px;
}
.ks-footer__brand img { width: 180px; height: auto; }
.ks-footer h4 {
  color: #ffffff;
  font-weight: 600;
  font-size: 16px;
  letter-spacing: .05em;
  text-transform: uppercase;
  margin: 6px 0 22px;
}
.ks-footer__pages-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
.ks-footer ul { list-style: none; margin: 0; padding: 0; }
.ks-footer li { margin-bottom: 14px; }
.ks-footer li a { color: #d6d7ef; font-size: 15px; transition: color .15s ease; }
.ks-footer li a:hover { color: #ffffff; }

.ks-footer__divider {
  position: relative;
  max-width: 1240px;
  margin: 6px auto 0;
  padding: 0 26px;
}
.ks-footer__divider hr {
  border: 0;
  border-top: 1px solid rgba(255,255,255,.22);
  margin: 0;
}
.ks-footer__copy {
  position: relative;
  text-align: center;
  color: #d3d4ef;
  font-size: 14px;
  padding: 26px 26px 32px;
  margin: 0;
}

/* =====================================================================
   RESPONSIVE (header/footer)
   ===================================================================== */
@media (max-width: 1080px) {
  .ks-nav { gap: 20px; }
  .ks-nav a, .ks-header__login { font-size: 14px; }
}
@media (max-width: 960px) {
  .ks-nav-toggle { display: inline-flex; }
  .ks-nav,
  .ks-header__actions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    background: #ffffff;
    padding: 18px 26px;
    box-shadow: var(--ks-shadow-md);
    display: none;
  }
  .ks-header.is-open .ks-nav,
  .ks-header.is-open .ks-header__actions { display: flex; }
  .ks-header.is-open .ks-header__actions { top: 100%; padding-top: 0; }
  .ks-nav { margin-left: 0; }
  .ks-header__signup { display: inline-block; }
  .ks-footer__inner { grid-template-columns: 1fr 1fr; }
  .ks-footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  .ks-footer__inner { grid-template-columns: 1fr; }
}
