/*
Theme Name: Budget Web Design
Theme URI: https://budgetwebdesign.com.au
Author: Budget Web Design
Description: Custom lightweight theme for budgetwebdesign.com.au. Cream/ink design system with Fraunces + Hanken Grotesk, replacing the legacy arkahost/WPBakery stack. Content pages are self-contained HTML sections rendered full-width.
Version: 1.5.3
Requires at least: 6.0
Requires PHP: 7.4
License: Proprietary
Text Domain: bwd
*/

/* ============ Design tokens (site-wide) ============ */
:root {
  --ink: #191512;
  --ink-soft: #4a423b;
  --cream: #FBF6EE;
  --cream-2: #F3EADB;
  --paper: #ffffff;
  --coral: #E8552E;
  --coral-deep: #C8421F;
  --teal: #15564F;
  --gold: #E0A33B;
  --line: rgba(25, 21, 18, .12);
  --shadow: 0 18px 50px -18px rgba(25, 21, 18, .28);
  --shadow-soft: 0 8px 30px -12px rgba(25, 21, 18, .18);
  --maxw: 1180px;
  --r: 18px;
}

/* ============ Base ============ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: 'Hanken Grotesk', system-ui, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--coral-deep); }
h1, h2, h3, h4 { font-family: 'Fraunces', Georgia, serif; font-weight: 600; line-height: 1.08; letter-spacing: -.015em; }

.bwd-wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

/* Screen-reader helper (WP standard) */
.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px; width: 1px;
  overflow: hidden; position: absolute !important;
}

/* ============ Header ============ */
.bwd-site-header {
  position: sticky; top: 0; z-index: 200;
  background: rgba(251, 246, 238, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.bwd-site-header .bwd-wrap {
  display: flex; align-items: center; gap: 6px 20px;
  flex-wrap: wrap;
  padding-top: 14px; padding-bottom: 10px;
}
/* row 1: logo on its own line; row 2: nav left + CTA right */
.bwd-logo { display: flex; align-items: center; flex-basis: 100%; line-height: 0; }
.bwd-logo svg { width: min(560px, 82vw); height: auto; display: block; }
.bwd-nav { flex: 1; min-width: 0; }

/* Primary nav */
.bwd-nav > ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; align-items: center; }
.bwd-nav li { position: relative; }
.bwd-nav a {
  display: block; padding: 12px 14px;
  color: var(--ink); text-decoration: none;
  font-weight: 600; font-size: .94rem; letter-spacing: .01em;
  transition: color .18s;
}
/* animated underline */
.bwd-nav > ul > li > a { position: relative; }
.bwd-nav > ul > li > a::before {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 6px;
  height: 2px; border-radius: 2px; background: var(--coral);
  transform: scaleX(0); transform-origin: left;
  transition: transform .22s cubic-bezier(.2, .7, .2, 1);
}
.bwd-nav > ul > li > a:hover { color: var(--coral-deep); }
.bwd-nav > ul > li > a:hover::before,
.bwd-nav > ul > li.current-menu-item > a::before,
.bwd-nav > ul > li.current-menu-ancestor > a::before { transform: scaleX(1); }
.bwd-nav > ul > li.current-menu-item > a,
.bwd-nav > ul > li.current-menu-ancestor > a { color: var(--coral-deep); }

/* Dropdowns */
.bwd-nav .sub-menu {
  list-style: none; margin: 0; padding: 10px;
  position: absolute; top: calc(100% - 4px); left: 8px; min-width: 288px;
  background: var(--paper);
  border: 1px solid var(--line); border-top: 3px solid var(--coral);
  border-radius: 4px 4px 16px 16px;
  box-shadow: 0 24px 60px -20px rgba(25, 21, 18, .35);
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity .18s, transform .22s cubic-bezier(.2, .7, .2, 1), visibility .18s;
}
.bwd-nav li:hover > .sub-menu,
.bwd-nav li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.bwd-nav .sub-menu li + li { border-top: 1px solid rgba(25, 21, 18, .05); }
.bwd-nav .sub-menu a {
  font-weight: 500; font-size: .92rem; padding: 10px 12px; border-radius: 9px;
  white-space: nowrap; /* long items stay on one line */
  transition: background .15s, color .15s, transform .18s;
}
.bwd-nav .sub-menu a:hover {
  background: var(--cream); color: var(--coral-deep); transform: translateX(5px);
}
.bwd-nav .sub-menu .current-menu-item > a { color: var(--coral-deep); background: var(--cream); }
/* chevron */
.bwd-nav .menu-item-has-children > a::after {
  content: ""; display: inline-block; margin-left: 8px;
  width: 6px; height: 6px;
  border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform .2s;
}
.bwd-nav .menu-item-has-children:hover > a::after {
  transform: rotate(225deg) translateY(-1px);
}

/* Header CTA */
.bwd-header-cta {
  flex: none; margin-left: auto;
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--coral); color: #fff !important;
  font-weight: 600; font-size: .92rem;
  padding: 11px 20px; border-radius: 999px; text-decoration: none;
  box-shadow: 0 10px 24px -8px rgba(232, 85, 46, .6);
  transition: .2s;
}
.bwd-header-cta:hover { background: var(--coral-deep); transform: translateY(-2px); }

/* Mobile toggle */
.bwd-menu-toggle {
  display: none; margin-left: auto;
  background: none; border: 1.5px solid var(--ink); border-radius: 10px;
  padding: 9px 12px; cursor: pointer;
  font: inherit; font-weight: 600; color: var(--ink);
}
@media (max-width: 1020px) {
  .bwd-menu-toggle { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; }
  .bwd-header-cta { display: none; }
  .bwd-site-header .bwd-wrap { padding-top: 10px; padding-bottom: 10px; }
  .bwd-logo { flex-basis: auto; } /* logo + toggle share the row on mobile */
  .bwd-nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--cream); border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
    max-height: calc(100vh - 74px); overflow: auto;
    padding: 12px 22px 26px;
    border-top: none;
  }
  .bwd-nav.open { display: block; }
  .bwd-nav > ul { flex-direction: column; align-items: stretch; gap: 0; }
  .bwd-nav .sub-menu {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: none; background: transparent;
    padding: 0 0 0 16px; min-width: 0;
  }
}

/* ============ Breadcrumbs ============ */
.bwd-crumbs {
  font-size: .8rem; color: var(--ink-soft);
  padding: 12px 0 0;
}
.bwd-crumbs a { color: var(--ink-soft); text-decoration: none; font-weight: 500; }
.bwd-crumbs a:hover { color: var(--coral-deep); }
.bwd-crumbs .sep { margin: 0 7px; opacity: .55; }
.bwd-crumbs span[aria-current] { color: var(--ink); font-weight: 600; }

/* homepage: breathing room above the hero eyebrow */
.bwd-main .bwd-home .hero { padding-top: 22px; }

/* ai-direct-access: its section was designed with its own cream background
   for the old cream page — let it sit on the white content sheet instead */
.bwd-main .bwd-ca { background: transparent; }

/* ============ Content area ============ */
/* White "sheet" for the content column; the cream page background
   stays visible above (header area) and in the left/right gutters. */
.bwd-main {
  min-height: 55vh;
  max-width: 1240px;
  margin: 0 auto;
  background: var(--paper);
  box-shadow: 0 0 0 1px var(--line), var(--shadow-soft);
  padding-bottom: 34px;
}
.bwd-main > .bwd-page-title { max-width: var(--maxw); margin: 40px auto 6px; padding: 0 22px; }

/* Default styling for plain (non-snippet) content */
.bwd-prose { max-width: var(--maxw); margin: 0 auto; padding: 26px 22px 60px; }
.bwd-prose h2 { margin-top: 1.6em; }
.bwd-prose li { margin: .35em 0; }

/* ============ Portfolio ============ */
.bwd-portfolio { padding: 46px 22px 30px; }
.bwd-eyebrow {
  display: inline-flex; font-size: .78rem; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--coral-deep); background: rgba(232, 85, 46, .1);
  border: 1px solid rgba(232, 85, 46, .25);
  padding: 7px 14px; border-radius: 999px;
}
.bwd-portfolio-head { margin-bottom: 40px; }
.bwd-portfolio-head h1 { font-size: clamp(1.7rem, 3.2vw, 2.6rem); margin: 16px 0 0; }
.bwd-portfolio-head p { color: var(--ink-soft); font-size: 1.06rem; margin-top: 12px; }
@media (min-width: 860px) {
  /* heading and intro each on a single line */
  .bwd-portfolio-head h1, .bwd-portfolio-head p { white-space: nowrap; }
}
.bwd-portfolio-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px;
}
@media (max-width: 1100px) { .bwd-portfolio-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px)  { .bwd-portfolio-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px)  { .bwd-portfolio-grid { grid-template-columns: 1fr; } }
.bwd-work {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r);
  overflow: hidden; display: flex; flex-direction: column; transition: .25s;
}
.bwd-work:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: transparent; }
.bwd-work-media { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--cream-2); }
.bwd-work-media img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .4s; }
.bwd-work:hover .bwd-work-media img { transform: scale(1.04); }
.bwd-work.no-thumb .bwd-work-media {
  display: grid; place-items: center;
  background: linear-gradient(150deg, var(--teal), #0f413c);
}
/* monogram tile via CSS so the letter stays out of scraped text content */
.bwd-work.no-thumb .bwd-work-media::before {
  content: attr(data-initial);
  font-family: 'Fraunces', Georgia, serif; font-size: 3.6rem; font-weight: 600;
  color: rgba(251, 246, 238, .85);
}
.bwd-work-info { padding: 14px 16px 16px; }
.bwd-work-info h2 { font-size: 1.02rem; margin: 0 0 8px; line-height: 1.3; }
.bwd-work-links { display: flex; gap: 14px; font-size: .85rem; font-weight: 600; }
.bwd-work-links a { color: var(--coral-deep); text-decoration: none; }
.bwd-work-links a:hover { text-decoration: underline; }

/* Single project */
.bwd-work-single { padding: 46px 22px 20px; }
.bwd-work-back a { color: var(--ink-soft); text-decoration: none; font-weight: 600; font-size: .92rem; }
.bwd-work-back a:hover { color: var(--coral-deep); }
.bwd-work-single h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); margin: 12px 0 14px; }
.bwd-work-visit {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--coral); color: #fff; font-weight: 600; font-size: .95rem;
  padding: 11px 20px; border-radius: 999px; text-decoration: none;
}
.bwd-work-visit:hover { background: var(--coral-deep); }
.bwd-work-hero { margin: 22px 0; }
.bwd-work-hero img { border-radius: var(--r); border: 1px solid var(--line); }

/* ============ Footer ============ */
.bwd-footer {
  background: var(--ink); color: var(--cream);
  margin-top: 70px; padding: 54px 0 30px;
}
.bwd-footer a { color: var(--cream); text-decoration: none; }
.bwd-footer a:hover { color: var(--gold); }
.bwd-footer-grid {
  display: grid; grid-template-columns: 1fr 1fr 1fr 1.2fr; gap: 34px;
}
.bwd-footer a.hl { color: #00d4ff; font-weight: 700; }
.bwd-footer a.hl:hover { color: #7ee7ff; }

/* Contact column (matches the old footer layout) */
.bwd-footer-contact .phone {
  display: block; font-size: 1.2rem; font-weight: 700; color: #fff;
  margin-bottom: 5px; text-decoration: none;
}
.bwd-footer-contact .email {
  display: block; font-size: .9rem; margin-bottom: 15px; text-decoration: none;
}
.bwd-footer-contact .quote-btn {
  display: inline-block; background: var(--coral); color: #fff !important;
  padding: 12px 20px; border-radius: 50px; font-weight: 700; font-size: .9rem;
  text-decoration: none; transition: .2s;
}
.bwd-footer-contact .quote-btn:hover { background: var(--coral-deep); transform: translateY(-2px); }
.bwd-footer-contact .cpanels {
  margin-top: 25px; padding-top: 15px; border-top: 1px solid rgba(255, 255, 255, .1);
}
.bwd-footer-contact .cpanels a { display: block; opacity: .8; transition: .3s; text-decoration: none; }
.bwd-footer-contact .cpanels a:hover { opacity: 1; }
.bwd-footer-contact .cpanels img { max-width: 180px; height: auto; }
.bwd-footer-contact .cpanels p { font-size: .75rem; color: #00d4ff; margin: 5px 0 0; }
.bwd-footer-contact .loc { margin-top: 20px; font-size: .9rem; line-height: 1.5; opacity: .9; }
.bwd-footer h4 {
  color: var(--gold); font-family: 'Hanken Grotesk', sans-serif;
  font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  margin: 0 0 14px;
}
.bwd-footer ul { list-style: none; margin: 0; padding: 0; }
.bwd-footer li { margin: 8px 0; font-size: .95rem; }
.bwd-footer ul a { display: inline-block; transition: color .15s, transform .18s; }
.bwd-footer ul a:hover { transform: translateX(3px); }
.bwd-footer .tagline { color: rgba(251, 246, 238, .75); font-size: .95rem; max-width: 34ch; }
.bwd-footer .bwd-footer-logo svg { width: 300px; max-width: 100%; height: auto; }
/* Recolor the inline logo for the dark footer: dark ink parts become cream */
.bwd-footer .bwd-footer-logo svg text { fill: var(--cream); }
.bwd-footer .bwd-footer-logo svg text[fill="#777"] { fill: rgba(251, 246, 238, .6); }
.bwd-footer .bwd-footer-logo svg text[fill="#999"] { fill: rgba(251, 246, 238, .55); }
.bwd-footer .bwd-footer-logo svg text[fill="#e65127"] { fill: var(--gold); }
.bwd-footer .bwd-footer-logo svg circle[fill="#1a1a1a"] { fill: var(--cream); }
.bwd-footer .bwd-footer-logo svg path[stroke="#1a1a1a"] { stroke: var(--cream); }
.bwd-footer .bwd-footer-logo svg line { stroke: rgba(251, 246, 238, .3); }
.bwd-footer .legal {
  border-top: 1px solid rgba(251, 246, 238, .15);
  margin-top: 44px; padding-top: 22px;
  display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between;
  color: rgba(251, 246, 238, .6); font-size: .85rem;
}
.bwd-footer .legal a { color: rgba(251, 246, 238, .8); text-decoration: none; }
.bwd-footer .legal a:hover { color: var(--gold); }
.bwd-footer .legal-links a { padding: 0 4px; }
@media (max-width: 980px) {
  .bwd-footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
}
@media (max-width: 560px) {
  .bwd-footer-grid { grid-template-columns: 1fr; gap: 28px; }
}
