/*
 * CMS pink rebrand - global layer.
 * Loaded only when cms_rebrand_active() (see functions/rebrand.php).
 * Block-specific styles live in each blocks/{name}/style.css.
 */

/* ---------- Tokens ---------- */

body.cms-rebrand {
  --rb-pink: #ff0090;          /* accents and text on dark */
  --rb-pink-deep: #d4007a;     /* backgrounds behind white text (AA) */
  --rb-pink-press: #b00066;
  --rb-green: #1b3d08;
  --rb-concrete: #141618;
  --rb-concrete-mid: #1a1d1f;
  --rb-concrete-soft: #222527;
  --rb-steel: #2c3033;
  --rb-rule: rgba(255, 255, 255, 0.1);
  --rb-muted: rgba(255, 255, 255, 0.72);

  /* Re-point the theme's own variables so the existing blocks pick up the brand. */
  --primary: #141618;
  --secondary: #d4007a;
  --font1: 'Anton', sans-serif;
  --font2: 'DM Sans', sans-serif;
}

body.cms-rebrand ::selection {
  background: var(--rb-pink);
  color: #fff;
}

body.cms-rebrand ::-webkit-scrollbar-thumb {
  background: var(--rb-pink-deep);
}

/* ---------- Type ---------- */

body.cms-rebrand h1,
body.cms-rebrand h2,
body.cms-rebrand h3 {
  font-family: 'Anton', sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

body.cms-rebrand h4,
body.cms-rebrand h5,
body.cms-rebrand h6 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Long-form copy (blog posts, WYSIWYG blocks): readable headings, not shouting. */
body.cms-rebrand .wys h2,
body.cms-rebrand .wys h3,
body.cms-rebrand .wyscontent h2,
body.cms-rebrand .wyscontent h3,
body.cms-rebrand .wysiwyg-block h2,
body.cms-rebrand .wysiwyg-block h3,
body.cms-rebrand .wysiwyg-container h2,
body.cms-rebrand .wysiwyg-container h3,
body.cms-rebrand .wysiwyg-container h4 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
  line-height: 1.15;
}

body.cms-rebrand p a,
body.cms-rebrand li a {
  color: var(--rb-pink-deep);
}

body.cms-rebrand .rb-accent {
  color: var(--rb-pink);
}

/* ---------- Layout helpers ---------- */

.cms-rebrand .container.rb-wrap {
  max-width: 1400px;
  padding-left: 64px;
  padding-right: 64px;
}

.cms-rebrand .rb-tex {
  background-image: repeating-linear-gradient(-45deg, transparent, transparent 3px, rgba(255, 255, 255, 0.012) 3px, rgba(255, 255, 255, 0.012) 4px);
}

.cms-rebrand .rb-tag {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--rb-pink);
}

.cms-rebrand .rb-tag::before {
  content: "";
  flex-shrink: 0;
  width: 18px;
  height: 1px;
  background: currentColor;
}

.cms-rebrand .rb-tag--muted {
  color: rgba(255, 255, 255, 0.6);
}

body.cms-rebrand .rb-display {
  margin: 0 0 24px;
  font-family: 'Anton', sans-serif;
  font-weight: 400;
  font-size: 72px;
  line-height: 0.9;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: #fff;
}

/* ---------- Buttons ---------- */

.cms-rebrand .rb-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.cms-rebrand .rb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 28px;
  border: 1px solid transparent;
  background: var(--rb-pink-deep);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: #fff;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.cms-rebrand .rb-btn:hover,
.cms-rebrand .rb-btn:focus-visible {
  background: var(--rb-pink-press);
  color: #fff;
}

.cms-rebrand .rb-btn--ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.25);
}

.cms-rebrand .rb-btn--ghost:hover,
.cms-rebrand .rb-btn--ghost:focus-visible {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.6);
}

.cms-rebrand .rb-btn--white {
  background: #fff;
  color: var(--rb-pink-press);
}

.cms-rebrand .rb-btn--white:hover,
.cms-rebrand .rb-btn--white:focus-visible {
  background: #f3f3f3;
  color: var(--rb-pink-press);
}

.cms-rebrand .rb-btn--dark {
  background: rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.35);
}

.cms-rebrand .rb-btn--dark:hover,
.cms-rebrand .rb-btn--dark:focus-visible {
  background: rgba(0, 0, 0, 0.5);
}

.cms-rebrand a:focus-visible,
.cms-rebrand button:focus-visible,
.cms-rebrand summary:focus-visible {
  outline: 2px solid var(--rb-pink);
  outline-offset: 2px;
}

/* The theme's existing buttons, re-skinned. */
body.cms-rebrand .btn {
  width: auto;
  min-width: 220px;
  padding: 0 28px;
  border-radius: 0;
  background: var(--rb-pink-deep);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #fff;
}

body.cms-rebrand .btn:hover {
  background: var(--rb-pink-press);
  color: #fff !important;
}

body.cms-rebrand .btn.btn-secondary {
  background: var(--rb-concrete);
  color: #fff;
}

body.cms-rebrand .btn.btn-secondary:hover {
  background: var(--rb-pink-deep);
}

/* ---------- Header ---------- */

.rb-skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 2000;
  padding: 12px 20px;
  background: #fff;
  color: #111;
}

.rb-skip:focus {
  left: 16px;
  top: 16px;
}

.rb-header {
  position: sticky;
  top: 0;
  z-index: 1000;
}

.admin-bar .rb-header {
  top: 32px;
}

.rb-announce {
  padding: 6px 16px;
  background: var(--rb-green);
  text-align: center;
}

.cms-rebrand .rb-announce p {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #fff;
}

.rb-navbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 87px;
  padding: 0 32px;
  background: rgba(20, 22, 24, 0.97);
  border-bottom: 1px solid var(--rb-rule);
}

.rb-brand {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
}

.rb-brand img {
  display: block;
  width: auto;
  height: 74px;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.35));
}

.cms-rebrand .rb-menu {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.cms-rebrand .rb-menu li {
  position: relative;
  margin: 0;
  list-style: none;
}

.cms-rebrand .rb-menu > li > a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 13px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.78);
  transition: color 0.2s;
}

.cms-rebrand .rb-menu > .menu-item-has-children > a::after {
  content: "";
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  opacity: 0.6;
}

.cms-rebrand .rb-menu > li:hover > a,
.cms-rebrand .rb-menu > li:focus-within > a,
.cms-rebrand .rb-menu > .current-menu-item > a,
.cms-rebrand .rb-menu > .current-menu-ancestor > a {
  color: var(--rb-pink);
}

.cms-rebrand .rb-menu .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  margin: 0;
  padding: 6px 0;
  list-style: none;
  background: var(--rb-concrete-soft);
  border: 1px solid var(--rb-rule);
  border-top: 2px solid var(--rb-pink-deep);
}

.cms-rebrand .rb-menu li:hover > .sub-menu,
.cms-rebrand .rb-menu li:focus-within > .sub-menu {
  display: block;
}

.cms-rebrand .rb-menu .sub-menu a {
  display: block;
  padding: 9px 20px;
  font-size: 14px;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.75);
  transition: color 0.15s, background 0.15s;
}

.cms-rebrand .rb-menu .sub-menu a:hover,
.cms-rebrand .rb-menu .sub-menu a:focus-visible {
  background: rgba(255, 0, 144, 0.08);
  color: var(--rb-pink);
}

.rb-nav-mobile-cta {
  display: none;
}

.rb-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.cms-rebrand .rb-actions-phone {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  white-space: nowrap;
  text-decoration: none;
  color: #fff;
}

.cms-rebrand .rb-actions-phone:hover {
  color: var(--rb-pink);
}

.rb-actions .rb-btn {
  min-width: 170px;
  min-height: 42px;
}

.rb-toggle {
  display: none;
}

.rb-callbar {
  display: none;
}

/* ---------- Footer ---------- */

.rb-footer {
  padding: 80px 0 32px;
  background-color: var(--rb-concrete-soft);
  background-image: repeating-linear-gradient(-45deg, transparent, transparent 3px, rgba(255, 255, 255, 0.012) 3px, rgba(255, 255, 255, 0.012) 4px);
  border-top: 1px solid var(--rb-rule);
}

.rb-footer-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 64px;
}

.rb-footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 48px;
  padding-top: 56px;
  margin-bottom: 56px;
  border-top: 2px solid rgba(27, 61, 8, 0.7);
}

.rb-footer-logo {
  display: block;
  width: 170px;
  height: auto;
  margin-bottom: 16px;
}

.cms-rebrand .rb-footer p {
  margin: 0 0 12px;
  color: var(--rb-muted);
}

.cms-rebrand .rb-footer .rb-footer-script {
  font-family: 'Great Vibes', cursive;
  font-size: 22px;
  color: #fff;
}

.cms-rebrand .rb-footer .rb-footer-rating {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
}

.rb-footer-rating span {
  color: var(--rb-pink);
}

.cms-rebrand .rb-footer .rb-footer-blurb {
  max-width: 260px;
  font-size: 14px;
  line-height: 1.65;
  font-weight: 300;
}

.cms-rebrand .rb-footer .rb-footer-heading {
  margin: 0 0 20px;
  font-size: 15px;
  letter-spacing: 0.1em;
  color: #fff;
}

.cms-rebrand .rb-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.cms-rebrand .rb-footer li {
  margin: 0 0 10px;
}

.cms-rebrand .rb-footer li a {
  font-size: 14px;
  text-decoration: none;
  color: var(--rb-muted);
  transition: color 0.2s;
}

.cms-rebrand .rb-footer li a:hover,
.cms-rebrand .rb-footer li a:focus-visible {
  color: var(--rb-pink);
}

.cms-rebrand .rb-footer-phone {
  display: inline-block;
  margin-bottom: 20px;
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
  color: var(--rb-pink);
}

.cms-rebrand .rb-footer .rb-footer-address {
  font-size: 14px;
  line-height: 1.6;
}

.rb-footer-address strong {
  display: block;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.rb-footer-social {
  display: flex;
  gap: 8px;
  margin-top: 20px;
}

.cms-rebrand .rb-footer-social a {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--rb-rule);
  background: rgba(255, 255, 255, 0.04);
  font-size: 15px;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.8);
  transition: background 0.2s, color 0.2s;
}

.cms-rebrand .rb-footer-social a:hover,
.cms-rebrand .rb-footer-social a:focus-visible {
  background: var(--rb-pink-deep);
  color: #fff;
}

.rb-footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 24px;
  border-top: 1px solid var(--rb-rule);
}

.cms-rebrand .rb-footer .rb-footer-bottom p {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

.cms-rebrand .rb-footer-bottom a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
}

.cms-rebrand .rb-footer-bottom a:hover {
  color: var(--rb-pink);
}

/* ---------- Gravity Forms inside .rb-form (light card) ---------- */

.cms-rebrand .rb-form .gform_wrapper {
  margin: 0;
}

.cms-rebrand .rb-form .gform_fields {
  row-gap: 14px !important;
}

.cms-rebrand .rb-form .gfield_label,
.cms-rebrand .rb-form .gform-field-label {
  margin-bottom: 5px !important;
  font-family: 'DM Sans', sans-serif;
  font-size: 11px !important;
  font-weight: 600 !important;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #444 !important;
}

.cms-rebrand .rb-form .gfield_required {
  color: var(--rb-pink-deep) !important;
}

.cms-rebrand .rb-form input[type="text"],
.cms-rebrand .rb-form input[type="tel"],
.cms-rebrand .rb-form input[type="email"],
.cms-rebrand .rb-form textarea,
.cms-rebrand .rb-form select {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px !important;
  border: 1px solid #d5d5d5 !important;
  border-radius: 0 !important;
  background: #f7f7f7 !important;
  box-shadow: none !important;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px !important;
  color: #111 !important;
}

.cms-rebrand .rb-form textarea {
  height: 96px !important;
  min-height: 96px;
  resize: vertical;
}

.cms-rebrand .rb-form input:focus,
.cms-rebrand .rb-form textarea:focus,
.cms-rebrand .rb-form select:focus {
  outline: 2px solid var(--rb-pink) !important;
  outline-offset: -1px;
}

.cms-rebrand .rb-form .gform_footer,
.cms-rebrand .rb-form .gform-footer {
  margin: 18px 0 0 !important;
  padding: 0 !important;
}

body.cms-rebrand .rb-form .gform_wrapper .gform_button,
body.cms-rebrand .rb-form .gform_wrapper input[type="submit"] {
  width: 100% !important;
  min-height: 52px;
  border: 0 !important;
  border-radius: 0 !important;
  background: var(--rb-pink-deep) !important;
  font-family: 'Anton', sans-serif !important;
  font-size: 17px !important;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff !important;
  cursor: pointer;
  transition: background 0.2s;
}

body.cms-rebrand .rb-form .gform_wrapper .gform_button:hover,
body.cms-rebrand .rb-form .gform_wrapper input[type="submit"]:hover {
  background: var(--rb-pink-press) !important;
}

/* ---------- Existing blocks on inner pages ---------- */

/* Page hero (Default Hero 3): concrete with a pink rule. */
body.cms-rebrand .default3-container {
  min-height: 300px;
  padding: 72px 0 56px;
  background-color: var(--rb-concrete);
  background-image: repeating-linear-gradient(-45deg, transparent, transparent 3px, rgba(255, 255, 255, 0.012) 3px, rgba(255, 255, 255, 0.012) 4px);
  border-bottom: 4px solid var(--rb-pink-deep);
}

body.cms-rebrand .default3-container .title3 {
  font-size: 64px;
  line-height: 0.95;
}

body.cms-rebrand p#breadcrumbs,
body.cms-rebrand p#breadcrumbs a {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

body.cms-rebrand p#breadcrumbs a:hover {
  color: var(--rb-pink);
}

/* Section eyebrows that used --secondary for small caps text sit on white: use the AA pink. */
body.cms-rebrand .flexsides h3 {
  font-family: 'DM Sans', sans-serif;
  color: var(--rb-pink-deep);
}

body.cms-rebrand .flexsides h2,
body.cms-rebrand h2.split-content-block__title {
  line-height: 0.95;
}

/* Split title + copy on the dark variant: links in pink. */
body.cms-rebrand .split-content-block--primary .split-content-block__content a {
  color: var(--rb-pink);
}

/*
 * Custom HTML sections on the service + city pages (.cms-metal-premium-page,
 * .cms-parma-roofing, ...) define their palette as --cms-* variables on their
 * root element. Re-point them here instead of editing 14 pages of content.
 * Yellow becomes the bright pink, which keeps their dark-on-yellow button text
 * at AA contrast.
 */
body.cms-rebrand [class*="cms-"] {
  --cms-yellow: #ff0090;
  --cms-yellow2: #ff3aa6;
  --cms-yellow-dark: #ff3aa6;
  --cms-yellow-soft: #ffe3f2;
  --cms-secondary: #ff0090;
  --cms-navy: #141618;
  --cms-navy2: #1a1d1f;
  --cms-navy-soft: #1a1d1f;
  --cms-dark: #141618;
  --cms-dark-2: #1a1d1f;
  --cms-primary: #141618;
  --cms-green: #1b3d08;
}

/* Every Gravity Form on the site: brand button. */
body.cms-rebrand .gform_wrapper .gform_button,
body.cms-rebrand .gform_wrapper input[type="submit"] {
  min-height: 48px;
  padding: 0 32px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: var(--rb-pink-deep) !important;
  font-family: 'DM Sans', sans-serif !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fff !important;
  cursor: pointer;
}

body.cms-rebrand .gform_wrapper .gform_button:hover,
body.cms-rebrand .gform_wrapper input[type="submit"]:hover {
  background: var(--rb-pink-press) !important;
}

/* ---------- Responsive ---------- */

@media (max-width: 1199px) {
  .cms-rebrand .container.rb-wrap,
  .rb-footer-inner {
    padding-left: 40px;
    padding-right: 40px;
  }

  body.cms-rebrand .rb-display {
    font-size: 60px;
  }

  .rb-navbar {
    height: 76px;
    padding: 0 24px;
  }

  .rb-brand img {
    height: 62px;
  }

  .rb-actions {
    display: none;
  }

  .rb-toggle {
    position: relative;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: transparent;
    cursor: pointer;
  }

  .rb-toggle span {
    position: absolute;
    width: 18px;
    height: 1.5px;
    background: #fff;
    transition: transform 0.2s;
  }

  .rb-toggle span:first-child {
    transform: translateY(-4px);
  }

  .rb-toggle span:last-child {
    transform: translateY(4px);
  }

  .rb-toggle[aria-expanded="true"] span:first-child {
    transform: rotate(45deg);
  }

  .rb-toggle[aria-expanded="true"] span:last-child {
    transform: rotate(-45deg);
  }

  .rb-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: calc(100vh - 140px);
    overflow-y: auto;
    padding: 16px 24px 24px;
    background: var(--rb-concrete);
    border-top: 1px solid var(--rb-rule);
    box-shadow: 0 22px 45px rgba(0, 0, 0, 0.4);
  }

  .rb-nav.is-open {
    display: block;
  }

  .cms-rebrand .rb-menu {
    flex-direction: column;
    align-items: stretch;
  }

  .cms-rebrand .rb-menu > li > a {
    justify-content: space-between;
    min-height: 46px;
    padding: 10px 4px;
    font-size: 15px;
  }

  .cms-rebrand .rb-menu > .menu-item-has-children > a::after {
    display: none;
  }

  .cms-rebrand .rb-menu .sub-menu,
  .cms-rebrand .rb-menu li:hover > .sub-menu {
    display: block;
    position: static;
    margin: 0 0 8px;
    border: 0;
    border-left: 2px solid var(--rb-pink-deep);
    background: var(--rb-concrete-mid);
  }

  .rb-nav-mobile-cta {
    display: block;
    margin-top: 16px;
  }

  .rb-nav-mobile-cta .rb-btn {
    width: 100%;
  }

  .rb-footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  body.cms-rebrand .default3-container .title3 {
    font-size: 52px;
  }
}

@media (max-width: 767px) {
  .cms-rebrand .container.rb-wrap,
  .rb-footer-inner {
    padding-left: 16px;
    padding-right: 16px;
  }

  body.cms-rebrand .rb-display {
    font-size: 44px;
  }

  .admin-bar .rb-header {
    top: 0;
  }

  .rb-announce {
    padding: 5px 12px;
  }

  .cms-rebrand .rb-announce p {
    font-size: 10px;
    letter-spacing: 0.13em;
  }

  .rb-navbar {
    height: 70px;
    padding: 0 16px;
  }

  .rb-brand img {
    height: 56px;
  }

  .rb-nav {
    padding: 12px 16px 20px;
  }

  .rb-callbar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 44px;
    padding: 0 16px;
    background: var(--rb-pink-deep);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    text-decoration: none;
    color: #fff;
  }

  .rb-callbar svg {
    width: 16px;
    fill: currentColor;
  }

  .rb-callbar strong {
    font-size: 14px;
    letter-spacing: 0.08em;
  }

  .rb-footer {
    padding: 56px 0 24px;
  }

  .rb-footer-grid {
    grid-template-columns: 1fr;
    gap: 36px;
    padding-top: 40px;
  }

  .rb-footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  body.cms-rebrand .default3-container {
    min-height: 220px;
    padding: 48px 0 40px;
  }

  body.cms-rebrand .default3-container .title3 {
    font-size: 40px;
  }
}
