/* ============================================================
   Pillar Advisory — Design Tokens
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Gloock&family=Instrument+Sans:ital,wght@0,400;0,500;0,600;1,400&display=swap');

:root {
  /* Brand colours */
  --navy:         #1C2E3A;
  --navy-light:   #243747;
  --teal-deep:    #0F766E;
  --teal-mid:     #0D9488;
  --teal-soft:    #5EEAD4;
  --teal-pale:    #CCFBF1;
  --off-white:    #F8FAFB;
  --slate-100:    #F1F5F9;
  --slate-200:    #E2E8F0;
  --slate-300:    #CBD5E1;
  --slate-600:    #475569;
  --slate-700:    #334155;
  --white:        #FFFFFF;

  /* Semantic roles */
  --bg:              var(--off-white);
  --bg-alt:          var(--slate-100);
  --bg-dark:         var(--navy);
  --surface:         var(--white);
  --surface-dark:    var(--navy-light);
  --fg:              var(--navy);
  --fg-muted:        var(--slate-600);
  --fg-subtle:       var(--slate-700);
  --fg-on-dark:      var(--white);
  --fg-on-dark-muted:   rgba(255,255,255,0.72);
  --fg-on-dark-subtle:  rgba(255,255,255,0.56);
  --accent:          var(--teal-deep);
  --accent-hover:    var(--teal-mid);
  --border:          var(--slate-200);
  --border-dark:     rgba(255,255,255,0.08);

  /* Gradients */
  --gradient-brand: linear-gradient(135deg, var(--navy) 0%, var(--teal-mid) 100%);
  --gradient-hero:  radial-gradient(60% 50% at 85% 15%, rgba(13,148,136,0.18) 0%, rgba(28,46,58,0) 60%);
  --grid-texture:   linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);

  /* Type families */
  --font-display: 'Gloock', 'Source Serif Pro', Georgia, serif;
  --font-body:    'Instrument Sans', -apple-system, 'Segoe UI', system-ui, sans-serif;

  /* Type scale */
  --fs-display:   64px;
  --fs-h1:        48px;
  --fs-h2:        36px;
  --fs-h3:        24px;
  --fs-h4:        20px;
  --fs-body-lg:   18px;
  --fs-body:      16px;
  --fs-body-sm:   14px;
  --fs-caption:   12px;
  --fs-eyebrow:   11px;

  /* Line-heights */
  --lh-display:  1.08;
  --lh-heading:  1.15;
  --lh-body:     1.55;
  --lh-tight:    1.25;

  /* Letter-spacing */
  --ls-display:  -0.02em;
  --ls-heading:  -0.01em;
  --ls-eyebrow:   0.08em;

  /* Weights */
  --fw-regular:  400;
  --fw-medium:   500;
  --fw-semibold: 600;

  /* Spacing (4px base) */
  --sp-1:   4px;
  --sp-2:   8px;
  --sp-3:  12px;
  --sp-4:  16px;
  --sp-5:  24px;
  --sp-6:  32px;
  --sp-7:  48px;
  --sp-8:  64px;
  --sp-9:  96px;
  --sp-10: 128px;

  /* Layout */
  --container: 1200px;
  --container-prose: 760px;
  --section-pad: 96px;
  --section-pad-m: 64px;

  /* Radii */
  --r-tag:     4px;
  --r-btn:     8px;
  --r-card:   16px;
  --r-feature: 24px;

  /* Shadows */
  --shadow-card:    0 1px 2px rgba(28,46,58,0.04), 0 1px 1px rgba(28,46,58,0.03);
  --shadow-up:      0 12px 32px -12px rgba(28,46,58,0.18);
  --shadow-focus:   0 0 0 3px rgba(15,118,110,0.25);

  /* Motion */
  --dur-fast:   120ms;
  --dur-base:   180ms;
  --dur-slow:   240ms;
  --ease-out:   cubic-bezier(0.22, 1, 0.36, 1);
  --ease-inout: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================================
   Base
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--fg);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: var(--fw-regular);
  color: var(--fg);
}
p { color: var(--fg-muted); }
a { color: var(--accent); text-decoration: none; transition: color var(--dur-base) var(--ease-out); }
a:hover { color: var(--accent-hover); }
img { display: block; max-width: 100%; }
button { font-family: var(--font-body); }

/* ============================================================
   Typography utilities
   ============================================================ */

.eyebrow {
  font-family: var(--font-body);
  font-size: var(--fs-eyebrow);
  font-weight: var(--fw-semibold);
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--teal-mid);
  margin-bottom: var(--sp-3);
  display: block;
}
.eyebrow-dark { color: var(--teal-soft); }

.display {
  font-family: var(--font-display);
  font-size: clamp(40px, 5vw, var(--fs-display));
  line-height: var(--lh-display);
  letter-spacing: var(--ls-display);
  font-weight: var(--fw-regular);
}
.accent-word {
  font-family: var(--font-body);
  font-style: italic;
  font-weight: var(--fw-regular);
  color: var(--teal-soft);
}
.on-light .accent-word { color: var(--teal-mid); }

/* ============================================================
   Layout
   ============================================================ */

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--sp-8);
}
.container-prose {
  max-width: var(--container-prose);
  margin: 0 auto;
  padding: 0 var(--sp-6);
}
section { padding: var(--section-pad) 0; }

/* ============================================================
   Buttons
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-body);
  font-size: var(--fs-body-sm);
  font-weight: var(--fw-semibold);
  line-height: 1;
  padding: 14px 22px;
  border-radius: var(--r-btn);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--dur-base) var(--ease-out),
              border-color var(--dur-base) var(--ease-out),
              color var(--dur-base) var(--ease-out);
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--teal-deep); color: var(--white); }
.btn-primary:hover { background: var(--teal-mid); color: var(--white); }
.btn-primary:active { filter: brightness(0.92); }
.btn-secondary { background: transparent; color: var(--navy); border-color: var(--slate-200); }
.btn-secondary:hover { background: var(--off-white); color: var(--navy); }
.btn-ghost-dark { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.24); }
.btn-ghost-dark:hover { background: rgba(255,255,255,0.06); color: var(--white); }

/* ============================================================
   Cards
   ============================================================ */

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: var(--sp-6);
  transition: border-top-color var(--dur-base) var(--ease-out),
              border-top-width var(--dur-base) var(--ease-out),
              padding-top var(--dur-base) var(--ease-out);
}
.card:hover {
  border-top-color: var(--teal-deep);
  border-top-width: 2px;
  padding-top: 31px;
}
.card-dark {
  background: var(--surface-dark);
  border: 1px solid var(--border-dark);
  border-radius: var(--r-card);
  padding: var(--sp-6);
  color: var(--white);
  transition: border-top-color var(--dur-base) var(--ease-out);
}
.card-dark:hover { border-top-color: var(--teal-soft); border-top-width: 2px; padding-top: 31px; }

/* ============================================================
   Tag
   ============================================================ */

.tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: var(--r-tag);
  background: var(--teal-pale);
  color: var(--teal-deep);
  font-size: var(--fs-caption);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.01em;
}

/* ============================================================
   Pillar mark
   ============================================================ */

.pillar-mark {
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
}
.pillar-mark span {
  display: block;
  border-radius: 1.5px;
}

/* ============================================================
   Skip link (accessibility)
   ============================================================ */

.skip-link {
  position: absolute; top: -48px; left: 0;
  background: var(--teal-deep); color: var(--white);
  padding: 10px 20px; z-index: 999;
  border-radius: 0 0 8px 0;
  font-size: 14px; font-weight: 600;
  text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus { top: 0; }

/* ============================================================
   Navigation
   ============================================================ */

.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: 64px;
  display: flex; align-items: center;
  padding: 0 var(--sp-8);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background var(--dur-base) var(--ease-out),
              border-color var(--dur-base) var(--ease-out),
              backdrop-filter var(--dur-base) var(--ease-out);
}
.nav.scrolled {
  background: rgba(248,250,251,0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--slate-200);
}
.nav-brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--navy);
  font-family: var(--font-display);
  font-size: 20px; letter-spacing: -0.01em;
}
.nav-brand:hover { color: var(--navy); text-decoration: none; }
.nav-links {
  display: flex; gap: 28px; margin-left: 48px;
  list-style: none;
}
.nav-links a {
  color: var(--slate-700);
  font-size: var(--fs-body-sm);
  font-weight: var(--fw-regular);
  text-decoration: none;
  transition: color var(--dur-base) var(--ease-out);
}
.nav-links a:hover { color: var(--teal-deep); }
.nav-links a.active { color: var(--teal-deep); font-weight: var(--fw-semibold); }
.nav-cta { margin-left: auto; }

/* Hamburger */
.hamburger {
  display: none; flex-direction: column; gap: 5px;
  cursor: pointer; padding: 8px 10px; border: none; background: none;
  margin-left: auto;
}
.hamburger span {
  display: block; width: 24px; height: 2px;
  background: var(--navy); border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.nav.scrolled .hamburger span { background: var(--navy); }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  overflow: hidden; max-height: 0;
  transition: max-height 0.35s ease;
  background: var(--navy);
  border-top: 1px solid rgba(255,255,255,0.08);
  position: fixed; top: 64px; left: 0; right: 0; z-index: 99;
}
.mobile-menu.open { max-height: 400px; }
.mobile-menu a {
  display: block; color: rgba(255,255,255,0.8);
  text-decoration: none; font-size: 15px; font-weight: 500;
  padding: 13px 32px; border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: color 0.2s, background 0.2s;
}
.mobile-menu a:hover { color: var(--teal-soft); background: rgba(255,255,255,0.04); }
.mobile-menu .mob-cta {
  margin: 12px 32px 16px;
  background: var(--teal-deep); color: var(--white) !important;
  padding: 12px 20px; border-radius: var(--r-btn);
  text-align: center; font-weight: 600;
  border-bottom: none !important;
}
.mobile-menu .mob-cta:hover { background: var(--teal-mid) !important; }

/* ============================================================
   Page banner (inner page hero)
   ============================================================ */

.page-banner {
  background: var(--navy);
  padding: 80px 0 72px;
  position: relative;
  overflow: hidden;
}
.page-banner::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--grid-texture);
  background-size: 48px 48px;
  pointer-events: none;
}
.page-banner::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(50% 60% at 80% 40%, rgba(13,148,136,0.2) 0%, transparent 60%);
  pointer-events: none;
}
.page-banner-inner { position: relative; z-index: 1; }
.breadcrumb {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 24px;
  font-size: var(--fs-caption); color: rgba(255,255,255,0.48);
}
.breadcrumb a { color: rgba(255,255,255,0.48); text-decoration: none; }
.breadcrumb a:hover { color: rgba(255,255,255,0.72); }
.breadcrumb-sep { font-size: 10px; }
.breadcrumb span:last-child { color: rgba(255,255,255,0.72); }
.page-banner h1 {
  font-family: var(--font-display);
  font-size: clamp(36px, 4.5vw, 56px);
  line-height: 1.1;
  letter-spacing: var(--ls-display);
  color: var(--white);
  margin: 0 0 var(--sp-5);
  font-weight: var(--fw-regular);
}
.page-banner .dek {
  font-size: 18px;
  line-height: 1.65;
  color: rgba(255,255,255,0.72);
  max-width: 640px;
  margin: 0;
}

/* ============================================================
   Meta strip (case study pages)
   ============================================================ */

.meta-strip {
  background: var(--white);
  border-top: 1px solid var(--slate-200);
  border-bottom: 1px solid var(--slate-200);
  padding: 28px 0;
}
.meta-strip-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
.meta-label {
  font-size: var(--fs-eyebrow);
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--teal-mid);
  font-weight: var(--fw-semibold);
  margin-bottom: 8px;
  display: block;
}
.meta-value {
  color: var(--slate-700);
  font-size: 15px;
  line-height: 1.4;
}

/* ============================================================
   CTA band (reusable)
   ============================================================ */

.cta-band {
  background: var(--navy);
  padding: var(--section-pad) 0;
  position: relative;
  overflow: hidden;
  text-align: center;
}
.cta-band::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(60% 80% at 50% 50%, rgba(13,148,136,0.25) 0%, rgba(28,46,58,0) 60%);
  pointer-events: none;
}
.cta-band-inner { position: relative; z-index: 1; max-width: 800px; margin: 0 auto; }
.cta-band h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.5vw, 42px);
  line-height: var(--lh-heading);
  letter-spacing: var(--ls-heading);
  color: var(--white);
  margin-bottom: var(--sp-4);
}
.cta-band p { color: rgba(255,255,255,0.72); font-size: 18px; line-height: 1.65; margin-bottom: var(--sp-7); }

/* ============================================================
   Footer
   ============================================================ */

.footer {
  background: var(--navy);
  color: var(--white);
  padding: 64px 0 32px;
  border-top: 1px solid rgba(255,255,255,0.07);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  align-items: flex-start;
  margin-bottom: 48px;
}
.footer-brand-desc {
  color: rgba(255,255,255,0.56);
  font-size: 13px;
  line-height: 1.6;
  margin-top: 14px;
  max-width: 260px;
}
.footer-col-head {
  font-size: var(--fs-eyebrow);
  text-transform: uppercase;
  letter-spacing: var(--ls-eyebrow);
  color: var(--teal-soft);
  font-weight: var(--fw-semibold);
  margin-bottom: 16px;
  display: block;
}
.footer-col ul { list-style: none; display: grid; gap: 10px; }
.footer-col a {
  color: rgba(255,255,255,0.64);
  font-size: var(--fs-body-sm);
  text-decoration: none;
  transition: color var(--dur-base) var(--ease-out);
}
.footer-col a:hover { color: var(--white); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  font-size: var(--fs-caption);
  color: rgba(255,255,255,0.4);
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 768px) {
  :root { --section-pad: 64px; }
  .nav { padding: 0 24px; }
  .nav-links, .nav-cta { display: none; }
  .hamburger { display: flex; }
  .container { padding: 0 24px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .meta-strip-grid { grid-template-columns: 1fr 1fr; gap: 20px; }
  .footer-bottom { flex-direction: column; gap: 6px; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}
