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

:root {
  --navy:   #25284C;
  --cream:  #F6F1E7;
  --mint:   #E6FFC9;
  --sky:    #A0E6F3;
  --teal:   #E3F4F8;
  --cyan:   #00D7FF;
  --gray:   #6B7280;
  --grad:   linear-gradient(135deg, #E6FFC9 0%, #A0E6F3 100%);
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Inter Tight', sans-serif;
  color: var(--navy);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }

/* HERO shell, shared design system */
.hero {
  background: linear-gradient(135deg, #b8f0d8 0%, #c8effa 50%, #a8e4f5 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 36px 24px 0;
  position: relative;
  overflow: hidden;
}
.hero.blog-hero { min-height: 0; padding-bottom: 110px; }

.hero-waves {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 70%;
  background: url('../img/s88-header-image.jpg') center bottom / cover no-repeat;
  opacity: 0.85;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.28) 24%, rgba(0,0,0,0.7) 42%, black 56%);
  mask-image: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.28) 24%, rgba(0,0,0,0.7) 42%, black 56%);
}

/* Pill nav */
.nav-pill {
  display: flex;
  align-items: center;
  gap: 0;
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.75);
  border-radius: 100px;
  padding: 12px 12px 12px 26px;
  width: 100%;
  max-width: 900px;
  position: relative;
  z-index: 10;
  box-shadow: 0 4px 24px rgba(37,40,76,0.08);
}
.nav-logo { height: 26px; width: auto; display: block; margin-right: auto; flex-shrink: 0; }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; }
.nav-links a {
  font-size: 16px;
  font-weight: 500;
  color: var(--navy);
  padding: 9px 21px;
  border-radius: 100px;
  transition: background 0.2s;
}
.nav-links a:hover { background: rgba(37,40,76,0.06); }
.nav-links a.active-page { background: rgba(37,40,76,0.06); }
.nav-links .services-link { display: flex; align-items: center; gap: 4px; }
.nav-links .services-link svg { opacity: 0.5; transition: transform 0.2s; }
.nav-links li:hover .services-link svg { transform: rotate(180deg); }
.nav-cta {
  background: var(--navy) !important;
  color: #fff !important;
  padding: 9px 23px !important;
  border-radius: 100px !important;
  font-weight: 600 !important;
}
.nav-links li { position: relative; }

/* Mega menu */
.mega-menu {
  display: none;
  position: absolute;
  top: 100%; left: 50%;
  transform: translateX(-50%);
  width: 660px;
  padding-top: 10px;
  z-index: 100;
}
.nav-links li:hover .mega-menu { display: block; }
.mega-inner {
  background: #fff;
  border: 1px solid rgba(37,40,76,0.09);
  border-radius: 20px;
  box-shadow: 0 16px 48px rgba(37,40,76,0.12);
  padding: 8px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}
.mega-item {
  padding: 22px 24px;
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: background 0.18s;
  cursor: pointer;
}
.mega-item:hover { background: #F6F1E7; }
.nav-links a.mega-item { display: flex; padding: 22px 24px; border-radius: 14px; }
.nav-links a.mega-item:hover { background: #F6F1E7; }
.mega-num {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--cyan);
}
.mega-title { font-size: 16px; font-weight: 700; color: var(--navy); letter-spacing: -0.01em; line-height: 1.3; }
.mega-desc { font-size: 14px; color: var(--gray); line-height: 1.5; }
.mega-menu-footer {
  grid-column: 1 / -1;
  border-top: 1px solid rgba(37,40,76,0.07);
  margin-top: 4px;
  padding: 14px 16px 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.mega-menu-footer span { font-size: 14px; color: var(--gray); }
.mega-menu-footer a {
  font-size: 14px; font-weight: 600; color: var(--navy);
  display: flex; align-items: center; gap: 6px;
  padding: 0 !important; border-radius: 0 !important;
}
.mega-menu-footer a:hover { background: none !important; opacity: 0.65; }

/* Simple dropdown */
.simple-dropdown {
  display: none;
  position: absolute;
  top: 100%; left: 50%;
  transform: translateX(-50%);
  padding-top: 10px;
  z-index: 100;
  min-width: 160px;
}
.nav-links li:hover .simple-dropdown { display: block; }
.simple-inner {
  background: #fff;
  border: 1px solid rgba(37,40,76,0.09);
  border-radius: 14px;
  box-shadow: 0 12px 36px rgba(37,40,76,0.1);
  padding: 6px;
  display: flex;
  flex-direction: column;
}
.simple-dropdown a {
  font-size: 15px !important; font-weight: 500 !important; color: var(--navy) !important;
  padding: 10px 18px !important; border-radius: 10px !important;
  white-space: nowrap; display: block;
}
.simple-dropdown a:hover { background: #F6F1E7 !important; }

/* Hero content */
.hero-content {
  position: relative;
  z-index: 5;
  text-align: center;
  max-width: 1080px;
  padding: 70px 0 0;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--navy);
  opacity: 0.65;
  margin-bottom: 22px;
  padding: 7px 16px;
  background: rgba(255,255,255,0.4);
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: 100px;
}
.hero-content h1 {
  font-family: 'IBM Plex Mono', monospace;
  font-size: clamp(32px, 4vw, 50px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--navy);
  margin-bottom: 26px;
}
.hero-content p {
  font-size: 17px;
  line-height: 1.7;
  color: var(--navy);
  opacity: 0.75;
  max-width: 680px;
  margin: 0 auto;
}

/* Shared section label */
.sec-label {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 20px;
  font-family: 'IBM Plex Mono', monospace;
}

/* ===== FEATURED POST (overlaps hero like stat cards) ===== */
.featured-wrap {
  padding: 0 80px;
  margin-top: -70px;
  position: relative;
  z-index: 6;
}
.featured-card {
  display: grid;
  grid-template-columns: 6fr 5fr;
  background: #fff;
  border: 1px solid rgba(37,40,76,0.08);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 14px 40px rgba(37,40,76,0.10);
  transition: transform 0.2s, box-shadow 0.2s;
}
.featured-card:hover { transform: translateY(-4px); box-shadow: 0 22px 56px rgba(37,40,76,0.14); }
.featured-thumb {
  position: relative;
  min-height: 340px;
  display: flex;
  align-items: flex-end;
  padding: 24px 28px;
}
/* Replace the gradient div with an <img> when a real post image exists.
   One image per post: used here as the thumbnail AND on the post page as the hero. 16:9, ~1600x900px. */
.featured-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.featured-thumb .thumb-mark { position: relative; z-index: 1; 
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--navy);
  background: rgba(255,255,255,0.55);
  border: 1px solid rgba(255,255,255,0.7);
  backdrop-filter: blur(8px);
  padding: 7px 14px;
  border-radius: 100px;
}
.featured-body {
  padding: 48px 52px 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.featured-flag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 16px;
}
.featured-flag .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); }
.featured-body h2 {
  font-size: clamp(24px, 2.4vw, 32px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.18;
  margin-bottom: 16px;
}
.featured-body > p {
  font-size: 16px;
  color: var(--gray);
  line-height: 1.7;
  margin-bottom: 24px;
}
.post-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  color: var(--gray);
  margin-bottom: 26px;
}
.post-meta .sep { opacity: 0.4; }
.read-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
  border-bottom: 1.5px solid var(--cyan);
  padding-bottom: 3px;
  align-self: flex-start;
  transition: opacity 0.2s;
}
.read-link:hover { opacity: 0.65; }

/* Thumbnail gradient placeholders, one per category */
.th-paid   { background: linear-gradient(135deg, #E6FFC9 0%, #A0E6F3 100%); }
.th-email  { background: linear-gradient(135deg, #C8FFDE 0%, #ADEDF9 100%); }
.th-cro    { background: linear-gradient(135deg, #A0E6F3 0%, #E3F4F8 100%); }
.th-growth { background: linear-gradient(135deg, #F6F1E7 0%, #E6FFC9 100%); }
.thumb-orb::before {
  content: '';
  position: absolute;
  top: -60px; right: -40px;
  width: 260px; height: 260px;
  background: radial-gradient(circle, rgba(255,255,255,0.55) 0%, transparent 65%);
  pointer-events: none;
}

/* ===== FILTER BAR ===== */
.filter-wrap {
  padding: 72px 80px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.filter-wrap h2 {
  font-size: clamp(24px, 2.4vw, 32px);
  font-weight: 800;
  letter-spacing: -0.03em;
}
.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-btn {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--navy);
  background: #fff;
  border: 1px solid rgba(37,40,76,0.16);
  border-radius: 100px;
  padding: 9px 18px;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s;
}
.filter-btn:hover { background: var(--cream); }
.filter-btn.active {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

/* ===== POST GRID ===== */
.post-grid-wrap { padding: 36px 80px 40px; }
.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.post-card {
  background: #fff;
  border: 1px solid rgba(37,40,76,0.08);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 48px rgba(37,40,76,0.10);
  border-color: rgba(0,215,255,0.3);
}
.post-card.hidden { display: none; }
/* Replace the gradient div with an <img> when a real post image exists (same image as post hero, 16:9). */
.post-thumb {
  aspect-ratio: 16 / 9;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 14px 18px;
}
.post-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.post-thumb .thumb-mark {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--navy);
  background: rgba(255,255,255,0.55);
  border: 1px solid rgba(255,255,255,0.7);
  backdrop-filter: blur(8px);
  padding: 6px 12px;
  border-radius: 100px;
  position: relative;
  z-index: 1;
}
.post-body {
  padding: 24px 26px 28px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.post-body h3 {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin-bottom: 12px;
}
.post-body > p {
  font-size: 14.5px;
  color: var(--gray);
  line-height: 1.65;
  margin-bottom: 18px;
  flex-grow: 1;
}
.post-body .post-meta { margin-bottom: 0; font-size: 12.5px; }

/* CTA */
.cta-wrap { padding: 90px 80px; }
.cta-box {
  background: var(--navy);
  border-radius: 24px;
  padding: 72px 80px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 48px;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.cta-box::before {
  content: '';
  position: absolute;
  top: -100px; right: -100px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(160,230,243,0.14) 0%, transparent 65%);
  pointer-events: none;
}
.cta-box::after {
  content: '';
  position: absolute;
  bottom: -80px; left: 200px;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(230,255,201,0.08) 0%, transparent 65%);
  pointer-events: none;
}
.cta-text h2 {
  font-size: clamp(24px, 2.5vw, 36px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #fff;
  line-height: 1.15;
  margin-bottom: 14px;
}
.cta-text p {
  font-size: 16px;
  color: rgba(255,255,255,0.5);
  line-height: 1.65;
  max-width: 500px;
}
.btn-grad {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--grad);
  color: var(--navy);
  padding: 15px 30px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn-grad:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,215,255,0.18); }

/* Footer */
footer { padding: 64px 80px 40px; border-top: 1px solid rgba(37,40,76,0.07); }
.footer-grid {
  display: grid;
  grid-template-columns: 2.5fr 1fr 1fr 1fr;
  gap: 64px;
  margin-bottom: 56px;
}
.footer-logo { height: 40px; width: auto; display: block; margin-bottom: 16px; }
.footer-tagline { font-size: 14.5px; color: var(--gray); line-height: 1.65; max-width: 240px; }
.footer-col h5 {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 18px;
  font-family: 'IBM Plex Mono', monospace;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 11px; }
.footer-col a { font-size: 14.5px; color: var(--gray); transition: color 0.18s; }
.footer-col a:hover { color: var(--navy); }
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid rgba(37,40,76,0.07);
  font-size: 13.5px;
  color: var(--gray);
  font-family: 'IBM Plex Mono', monospace;
}
.footer-legal { display: flex; gap: 20px; }
.footer-legal a { color: var(--gray); transition: color 0.18s; }
.footer-legal a:hover { color: var(--navy); }

/* Responsive */
@media (max-width: 900px) {
  .nav-links li:not(:last-child) { display: none; }
  .featured-wrap { padding: 0 28px; margin-top: -50px; }
  .featured-card { grid-template-columns: 1fr; }
  .featured-thumb { min-height: 220px; }
  .featured-body { padding: 32px 28px; }
  .filter-wrap { padding: 56px 28px 0; }
  .post-grid-wrap { padding: 28px 28px 24px; }
  .post-grid { grid-template-columns: 1fr; }
  .cta-box { grid-template-columns: 1fr; text-align: left; }
  .cta-wrap { padding: 60px 28px; }
  footer { padding: 48px 28px 32px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
}

/* ===== S88 MOBILE THEME (shared) ===== */
/* Heading wrap control: no <br> in headings; width + balance handle wrapping */
.hero h1 { margin-left: auto; margin-right: auto; text-wrap: balance; }
.nav-pill > a.nav-home { margin-right: auto; display: block; flex-shrink: 0; }
.nav-links a.mega-item.active { background: #F6F1E7; box-shadow: inset 0 0 0 1.5px rgba(0,215,255,0.4); }
.nav-burger { display: none; }
.mobile-menu { display: none; }
@media (max-width: 900px) {
  .nav-pill { padding: 10px 10px 10px 20px; }
  .nav-links { display: none !important; }
  .hero h1 { max-width: 75%; }
  .nav-burger {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    border: 0;
    background: var(--navy);
    border-radius: 100px;
    cursor: pointer;
    flex-shrink: 0;
  }
  .nav-burger span { display: block; width: 18px; height: 2px; background: #fff; border-radius: 2px; transition: transform 0.25s, opacity 0.2s; }
  body.mm-open .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  body.mm-open .nav-burger span:nth-child(2) { opacity: 0; }
  body.mm-open .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  body.mm-open .mobile-menu { display: flex; }
  .mobile-menu {
    width: 100%;
    max-width: 900px;
    margin-top: 10px;
    position: relative;
    z-index: 9;
    flex-direction: column;
    gap: 2px;
    background: rgba(255,255,255,0.72);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.8);
    border-radius: 24px;
    padding: 10px;
    box-shadow: 0 12px 36px rgba(37,40,76,0.10);
  }
  .mobile-menu a, .mobile-menu summary {
    font-size: 16px;
    font-weight: 600;
    color: var(--navy);
    padding: 14px 18px;
    border-radius: 14px;
    display: block;
    cursor: pointer;
  }
  .mobile-menu a:active, .mobile-menu summary:active { background: rgba(37,40,76,0.06); }
  .mm-group summary { list-style: none; display: flex; justify-content: space-between; align-items: center; }
  .mm-group summary::-webkit-details-marker { display: none; }
  .mm-group summary::after { content: '+'; font-family: 'IBM Plex Mono', monospace; font-size: 18px; color: var(--cyan); }
  .mm-group[open] summary::after { content: '\2013'; }
  .mm-sub { display: flex; flex-direction: column; padding: 0 6px 6px; }
  .mm-sub a { font-weight: 500; font-size: 15px; padding: 11px 16px; color: var(--gray); }
  .mm-cta { background: var(--navy); color: #fff !important; text-align: center; margin-top: 6px; }
}
@media (max-width: 640px) {
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 10px; text-align: center; }
  .btn-grad, .btn-solid, .hero-btn { width: 100%; justify-content: center; }
  .hero h1 { font-size: clamp(24px, 7vw, 32px); max-width: 100%; }
}
