/*
Theme Name: Rex & Flex
Theme URI: https://rexandflex.com
Author: Rex & Flex
Description: A fully editable block theme for a combined plumbing and electrical services business.
Version: 1.0.0
Requires at least: 6.6
Requires PHP: 7.4
Text Domain: rexandflex
Tags: block-patterns, full-site-editing, custom-colors, custom-logo, featured-images
*/

:root {
  --rx-navy: var(--wp--preset--color--navy, #101b2b);
  --rx-navy-soft: var(--wp--preset--color--navy-soft, #17263d);
  --rx-cream: var(--wp--preset--color--cream, #f5e9d3);
  --rx-paper: var(--wp--preset--color--paper, #fffaf0);
  --rx-red: var(--wp--preset--color--red, #e4422b);
  --rx-yellow: var(--wp--preset--color--yellow, #f4c544);
  --rx-blue: var(--wp--preset--color--blue, #316f9f);
  --rx-border: 2px solid var(--rx-navy);
}

html { scroll-behavior: smooth; }
body { margin: 0; overflow-x: hidden; }
.wp-site-blocks { padding: 0; }
.wp-site-blocks > * { margin-block-start: 0; }
a { transition: color .2s ease, background-color .2s ease, transform .2s ease, box-shadow .2s ease; }

.rx-kicker {
  margin: 0 0 16px !important;
  color: var(--rx-red);
  font-size: .76rem !important;
  font-weight: 900;
  letter-spacing: .17em;
  line-height: 1.3;
  text-transform: uppercase;
}
.rx-kicker--light { color: var(--rx-yellow); }
.rx-display {
  margin: 0;
  font-size: clamp(3rem, 5.4vw, 5.7rem) !important;
  font-weight: 950 !important;
  letter-spacing: -.065em;
  line-height: .91 !important;
}
.rx-muted { color: #596273; line-height: 1.7; }

/* Header */
.rx-header {
  min-height: 88px;
  padding: 0 max(5vw, calc((100vw - 1440px) / 2 + 5vw));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  background: var(--rx-paper);
}
.rx-brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.rx-brand .wp-block-image { margin: 0; }
.rx-brand img {
  width: 54px !important;
  height: 54px !important;
  border: 2px solid var(--rx-navy);
  border-radius: 50%;
  object-fit: cover;
}
.rx-brand-name {
  margin: 0 !important;
  font-size: clamp(1.05rem, 2vw, 1.42rem) !important;
  font-weight: 950 !important;
  letter-spacing: -.055em;
  white-space: nowrap;
}
.rx-brand-name a { text-decoration: none; }
.rx-nav { font-size: .88rem; font-weight: 750; }
.rx-nav .wp-block-navigation-item__content { padding: 7px 0; }
.rx-header-cta .wp-block-button__link {
  padding: 14px 20px;
  border: 0;
  border-radius: 4px;
  background: var(--rx-navy);
  color: #fff;
  font-size: .88rem;
  font-weight: 850;
}

/* Hero */
.rx-hero {
  min-height: 690px;
  padding: 60px max(5vw, calc((100vw - 1440px) / 2 + 5vw)) 88px;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.rx-hero-columns { width: 100%; gap: 5vw !important; align-items: center !important; }
.rx-eyebrow {
  margin: 0 0 24px !important;
  font-size: .76rem !important;
  font-weight: 900;
  letter-spacing: .17em;
  text-transform: uppercase;
}
.rx-eyebrow strong { color: var(--rx-red); }
.rx-hero-title {
  margin: 0;
  font-size: clamp(4.2rem, 7.2vw, 7.2rem) !important;
  font-weight: 950 !important;
  letter-spacing: -.065em;
  line-height: .91 !important;
}
.rx-hero-title mark { color: var(--rx-red) !important; background: transparent !important; }
.rx-hero-intro { max-width: 600px; margin: 28px 0 0 !important; color: #475165; font-size: 1.12rem !important; line-height: 1.65; }
.rx-hero-buttons { margin-top: 32px; gap: 12px; }
.rx-button .wp-block-button__link {
  min-height: 54px;
  padding: 0 23px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--rx-navy);
  border-radius: 4px;
  font-size: .9rem;
  font-weight: 900;
}
.rx-button--primary .wp-block-button__link { border-color: var(--rx-red); background: var(--rx-red); color: #fff; }
.rx-button--secondary .wp-block-button__link { background: transparent; color: var(--rx-navy); }
.rx-button .wp-block-button__link:hover { transform: translateY(-2px); box-shadow: 4px 5px 0 var(--rx-navy); }
.rx-trust { margin-top: 28px; gap: 20px; font-size: .77rem; font-weight: 750; }
.rx-trust p { margin: 0; }
.rx-trust strong { color: var(--rx-red); }
.rx-hero-art { position: relative; display: grid; place-items: center; min-width: 0; }
.rx-mascot {
  width: min(100%, 570px);
  aspect-ratio: 1;
  margin: 0 !important;
  padding: 12px;
  background: var(--rx-cream);
  border: 3px solid var(--rx-navy);
  border-radius: 50%;
  box-shadow: 18px 18px 0 var(--rx-red);
  overflow: hidden;
}
.rx-mascot img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.rx-sticker {
  position: absolute;
  z-index: 2;
  padding: 10px 13px !important;
  background: var(--rx-yellow);
  border: var(--rx-border);
  box-shadow: 4px 4px 0 var(--rx-navy);
  font-size: .72rem !important;
  font-weight: 950;
  transform: rotate(-6deg);
}
.rx-sticker--top { top: 7%; right: 1%; }
.rx-sticker--bottom { bottom: 10%; left: -2%; background: #fff; transform: rotate(5deg); }

.rx-ticker {
  padding: 19px 20px !important;
  overflow: hidden;
  background: var(--rx-red);
  color: #fff;
  border-top: var(--rx-border);
  border-bottom: var(--rx-border);
  font-weight: 950;
  letter-spacing: .12em;
  text-align: center;
  white-space: nowrap;
}
.rx-ticker strong { padding: 0 20px; color: var(--rx-yellow); }

/* Shared sections */
.rx-section { padding: 110px max(5vw, calc((100vw - 1440px) / 2 + 5vw)); }
.rx-section-heading { margin-bottom: 60px; gap: 8vw !important; align-items: flex-end !important; }
.rx-section-heading > .wp-block-column:last-child p { margin-bottom: 4px; }
.rx-service-grid { gap: 20px !important; }
.rx-service-card {
  min-height: 575px;
  padding: 44px;
  border: var(--rx-border);
}
.rx-service-card--plumbing { background: #dbeeff; }
.rx-service-card--electrical { background: var(--rx-yellow); }
.rx-service-meta { margin: 0 0 72px !important; font-size: .72rem !important; font-weight: 900; letter-spacing: .14em; }
.rx-service-card h3 { margin: 0; font-size: clamp(2.4rem, 4vw, 4.1rem) !important; font-weight: 900; letter-spacing: -.055em; line-height: .95; }
.rx-service-intro { max-width: 440px; margin: 20px 0 25px !important; color: #344056; line-height: 1.6; }
.rx-service-card ul { margin: 0 0 30px; padding-left: 1.25rem; columns: 2; column-gap: 30px; font-size: .86rem; font-weight: 750; }
.rx-service-card li { margin-bottom: 12px; break-inside: avoid; }
.rx-text-link { margin-top: 24px !important; font-size: .9rem !important; font-weight: 900; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }

/* Why us */
.rx-why {
  padding: 110px max(5vw, calc((100vw - 1440px) / 2 + 5vw));
  background: var(--rx-navy);
  color: #fff;
}
.rx-why-columns { gap: 7vw !important; }
.rx-why .rx-display mark { color: var(--rx-red) !important; background: transparent !important; }
.rx-why-intro { max-width: 560px; margin: 28px 0 32px !important; color: #bac3d2; line-height: 1.7; }
.rx-button--cream .wp-block-button__link { border-color: var(--rx-cream); background: var(--rx-cream); color: var(--rx-navy); }
.rx-button--cream .wp-block-button__link:hover { box-shadow: 4px 5px 0 var(--rx-red); }
.rx-promises { gap: 0 !important; border-top: 1px solid #40506a; border-left: 1px solid #40506a; }
.rx-promise { min-height: 235px; padding: 30px; border-right: 1px solid #40506a; border-bottom: 1px solid #40506a; }
.rx-promise-number { margin: 0 !important; color: var(--rx-red); font-size: .73rem !important; font-weight: 900; }
.rx-promise h3 { margin: 38px 0 10px; font-size: 1.4rem !important; }
.rx-promise p:last-child { margin: 0; color: #aeb8c8; font-size: .9rem; line-height: 1.55; }

/* Process */
.rx-process-columns { gap: 8vw !important; align-items: flex-start !important; }
.rx-steps { border-top: var(--rx-border); }
.rx-step { padding: 34px 0; gap: 24px; border-bottom: 1px solid #bbc0c8; }
.rx-step-number {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  margin: 0 !important;
  display: grid;
  place-items: center;
  border: var(--rx-border);
  border-radius: 50%;
  font-weight: 950;
}
.rx-step h3 { margin: 0 0 8px; font-size: 1.5rem !important; }
.rx-step p:last-child { margin: 0; color: #5d6572; line-height: 1.55; }

/* Reviews */
.rx-reviews { padding: 110px max(5vw, calc((100vw - 1440px) / 2 + 5vw)); background: var(--rx-cream); }
.rx-review-columns { gap: 6vw !important; }
.rx-rating { margin-top: 30px !important; }
.rx-rating strong { color: var(--rx-red); letter-spacing: .12em; }
.rx-review-card { margin: 0 0 16px !important; padding: 34px; background: var(--rx-paper); border: var(--rx-border); }
.rx-review-card > p:first-child { margin: 0 0 30px; font-size: clamp(1.15rem, 2vw, 1.55rem) !important; font-weight: 700; line-height: 1.45; }
.rx-reviewer { margin: 0 !important; font-size: .78rem !important; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }

/* FAQs */
.rx-faq-columns { gap: 8vw !important; }
.rx-faq-list { border-top: var(--rx-border); }
.rx-faq-list .wp-block-details { margin: 0; padding: 24px 0; border-bottom: 1px solid #b6bbc3; }
.rx-faq-list summary { cursor: pointer; font-weight: 850; }
.rx-faq-list details p { margin: 18px 48px 0 0; color: #596273; line-height: 1.65; }

/* Contact and footer */
.rx-contact { padding: 90px max(5vw, calc((100vw - 1440px) / 2 + 5vw)); background: var(--rx-red); color: #fff; }
.rx-contact-columns { gap: 8vw !important; align-items: center !important; }
.rx-contact-intro { max-width: 550px; color: #ffd9d2; line-height: 1.6; }
.rx-contact-link { padding: 22px 0; border-bottom: 2px solid rgba(255,255,255,.6); }
.rx-contact-link p { margin: 0; }
.rx-contact-link a { color: #fff; font-size: clamp(1.1rem, 2.4vw, 1.7rem); font-weight: 900; letter-spacing: -.03em; text-decoration: none; }
.rx-contact-label { margin: 0 0 4px !important; font-size: .68rem !important; font-weight: 900; letter-spacing: .15em; }
.rx-contact-note { margin-top: 18px !important; color: #ffd9d2; font-size: .8rem !important; }
.rx-footer { min-height: 112px; padding: 25px max(5vw, calc((100vw - 1440px) / 2 + 5vw)); background: var(--rx-navy); color: #fff; }
.rx-footer-inner { justify-content: space-between; gap: 24px; }
.rx-footer p { margin: 0; color: #aeb8c8; font-size: .74rem !important; }
.rx-footer a { color: #fff; }
.rx-footer .rx-brand img { border-color: var(--rx-cream); }
.rx-mobile-call { display: none; }

/* Interior pages */
.rx-page { min-height: 55vh; padding: 90px max(5vw, calc((100vw - 1100px) / 2 + 5vw)); }
.rx-page .wp-block-post-title { font-size: clamp(3rem, 6vw, 6rem); letter-spacing: -.055em; line-height: .95; }
.rx-page .wp-block-post-content { font-size: 1.05rem; line-height: 1.75; }

@media (max-width: 980px) {
  .rx-hero-columns, .rx-section-heading, .rx-why-columns, .rx-process-columns, .rx-review-columns, .rx-faq-columns, .rx-contact-columns { flex-wrap: wrap !important; }
  .rx-hero-columns > .wp-block-column, .rx-section-heading > .wp-block-column, .rx-why-columns > .wp-block-column, .rx-process-columns > .wp-block-column, .rx-review-columns > .wp-block-column, .rx-faq-columns > .wp-block-column, .rx-contact-columns > .wp-block-column { flex-basis: 100% !important; }
  .rx-hero-art { max-width: 620px; width: 86%; margin: 30px auto 0; }
  .rx-section-heading, .rx-why-columns, .rx-process-columns, .rx-review-columns, .rx-faq-columns, .rx-contact-columns { gap: 52px !important; }
}

@media (max-width: 680px) {
  .rx-header { min-height: 76px; padding: 0 20px; }
  .rx-brand img { width: 46px !important; height: 46px !important; }
  .rx-header .wp-block-buttons { display: none; }
  .rx-nav .wp-block-navigation__responsive-container-open { display: flex; }
  .rx-hero { min-height: auto; padding: 46px 20px 70px; }
  .rx-hero-title { font-size: clamp(3.6rem, 17vw, 5.2rem) !important; }
  .rx-hero-intro { font-size: 1rem !important; }
  .rx-hero-buttons { display: grid; }
  .rx-hero-buttons .wp-block-button, .rx-hero-buttons .wp-block-button__link { width: 100%; }
  .rx-hero-art { width: 92%; }
  .rx-mascot { box-shadow: 10px 10px 0 var(--rx-red); }
  .rx-sticker--top { right: -5%; }
  .rx-sticker--bottom { left: -7%; }
  .rx-ticker { text-align: left; }
  .rx-section, .rx-why, .rx-reviews, .rx-contact { padding: 80px 20px; }
  .rx-display { font-size: clamp(2.9rem, 14vw, 4.4rem) !important; }
  .rx-service-grid { flex-wrap: wrap !important; }
  .rx-service-grid > .wp-block-column { flex-basis: 100% !important; }
  .rx-service-card { min-height: auto; padding: 30px 24px; }
  .rx-service-meta { margin-bottom: 48px !important; }
  .rx-service-card ul { columns: 1; }
  .rx-promises { flex-wrap: wrap !important; }
  .rx-promises > .wp-block-column { flex-basis: 100% !important; }
  .rx-promise { min-height: 190px; }
  .rx-review-card { padding: 26px 22px; }
  .rx-footer { padding: 28px 20px 90px; }
  .rx-footer-inner { flex-direction: column; align-items: flex-start; }
  .rx-mobile-call {
    position: fixed;
    z-index: 100;
    left: 14px;
    right: 14px;
    bottom: 12px;
    min-height: 54px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--rx-yellow);
    border: var(--rx-border);
    box-shadow: 4px 4px 0 var(--rx-navy);
    color: var(--rx-navy);
    font-weight: 950;
    text-decoration: none;
  }
  .rx-mobile-call .wp-block-button__link {
    width: 100%;
    padding: 14px 0;
    display: flex;
    justify-content: space-between;
    background: transparent;
    color: var(--rx-navy);
    border: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}

/* Keep editing comfortable inside the Site Editor. */
.editor-styles-wrapper .rx-mobile-call { position: static; display: block; margin: 20px; }
.editor-styles-wrapper .rx-hero-art { min-height: 420px; }
