/*
Theme Name:  Bug & Bark
Theme URI:   https://bugandbark.co.uk
Author:      Syntects
Description: Custom Bug & Bark theme. All page content is built via Custom HTML blocks using the Full Width template.
Version:     2.0.0
Requires at least: 6.0
Tested up to:      6.7
Requires PHP:      8.0
License: Proprietary
Text Domain: bugandbark
*/

/* ================================================================
   CSS VARIABLE SYSTEM
   ================================================================ */
:root {
  /* Colours */
  --cream:        #f5ecd6;
  --cream-2:      #ede2c5;
  --sage:         #cbd9b1;
  --sage-deep:    #6f8b5a;
  --sage-soft:    #dde7c8;
  --sage-blob:    #c8d6b3;
  --pink:         #f1d1d1;
  --pink-deep:    #d89999;
  --pink-soft:    #f6dede;
  --coral:        #d27a7a;
  --coral-deep:   #b85c5c;
  --ink:          #2c3d1d;
  --ink-soft:     #4a5a3c;
  --blue:         #a6c8d8;
  --blue-soft:    #dde9ef;

  /* Typography */
  --font-display: "Lilita One", sans-serif;
  --font-body:    "DM Sans", system-ui, sans-serif;
  --font-marker:  "Caveat", cursive;

  /* Spacing */
  --max-w:        1320px;
  --section-py:   110px;
  --section-px:   40px;

  /* Shape */
  --radius-pill:  999px;
  --radius-card:  24px;
  --radius-img:   18px;
}

/* ================================================================
   RESET
   ================================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font-family: inherit; cursor: pointer; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
ul, ol { list-style: none; padding: 0; margin: 0; }

/* ================================================================
   SHARED TYPOGRAPHY CLASSES
   (Used by page HTML blocks)
   ================================================================ */
.bnb-h1, .bnb-h2, .bnb-h3, .bnb-h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: 0.005em;
  color: var(--ink);
}
.bnb-h1 { font-size: clamp(48px, 7vw, 108px); }
.bnb-h2 { font-size: clamp(36px, 5vw,  72px); }
.bnb-h3 { font-size: clamp(26px, 3vw,  44px); }
.bnb-h4 { font-size: clamp(18px, 2vw,  28px); }

.bnb-marker { font-family: var(--font-marker); font-weight: 700; line-height: 1.1; }

.bnb-body-lg { font-size: 18px; line-height: 1.7; color: var(--ink-soft); }
.bnb-body    { font-size: 16px; line-height: 1.65; color: var(--ink-soft); }
.bnb-body-sm { font-size: 14px; line-height: 1.6;  color: var(--ink-soft); }

/* Eyebrow pill label */
.bnb-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--sage-deep);
  background: rgba(200,214,179,0.45);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 16px;
  letter-spacing: 0.02em;
}

/* Wavy underline accent */
.bnb-wavy { position: relative; display: inline; color: var(--pink-deep); }
.bnb-wavy::after {
  content: "";
  position: absolute;
  left: -0.04em; right: -0.04em; bottom: -0.16em;
  height: 0.15em;
  background: no-repeat center / 100% 100%
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 14'><path d='M2 9C30 4 60 12 100 7S170 4 198 8' fill='none' stroke='%23d89999' stroke-width='3.5' stroke-linecap='round'/></svg>");
}

/* ================================================================
   SHARED LAYOUT UTILITIES
   ================================================================ */
.bnb-container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--section-px);
}

/* Pill buttons */
.bnb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: 0.02em;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  white-space: nowrap;
  line-height: 1;
}
.bnb-btn:hover { transform: translateY(-2px) rotate(-0.5deg); }
.bnb-btn--pink  { background: var(--pink-deep);  color: var(--cream); }
.bnb-btn--pink:hover  { background: var(--coral-deep); }
.bnb-btn--ink   { background: var(--ink);         color: var(--cream); }
.bnb-btn--ink:hover   { background: #1e2d13; }
.bnb-btn--sage  { background: var(--sage-deep);   color: var(--cream); }
.bnb-btn--ghost { background: transparent; color: var(--ink); border: 2px solid var(--ink); box-shadow: none; }
.bnb-btn--sm    { font-size: 14px; padding: 10px 20px; }
.bnb-btn--lg    { font-size: 18px; padding: 16px 34px; }

/* Marquee strip */
.bnb-marquee { overflow: hidden; }
.bnb-marquee-track {
  display: inline-flex;
  white-space: nowrap;
  animation: bnb-mq linear infinite;
  will-change: transform;
}
.bnb-marquee-row {
  display: inline-flex;
  align-items: center;
  padding-block: 13px;
  font-family: var(--font-display);
  letter-spacing: 0.06em;
  font-size: 13px;
  text-transform: uppercase;
}
.bnb-marquee-item { display: inline-flex; align-items: center; gap: 24px; padding-inline: 12px; }
.bnb-marquee-div  { opacity: 0.5; font-size: 11px; }
@keyframes bnb-mq { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ================================================================
   NAVIGATION
   ================================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: rgba(245,236,214,0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(44,61,29,0.07);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  height: 70px;
  max-width: 100%;
  gap: 24px;
}

/* Logo */
.site-logo { display: inline-flex; text-decoration: none; flex-shrink: 0; }
.bnb-logo  { display: inline-flex; flex-direction: column; align-items: flex-start; line-height: 1; gap: 5px; }
.bnb-logo-wordmark {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 0.92;
  letter-spacing: 0.005em;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.bnb-logo-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--pink-deep);
  color: var(--cream);
  font-family: var(--font-display);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: var(--radius-pill);
  padding: 4px 10px;
  white-space: nowrap;
}
.bnb-logo-img { display: block; height: auto; width: auto; }

/* Desktop nav links */
.header-nav { display: flex; align-items: center; gap: 28px; }
.header-nav a {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  opacity: 0.8;
  transition: opacity 0.15s;
  white-space: nowrap;
}
.header-nav a:hover {
  opacity: 1;
  text-decoration: underline;
  text-decoration-style: wavy;
  text-decoration-color: var(--pink-deep);
  text-underline-offset: 5px;
}

/* Nav CTA button */
.header-cta { flex-shrink: 0; }

/* Hamburger — hidden on desktop */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  padding: 4px;
  flex-shrink: 0;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.2s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile drawer */
.nav-drawer {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--cream);
  z-index: 490;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 80px 24px 48px;
}
.nav-drawer.is-open { display: flex; }
.nav-drawer a {
  font-family: var(--font-display);
  font-size: 40px;
  line-height: 1;
  color: var(--ink);
  text-decoration: none;
}
.nav-drawer a:hover { color: var(--pink-deep); }
.nav-drawer-close {
  position: absolute;
  top: 18px; right: 18px;
  background: none;
  border: none;
  font-size: 26px;
  color: var(--ink);
  padding: 8px;
  line-height: 1;
}

/* ================================================================
   FOOTER
   ================================================================ */
.site-footer {
  background: var(--ink);
  color: var(--cream);
  padding: 64px 40px 0;
  border-top: 1px solid rgba(245,236,214,0.08);
}
.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 2fr;
  gap: 48px;
}
.footer-tag {
  font-size: 14px;
  line-height: 1.65;
  color: rgba(245,236,214,0.55);
  margin-top: 16px;
  max-width: 240px;
}
.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.footer-cols h4 {
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: 0.04em;
  color: var(--cream);
  margin-bottom: 12px;
  font-weight: 400;
}
.footer-cols a {
  display: block;
  padding: 4px 0;
  font-size: 14px;
  color: rgba(245,236,214,0.5);
  text-decoration: none;
  transition: color 0.15s;
}
.footer-cols a:hover { color: var(--cream); }
.footer-rule { margin-top: 40px; overflow: hidden; }
.footer-rule .bnb-marquee-row {
  padding-block: 6px;
  font-size: clamp(48px, 8vw, 80px);
  letter-spacing: 0;
}
.footer-fine {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 18px 0 28px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
  color: rgba(245,236,214,0.3);
  border-top: 1px solid rgba(245,236,214,0.07);
  margin-top: 0;
}

/* ================================================================
   FULL WIDTH PAGE — ensures no WordPress padding/margin
   ================================================================ */
.page-template-page-full-width #bnb-main,
.page-template-page-full-width .entry-content,
.page-template-page-full-width .wp-block-group {
  padding: 0 !important;
  margin: 0 !important;
  max-width: 100% !important;
}

/* ================================================================
   MOBILE — RESPONSIVE
   ================================================================ */

/* Tablets */
@media (max-width: 900px) {
  /* Nav */
  .header-inner {
    padding: 0 20px;
    height: 62px;
    position: relative;
    justify-content: space-between;
  }
  .header-nav   { display: none; }
  .header-cta   { display: none; }
  .nav-toggle   { display: flex; }

  /* Footer */
  .site-footer  { padding: 48px 24px 0; }
  .footer-inner { grid-template-columns: 1fr; gap: 36px; }
  .footer-cols  { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .footer-tag   { max-width: 100%; }
}

/* Phones */
@media (max-width: 480px) {
  .site-footer { padding: 40px 20px 0; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .bnb-btn     { font-size: 14px; padding: 12px 22px; }
}
