/* Panda — shared styles */

/* ── Nexa (self-hosted) ───────────────────────────────────────────────
   FONT FILES: place the four files below inside:
     /wp-content/plugins/tbps-theme-settings/assets/fonts/
       nexa-regular.woff2
       nexa-regular.woff
       nexa-bold.woff2
       nexa-bold.woff

   LICENSE: Nexa is a commercial typeface by Fontfabric.
   You must purchase a web license before deploying to production.
   → https://www.fontfabric.com/fonts/nexa/

   The old cdnfonts.com import has been removed; self-hosting gives you
   full control over caching, GDPR compliance, and licence compliance.
   -------------------------------------------------------------------- */
@font-face {
  font-family: 'Nexa';
  src: url('fonts/nexa-regular.woff2') format('woff2'),
       url('fonts/nexa-regular.woff')  format('woff');
  font-weight: 400;
  font-style:  normal;
  font-display: swap;
}
@font-face {
  font-family: 'Nexa';
  src: url('fonts/nexa-bold.woff2') format('woff2'),
       url('fonts/nexa-bold.woff')  format('woff');
  font-weight: 700;
  font-style:  normal;
  font-display: swap;
}

@import url("https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,400;12..96,500;12..96,600;12..96,700;12..96,800&family=Instrument+Serif:ital@0;1&family=JetBrains+Mono:wght@400;500&display=swap");

/* ── Shared design-system tokens (used by header, footer, and all templates) ── */
:root {
  --bg: #f4f1ea;
  --bg-soft: #ece8df;
  --ink: #0d0d0d;
  --ink-soft: #2a2a2a;
  --muted: #6b6862;
  --line: rgba(13, 13, 13, 0.14);
  --line-soft: rgba(13, 13, 13, 0.07);
  --accent: #000;
  --studio: #fff;
  --accent-deep: #000;
  --display: "Bricolage Grotesque", system-ui, sans-serif;
  --serif: "Instrument Serif", serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  /* --body controls paragraph / body-copy text only (not headings or UI).
     Extend the selector block below if you add more body-copy classes. */
  --body: "Nexa", "Bricolage Grotesque", system-ui, sans-serif;
  --max: 1440px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
}
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--display);
  font-feature-settings: "ss01", "ss02";
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  line-height: 1.3;
}

/* ── Nexa: paragraph / body-copy text only ───────────────────────────
   To add more body-copy elements later, extend this selector list.
   DO NOT add body, h1-h6, button, input, nav, or .mono here.
   -------------------------------------------------------------------- */
p,
blockquote,
li,
.body-text,
.lead,
.hero-desc,
.description,
.caption,
.stack-card-desc,
.caps-intro,
.hero-desc {
  font-family: var(--body);
}
.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 32px;
}

/* ── Hide Astra's default header ─────────────────────────────────── */
/* Scope to header/div elements only — Astra adds .ast-header-break-point
   as a body class on mobile, so a bare class selector would hide the body. */
header#masthead,
header.site-header,
div.ast-desktop-header {
  display: none !important;
}

/* ── Outer wrapper ───────────────────────────────────────────────── */
.tbps-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  padding: 14px 20px;
  pointer-events: none;
  /* Explicitly own the font so page-specific CSS can't bleed in */
  font-family: var(--display);
  -webkit-font-smoothing: antialiased;
}

/* ── Inner pill container ────────────────────────────────────────── */
.tbps-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1100px;
  margin: 0 auto;
  border-radius: 60px;
  padding: 10px 10px 10px 20px;
  pointer-events: all;
  gap: 16px;
  position: relative;
  /* Gradient border using background-clip trick */
  border: 2.5px solid transparent;
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(
        135deg,
        #e0e0e0 0%,
        #888888 25%,
        #111111 50%,
        #888888 75%,
        #e0e0e0 100%
      )
      border-box;
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.1),
    0 12px 32px rgba(0, 0, 0, 0.16),
    0 24px 56px rgba(0, 0, 0, 0.1);
}

/* ── Logo ────────────────────────────────────────────────────────── */
.tbps-header-logo {
  flex-shrink: 0;
}

.tbps-header-logo a {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.tbps-logo-img {
  height: 36px;
  width: auto;
  display: block;
}

.tbps-site-name {
  font-size: 18px;
  font-weight: 700;
  color: #111;
  letter-spacing: -0.3px;
  white-space: nowrap;
}

/* ── Navigation ──────────────────────────────────────────────────── */
.tbps-header-nav {
  flex: 1;
  display: flex;
  justify-content: center;
}

.tbps-nav-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}

.tbps-nav-menu > li {
  position: relative;
}

.tbps-nav-menu > li > a,
.tbps-nav-menu > li > a:visited {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 14px;
  font-size: 14.5px;
  font-weight: 500;
  color: #333;
  text-decoration: none;
  border-radius: 40px;
  transition:
    background 0.15s ease,
    color 0.15s ease;
  white-space: nowrap;
}

.tbps-nav-menu > li > a:hover,
.tbps-nav-menu > li:hover > a {
  background: #f4f4f4;
  color: #111;
}

.tbps-nav-menu > li.tbps-active > a,
.tbps-nav-menu > li.current-menu-item > a,
.tbps-nav-menu > li.current-page-ancestor > a {
  background: #111 !important;
  color: #fff !important;
  font-weight: 600;
}

.tbps-nav-menu > li.tbps-active > a:hover,
.tbps-nav-menu > li.current-menu-item > a:hover,
.tbps-nav-menu > li.current-page-ancestor > a:hover {
  background: #222 !important;
  color: #fff !important;
}

/* Dropdown arrow icon */
.tbps-dropdown-icon {
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.tbps-nav-menu > li:hover .tbps-dropdown-icon,
.tbps-nav-menu > li.tbps-open .tbps-dropdown-icon {
  transform: rotate(180deg);
}

/* ── Dropdown sub-menu ───────────────────────────────────────────── */
.tbps-nav-menu .sub-menu {
  list-style: none;
  margin: 0;
  padding: 8px;
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 180px;
  background: #fff;
  border-radius: 16px;
  box-shadow:
    0 8px 30px rgba(0, 0, 0, 0.12),
    0 0 0 1px rgba(0, 0, 0, 0.06);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.18s ease,
    transform 0.18s ease,
    visibility 0.18s;
  transform: translateX(-50%) translateY(-6px);
}

.tbps-nav-menu > li:hover .sub-menu,
.tbps-nav-menu > li.tbps-open .sub-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: all;
  transform: translateX(-50%) translateY(0);
}

.tbps-nav-menu .sub-menu li a,
.tbps-nav-menu .sub-menu li a:visited {
  display: block;
  padding: 9px 14px;
  font-size: 14px;
  font-weight: 500;
  color: #444;
  text-decoration: none;
  border-radius: 10px;
  transition:
    background 0.12s ease,
    color 0.12s ease;
  white-space: nowrap;
}

.tbps-nav-menu .sub-menu li a:hover {
  background: #f4f4f4;
  color: #111;
}

/* ── Header Right ────────────────────────────────────────────────── */
.tbps-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* ── CTA Button ──────────────────────────────────────────────────── */
.tbps-header-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: #111;
  color: #fff !important;
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
  border-radius: 40px;
  white-space: nowrap;
  transition:
    background 0.15s ease,
    transform 0.12s ease;
  letter-spacing: -0.1px;
}

.tbps-header-btn:hover {
  background: #222;
  transform: translateY(-1px);
  color: #fff !important;
}

@keyframes tbps-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.25);
  }
  50% {
    box-shadow: 0 0 0 5px rgba(34, 197, 94, 0.12);
  }
}

/* ── Hamburger (mobile) ──────────────────────────────────────────── */
.tbps-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  transition: background 0.15s ease;
}

.tbps-hamburger:hover {
  background: #f4f4f4;
}

.tbps-hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: #111;
  border-radius: 2px;
  transition:
    transform 0.25s ease,
    opacity 0.25s ease;
  transform-origin: center;
}

.tbps-hamburger.tbps-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.tbps-hamburger.tbps-open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.tbps-hamburger.tbps-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── Mobile Menu ─────────────────────────────────────────────────── */
.tbps-mobile-menu {
  display: none;
  max-width: 1100px;
  margin: 10px auto 0;
  background: #fff;
  border-radius: 20px;
  padding: 16px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
  pointer-events: all;
}

.tbps-mobile-menu.tbps-open {
  display: block;
}

.tbps-mobile-nav-menu {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
}

.tbps-mobile-nav-menu li a {
  display: block;
  padding: 11px 14px;
  font-size: 15px;
  font-weight: 500;
  color: #333;
  text-decoration: none;
  border-radius: 10px;
  transition: background 0.12s ease;
}

.tbps-mobile-nav-menu li a:hover {
  background: #f4f4f4;
  color: #111;
}

.tbps-mobile-nav-menu li.tbps-active > a,
.tbps-mobile-nav-menu li.current-menu-item > a,
.tbps-mobile-nav-menu li.current-page-ancestor > a {
  background: #111 !important;
  color: #fff !important;
  font-weight: 600;
}

.tbps-mobile-nav-menu .sub-menu {
  list-style: none;
  padding: 0 0 0 14px;
  margin: 0;
}

.tbps-mobile-nav-menu .sub-menu li a {
  font-size: 14px;
  color: #666;
  padding: 8px 14px;
}

.tbps-mobile-btn {
  width: 100%;
  justify-content: center;
}

/* ── Offset page content so it starts below the header ──────────── */
body {
  padding-top: 80px !important;
}

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .tbps-header {
    padding: 12px 14px;
  }

  .tbps-header-inner {
    padding: 8px 8px 8px 16px;
  }

  .tbps-header-nav {
    display: none;
  }

  .tbps-header-btn:not(.tbps-mobile-btn) {
    display: none;
  }

  .tbps-hamburger {
    display: flex;
  }
}

/* ═══════════════════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════════════════ */
.tbps-footer {
  background: var(--bg);
  font-family: var(--display);
  margin-top: 80px;
}

/* Top section: brand + 3 nav columns */
.tbps-footer-inner {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 80px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 72px 32px 72px;
  border-bottom: 1px solid var(--line);
}

/* Brand column */
.tbps-footer-brand {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tbps-footer-logo-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.tbps-footer-logo-img {
  /* height: 32px; */
  width: auto;
  display: block;
}

.tbps-footer-site-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.3px;
}

.tbps-footer-tagline {
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--muted);
  max-width: 280px;
  margin: 0;
}

/* Nav columns */
.tbps-footer-nav {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

/* Widget title (set in the widget admin panel) */
.tbps-footer-col .tbps-footer-col-title,
.tbps-footer-col h4 {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 20px;
}

/* Nav menu widget: WordPress wraps <ul> in an extra <div> container */
.tbps-footer-col .menu,
.tbps-footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.tbps-footer-col .menu li,
.tbps-footer-col ul li {
  margin: 0;
  padding: 0;
}

.tbps-footer-col .menu li a,
.tbps-footer-col ul li a {
  font-size: 15px;
  font-weight: 400;
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 0.15s ease;
}

.tbps-footer-col .menu li a:hover,
.tbps-footer-col ul li a:hover {
  color: var(--ink);
}

/* Remove any default widget margins */
.tbps-footer-widget {
  margin: 0;
  padding: 0;
}

/* Full-width wordmark */
.tbps-footer-wordmark-row {
  /* padding: 40px 32px 0; */
}

.tbps-footer-wordmark {
  display: block;
  font-family: var(--display);
  font-size: 10.5vw;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.88;
  color: var(--ink);
  white-space: nowrap;
  text-align: center;
}

/* Copyright bar */
.tbps-footer-bottom {
  max-width: var(--max);
  margin: 0 auto;
  padding: 24px 32px 40px;
}

.tbps-footer-bottom p {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
  text-align: center;
}

/* Responsive */
@media (max-width: 900px) {
  .tbps-footer-inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .tbps-footer-wordmark {
    font-size: 14vw;
  }
}

@media (max-width: 600px) {
  .tbps-footer-nav {
    grid-template-columns: 1fr 1fr;
  }

  .tbps-footer-wordmark-row {
    overflow: visible;
    padding: 8px 20px 0;
  }

  .tbps-footer-wordmark {
    font-size: 14vw;
    white-space: normal;
    word-break: keep-all;
    line-height: 0.95;
    text-align: center;
  }

  .tbps-footer-bottom p {
    text-align: center;
  }
}

/* ── Full-screen project overlay ─────────────────────────────────── */
#tbps-project-overlay {
  position: fixed;
  inset: 0;
  z-index: 99998;
  transform: translateX(100%);
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  overflow: hidden;
  box-shadow: -8px 0 60px rgba(0, 0, 0, 0.18);
  background: #fff;
}

#tbps-project-overlay.tbps-overlay-open {
  transform: translateX(0);
}

#tbps-project-overlay iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* Prevent background scroll while overlay is open */
body.tbps-overlay-active {
  overflow: hidden;
}
