/*
Theme Name: Resonance
Theme URI: https://github.com/BillKG
Author: BillKG
Author URI: https://github.com/BillKG
Description: Reusable WordPress theme template with React-powered sections and project-level color controls.
Version: 1.0.2
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: business-starter
*/

:root {
  --bt-primary: #771919;
  --bt-accent: #590000;
  --bt-secondary: #1d365d;
  --bt-highlight: #9a3c3c;
  --bt-ink: #1c1917;
  --bt-muted: #625957;
  --bt-surface: #ffffff;
  --bt-soft: #e7e5e4;
  --bt-warm: #f7f4f2;
  --bt-paper: #fbfaf8;
  --bt-paper-ink: rgba(28, 25, 23, 0.08);
  --bt-tape: #171313;
  --bt-border: rgba(28, 25, 23, 0.12);
  --bt-shadow: 0 18px 55px rgba(28, 25, 23, 0.14);
  --bt-max-width: 1240px;
  --bt-header-height: 78px;
  --bt-display-font: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", Impact, sans-serif;
  --bt-body-font: "Manrope", "Avenir Next", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  color: var(--bt-ink);
  background:
    linear-gradient(135deg, rgba(119, 25, 25, 0.035) 0 1px, transparent 1px 18px),
    linear-gradient(90deg, rgba(28, 25, 23, 0.025), transparent 30%),
    var(--bt-paper);
  font-family: var(--bt-body-font);
  line-height: 1.6;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

body > main {
  flex: 1 0 auto;
}

body.ee-lightbox-open,
body.is-menu-open {
  overflow: hidden;
}

a {
  color: var(--bt-primary);
  font-weight: 700;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

h1,
h2,
h3,
h4,
h5,
h6,
.site-title,
.primary-menu a,
.site-cta,
.wp-block-button__link,
button,
input[type="submit"] {
  font-family: var(--bt-display-font);
  letter-spacing: 0;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 10000;
  width: auto;
  height: auto;
  padding: 0.75rem 1rem;
  clip: auto;
  color: #ffffff;
  background: var(--bt-primary);
}

.site-header {
  position: fixed;
  top: 0;
  right: 0;
  left: 0;
  z-index: 1000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.18);
  transition: background-color 180ms ease, box-shadow 180ms ease, border-color 180ms ease, backdrop-filter 180ms ease;
  backdrop-filter: blur(12px);
}

body.is-scrolled .site-header {
  border-color: rgba(28, 25, 23, 0.1);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 12px 34px rgba(28, 25, 23, 0.1);
  backdrop-filter: blur(18px);
}

.site-header__inner,
.site-footer__inner,
.site-main,
.site-section {
  width: min(var(--bt-max-width), calc(100% - 2rem));
  margin-inline: auto;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--bt-header-height);
  gap: 1.5rem;
}

.site-branding {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--bt-ink);
  background: transparent;
  text-decoration: none;
}

.site-branding__logo,
.custom-logo {
  width: auto;
  height: 68px;
  max-width: 28vw;
  max-height: calc(var(--bt-header-height) - 10px);
  object-fit: contain;
  object-position: left center;
  background: transparent;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.18));
}

.site-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0;
}

.site-description {
  display: block;
  margin: 0;
  color: var(--bt-muted);
  font-size: 0.9rem;
}

.primary-menu {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.primary-menu a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  color: var(--bt-ink);
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 160ms ease, background-color 160ms ease;
}

.primary-menu a:hover,
.primary-menu .current-menu-item > a,
.primary-menu .current_page_item > a {
  color: var(--bt-primary);
  background: rgba(119, 25, 25, 0.08);
}

.primary-menu .current-menu-item > a::after,
.primary-menu .current_page_item > a::after {
  content: "";
  width: 6px;
  height: 6px;
  margin-left: 0.45rem;
  border-radius: 999px;
  background: var(--bt-primary);
}

body.home:not(.is-scrolled):not(.is-menu-open) .primary-menu a,
body.front-page:not(.is-scrolled):not(.is-menu-open) .primary-menu a {
  color: #ffffff;
  text-shadow: 0 10px 24px rgba(0, 0, 0, 0.32);
}

body.home:not(.is-scrolled):not(.is-menu-open) .primary-menu a:hover,
body.home:not(.is-scrolled):not(.is-menu-open) .primary-menu .current-menu-item > a,
body.home:not(.is-scrolled):not(.is-menu-open) .primary-menu .current_page_item > a,
body.front-page:not(.is-scrolled):not(.is-menu-open) .primary-menu a:hover,
body.front-page:not(.is-scrolled):not(.is-menu-open) .primary-menu .current-menu-item > a,
body.front-page:not(.is-scrolled):not(.is-menu-open) .primary-menu .current_page_item > a {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.16);
}

body.home:not(.is-scrolled):not(.is-menu-open) .primary-menu .current-menu-item > a::after,
body.home:not(.is-scrolled):not(.is-menu-open) .primary-menu .current_page_item > a::after,
body.front-page:not(.is-scrolled):not(.is-menu-open) .primary-menu .current-menu-item > a::after,
body.front-page:not(.is-scrolled):not(.is-menu-open) .primary-menu .current_page_item > a::after {
  background: #ffffff;
}

.site-cta,
.wp-block-button__link,
button,
input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.78rem 1.1rem;
  border: 0;
  border-radius: 8px;
  color: #ffffff;
  background: var(--bt-primary);
  font-size: 1.12rem;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(119, 25, 25, 0.18);
  transition: background-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.site-cta:hover,
.wp-block-button__link:hover,
button:hover,
input[type="submit"]:hover {
  background: var(--bt-accent);
  transform: translateY(-1px);
}

.site-menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(119, 25, 25, 0.18);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: none;
  backdrop-filter: blur(14px);
}

.site-menu-toggle span[aria-hidden="true"] {
  display: block;
  width: 20px;
  height: 2px;
  margin: 3px auto;
  border-radius: 99px;
  background: var(--bt-primary);
  transition: transform 180ms ease, opacity 180ms ease;
}

body.is-menu-open .site-menu-toggle span[aria-hidden="true"]:nth-child(2) {
  transform: translateY(5px) rotate(45deg);
}

body.is-menu-open .site-menu-toggle span[aria-hidden="true"]:nth-child(3) {
  opacity: 0;
}

body.is-menu-open .site-menu-toggle span[aria-hidden="true"]:nth-child(4) {
  transform: translateY(-5px) rotate(-45deg);
}

.site-main {
  padding-block: calc(var(--bt-header-height) + 3rem) 3rem;
}

.ee-main {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.52), rgba(251, 250, 248, 0.96)),
    var(--bt-paper);
  padding-top: 0;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-block: 2rem;
}

.service-card,
.post-card {
  min-height: 180px;
  padding: 1.25rem;
  border: 1px solid var(--bt-border);
  border-radius: 8px;
  background: #ffffff;
}

.service-card h3,
.post-card h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.service-card p,
.post-card p {
  margin: 0;
  color: var(--bt-muted);
}

.entry-header,
.entry-content,
.entry-footer {
  max-width: 760px;
  margin-inline: auto;
}

.entry-title {
  margin-top: 0;
  font-size: 3rem;
  line-height: 1.05;
  letter-spacing: 0;
}

.entry-featured-image {
  max-width: 920px;
  margin: 0 auto 2rem;
}

.entry-featured-image img {
  width: 100%;
  border-radius: 8px;
}

.site-footer {
  margin-top: auto;
  padding: 2.5rem 0;
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(23, 19, 19, 0.96), rgba(89, 0, 0, 0.94)),
    var(--bt-tape);
}

.site-footer a {
  color: #ffffff;
}

.site-footer__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  gap: 1.5rem 2rem;
  align-items: start;
}

.site-footer__brand {
  display: grid;
  gap: 1rem;
  max-width: 560px;
}

.site-footer__logo {
  width: 132px;
  max-height: 72px;
  object-fit: contain;
  padding: 0.35rem;
  border-radius: 8px;
  background: #ffffff;
}

.site-footer p {
  margin: 0;
}

.site-footer__contact {
  display: grid;
  gap: 0.45rem;
  justify-items: end;
  text-align: right;
}

.site-footer__fineprint {
  grid-column: 1 / -1;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.92rem;
}

@media (max-width: 800px) {
  .site-header__inner {
    gap: 0.75rem;
  }

  .site-menu-toggle {
    display: inline-grid;
    place-items: center;
  }

  .site-navigation {
    position: fixed;
    top: calc(var(--bt-header-height) + 0.55rem);
    right: 1rem;
    left: 1rem;
    z-index: 999;
    max-height: calc(100svh - var(--bt-header-height) - 2rem);
    padding: 0.85rem;
    border: 1px solid rgba(28, 25, 23, 0.12);
    border-radius: 8px;
    background:
      linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(247, 244, 242, 0.94)),
      var(--bt-paper);
    box-shadow: var(--bt-shadow);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    transition: opacity 180ms ease, transform 180ms ease;
    overflow-y: auto;
    backdrop-filter: blur(18px);
  }

  body.is-menu-open .site-navigation {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .primary-menu {
    align-items: stretch;
    flex-direction: column;
    gap: 0.25rem;
  }

  .primary-menu a {
    justify-content: space-between;
    min-height: 48px;
    width: 100%;
  }

  .site-cta--header {
    display: none;
  }

  .site-footer__inner {
    grid-template-columns: 1fr;
  }

  .site-footer__contact {
    justify-items: start;
    text-align: left;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  :root {
    --bt-header-height: 70px;
  }

  .site-header__inner,
  .site-footer__inner,
  .site-main,
  .site-section {
    width: min(var(--bt-max-width), calc(100% - 1.25rem));
  }

  .site-branding__logo,
  .custom-logo {
    height: 58px;
    max-width: 30vw;
  }
}
