/* ─── CTA section: remove poster image, minimal centered redesign ─────────── */

/* kill the poster ::after on all page variants */
.cta__inner::after,
main:has(#projects) .cta__inner::after,
main:has(#skills) .cta__inner::after {
  display: none !important;
}

/* single-column centered layout */
.cta__inner,
main:has(#projects) .cta__inner,
main:has(#skills) .cta__inner {
  grid-template-columns: 1fr !important;
  grid-template-rows: auto !important;
  max-width: 680px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  text-align: center !important;
  padding: clamp(52px, 8vw, 96px) clamp(32px, 5vw, 64px) !important;
  background:
    radial-gradient(ellipse 80% 50% at 50% 110%, rgba(202,239,145,.10) 0%, transparent 65%) !important;
  border: 1px solid rgba(255,255,255,.08) !important;
  border-radius: 32px !important;
}

/* reset grid placement for all children */
.cta__inner > *,
main:has(#projects) .cta__inner > *,
main:has(#skills) .cta__inner > * {
  grid-column: 1 !important;
  justify-self: center !important;
  text-align: center !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* eyebrow label before the headline */
.cta__inner::before {
  content: "Available for new clients" !important;
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  font-size: .72rem !important;
  font-weight: 600 !important;
  letter-spacing: .07em !important;
  text-transform: uppercase !important;
  color: var(--accent-text) !important;
  margin-bottom: 20px !important;
  justify-content: center !important;
}

/* headline sizing */
.cta__inner > :nth-child(1) {
  grid-row: auto !important;
  max-width: 18ch !important;
  font-size: clamp(2rem, 5vw, 3.2rem) !important;
  line-height: 1.1 !important;
  letter-spacing: -.03em !important;
}

/* body copy */
.cta__inner > :nth-child(2) {
  grid-row: auto !important;
  max-width: 46ch !important;
  margin-top: 20px !important;
  color: var(--text-muted) !important;
  font-size: 1.05rem !important;
  line-height: 1.6 !important;
}

/* CTA button */
.cta__inner > :nth-child(3) {
  grid-row: auto !important;
  margin-top: 36px !important;
  padding: 18px 40px !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  min-width: 220px !important;
  text-align: center !important;
}

/* light theme */
[data-theme=light] .cta__inner,
[data-theme=light] main:has(#projects) .cta__inner,
[data-theme=light] main:has(#skills) .cta__inner {
  background:
    radial-gradient(ellipse 80% 50% at 50% 110%, rgba(202,239,145,.18) 0%, transparent 65%) !important;
  border-color: rgba(0,0,0,.07) !important;
}

/* ─── Global: Social links order — Email · WhatsApp · Instagram · X/Twitter ── */
.footer__socials { display: flex !important; }
.footer__socials a[aria-label="Email"]      { order: 1 !important; }
.footer__socials a[aria-label="WhatsApp"]   { order: 2 !important; }
.footer__socials a[aria-label="Instagram"]  { order: 3 !important; }
.footer__socials a[aria-label="X / Twitter"]{ order: 4 !important; }
.footer__socials a[aria-label="Medium"]     { order: 5 !important; }

/* ─── Mobile only: Locations col — invisible, links kept for SEO ─────────── */
@media (max-width: 860px) {
  .footer__col:nth-child(2) {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }
}

/* ─── Global: Popular Guides col — invisible, links kept for SEO ──────────── */
.footer__col--guides {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* ─── Global: Remove "Let's Build Together" contact poster ──────────────── */
.contact__info::after {
  display: none !important;
}

/* ─── Global: PERFORMANCE MARKETER watermark — both words readable ───────── */
[data-theme=dark] .footer__big {
  background-image: linear-gradient(180deg,
    rgba(255,255,255,.19) 0%,
    rgba(255,255,255,.19) 72%,
    rgba(255,255,255,.12) 87%,
    rgba(255,255,255,.07) 100%) !important;
}

/* ─── Global: Footer bottom bar — more legible credits ──────────────────── */
.footer__bottom p,
.footer__bottom .footer__credit {
  color: rgba(255,255,255,0.45) !important;
}
[data-theme=light] .footer__bottom p,
[data-theme=light] .footer__bottom .footer__credit {
  color: rgba(0,0,0,0.45) !important;
}

/* ─── Global: Hide CTA col (contact poster area) on all screens ─────────── */
.footer__col.footer__col--contact {
  display: none !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   DESKTOP  (min-width: 861px) — Make-Believe layout
   Row 1: Social strip — full width (spans brand + nav + locations)
   Row 2: Brand (col 1) │ Nav (col 2) │ Locations (col 3)
   ═══════════════════════════════════════════════════════════════════════════ */
@media (min-width: 861px) {

  /* 1 ▸ Footer top → 3-col grid so social row spans the full footer width */
  .footer__top {
    display: grid !important;
    grid-template-columns: 260px 1fr 1fr !important;
    column-gap: 56px !important;
    row-gap: 0 !important;
    align-items: start !important;
  }

  /* 2 ▸ Brand — col 1, row 2: logo + 2-line tagline */
  .footer__brand {
    grid-column: 1 !important;
    grid-row: 2 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    border-bottom: none !important;
    padding: 32px 0 0 !important;
    margin-bottom: 0 !important;
    gap: 0 !important;
  }

  .footer__brand img {
    width: 150px !important;
    height: auto !important;
  }

  /* Show tagline under logo — full text, no clamp, sentence case */
  .footer__brand span {
    position: static !important;
    left: auto !important;
    width: 100% !important;
    max-width: 200px !important;
    height: auto !important;
    overflow: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    display: block !important;
    margin-top: 16px !important;
    font-size: 11px !important;
    font-weight: 400 !important;
    line-height: 1.8 !important;
    color: rgba(255,255,255,0.35) !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
  }
  .footer__brand span em {
    font-style: normal !important;
  }
  [data-theme=light] .footer__brand span {
    color: rgba(0,0,0,0.35) !important;
  }

  /* 3 ▸ Cols — display:contents so children join footer__top's grid */
  .footer__cols {
    display: contents !important;
  }

  /* 4 ▸ Social strip — spans ALL 3 cols, row 1 (above logo + nav + locations) */
  .footer__col:nth-child(3) {
    grid-column: 1 / -1 !important;
    grid-row: 1 !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    padding: 0 0 20px !important;
    border-top: none !important;
    border-bottom: 1px solid rgba(255,255,255,.07) !important;
    gap: 0 !important;
    margin-bottom: 0 !important;
  }

  .footer__col:nth-child(3) .footer__col-title {
    display: none !important;
  }

  .footer__col:nth-child(3) .footer__socials {
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 16px !important;
    align-items: center !important;
  }

  .footer__col:nth-child(3) .footer__socials a {
    width: auto !important;
    height: auto !important;
    min-width: unset !important;
    border-radius: 0 !important;
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
  }

  .footer__col:nth-child(3) .footer__socials a svg {
    display: none !important;
  }

  /* Exact Make-Believe values: 14px, weight 700, rgba(255,255,255,0.6) */
  .footer__col:nth-child(3) .footer__socials a::before {
    content: attr(aria-label) !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    letter-spacing: 0 !important;
    color: rgba(255,255,255,0.6) !important;
    text-transform: none !important;
  }

  .footer__col:nth-child(3) .footer__socials a:hover::before {
    color: rgba(255,255,255,1) !important;
  }

  /* 5 ▸ Nav links — col 2, row 2, flush top, 22px/400 */
  .footer__col:first-child {
    grid-column: 2 !important;
    grid-row: 2 !important;
    padding-top: 32px !important;
    padding-bottom: 0 !important;
    padding-left: 32px !important;
    margin-top: 0 !important;
    border-top: none !important;
    align-self: start !important;
  }

  .footer__col:first-child .footer__col-title {
    display: none !important;
  }

  .footer__col:first-child .footer__nav {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    gap: 4px !important;
  }

  /* Exact Make-Believe values: 22px, weight 400, letter-spacing -0.6px */
  .footer__col:first-child .footer__nav a {
    padding: 0 !important;
    font-size: 22px !important;
    font-weight: 400 !important;
    letter-spacing: -0.6px !important;
    line-height: 1.1 !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    color: rgba(255,255,255,.85) !important;
    transform: none !important;
  }

  .footer__col:first-child .footer__nav a:hover {
    color: #fff !important;
    background: transparent !important;
    transform: none !important;
  }

  /* ── Light mode (desktop) ── */
  [data-theme=light] .footer__col:nth-child(3) {
    border-bottom-color: rgba(0,0,0,.07) !important;
  }

  [data-theme=light] .footer__col:nth-child(3) .footer__socials a::before {
    color: rgba(0,0,0,.55) !important;
  }

  [data-theme=light] .footer__col:nth-child(3) .footer__socials a:hover::before {
    color: rgba(0,0,0,1) !important;
  }

  [data-theme=light] .footer__col:first-child .footer__nav a {
    color: rgba(0,0,0,.75) !important;
  }

  [data-theme=light] .footer__col:first-child .footer__nav a:hover {
    color: #000 !important;
  }

  [data-theme=light] .footer__brand img {
    opacity: 1 !important;
  }

  /* 6 ▸ Locations col — col 3, row 2, visible on desktop */
  .footer__col:nth-child(2) {
    position: static !important;
    left: auto !important;
    width: 100% !important;
    max-height: 230px !important;
    overflow: hidden !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    grid-column: 3 !important;
    grid-row: 2 !important;
    padding: 32px 0 0 !important;
    margin-top: 0 !important;
    border: none !important;
    align-self: start !important;
    max-height: none !important;
    overflow: visible !important;
  }

  .footer__col:nth-child(2) .footer__col-title {
    display: none !important;
  }

  .footer__col:nth-child(2) .footer__nav {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
  }

  .footer__col:nth-child(2) .footer__nav a {
    padding: 0 !important;
    font-size: 15px !important;
    font-weight: 400 !important;
    letter-spacing: -0.3px !important;
    line-height: 1.3 !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    color: rgba(255,255,255,.45) !important;
    transform: none !important;
  }

  .footer__col:nth-child(2) .footer__nav a:hover {
    color: rgba(255,255,255,.85) !important;
    background: transparent !important;
    transform: none !important;
  }

  [data-theme=light] .footer__col:nth-child(2) .footer__nav a {
    color: rgba(0,0,0,.4) !important;
  }

  [data-theme=light] .footer__col:nth-child(2) .footer__nav a:hover {
    color: rgba(0,0,0,.8) !important;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   MOBILE  (max-width: 860px) — Make-Believe layout
   Layout (top → bottom): Social strip → Logo → Nav → Bottom bar
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 860px) {

  /* 1 ▸ Outer layout: flex column, brand first */
  .footer__top {
    display: flex !important;
    flex-direction: column !important;
  }

  /* 2 ▸ Brand — logo AFTER social strip */
  .footer__brand {
    order: -10 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    border-bottom: none !important;
    border-top: none !important;
    padding: 24px 0 !important;
    margin-bottom: 0 !important;
    gap: 0 !important;
  }

  .footer__brand img {
    width: 60px !important;
    height: auto !important;
  }

  /* Hide services tagline text — kept in DOM for SEO */
  .footer__brand span {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }

  /* 3 ▸ Cols — display:contents so children join footer__top's flex order */
  .footer__cols {
    display: contents !important;
  }

  .footer__col {
    width: 100% !important;
    padding: 20px 0 !important;
    border-top: 1px solid rgba(255,255,255,.07) !important;
    gap: 10px !important;
    align-items: flex-start !important;
  }

  /* 4 ▸ Social strip — FIRST (order -20, before brand at -10) */
  .footer__col:nth-child(3) {
    order: -20 !important;
    border-top: none !important;
    padding-top: 0 !important;
    padding-bottom: 20px !important;
    border-bottom: 1px solid rgba(255,255,255,.07) !important;
    gap: 0 !important;
  }

  .footer__col:nth-child(3) .footer__col-title {
    display: none !important;
  }

  .footer__col:nth-child(3) .footer__socials {
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 16px !important;
    align-items: center !important;
  }

  .footer__col:nth-child(3) .footer__socials a {
    width: auto !important;
    height: auto !important;
    min-width: unset !important;
    border-radius: 0 !important;
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
  }

  .footer__col:nth-child(3) .footer__socials a svg {
    display: none !important;
  }

  /* Exact Make-Believe values: 14px, weight 700, rgba(255,255,255,0.6) */
  .footer__col:nth-child(3) .footer__socials a::before {
    content: attr(aria-label) !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    letter-spacing: 0 !important;
    color: rgba(255,255,255,0.6) !important;
  }

  .footer__col:nth-child(3) .footer__socials a:hover::before {
    color: rgba(255,255,255,1) !important;
  }

  /* 5 ▸ Navigate — after brand (order 0, brand is -10) */
  .footer__col:first-child {
    order: 0 !important;
    padding-top: 20px !important;
    border-top: 1px solid rgba(255,255,255,.07) !important;
  }

  .footer__col:first-child .footer__col-title {
    display: none !important;
  }

  .footer__col:first-child .footer__nav {
    display: flex !important;
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    gap: 4px !important;
  }

  /* Exact Make-Believe values: 22px, weight 400, letter-spacing -0.6px */
  .footer__col:first-child .footer__nav a {
    padding: 0 !important;
    font-size: 22px !important;
    font-weight: 400 !important;
    letter-spacing: -0.6px !important;
    line-height: 1.1 !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    color: rgba(255,255,255,.85) !important;
    transform: none !important;
  }

  .footer__col:first-child .footer__nav a:hover {
    color: #fff !important;
    background: transparent !important;
    transform: none !important;
  }

  /* 6 ▸ Guides — hidden globally but keep order for SEO links */
  .footer__col--guides {
    order: 1 !important;
  }

  /* 7 ▸ Bottom bar */
  .footer__bottom {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 4px !important;
    padding-top: 18px !important;
  }

  .footer__bottom p,
  .footer__credit {
    font-size: 0.72rem !important;
    opacity: 0.5 !important;
  }

  /* ── Light mode (mobile) ── */
  [data-theme=light] .footer__col {
    border-top-color: rgba(0,0,0,.07) !important;
  }

  [data-theme=light] .footer__col:nth-child(3) {
    border-bottom-color: rgba(0,0,0,.07) !important;
  }

  [data-theme=light] .footer__col:nth-child(3) .footer__socials a::before {
    color: rgba(0,0,0,.55) !important;
  }

  [data-theme=light] .footer__col:nth-child(3) .footer__socials a:hover::before {
    color: rgba(0,0,0,1) !important;
  }

  [data-theme=light] .footer__col:first-child .footer__nav a {
    color: rgba(0,0,0,.8) !important;
    background: transparent !important;
    border: none !important;
  }

  [data-theme=light] .footer__col:first-child .footer__nav a:hover {
    color: #000 !important;
    background: transparent !important;
  }
}
