/*
Theme Name: Rubios Construction
Theme URI: https://rubiosconstructionservices.com/
Author: Rubio's Construction Services
Description: Self-contained theme for Rubio's Construction Services. Page copy and images live in this theme, so a fresh WordPress install only needs this folder.
Version: 1.1.11
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: rubios
*/

:root {
  --gold: #ffb84f;
  --gold-dark: #e88128;
  --red: #c8102e;
  --ink: #2a2722;
  --muted: #5c5852;
  --paper: #ffffff;
  --shade: #f6f4f1;
  --line: #e6e1da;
  --hero: #141210;
  --max: 1180px;
  --header: 76px;
  --shadow: 0 12px 40px rgba(42, 39, 34, 0.08);
  --font: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
}

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

a {
  color: inherit;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -40px;
  background: var(--gold);
  color: var(--ink);
  padding: 8px 12px;
  z-index: 100;
}

.skip-link:focus {
  top: 12px;
}

.wrap {
  width: min(var(--max), calc(100% - 32px));
  margin-inline: auto;
}

.nav-inner,
.finance-grid,
.split,
.services,
.quotes,
.partners,
.work,
.contact-grid,
.footer-inner {
  width: min(var(--max), calc(100% - 32px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: #141210;
  color: #fff;
}

.home .site-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  background: transparent;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 36px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 0.92rem;
}

.topbar img {
  width: 16px;
  height: 16px;
  filter: brightness(0) invert(1);
}

.topbar a {
  color: #fff;
  text-decoration: none;
}

.topbar a:hover,
.topbar a:focus-visible {
  color: var(--gold);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
  min-height: 108px;
  padding: 12px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #fff;
  text-decoration: none;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.brand img {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
}

.brand span {
  font-size: 1.45rem;
  line-height: 1.15;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  border: 0;
  cursor: pointer;
  border-radius: 7px;
  font-weight: 650;
  font-family: inherit;
  line-height: 1.2;
}

.btn-phone {
  border: 1px solid #ff4f4f;
  color: #fff;
  padding: 12px 18px;
  border-radius: 4px;
  background: #ff4f4f;
  flex: none;
}

.btn-phone:hover,
.btn-phone:focus-visible,
.btn-phone:active {
  background: #fff;
  color: #000;
  border-color: #fff;
}

.btn-light {
  background: #fff;
  color: var(--ink);
  padding: 16px 28px;
}

.btn-light:hover,
.btn-light:focus-visible {
  background: var(--gold);
}

.btn-gold {
  background: var(--gold-dark);
  color: #fff;
  padding: 14px 22px;
}

.btn-gold:hover,
.btn-gold:focus-visible {
  background: #cf6814;
}

.btn-dark {
  background: var(--ink);
  color: #fff;
  padding: 16px 28px;
}

.btn-dark:hover,
.btn-dark:focus-visible {
  background: #000;
}

.hero {
  min-height: 100vh;
  display: grid;
  align-items: center;
  color: #fff;
  background-color: var(--hero);
  background-size: cover;
  background-position: center;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 7, 6, 0.72), rgba(8, 7, 6, 0.78));
}

.hero-inner {
  position: relative;
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: 168px 0 72px;
  text-align: center;
}

.hero h1 {
  margin: 0 0 18px;
  font-size: clamp(2.2rem, 4.4vw, 3.7rem);
  font-weight: 700;
  line-height: 1.12;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

.hero p {
  margin: 0 auto;
  max-width: 46rem;
  font-size: 1rem;
  font-weight: 400;
}

.hero .btn {
  margin-top: 32px;
}

.hero-inner {
  animation: rubios-slide-up 1.2s ease both;
}

@keyframes rubios-slide-up {
  from {
    transform: translate3d(0, 100%, 0);
  }
  to {
    transform: translate3d(0, 0, 0);
  }
}

.js .rise {
  opacity: 0;
  transform: translate3d(0, 100px, 0);
  transition: opacity 1.2s ease, transform 1.2s ease;
}

.js .rise.is-in {
  opacity: 1;
  transform: none;
}

.finance {
  background: #000;
  color: #fff;
  padding: 28px 0 36px;
}

.finance-grid {
  display: grid;
  grid-template-columns: minmax(160px, 240px) 1fr;
  gap: 36px;
  align-items: center;
  background: #000;
  border-radius: 18px;
  padding: 28px;
}

.finance-grid img {
  background: #000;
}

.finance h2 {
  margin: 0 0 10px;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.finance ul {
  margin: 12px 0 18px;
  padding-left: 18px;
}

.finance .fine {
  margin: 16px 0 0;
  font-size: 0.8rem;
  color: #d9d3cb;
}

.section {
  padding: 88px 0;
}

.section h2,
.lead-title {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  line-height: 1.2;
  margin: 0 0 12px;
}

.intro {
  max-width: 70rem;
  color: var(--ink);
  margin: 0;
}

.services {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
  margin-top: 48px;
  counter-reset: service;
}

.card {
  position: relative;
  background: #fff;
  box-shadow: var(--shadow);
  border-radius: 16px;
  padding: 32px 24px 36px;
  text-align: center;
  border-top: 3px solid transparent;
  overflow: hidden;
  counter-increment: service;
}

.card:nth-child(1) {
  grid-column: span 4;
}

.card:nth-child(n + 2) {
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.card::before {
  content: counter(service, decimal-leading-zero);
  position: absolute;
  top: 16px;
  right: 18px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--gold-dark);
}

.card img.icon {
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: 50%;
  margin: 8px auto 18px;
}

.card h3 {
  margin: 0 0 10px;
  font-size: 1.2rem;
}

.card-lead {
  display: flex;
  align-items: center;
  gap: 32px;
  text-align: left;
  padding: 40px 44px;
  color: #fff;
  background:
    radial-gradient(circle at 100% 120%, rgba(255, 184, 79, 0.28), transparent 42%),
    linear-gradient(145deg, #171512 0%, #2c261f 72%);
  border-top-color: transparent;
  box-shadow: 0 18px 50px rgba(20, 16, 12, 0.28);
}

.card-lead::before {
  top: auto;
  right: 20px;
  bottom: -8px;
  font-size: 5.5rem;
  letter-spacing: 0;
  line-height: 1;
  color: rgba(255, 184, 79, 0.16);
}

.card-lead img.icon {
  width: 128px;
  height: 128px;
  margin: 0;
  flex: none;
  box-shadow: 0 0 0 8px rgba(255, 184, 79, 0.18);
}

.card-lead h3 {
  color: #fff;
  font-size: clamp(1.5rem, 2vw, 1.9rem);
  margin-bottom: 12px;
}

.card.card-lead p {
  color: #e4ddd4;
  max-width: 36rem;
}

.card p,
.partner p,
.work-card p,
.quote p {
  margin: 0;
  color: var(--muted);
}

.shade {
  background: var(--shade);
}

.split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 64px;
  align-items: center;
}

.reasons {
  display: grid;
  gap: 16px;
  margin-top: 20px;
}

.reasons strong {
  display: block;
  color: var(--ink);
}

.about-photo {
  width: 100%;
  border-radius: 8px;
  object-fit: cover;
  min-height: 280px;
  max-height: 520px;
}

.testimonials {
  color: #fff;
  background-color: #161411;
  background-size: cover;
  background-position: center;
  position: relative;
}

.testimonials::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(13, 12, 10, 0.9);
  z-index: 0;
}

.testimonials .wrap,
.testimonials .quotes {
  position: relative;
  z-index: 1;
}

.kicker {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
  font-weight: 700;
}

.kicker::before,
.kicker::after {
  content: "";
  width: 30px;
  height: 2px;
  background: var(--gold);
}

.center {
  text-align: center;
}

.center .sub {
  max-width: 40rem;
  margin: 8px auto 0;
}

.quotes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 40px;
}

.quote {
  border: 1px solid rgba(242, 237, 230, 0.35);
  border-radius: 8px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.03);
}

.quote img.stars {
  width: 94px;
  margin-bottom: 14px;
}

.person {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
}

.person img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
}

.person strong {
  display: block;
}

.person span,
.quote p {
  color: #ddd8d0;
}

.partners {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 36px;
}

.partner {
  background: #fff;
  border-radius: 12px;
  padding: 28px 24px 32px;
  box-shadow: var(--shadow);
}

.partner h3 {
  margin: 0 0 8px;
  font-size: 1.2rem;
}

.partner ul {
  margin: 10px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.work {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 48px;
}

.work-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.work-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

@media (hover: hover) and (pointer: fine) {
  .card,
  .work-card,
  .quote,
  .partner,
  .btn {
    transition: transform 0.35s ease, box-shadow 0.35s ease, background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
  }

  .card img.icon,
  .work-card img {
    transition: transform 0.45s ease;
  }

  .card:hover,
  .work-card:hover,
  .partner:hover {
    transform: translateY(-12px);
    box-shadow: 0 24px 50px rgba(42, 39, 34, 0.18);
  }

  .card:hover {
    border-top-color: var(--gold-dark);
  }

  .card.card-lead:hover {
    border-top-color: transparent;
    box-shadow: 0 28px 60px rgba(20, 16, 12, 0.38);
  }

  .card:hover img.icon {
    transform: scale(1.08) rotate(-4deg);
  }

  .work-card:hover img {
    transform: scale(1.08);
  }

  .quote:hover {
    transform: translateY(-12px);
    border-color: var(--gold);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  }
}

@media (prefers-reduced-motion: reduce) {
  .card,
  .work-card,
  .quote,
  .partner,
  .card img.icon,
  .work-card img,
  .btn {
    transition: none;
  }

  .hero-inner {
    animation: none;
  }

  .rise {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

.work-card div {
  padding: 20px 20px 24px;
}

.work-card h3 {
  margin: 0 0 8px;
  font-size: 1.2rem;
}

.section-cta {
  display: flex;
  justify-content: center;
  margin-top: 36px;
}

.contact {
  background: var(--gold);
}

.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 40px;
  align-items: center;
}

.contact h2 {
  margin-top: 0;
}

.mail-line {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
}

.mail-line img {
  width: 28px;
  height: 28px;
}

.form-card {
  background: #fff;
  color: var(--ink);
  border-radius: 8px;
  padding: 32px 28px;
  box-shadow: var(--shadow);
}

.form-card h3 {
  margin: 0 0 16px;
  font-size: 1.6rem;
}

.form-card label {
  display: block;
  font-size: 0.92rem;
  margin: 12px 0 6px;
}

.form-card input,
.form-card textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px 12px;
  font: inherit;
  background: #fff;
}

.form-card input:focus,
.form-card textarea:focus {
  outline: 2px solid var(--gold-dark);
  border-color: transparent;
}

.form-card .cf-turnstile {
  margin: 8px 0 16px;
}

.form-card textarea {
  min-height: 120px;
  resize: vertical;
}

.form-card .btn {
  margin-top: 16px;
  width: 100%;
}

.notice {
  padding: 10px 12px;
  border-radius: 6px;
  margin-bottom: 12px;
}

.notice.ok {
  background: #e8f6ec;
  color: #146c36;
}

.notice.bad {
  background: #fdecec;
  color: #9d1c1c;
}

.hp {
  position: absolute;
  left: -9999px;
}

.site-footer {
  background: var(--ink);
  color: #fff;
  padding: 48px 0 28px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-brand img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
}

.footer-brand strong {
  font-size: 1.25rem;
}

.legal {
  margin: 32px 0 0;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px 32px;
  flex-wrap: wrap;
  color: #c8c2ba;
  font-size: 0.9rem;
}

.legal p {
  margin: 0;
}

.legal a {
  color: #fff;
  text-decoration: none;
}

.legal a:hover,
.legal a:focus-visible {
  color: var(--gold);
}

.to-top {
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--ink);
  text-decoration: none;
  display: grid;
  place-items: center;
  font-weight: 700;
  box-shadow: var(--shadow);
}

.page-main {
  padding: 48px 0 72px;
}

.page-main .entry {
  width: min(760px, calc(100% - 32px));
  margin: 0 auto;
}

@media (max-width: 980px) {
  .quotes,
  .partners,
  .work,
  .split,
  .finance-grid,
  .contact-grid {
    grid-template-columns: 1fr 1fr;
  }

  .split,
  .finance-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .quotes,
  .partners,
  .work {
    grid-template-columns: 1fr 1fr;
  }

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

  .services .card-lead {
    grid-column: 1 / -1;
  }

  .services .card:nth-child(n + 2) {
    grid-column: auto;
  }
}

@media (max-width: 760px) {
  .topbar {
    padding-inline: 16px;
    font-size: 0.8rem;
  }

  .nav-inner {
    width: min(1180px, calc(100% - 32px));
    min-height: 84px;
  }

  .brand img {
    width: 64px;
    height: 64px;
  }

  .brand span {
    font-size: 1.05rem;
  }

  .btn-phone {
    padding: 10px 12px;
    font-size: 0.85rem;
  }

  .hero-inner {
    padding-top: 148px;
  }

  .quotes,
  .partners,
  .work {
    grid-template-columns: 1fr;
  }

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

  .services .card-lead,
  .services .card:nth-child(n + 2) {
    grid-column: auto;
  }

  .card-lead {
    flex-direction: column;
    text-align: center;
    padding: 32px 24px 36px;
  }

  .card-lead img.icon {
    margin-inline: auto;
  }

  .card-lead::before {
    font-size: 3.5rem;
  }

  .section {
    padding: 64px 0;
  }

  .legal {
    flex-direction: column;
    align-items: flex-start;
  }
}
