/* ============================================================================
 * CBP Base — shared styles used by every cbp-canvas template.
 * Includes: CSS variables, reset, .wrap, .label, .stripes, .announce,
 *           .nav, .btn variants, .footer, and .duotone (SVG motif treatment).
 * Per-page styles live in cbp-{page}.css.
 * ==========================================================================*/

:root {
  --pink:        #EC1E7C;
  --pink-dark:   #C71566;
  --cyan:        #36B6E0;
  --cyan-dark:   #2898BD;
  --yellow:      #F5CC36;
  --ink:         #0F0F12;
  --ink-soft:    #2A2A30;
  --ink-muted:   #5A5A65;
  --ink-faint:   #8E8E96;
  --bg:          #FAFAF7;
  --bg-white:    #FFFFFF;
  --line:        rgba(15,15,18,0.08);
  --line-strong: rgba(15,15,18,0.14);
  --line-dark:   rgba(255,255,255,0.10);
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body:    'Inter', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, monospace;
}

/* ── Reset ── */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body { font-family: var(--font-body); font-size: 16px; line-height: 1.6; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* ── Layout ── */
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 40px; }

/* ── Eyebrow label ── */
.label { font-family: var(--font-mono); font-size: 11px; letter-spacing: 2.5px; text-transform: uppercase; font-weight: 500; display: inline-flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.label::before { content: ''; display: inline-block; width: 24px; height: 2px; background: currentColor; flex-shrink: 0; }

/* ── CMYK-inspired stripe divider ── */
.stripes { display: flex; height: 14px; width: 100%; }
.stripes span { flex: 1; }
.stripes .s1 { background: var(--pink); }
.stripes .s2 { background: var(--cyan); }
.stripes .s3 { background: var(--yellow); }

/* ── Announce bar ── */
.announce { background: var(--ink); color: #fff; text-align: center; padding: 12px 16px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 2.5px; text-transform: uppercase; font-weight: 500; }
.announce .a-sep { color: var(--pink); padding: 0 12px; }
.announce .a-accent { color: var(--yellow); }

/* ── Nav ── */
.nav { background: var(--ink); padding: 18px 0; position: sticky; top: 0; z-index: 50; }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 40px; }
.nav-logo { display: flex; align-items: center; }
.nav-logo img { height: 38px; width: auto; display: block; }
.nav-links { display: flex; gap: 28px; align-items: center; }
.nav-links > .nav-item { position: relative; }
.nav-links a { color: rgba(255,255,255,0.78); font-size: 14px; font-weight: 500; transition: color 0.2s; display: inline-flex; align-items: center; gap: 4px; }
.nav-links a:hover, .nav-links a.active { color: #fff; }
.nav-chevron { font-size: 14px; transition: transform 0.2s; }
.nav-item.has-children:hover > a .nav-chevron,
.nav-item.has-children:focus-within > a .nav-chevron { transform: rotate(180deg); }

/* ── Nav dropdowns (desktop) ── */
.nav-submenu { position: absolute; top: 100%; left: -14px; min-width: 200px; background: var(--ink); border: 1px solid rgba(255,255,255,0.08); box-shadow: 0 24px 60px -20px rgba(0,0,0,0.6); padding: 8px 0; display: flex; flex-direction: column; opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity 0.2s, transform 0.2s, visibility 0.2s; z-index: 55; }
.nav-item.has-children:hover > .nav-submenu,
.nav-item.has-children:focus-within > .nav-submenu { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-submenu a { padding: 10px 18px; font-size: 13px; white-space: nowrap; }
.nav-submenu a:hover { background: rgba(255,255,255,0.04); color: var(--pink); }
.nav-actions { display: flex; align-items: center; gap: 18px; }
.nav-login { color: rgba(255,255,255,0.78); font-size: 14px; font-weight: 500; }
.nav-login:hover { color: #fff; }
.nav-signup { background: var(--pink); color: #fff; padding: 10px 22px; font-size: 13px; font-weight: 600; letter-spacing: 0.5px; transition: background 0.2s; }
.nav-signup:hover { background: var(--pink-dark); }

/* ── Buttons ── */
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 16px 32px; font-family: var(--font-body); font-size: 14px; font-weight: 600; letter-spacing: 0.5px; border: 0; cursor: pointer; transition: all 0.2s; text-decoration: none; }
.btn i { font-size: 16px; }
.btn-pink { background: var(--pink); color: #fff; }
.btn-pink:hover { background: var(--pink-dark); transform: translateY(-1px); }
.btn-cyan { background: var(--cyan); color: var(--ink); }
.btn-cyan:hover { background: var(--cyan-dark); transform: translateY(-1px); }
.btn-yellow { background: var(--yellow); color: var(--ink); }
.btn-yellow:hover { background: #E0B826; transform: translateY(-1px); }
.btn-outline-light { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,0.25); padding: 14.5px 30.5px; }
.btn-outline-light:hover { border-color: #fff; }
.btn-outline-dark { background: transparent; color: var(--ink); border: 1.5px solid var(--line-strong); padding: 14.5px 30.5px; }
.btn-outline-dark:hover { border-color: var(--ink); }

/* ── Duotone SVG treatment (used by all motif spot illustrations) ── */
.duotone { position: relative; display: inline-block; }
.duotone svg { display: block; }
.duotone .layer { position: absolute; inset: 0; pointer-events: none; }
.duotone .layer.cyan { color: var(--cyan); filter: drop-shadow(0 0 6px rgba(54,182,224,0.5)); }
.duotone .layer.pink { color: var(--pink); filter: drop-shadow(0 0 6px rgba(236,30,124,0.5)); transform: translate(-1.6%, -1.2%); mix-blend-mode: screen; opacity: 0.85; }

/* ── Halftone dot drift (shared animation, per-page keyframe overrides ok) ── */
@keyframes halftoneDrift {
  from { background-position: 0 0, 14px 14px; }
  to   { background-position: 56px 28px, 70px 42px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}

/* ── Footer ── */
.footer { background: var(--ink); color: #fff; padding: 80px 0 32px; position: relative; overflow: hidden; }
.footer::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle, rgba(54,182,224,0.10) 1.5px, transparent 2.5px),
    radial-gradient(circle, rgba(236,30,124,0.08) 1.5px, transparent 2.5px);
  background-size: 32px 32px, 32px 32px;
  background-position: 0 0, 16px 16px;
  pointer-events: none;
}
.footer .wrap { position: relative; z-index: 1; }
.footer-grid { display: grid; grid-template-columns: 2.2fr 1fr 1fr 1fr; gap: 56px; margin-bottom: 56px; }
.footer-brand .nav-logo { display: inline-block; margin-bottom: 22px; }
.footer-logo img { height: 56px; width: auto; display: block; }
.footer-tagline { display: block; width: auto; font-size: 14px; line-height: 1.7; color: rgba(255,255,255,0.6); max-width: 460px; margin: 0 0 22px; }
.footer-social { display: flex; gap: 10px; }
.footer-social a { width: 38px; height: 38px; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.7); transition: all 0.2s; }
.footer-social a:hover { background: var(--pink); color: #fff; }
.footer-social i { font-size: 17px; }
.footer-phone { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; font-family: var(--font-mono); font-size: 13px; letter-spacing: 1px; color: rgba(255,255,255,0.72); transition: color 0.2s; }
.footer-phone i { color: var(--pink); font-size: 16px; }
.footer-phone:hover { color: #fff; }
.footer-col h4 { font-family: var(--font-mono); font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: rgba(255,255,255,0.5); font-weight: 500; margin: 0 0 22px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 12px; }
.footer-col a { font-size: 14px; color: rgba(255,255,255,0.78); transition: color 0.2s; }
.footer-col a:hover { color: var(--pink); }
.footer-bot { border-top: 1px solid var(--line-dark); padding-top: 24px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; font-size: 12px; color: rgba(255,255,255,0.45); font-family: var(--font-mono); letter-spacing: 1px; }

/* ── Star drift + twinkle animations (shared across hero + mobile nav) ── */
@keyframes starDrift {
  from { background-position: 0 0; }
  to   { background-position: -600px -300px; }
}
.twinkle { position: absolute; width: 10px; height: 10px; background: #fff; clip-path: polygon(50% 0%, 56% 44%, 100% 50%, 56% 56%, 50% 100%, 44% 56%, 0% 50%, 44% 44%); opacity: 0.4; animation: twinkle 3.6s ease-in-out infinite; }
.twinkle.t-small { width: 6px; height: 6px; animation-duration: 2.8s; }
.twinkle.t-big   { width: 16px; height: 16px; animation-duration: 4.4s; filter: drop-shadow(0 0 4px rgba(255,255,255,0.6)); }
.twinkle.t-pink  { background: var(--pink); filter: drop-shadow(0 0 6px rgba(236,30,124,0.6)); }
.twinkle.t-cyan  { background: var(--cyan); filter: drop-shadow(0 0 6px rgba(54,182,224,0.6)); }
@keyframes twinkle {
  0%, 100% { opacity: 0.25; transform: scale(0.7) rotate(0deg); }
  50%      { opacity: 1;    transform: scale(1.1) rotate(45deg); }
}

/* ── Mobile nav ── */
.nav-toggle { display: none; background: transparent; border: 0; padding: 8px; cursor: pointer; margin-left: 6px; }
.nav-toggle-bar { display: block; width: 22px; height: 2px; background: #fff; margin: 5px auto; transition: transform 0.25s, opacity 0.2s; }
body.nav-open .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.nav-open .nav-toggle-bar:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav { position: fixed; inset: 0; background: var(--ink); z-index: 40; opacity: 0; pointer-events: none; transition: opacity 0.25s ease; padding: 140px 32px 40px; overflow-y: auto; }
body.nav-open .mobile-nav { opacity: 1; pointer-events: auto; }
.mobile-nav-stars { position: absolute; inset: 0; background-image: url('../img/stars.svg'); background-size: 520px 520px; background-repeat: repeat; opacity: 0.6; pointer-events: none; animation: starDrift 180s linear infinite; z-index: 0; }
.mobile-nav-stars::after { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 40%, rgba(15,15,18,0.55) 0%, transparent 65%); }
.mobile-nav-twinkle { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.mobile-nav-inner { display: flex; flex-direction: column; gap: 4px; max-width: 480px; margin: 0 auto; position: relative; z-index: 2; }
.mobile-nav-link { display: block; width: 100%; text-align: left; background: transparent; border: 0; border-bottom: 1px solid rgba(255,255,255,0.08); color: #fff; font-family: var(--font-display); font-size: 26px; font-weight: 600; letter-spacing: -0.8px; padding: 14px 0; transition: color 0.2s; cursor: pointer; }
.mobile-nav-link:hover, .mobile-nav-link.active { color: var(--pink); }

/* Collapsible parent (e.g. Resources) — behaves like other links but toggles children. */
.mobile-nav-toggle { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mobile-nav-chevron { font-size: 22px; color: rgba(255,255,255,0.85); transition: transform 0.25s; }
.mobile-nav-toggle[aria-expanded="true"] .mobile-nav-chevron { transform: rotate(180deg); color: var(--pink); }

.mobile-nav-children { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.mobile-nav-group .mobile-nav-toggle[aria-expanded="true"] + .mobile-nav-children { max-height: 600px; }
.mobile-nav-sublink { display: block; color: rgba(255,255,255,0.78); font-family: var(--font-display); font-size: 18px; font-weight: 400; letter-spacing: -0.2px; padding: 12px 0 12px 18px; border-bottom: 1px solid rgba(255,255,255,0.05); transition: color 0.2s; }
.mobile-nav-sublink:hover, .mobile-nav-sublink.active { color: var(--pink); }
.mobile-nav-sublink:last-child { border-bottom: 1px solid rgba(255,255,255,0.08); }
.mobile-nav-cta { display: flex; gap: 10px; margin-top: 28px; flex-wrap: wrap; }
.mobile-nav-cta .btn { flex: 1; justify-content: center; }
.mobile-nav-decor { position: relative; width: 200px; max-width: 45vw; aspect-ratio: 1/1; margin: 48px auto 0; opacity: 0.9; }
.mobile-nav-decor img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.mobile-nav-decor .skull-pink { transform: translate(2%, 2%); opacity: 0.78; filter: drop-shadow(0 0 12px rgba(236,30,124,0.4)); mix-blend-mode: screen; }
.mobile-nav-decor .skull-cyan { filter: drop-shadow(0 0 12px rgba(54,182,224,0.4)); }

/* ── Responsive base ── */
@media (max-width: 960px) {
  .wrap { padding: 0 24px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
}
@media (max-width: 720px) {
  .nav .nav-links,
  header.nav .nav-links { display: none !important; }
  .nav .nav-actions .nav-login,
  .nav .nav-actions .nav-signup { display: none !important; }
  .nav .nav-toggle { display: block !important; }
  .nav .wrap { gap: 12px; }
  .nav-logo img { height: 34px !important; }
}
@media (max-width: 720px) {
  /* Compact mobile footer — same breakpoint as the mobile nav switch */
  .footer { padding: 48px 0 24px !important; }
  .footer-grid { grid-template-columns: 1fr !important; gap: 32px !important; margin-bottom: 32px !important; }
  .footer-brand { text-align: center !important; }
  .footer-brand .nav-logo { margin: 0 auto 18px !important; width: fit-content !important; display: inline-block !important; }
  .footer-logo img { height: 42px !important; margin: 0 auto !important; }
  .footer-tagline { font-size: 13px !important; line-height: 1.55 !important; margin: 0 auto 18px !important; max-width: 320px !important; }
  .footer-social { justify-content: center !important; }
  .footer-col { text-align: center !important; }
  .footer-col h4 { margin-bottom: 12px !important; font-size: 10px !important; }
  .footer-col ul { padding: 0 !important; margin: 0 !important; }
  .footer-col li { margin-bottom: 8px !important; }
  .footer-col a { font-size: 15px !important; }
  .footer-bot { justify-content: center !important; text-align: center !important; padding-top: 16px !important; font-size: 11px !important; }
  .footer-bot span { flex-basis: 100% !important; }
}
