/* ============================================================
   KindlyCrew Care Suite — shared design system
   Warm light "care luxury" theme. Deliberately opposite of the
   dark WreckPix garage. Palette from the approved K-Crew logo.
   ============================================================ */

:root {
  /* --- palette (logo-derived) --- */
  --cream:        #FAF3E8;   /* parchment ground */
  --cream-2:      #F3E9D8;   /* warmer panel */
  --cream-3:      #FFFDF9;   /* near-white card */
  --ink:          #1E3A5F;   /* deep navy — primary text */
  --ink-soft:     #3C567A;   /* secondary text */
  --ink-faint:    #6B7E97;   /* muted labels */
  --sky:          #7DB3D8;   /* sky blue */
  --sky-deep:     #4E8FBF;   /* readable sky for links/text */
  --orange:       #F0964A;   /* warm orange */
  --orange-deep:  #D97A2B;   /* readable orange */
  --coral:        #EF7E6B;   /* coral heart warmth */
  --teal:         #2DD4BF;   /* parent accent thread — fine use only */
  --teal-deep:    #12A594;   /* readable teal */

  /* --- semantic --- */
  --bg:           var(--cream);
  --text:         var(--ink);
  --text-2:       var(--ink-soft);
  --line:         color-mix(in srgb, var(--ink) 12%, transparent);
  --line-strong:  color-mix(in srgb, var(--ink) 22%, transparent);
  --card:         var(--cream-3);

  /* --- type --- */
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body:    "Nunito Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --text-hero:  clamp(2.6rem, 1.4rem + 5.2vw, 5.2rem);
  --text-h2:    clamp(2rem, 1.3rem + 2.6vw, 3.2rem);
  --text-h3:    clamp(1.3rem, 1.05rem + 0.9vw, 1.7rem);
  --text-lede:  clamp(1.12rem, 1rem + 0.5vw, 1.4rem);
  --text-base:  clamp(1.02rem, 0.96rem + 0.28vw, 1.16rem);

  /* --- space / shape --- */
  --shell:      min(1200px, 92vw);
  --space-sec:  clamp(4.5rem, 3rem + 6vw, 9rem);
  --radius:     22px;
  --radius-lg:  30px;
  --radius-sm:  14px;

  /* --- depth (soft, warm) --- */
  --shadow-sm:  0 2px 8px color-mix(in srgb, var(--ink) 8%, transparent);
  --shadow-md:  0 14px 40px -18px color-mix(in srgb, var(--ink) 40%, transparent);
  --shadow-lg:  0 34px 80px -34px color-mix(in srgb, var(--ink) 46%, transparent);

  /* --- motion --- */
  --dur:   440ms;
  --ease:  cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* warm atmospheric backdrop — layered radial washes, no heaviness */
.backdrop {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 50% at 12% 0%, color-mix(in srgb, var(--sky) 34%, transparent), transparent 70%),
    radial-gradient(52% 46% at 92% 8%, color-mix(in srgb, var(--orange) 26%, transparent), transparent 68%),
    radial-gradient(70% 60% at 50% 108%, color-mix(in srgb, var(--teal) 16%, transparent), transparent 72%),
    var(--cream);
}

/* ---------- typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.015em;
  color: var(--ink);
  margin: 0 0 0.5em;
}
h1 { font-size: var(--text-hero); font-weight: 630; }
h2 { font-size: var(--text-h2); }
h3 { font-size: var(--text-h3); }
p  { margin: 0 0 1rem; }
a  { color: var(--sky-deep); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }

strong { color: var(--ink); font-weight: 800; }

.grad-text {
  background: linear-gradient(102deg, var(--orange-deep), var(--coral) 55%, var(--sky-deep));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- layout ---------- */
.shell { width: var(--shell); margin-inline: auto; }
section { padding-block: var(--space-sec); position: relative; }

.eyebrow {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal-deep);
  margin: 0 0 0.9rem;
  display: inline-flex; align-items: center; gap: 0.5rem;
}
.eyebrow::before {
  content: ""; width: 1.8rem; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--teal), var(--orange));
}

.section-head { max-width: 46rem; margin-bottom: clamp(2.4rem, 1.5rem + 3vw, 4rem); }
.lede { font-size: var(--text-lede); color: var(--text-2); line-height: 1.55; max-width: 44rem; }

/* ---------- skip link + focus ---------- */
.skip-link {
  position: absolute; left: 1rem; top: -3.5rem; z-index: 1000;
  background: var(--ink); color: #fff; padding: 0.7rem 1.2rem;
  border-radius: 0 0 12px 12px; text-decoration: none; font-weight: 700;
  transition: top 180ms var(--ease);
}
.skip-link:focus { top: 0; }

:focus-visible {
  outline: 3px solid var(--orange-deep);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- buttons ---------- */
.btn {
  --btn-bg: var(--ink);
  display: inline-flex; align-items: center; gap: 0.55rem;
  font-family: var(--font-body); font-weight: 800;
  font-size: 1.02rem; line-height: 1;
  padding: 0.95rem 1.5rem; border-radius: 999px;
  border: 2px solid transparent; cursor: pointer;
  text-decoration: none; white-space: nowrap;
  transition: transform var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease),
              background-color 200ms var(--ease),
              color 200ms var(--ease);
}
.btn .arrow { transition: transform 300ms var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

.btn-primary {
  background: linear-gradient(120deg, var(--orange), var(--coral));
  color: #fff;
  box-shadow: 0 12px 26px -10px color-mix(in srgb, var(--orange) 80%, transparent);
}
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 20px 38px -12px color-mix(in srgb, var(--orange) 80%, transparent); }

.btn-ghost {
  background: color-mix(in srgb, var(--cream-3) 70%, transparent);
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn-ghost:hover { transform: translateY(-3px); border-color: var(--ink); background: var(--cream-3); box-shadow: var(--shadow-md); }

.btn-teal {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 12px 26px -12px color-mix(in srgb, var(--ink) 80%, transparent);
}
.btn-teal:hover { transform: translateY(-3px); box-shadow: 0 20px 40px -14px color-mix(in srgb, var(--ink) 70%, transparent); }

/* ---------- header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 100;
  transition: background-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
              backdrop-filter var(--dur) var(--ease);
}
.site-head.scrolled {
  background: color-mix(in srgb, var(--cream) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  box-shadow: 0 1px 0 var(--line), var(--shadow-sm);
}
.bar { display: flex; align-items: center; gap: 1.5rem; padding-block: 0.9rem; }

.brand {
  display: inline-flex; align-items: center; gap: 0.7rem;
  font-family: var(--font-display); font-weight: 630; font-size: 1.34rem;
  color: var(--ink); text-decoration: none; letter-spacing: -0.01em;
}
.brand .logo-img { height: 40px; width: auto; display: block; }
.brand .suite {
  font-family: var(--font-body); font-weight: 800;
  font-size: 0.62rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--teal-deep);
  border: 1.5px solid color-mix(in srgb, var(--teal) 55%, transparent);
  padding: 0.22rem 0.5rem; border-radius: 999px;
}

.site-nav { display: flex; gap: 1.5rem; margin-left: auto; }
.site-nav a {
  color: var(--ink-soft); text-decoration: none; font-weight: 700;
  font-size: 0.98rem; padding: 0.3rem 0; position: relative;
}
.site-nav a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 0;
  background: linear-gradient(90deg, var(--orange), var(--teal));
  transition: width 260ms var(--ease);
}
.site-nav a:hover { color: var(--ink); }
.site-nav a:hover::after { width: 100%; }

.head-cta { display: flex; gap: 0.7rem; }
.head-cta .btn { padding: 0.7rem 1.15rem; font-size: 0.94rem; }

/* ---------- reveal (transform/opacity only) ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 700ms var(--ease), transform 700ms var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 90ms; }
.reveal[data-delay="2"] { transition-delay: 180ms; }
.reveal[data-delay="3"] { transition-delay: 270ms; }

/* ---------- surface card primitive ---------- */
.surface {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}

/* ---------- footer ---------- */
.site-foot {
  background: color-mix(in srgb, var(--ink) 96%, #000);
  color: color-mix(in srgb, #fff 82%, var(--sky));
  padding-block: clamp(3.5rem, 2.5rem + 3vw, 5rem) 2.5rem;
  border-top: 4px solid transparent;
  border-image: linear-gradient(90deg, var(--teal), var(--orange), var(--coral)) 1;
}
.foot-grid {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 2.4rem; padding-bottom: 2.6rem;
  border-bottom: 1px solid color-mix(in srgb, #fff 14%, transparent);
}
.foot-brand .brand { color: #fff; }
.foot-brand p { color: color-mix(in srgb, #fff 68%, var(--sky)); max-width: 26rem; margin-top: 0.9rem; }
.foot-col h4 { color: #fff; font-family: var(--font-body); font-weight: 800; font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 1rem; }
.foot-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.6rem; }
.foot-col a { color: color-mix(in srgb, #fff 74%, var(--sky)); text-decoration: none; font-weight: 600; }
.foot-col a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.foot-legal {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem;
  padding-top: 1.8rem; font-size: 0.9rem;
  color: color-mix(in srgb, #fff 58%, var(--sky));
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .site-nav { display: none; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .head-cta .btn-ghost { display: none; }
  .foot-grid { grid-template-columns: 1fr; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}
