/* =========================================================
   Callista Advisory Group — styles.css
   ========================================================= */

:root {
  /* Brand palette — drawn from the CA Group business card */
  --navy-900: #0b1730;
  --navy-800: #0e1b36;
  --navy-700: #14264a;
  --navy-600: #1b3157;
  --blue-600: #235ea3;
  --blue-500: #2f6fb6;
  --blue-400: #4a8fd6;
  --blue-300: #7db4e6;

  --ink: #1d2742;
  --muted: #5d6b86;
  --line: #e5ebf3;
  --bg: #ffffff;
  --bg-soft: #f5f8fc;
  --bg-alt: #eef3fa;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 4px 16px rgba(14, 27, 54, 0.06);
  --shadow-md: 0 16px 40px rgba(14, 27, 54, 0.10);
  --shadow-lg: 0 28px 70px rgba(14, 27, 54, 0.16);

  --maxw: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  --serif: "Playfair Display", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --script: "Great Vibes", cursive;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 110px; }

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

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

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

.ico { width: 18px; height: 18px; fill: currentColor; flex: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 600; font-size: 0.95rem; letter-spacing: 0.01em;
  padding: 14px 26px; border-radius: 999px; cursor: pointer; border: 1px solid transparent;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s, color 0.25s;
  white-space: nowrap;
}
.btn--accent { background: var(--blue-500); color: #fff; box-shadow: 0 10px 24px rgba(47, 111, 182, 0.35); }
.btn--accent:hover { background: var(--blue-600); transform: translateY(-2px); box-shadow: 0 14px 30px rgba(35, 94, 163, 0.42); }
.btn--ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.4); }
.btn--ghost:hover { background: rgba(255, 255, 255, 0.1); border-color: #fff; transform: translateY(-2px); }
.btn--block { width: 100%; }

/* ---------- Eyebrow / section heads ---------- */
.eyebrow {
  display: inline-block; font-size: 0.78rem; font-weight: 600; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--blue-500); margin-bottom: 16px;
}
.eyebrow--light { color: var(--blue-300); }

.section { padding: 96px 0; }
.section--alt { background: var(--bg-soft); }
.section--dark { background: linear-gradient(160deg, var(--navy-800), var(--navy-600)); color: #fff; }

.section__head { max-width: 720px; margin: 0 auto 56px; text-align: center; }
.section__title {
  font-family: var(--serif); font-weight: 600; line-height: 1.15;
  font-size: clamp(1.9rem, 3.6vw, 2.8rem); letter-spacing: -0.01em;
}
.section__sub { color: var(--muted); margin-top: 16px; font-size: 1.06rem; }
.section--dark .section__sub, .section--dark .why__head p { color: rgba(255, 255, 255, 0.78); }

/* =========================================================
   TOP BAR
   ========================================================= */
.topbar {
  background: var(--navy-900); color: rgba(255, 255, 255, 0.82);
  font-size: 0.84rem; border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.topbar__inner { display: flex; align-items: center; justify-content: space-between; min-height: 42px; gap: 18px; }
.topbar__contacts { display: flex; gap: 22px; }
.topbar__contacts a { display: inline-flex; align-items: center; gap: 7px; transition: color 0.2s; }
.topbar__contacts a:hover { color: #fff; }
.topbar__contacts .ico { width: 15px; height: 15px; }
.topbar__badge { display: inline-flex; align-items: center; gap: 8px; color: var(--blue-300); font-weight: 500; }
.topbar__badge .ico { width: 16px; height: 16px; fill: var(--blue-300); }

/* =========================================================
   HEADER / NAV
   ========================================================= */
.header {
  position: sticky; top: 0; z-index: 100; background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid transparent;
  transition: box-shadow 0.3s, border-color 0.3s;
}
.header.is-stuck { box-shadow: var(--shadow-sm); border-color: var(--line); }
.header__inner { display: flex; align-items: center; justify-content: space-between; min-height: 76px; }

/* Brand / logo */
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--navy-800); }
.brand__mark { width: 52px; height: 52px; display: grid; place-items: center; color: var(--blue-500); flex: none; }
.brand__logo { width: 100%; height: 100%; }
.brand__ca { font-family: var(--serif); font-weight: 700; font-size: 26px; fill: var(--navy-800); letter-spacing: 1px; }
.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand__text strong { font-family: var(--serif); font-size: 1.18rem; font-weight: 600; letter-spacing: 0.01em; }
.brand__text small { font-size: 0.66rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--blue-500); margin-top: 2px; }

.nav { display: flex; align-items: center; gap: 30px; }
.nav__list { display: flex; gap: 28px; }
.nav__list a { font-weight: 500; font-size: 0.96rem; color: var(--ink); position: relative; padding: 6px 0; transition: color 0.2s; }
.nav__list a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 0; background: var(--blue-500); transition: width 0.28s var(--ease);
}
.nav__list a:hover, .nav__list a.is-active { color: var(--blue-600); }
.nav__list a:hover::after, .nav__list a.is-active::after { width: 100%; }
.nav__cta { padding: 11px 22px; }

.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 26px; height: 2px; background: var(--navy-800); border-radius: 2px; transition: transform 0.3s, opacity 0.3s; }
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  position: relative; color: #fff; overflow: hidden;
  background: radial-gradient(1200px 600px at 80% -10%, var(--navy-600), transparent 60%),
              linear-gradient(155deg, var(--navy-900) 0%, var(--navy-700) 55%, var(--navy-600) 100%);
}
.hero__bg { position: absolute; inset: 0; pointer-events: none; }
.hero__wave { position: absolute; right: 0; top: 0; height: 100%; width: 70%; }
.hero__inner {
  position: relative; display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: center;
  padding: 104px 24px 110px;
}
.hero__content { max-width: 620px; }
.hero__title {
  font-family: var(--serif); font-weight: 600; letter-spacing: -0.015em; line-height: 1.1;
  font-size: clamp(2.2rem, 4.6vw, 3.5rem); margin-bottom: 22px;
}
.hero__statement { font-size: 1.18rem; color: rgba(255, 255, 255, 0.85); max-width: 540px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 32px 0 18px; }
.hero__signature { font-family: var(--script); font-size: 2rem; color: var(--blue-300); margin-top: 6px; }

/* Floating glass card */
.hero__card {
  background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow-lg);
}
.hero__card-top { display: flex; align-items: center; gap: 16px; padding-bottom: 20px; border-bottom: 1px solid rgba(255, 255, 255, 0.14); }
.hero__card-mark {
  width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; flex: none;
  font-family: var(--serif); font-weight: 700; font-size: 1.5rem; color: #fff;
  background: linear-gradient(150deg, var(--blue-500), var(--blue-600)); box-shadow: 0 8px 20px rgba(47, 111, 182, 0.4);
}
.hero__card-top strong { display: block; font-size: 1.08rem; font-family: var(--serif); font-weight: 600; }
.hero__card-top span { font-size: 0.85rem; color: var(--blue-300); }
.hero__card-list { margin: 22px 0; display: grid; gap: 14px; }
.hero__card-list li { display: flex; align-items: center; gap: 12px; font-size: 0.97rem; color: rgba(255, 255, 255, 0.9); }
.hero__card-list .ico { fill: var(--blue-300); }
.hero__card-link { color: var(--blue-300); font-weight: 600; font-size: 0.95rem; transition: gap 0.2s, color 0.2s; }
.hero__card-link:hover { color: #fff; }

/* =========================================================
   CREDENTIALS STRIP
   ========================================================= */
.creds { background: var(--bg); border-bottom: 1px solid var(--line); }
.creds__inner { display: flex; align-items: center; justify-content: center; gap: 40px; flex-wrap: wrap; padding: 30px 24px; }
.creds__lead { font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.creds__logos { display: flex; gap: 40px; flex-wrap: wrap; justify-content: center; align-items: center; }
.creds__logo { width: auto; object-fit: contain; }
.creds__logo--sait { height: 80px; }
.creds__logo--sars { height: 44px; }
.creds__logo--xero { height: 54px; }
.creds__logo--cipc { height: 72px; }

/* =========================================================
   ABOUT
   ========================================================= */
.about__inner { max-width: 860px; margin: 0 auto; }
.about__content p { color: var(--muted); margin-bottom: 16px; font-size: 1.04rem; }
.about__content .section__title { margin-bottom: 22px; }
.about__points { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 30px; }
.about__points li { padding-left: 18px; border-left: 3px solid var(--blue-400); }
.about__points strong { display: block; font-size: 1.02rem; color: var(--navy-700); }
.about__points span { font-size: 0.9rem; color: var(--muted); }

/* =========================================================
   SERVICES
   ========================================================= */
.services__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.service-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 32px 28px;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s;
  position: relative; overflow: hidden;
}
.service-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--blue-500), var(--blue-300)); transform: scaleX(0); transform-origin: left; transition: transform 0.35s var(--ease);
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: transparent; }
.service-card:hover::before { transform: scaleX(1); }
.service-card__icon {
  width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 20px;
  background: linear-gradient(150deg, var(--bg-alt), #fff); border: 1px solid var(--line);
}
.service-card__icon svg { width: 28px; height: 28px; fill: var(--blue-500); }
.service-card h3 { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; margin-bottom: 16px; color: var(--navy-700); }
.service-card ul { display: grid; gap: 10px; }
.service-card li { position: relative; padding-left: 24px; color: var(--muted); font-size: 0.96rem; }
.service-card li::before {
  content: ""; position: absolute; left: 0; top: 8px; width: 14px; height: 8px;
  border-left: 2px solid var(--blue-500); border-bottom: 2px solid var(--blue-500); transform: rotate(-45deg);
}
.service-card--cta {
  background: linear-gradient(160deg, var(--navy-800), var(--navy-600)); color: #fff;
  display: flex; flex-direction: column; justify-content: center; gap: 16px; border: none;
}
.service-card--cta h3 { color: #fff; }
.service-card--cta p { color: rgba(255, 255, 255, 0.8); font-size: 1rem; }
.service-card--cta::before { display: none; }
.service-card--cta .btn { align-self: flex-start; margin-top: 6px; }

/* =========================================================
   WHO WE HELP
   ========================================================= */
.who__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.who__item {
  text-align: center; padding: 36px 24px; border-radius: var(--radius); background: var(--bg-soft);
  border: 1px solid var(--line); transition: transform 0.3s var(--ease), box-shadow 0.3s;
}
.who__item:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.who__item svg {
  width: 34px; height: 34px; fill: #fff; padding: 12px; box-sizing: content-box; border-radius: 14px;
  background: linear-gradient(150deg, var(--blue-500), var(--blue-600)); margin: 0 auto 18px;
  box-shadow: 0 10px 22px rgba(47, 111, 182, 0.32);
}
.who__item h3 { font-family: var(--serif); font-size: 1.2rem; font-weight: 600; margin-bottom: 10px; color: var(--navy-700); }
.who__item p { font-size: 0.93rem; color: var(--muted); }

/* =========================================================
   WHY US
   ========================================================= */
.why__inner { display: grid; grid-template-columns: 0.95fr 1.05fr; gap: 60px; align-items: center; }
.why__head .section__title { color: #fff; margin-bottom: 18px; }
.why__head .btn { margin-top: 26px; }
.why__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.why__feature {
  background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-sm); padding: 26px 24px; transition: background 0.3s, transform 0.3s;
}
.why__feature:hover { background: rgba(255, 255, 255, 0.09); transform: translateY(-4px); }
.why__num { font-family: var(--serif); font-size: 1.6rem; color: var(--blue-300); font-weight: 700; }
.why__feature h3 { font-size: 1.1rem; margin: 8px 0 8px; font-weight: 600; }
.why__feature p { font-size: 0.92rem; color: rgba(255, 255, 255, 0.72); }

/* =========================================================
   PROCESS
   ========================================================= */
.process__steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; list-style: none; }
.process__steps li { position: relative; padding-top: 12px; }
.process__steps li::after {
  content: ""; position: absolute; top: 30px; left: 56px; right: -12px; height: 2px;
  background: linear-gradient(90deg, var(--blue-300), transparent);
}
.process__steps li:last-child::after { display: none; }
.process__n {
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--serif); font-weight: 700; font-size: 1.3rem; color: #fff; margin-bottom: 18px;
  background: linear-gradient(150deg, var(--blue-500), var(--blue-600)); box-shadow: 0 10px 22px rgba(47, 111, 182, 0.3);
}
.process__steps h3 { font-family: var(--serif); font-size: 1.18rem; font-weight: 600; color: var(--navy-700); margin-bottom: 8px; }
.process__steps p { font-size: 0.93rem; color: var(--muted); }

/* =========================================================
   CONTACT
   ========================================================= */
.contact__inner { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.contact__lead { color: var(--muted); font-size: 1.06rem; margin: 16px 0 30px; }
.contact__details { display: grid; gap: 22px; }
.contact__details li { display: flex; gap: 16px; align-items: flex-start; }
.contact__ico {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; flex: none;
  background: var(--bg-alt); color: var(--blue-500);
}
.contact__ico .ico { width: 20px; height: 20px; }
.contact__details small { display: block; font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.contact__details a, .contact__details div > span { font-size: 1.02rem; color: var(--navy-700); font-weight: 500; transition: color 0.2s; }
.contact__details a:hover { color: var(--blue-500); }

.contact__form-wrap {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 34px; box-shadow: var(--shadow-md);
}
.field { margin-bottom: 18px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--navy-700); margin-bottom: 7px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 15px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-family: inherit; font-size: 0.96rem; color: var(--ink); background: var(--bg-soft);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--blue-400); background: #fff; box-shadow: 0 0 0 4px rgba(74, 143, 214, 0.12);
}
.field textarea { resize: vertical; }
.contact__formnote { text-align: center; font-size: 0.84rem; color: var(--muted); margin-top: 14px; }
.contact__formnote.is-success { color: #1a8f5a; font-weight: 600; }
.contact__formnote.is-error { color: #c0392b; font-weight: 600; }

/* =========================================================
   FOOTER
   ========================================================= */
.footer { background: var(--navy-900); color: rgba(255, 255, 255, 0.7); padding-top: 64px; }
.footer__inner { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 40px; padding-bottom: 50px; }
.brand--footer { color: #fff; }
.brand--footer .brand__ca { fill: #fff; }
.brand--footer .brand__mark { color: var(--blue-400); }
.brand--footer .brand__text strong { color: #fff; }
.footer__tag { margin: 20px 0 12px; font-size: 0.95rem; line-height: 1.6; max-width: 340px; }
.footer__sig { font-family: var(--script); font-size: 1.6rem; color: var(--blue-300); }
.footer__col h4 { color: #fff; font-size: 0.95rem; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 18px; }
.footer__col ul { display: grid; gap: 11px; }
.footer__col a { font-size: 0.93rem; transition: color 0.2s; }
.footer__col a:hover { color: var(--blue-300); }
.footer__logos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; max-width: 280px; }
.footer-logo {
  background: #fff; border-radius: 10px; padding: 10px 12px; min-height: 58px;
  display: flex; align-items: center; justify-content: center;
}
.footer-logo img { max-height: 36px; max-width: 100%; width: auto; object-fit: contain; }
.footer__bar { border-top: 1px solid rgba(255, 255, 255, 0.08); }
.footer__bar-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px; font-size: 0.82rem; }

/* Back to top */
.to-top {
  position: fixed; right: 24px; bottom: 24px; width: 48px; height: 48px; border-radius: 50%;
  background: var(--blue-500); color: #fff; display: grid; place-items: center; font-size: 1.2rem;
  box-shadow: var(--shadow-md); opacity: 0; visibility: hidden; transform: translateY(12px);
  transition: opacity 0.3s, transform 0.3s, visibility 0.3s, background 0.2s; z-index: 90;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { background: var(--blue-600); }

/* =========================================================
   REVEAL ANIMATION
   ========================================================= */
[data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
[data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1020px) {
  .hero__inner { grid-template-columns: 1fr; gap: 40px; }
  .hero__card { max-width: 460px; }
  .why__inner, .contact__inner { grid-template-columns: 1fr; gap: 44px; }
  .services__grid { grid-template-columns: repeat(2, 1fr); }
  .who__grid { grid-template-columns: repeat(2, 1fr); }
  .process__steps { grid-template-columns: repeat(2, 1fr); }
  .process__steps li::after { display: none; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  /* Remove blur here: backdrop-filter creates a containing block that would
     trap the fixed-position slide-out menu inside the header instead of the viewport. */
  .header { backdrop-filter: none; -webkit-backdrop-filter: none; background: #fff; }
  .nav {
    position: fixed; inset: 0 0 0 auto; width: min(320px, 84vw); flex-direction: column; align-items: stretch;
    justify-content: flex-start; gap: 6px; background: #fff; padding: 100px 28px 40px;
    box-shadow: var(--shadow-lg); transform: translateX(110%); transition: transform 0.35s var(--ease); z-index: 99;
    visibility: hidden;
  }
  .nav.is-open { visibility: visible; }
  .nav.is-open { transform: translateX(0); }
  .nav__list { flex-direction: column; gap: 4px; }
  .nav__list a { display: block; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav__cta { margin-top: 16px; text-align: center; }
  .nav-toggle { display: flex; z-index: 100; }
  .topbar__contacts { gap: 14px; }
}

@media (max-width: 680px) {
  .section { padding: 70px 0; }
  .topbar__contacts a span, .topbar__badge { display: none; }
  .topbar__inner { justify-content: center; }
  .brand__text small { display: none; }
  .services__grid, .who__grid, .process__steps, .footer__inner, .about__points, .field-row { grid-template-columns: 1fr; }
  .footer__bar-inner { flex-direction: column; text-align: center; }
  .hero__signature { font-size: 1.7rem; }
}

@media (max-width: 420px) {
  .container { padding: 0 18px; }
  .hero__card, .contact__form-wrap { padding: 24px 20px; }
}
