/* ==========================================================================
   Carolina Analytics Team — theme styles
   Change the brand colors in :root and everything follows.
   ========================================================================== */

:root {
  /* Every color is light-dark(LIGHT, DARK): edit either value to retheme.
     The site follows the visitor's system setting; the header button
     lets them override it (see base.html). */
  color-scheme: light dark;

  --ink: light-dark(#1d2433, #ece8df);          /* text */
  --ink-soft: light-dark(#4a5468, #a9b1c1);
  --paper: light-dark(#fbf8f3, #11151e);        /* page background */
  --paper-2: light-dark(#f3eee5, #171c28);      /* alternate sections */
  --card: light-dark(#ffffff, #1b2130);
  --line: light-dark(#e4ddd0, #2b3446);
  --amber: #e5a03a;                              /* cat-eye amber */
  --amber-deep: light-dark(#b97614, #efb356);
  --teal: light-dark(#23716d, #5bbdb5);          /* links and accents */
  --teal-deep: light-dark(#185552, #86d4ce);
  --teal-tint: light-dark(#e3f0ee, #17302f);
  --btn: #23716d;                                /* button fill (white text) */
  --btn-hover: light-dark(#185552, #28807b);
  --band: light-dark(#1d2433, #1f273a);          /* dark bands: CTA, rate strip */
  --header-bg: light-dark(rgba(251, 248, 243, .92), rgba(17, 21, 30, .88));
  --shadow-c: light-dark(rgba(29, 36, 51, .06), rgba(0, 0, 0, .35));
  --shadow: 0 1px 2px var(--shadow-c), 0 8px 24px var(--shadow-c);

  /* the cat */
  --cat: light-dark(#1d2433, #4f5c82);
  --cat-ear: light-dark(#39445a, #6b79a1);
  --cat-whisker: light-dark(#fbf8f3, #e4e8f2);
  --cat-pupil: #1d2433;

  --radius: 14px;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
  --wrap: 1120px;
}
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); text-underline-offset: 3px; }
a:hover { color: var(--teal-deep); }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 650;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.25rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.muted { color: var(--ink-soft); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--band); color: #fff; padding: 8px 14px; border-radius: 6px; z-index: 100; }
.skip-link:focus { left: 8px; }

.eyebrow {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--amber-deep);
  margin-bottom: .75em;
}
.lede { font-size: 1.2rem; color: var(--ink-soft); max-width: 40em; }

/* ---------- Icons ---------- */
.icon { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon-sm { width: 18px; height: 18px; vertical-align: -3px; }

/* ---------- Logo ---------- */
.logo-mark { flex: none; }
.logo-mark .cat-head, .art-cat { fill: var(--cat); }
.cat-ear { fill: var(--cat-ear); }
.cat-eye { fill: var(--amber); }
.cat-pupil { fill: var(--cat-pupil); }
.cat-nose { fill: #d98c7a; }
.cat-whisker { stroke: var(--cat-whisker); stroke-width: 1.3; stroke-linecap: round; fill: none; opacity: .85; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  background: var(--btn); color: #fff;
  font: 700 1rem/1 var(--font-body);
  padding: .95em 1.4em;
  border-radius: 999px;
  border: 2px solid var(--btn);
  text-decoration: none;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .15s;
}
.btn:hover { background: var(--btn-hover); border-color: var(--btn-hover); color: #fff; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--card); color: var(--ink); border-color: var(--ink-soft); }
.btn-light { background: #fbf8f3; color: #1d2433; border-color: #fbf8f3; }
.btn-light:hover { background: #fff; border-color: #fff; color: #1d2433; }
.btn-small { padding: .6em 1.1em; font-size: .95rem; }

.text-link { display: inline-flex; align-items: center; gap: .35em; font-weight: 700; text-decoration: none; }
.text-link:hover { text-decoration: underline; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--font-display); font-weight: 650; font-size: 1.15rem; }
.brand-sub { font-size: .72rem; font-weight: 700; letter-spacing: .3em; color: var(--amber-deep); }

.site-nav { display: flex; align-items: center; gap: 24px; }
.site-nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.site-nav ul a {
  display: block; padding: .5em .8em; border-radius: 8px;
  color: var(--ink); text-decoration: none; font-weight: 600;
}
.site-nav ul a:hover { background: var(--paper-2); }
.site-nav ul a[aria-current="page"] { color: var(--teal-deep); box-shadow: inset 0 -2px 0 var(--amber); border-radius: 0; }

.nav-toggle { display: none; }
.nav-toggle-label { display: none; }

@media (max-width: 820px) {
  .nav-toggle-label {
    display: flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; cursor: pointer; border-radius: 10px;
  }
  .nav-toggle-label span, .nav-toggle-label span::before, .nav-toggle-label span::after {
    display: block; width: 22px; height: 2px; background: var(--ink); position: relative; transition: .2s;
  }
  .nav-toggle-label span::before, .nav-toggle-label span::after { content: ""; position: absolute; left: 0; }
  .nav-toggle-label span::before { top: -7px; }
  .nav-toggle-label span::after { top: 7px; }
  .nav-toggle:checked + .nav-toggle-label span { background: transparent; }
  .nav-toggle:checked + .nav-toggle-label span::before { top: 0; transform: rotate(45deg); }
  .nav-toggle:checked + .nav-toggle-label span::after { top: 0; transform: rotate(-45deg); }

  .site-nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 12px;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: 12px 20px 20px;
  }
  .nav-toggle:checked ~ .site-nav { display: flex; }
  .site-nav ul { flex-direction: column; }
  .site-nav ul a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--amber); }
  .brand-name { font-size: 1rem; }
}

/* ---------- Hero ---------- */
.hero { padding: clamp(48px, 8vw, 96px) 0 clamp(40px, 6vw, 72px); overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.hero h1 em { font-style: italic; color: var(--teal); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-art { margin: 0; }
.hero-art svg { width: 100%; height: auto; max-width: 420px; margin-left: auto; display: block; }
.art-base { stroke: var(--line); stroke-width: 2; }
.art-bar.b1 { fill: light-dark(#cfe3e0, #25413f); }
.art-bar.b2 { fill: light-dark(#9cc7c2, #2e5b58); }
.art-bar.b3 { fill: light-dark(#5ea29c, #3f8680); }
.art-bar.b4 { fill: var(--teal); }
.art-trend { fill: none; stroke: var(--amber); stroke-width: 2.5; stroke-dasharray: 5 6; stroke-linecap: round; }
.art-dot { fill: var(--paper); stroke: var(--amber); stroke-width: 2.5; }
.art-tail { fill: none; stroke: var(--cat); stroke-width: 7; stroke-linecap: round; }
.art-paw { stroke: var(--cat-ear); stroke-width: 1.6; stroke-linecap: round; }

@media (max-width: 820px) {
  .hero-inner { grid-template-columns: 1fr; gap: 24px; }
  .hero-art { order: -1; }
  .hero-art svg { max-width: 240px; margin: 0; }
}

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-alt { background: var(--paper-2); }
.section-head { max-width: 42em; margin-bottom: 36px; }
.section-head-tight { margin: 64px 0 20px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
}
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.service-card { display: flex; flex-direction: column; }
.service-card .text-link { margin-top: auto; }
.service-icon {
  width: 52px; height: 52px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--teal-tint); color: var(--teal);
  margin-bottom: 18px;
}
.card-headline { font-weight: 700; color: var(--ink); }

.signs { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 32px; }
.signs li { position: relative; padding-left: 30px; }
.signs li::before {
  content: ""; position: absolute; left: 0; top: .55em;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--amber); box-shadow: 0 0 0 4px rgba(229, 160, 58, .2);
}

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; counter-reset: step; }
.steps li { position: relative; padding-top: 8px; }
.step-num {
  display: inline-grid; place-items: center;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--band); color: var(--amber);
  font: 650 1.1rem/1 var(--font-display);
  margin-bottom: 14px;
}
.steps h3 { font-size: 1.15rem; }
.steps p { color: var(--ink-soft); margin: 0; }

.cta-band { background: var(--band); color: #fbf8f3; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #c9cfdb; max-width: 38em; margin: 0; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; }

@media (max-width: 900px) {
  .card-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .cta-inner { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 600px) {
  .signs, .steps { grid-template-columns: 1fr; }
}

/* ---------- Inner pages ---------- */
.page-hero { padding: clamp(48px, 7vw, 80px) 0 clamp(28px, 4vw, 40px); border-bottom: 1px solid var(--line); margin-bottom: 48px; }
.page-hero h1 { font-size: clamp(2rem, 4.5vw, 3rem); }
.prose-wrap { padding-bottom: 80px; }
.prose { max-width: 46em; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .5em; }
.prose li::marker { color: var(--amber-deep); }
.prose strong { color: var(--ink); }
.page-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 2em; }
.page-cta .btn { text-decoration: none; }
.page-cta .btn:not(.btn-ghost) { color: #fff; }
.page-cta .btn-ghost { color: var(--ink); }

/* Services page */
.page-services .prose { max-width: none; }
.page-services .prose > h2, .page-services .prose > ul, .page-services .prose > p { max-width: 46em; }
.service-block {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: clamp(24px, 4vw, 40px);
  margin-bottom: 32px;
  scroll-margin-top: 96px;
}
.service-block h2 { margin-top: 0; padding-bottom: .4em; border-bottom: 3px solid var(--amber); display: inline-block; }
.service-block > p { max-width: 46em; }
.usecases { background: var(--paper); border-radius: 10px; padding: 20px 24px 8px; margin: 20px 0; }
.usecases h3 { margin-top: 0; font-size: 1.05rem; font-family: var(--font-body); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); }
.usecases ul { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px 32px; padding-left: 1.2em; }
.tools { font-size: .95rem; color: var(--ink-soft); margin: 0; }
@media (max-width: 760px) { .usecases ul { grid-template-columns: 1fr; } }

/* Pricing page */
.rate-strip {
  display: grid; grid-template-columns: repeat(3, 1fr);
  background: var(--band); color: #fbf8f3;
  border-radius: var(--radius); overflow: hidden; margin-bottom: 36px;
}
.rate-item { padding: 22px 26px; display: flex; flex-direction: column; gap: 4px; }
.rate-item + .rate-item { border-left: 1px solid rgba(255, 255, 255, .12); }
.rate-label { font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--amber); }
.rate-value { font: 650 1.5rem/1.2 var(--font-display); color: #fff; }
.rate-value small { font-size: .9rem; color: #c9cfdb; font-family: var(--font-body); }

.price-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.price-grid-extra { grid-template-columns: repeat(2, 1fr); margin-top: 24px; }
.price-grid-extra .price-card { background: var(--paper-2); box-shadow: none; }
.price-card { position: relative; display: flex; flex-direction: column; }
.price-card.featured { border: 2px solid var(--teal); }
.badge {
  position: absolute; top: -12px; right: 20px;
  background: var(--amber); color: #1d2433;
  font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 999px;
}
.price-service { font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--teal); margin-bottom: .3em; }
.price-range { font: 650 1.7rem/1.2 var(--font-display); margin-bottom: .2em; }
.price-range span { white-space: nowrap; font: 400 .95rem var(--font-body); color: var(--ink-soft); }
.price-timeline { color: var(--ink-soft); font-size: .95rem; display: flex; align-items: center; gap: 6px; }
.checklist { list-style: none; padding: 0; margin: auto 0 0; border-top: 1px solid var(--line); padding-top: 14px; }
.checklist li { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 6px; font-size: .97rem; }
.checklist .icon { color: var(--teal); margin-top: 3px; stroke-width: 2.4; }

.factor-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin-bottom: 56px; }
.factor { border-left: 3px solid var(--amber); padding: 4px 0 4px 18px; }
.factor h3 { font-size: 1.1rem; font-family: var(--font-body); font-weight: 700; margin-bottom: .3em; }
.factor p { color: var(--ink-soft); margin: 0; }

@media (max-width: 960px) { .price-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 700px) {
  .rate-strip { grid-template-columns: 1fr; }
  .rate-item + .rate-item { border-left: 0; border-top: 1px solid rgba(255, 255, 255, .12); }
  .price-grid { grid-template-columns: 1fr; }
}

/* Team page */
.team-list { display: grid; gap: 32px; margin-bottom: 48px; }
.member { display: grid; grid-template-columns: 240px 1fr; gap: 36px; align-items: start; }
.member-photo img { width: 240px; height: 240px; object-fit: cover; border-radius: 50%; border: 6px solid var(--paper-2); }
.member-body h2 { margin-bottom: .1em; }
.member-role { color: var(--teal); font-weight: 700; margin-bottom: 1em; }
.credentials { list-style: none; padding: 0; margin: 0 0 1.2em; display: flex; flex-wrap: wrap; gap: 8px; }
.credentials li { background: var(--teal-tint); color: var(--teal-deep); font-weight: 600; font-size: .92rem; padding: 6px 12px; border-radius: 8px; }
.member-bio p { color: var(--ink); }
.tags { list-style: none; padding: 0; margin: 1.2em 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { border: 1px solid var(--line); font-size: .85rem; padding: 4px 10px; border-radius: 999px; color: var(--ink-soft); background: var(--paper); }
.member-links { margin-top: 1em; display: flex; gap: 16px; font-weight: 600; }
@media (max-width: 760px) {
  .member { grid-template-columns: 1fr; gap: 20px; }
  .member-photo img { width: 160px; height: 160px; }
}

/* Contact page */
.contact-layout { display: grid; grid-template-columns: .9fr 1.1fr; gap: 48px; align-items: start; padding-bottom: 80px; }
.contact-side .prose h3:first-child { margin-top: 0; }
.contact-details { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 12px; }
.contact-details li { display: flex; gap: 10px; align-items: center; }
.contact-details .icon { color: var(--teal); }

.contact-form { display: grid; gap: 18px; }
.contact-form h2 { font-size: 1.5rem; margin: 0; }
.contact-form label { display: grid; gap: 6px; font-weight: 600; font-size: .97rem; }
.optional { font-weight: 400; color: var(--ink-soft); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
input[type="text"], input[type="email"], textarea, select {
  width: 100%;
  font: 400 1rem/1.4 var(--font-body);
  color: var(--ink);
  padding: .75em .9em;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--teal); background: var(--card); box-shadow: 0 0 0 3px var(--teal-tint); }
textarea { resize: vertical; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-weight: 600; font-size: .97rem; margin-bottom: 8px; padding: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.contact-form .chip { display: inline-flex; position: relative; font-weight: 600; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span { padding: .5em 1em; border: 1.5px solid var(--line); border-radius: 999px; background: var(--paper); transition: .15s; }
.chip input:checked + span { background: var(--btn); border-color: var(--btn); color: #fff; }
.chip input:focus-visible + span { outline: 3px solid var(--amber); outline-offset: 2px; }
.contact-form .btn { justify-self: start; }
.form-note { font-size: .9rem; margin: 0; }
@media (max-width: 860px) {
  .contact-layout { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--paper-2); border-top: 1px solid var(--line); padding: 40px 0 32px; }
.footer-inner { display: grid; grid-template-columns: 1fr auto; gap: 20px 40px; align-items: center; }
.footer-brand { display: flex; gap: 14px; align-items: center; }
.footer-brand p { margin: 0; }
.footer-name { font-family: var(--font-display); font-weight: 650; }
.footer-links { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer-links a { color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.footer-links a:hover { color: var(--teal); }
.footer-copy { grid-column: 1 / -1; font-size: .88rem; margin: 0; padding-top: 16px; border-top: 1px solid var(--line); }
@media (max-width: 700px) { .footer-inner { grid-template-columns: 1fr; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}

/* ---------- Theme toggle (button lives in the header; see base.html) ---------- */
.theme-toggle {
  display: inline-grid; place-items: center;
  width: 40px; height: 40px; padding: 0; flex: none;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: transparent; color: var(--ink);
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.theme-toggle:hover { background: var(--paper-2); border-color: var(--ink-soft); }
.theme-toggle[hidden] { display: none; }
.theme-toggle .icon { width: 20px; height: 20px; }
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: inline; }
@media (max-width: 820px) { .theme-toggle { align-self: flex-start; } }
