/*
Theme Name: HomeFix
Description: Theme for the HomeFix demo: a home repair service with a quote quiz, visit booking and online payment.
Version: 2.0.0
Requires PHP: 8.1
Text Domain: homefix
*/

/* Manrope, SIL Open Font License 1.1: see assets/fonts/OFL.txt. One variable file covers 400–800. */
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("assets/fonts/manrope-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("assets/fonts/manrope-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ink: #14212b;
  --ink-2: #24384a;
  --muted: #5b6b76;
  --line: #e4e9ec;
  --paper: #ffffff;
  --cream: #faf8f3;
  --soft: #f1f6f4;
  --brand: #0e7c66;
  --brand-2: #139078;
  --brand-dark: #0a5e4d;
  --brand-tint: #e3f2ed;
  --accent: #f2a541;
  --accent-tint: #fdf1de;
  --danger: #b42318;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(20, 33, 43, 0.06), 0 8px 24px rgba(20, 33, 43, 0.08);
  --shadow-lg: 0 24px 60px rgba(20, 33, 43, 0.16);
  --wrap: 1180px;
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--brand);
}

h1,
h2,
h3 {
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 20px;
}

.muted {
  color: var(--muted);
}

.eyebrow {
  display: inline-block;
  margin-bottom: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--brand-tint);
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.eyebrow-light {
  background: rgba(255, 255, 255, 0.12);
  color: #cfe9e0;
}

/* Demo note and header */
.demo-note {
  padding: 8px 20px;
  background: var(--ink);
  color: #d6dee3;
  font-size: 13px;
  text-align: center;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid transparent;
  backdrop-filter: saturate(1.4) blur(10px);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.site-header.is-scrolled {
  border-color: var(--line);
  box-shadow: 0 6px 20px rgba(20, 33, 43, 0.06);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 21px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  color: #fff;
  font-size: 18px;
  box-shadow: 0 6px 16px rgba(14, 124, 102, 0.35);
}

.site-nav ul {
  display: flex;
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
}

.site-nav a:hover {
  color: var(--brand);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-phone {
  color: var(--ink);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 18px;
}

/* Buttons */
.btn,
.wp-block-button__link,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce #place_order {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border: 0;
  border-radius: 999px;
  background: var(--brand);
  color: #fff !important;
  font-family: var(--font);
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 8px 18px rgba(14, 124, 102, 0.25);
}

.btn:hover,
.wp-block-button__link:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce #place_order:hover {
  background: var(--brand-dark);
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.6;
  cursor: progress;
  transform: none;
}

.btn-lg {
  padding: 16px 28px;
  font-size: 17px;
}

.btn-ghost {
  background: transparent;
  color: var(--ink) !important;
  border: 2px solid var(--line);
  box-shadow: none;
}

.btn-ghost:hover {
  background: var(--soft);
  border-color: var(--brand);
}

.btn-light {
  background: #fff;
  color: var(--brand-dark) !important;
}

.btn-light:hover {
  background: var(--brand-tint);
}

/* Layout pieces */
.site-main {
  min-height: 60vh;
}

.page-head {
  padding: 48px 0 8px;
  background: linear-gradient(180deg, var(--soft) 0%, #fff 100%);
}

.page-title {
  margin: 0 0 8px;
  font-size: clamp(30px, 4vw, 44px);
}

.entry {
  padding-bottom: 72px;
}

.entry-content > p:first-child {
  max-width: 760px;
  color: var(--muted);
  font-size: 18px;
}

.section {
  padding: 88px 0;
}

.section-soft {
  background: var(--soft);
}

.section-dark {
  background: var(--ink);
  color: #fff;
}

.section-head {
  max-width: 640px;
  margin-bottom: 36px;
}

.section h2 {
  margin: 0 0 12px;
  font-size: clamp(28px, 3.4vw, 40px);
}

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: 64px 0 88px;
  background: radial-gradient(1200px 500px at 85% 0%, var(--accent-tint) 0%, transparent 60%),
    radial-gradient(900px 500px at 0% 100%, var(--brand-tint) 0%, transparent 60%), var(--cream);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  gap: 48px;
}

.hero h1 {
  margin: 0 0 20px;
  font-size: clamp(36px, 5.2vw, 62px);
  font-weight: 800;
}

.mark {
  background: linear-gradient(transparent 62%, rgba(242, 165, 65, 0.55) 62%);
}

.lead {
  max-width: 560px;
  margin: 0 0 32px;
  font-size: 19px;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.trust {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
}

.trust strong {
  display: block;
  font-size: 30px;
  font-weight: 800;
  line-height: 1.1;
}

.trust span {
  color: var(--muted);
  font-size: 14px;
}

.hero-art {
  position: relative;
}

.hero-art img {
  width: 100%;
  border-radius: 28px;
  box-shadow: var(--shadow-lg);
}

.float-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow-lg);
  font-size: 14px;
  animation: float 6s ease-in-out infinite;
}

.float-card strong {
  display: block;
}

.float-card small {
  color: var(--muted);
}

.float-card-top {
  top: 24px;
  left: -28px;
}

.float-card-bottom {
  right: -18px;
  bottom: 28px;
  animation-delay: -3s;
}

.float-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--brand-tint);
  color: var(--brand);
  font-weight: 800;
}

.float-icon-accent {
  background: var(--accent-tint);
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

/* Cards */
.cards {
  display: grid;
  gap: 20px;
}

.cards-4 {
  grid-template-columns: repeat(4, 1fr);
}

.cards-3 {
  grid-template-columns: repeat(3, 1fr);
}

.card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card h3 {
  margin: 16px 0 8px;
  font-size: 20px;
}

.card p {
  margin: 0;
  color: var(--muted);
}

.card .price {
  margin-top: 16px;
  font-weight: 800;
  color: var(--brand);
}

.service-icon {
  display: block;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background-color: var(--brand-tint);
  background-position: center;
  background-repeat: no-repeat;
  background-size: 28px;
}

.icon-key {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230e7c66' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='7.5' cy='15.5' r='4.5'/%3E%3Cpath d='M10.7 12.3 21 2m-4 4 3 3m-6-0 2 2'/%3E%3C/svg%3E");
}

.icon-bath {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230e7c66' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12h18v3a5 5 0 0 1-5 5H8a5 5 0 0 1-5-5v-3zM6 12V5a2 2 0 0 1 4 0M7 20l-1 2m11-2 1 2'/%3E%3C/svg%3E");
}

.icon-roller {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230e7c66' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='15' height='6' rx='2'/%3E%3Cpath d='M18 6h2v5h-8v3m-1 0h2v7h-2z'/%3E%3C/svg%3E");
}

.icon-bolt {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230e7c66' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M13 2 4 14h7l-1 8 9-12h-7z'/%3E%3C/svg%3E");
}

/* Before / after */
.ba-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  align-items: center;
  gap: 48px;
}

.checks {
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.checks li {
  position: relative;
  margin-bottom: 10px;
  padding-left: 32px;
  font-weight: 600;
}

.checks li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 1px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 13px;
}

.ba {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 8 / 5;
  user-select: none;
}

.ba-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ba-before {
  position: absolute;
  inset: 0;
  clip-path: inset(0 calc(100% - var(--pos)) 0 0);
}

.ba-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  width: 4px;
  margin-left: -2px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
  pointer-events: none;
}

.ba-handle::after {
  content: "⟷";
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin: -23px 0 0 -23px;
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  font-weight: 800;
  box-shadow: var(--shadow-lg);
}

.ba-range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
}

.ba-label {
  position: absolute;
  top: 16px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(20, 33, 43, 0.75);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  pointer-events: none;
}

.ba-label-before {
  left: 16px;
}

.ba-label-after {
  right: 16px;
}

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  position: relative;
  padding: 72px 24px 24px;
  border-radius: var(--radius);
  background: var(--cream);
  border: 1px solid var(--line);
}

.steps li::before {
  counter-increment: step;
  content: "0" counter(step);
  position: absolute;
  top: 20px;
  left: 24px;
  font-size: 32px;
  font-weight: 800;
  color: var(--accent);
}

.steps strong {
  display: block;
  margin-bottom: 6px;
  font-size: 18px;
}

.steps span {
  color: var(--muted);
}

/* Projects */
.project {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--ink-2);
  transition: transform 0.2s ease;
}

.project:hover {
  transform: translateY(-4px);
}

.project-cover {
  position: relative;
  aspect-ratio: 16 / 10;
  background-size: cover;
  background-position: center;
}

.tone-green .project-cover {
  background: linear-gradient(160deg, #139078 0%, #0a5e4d 100%);
}

.tone-sand .project-cover {
  background: linear-gradient(160deg, #f2c27b 0%, #d9a96b 100%);
}

.tone-ink .project-cover {
  background: linear-gradient(160deg, #3d5a73 0%, #24384a 100%);
}

.project-cover::after {
  content: "";
  position: absolute;
  inset: 18% 14% 0;
  border-radius: 16px 16px 0 0;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 -40px 0 rgba(255, 255, 255, 0.12);
}

.project-tag {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 1;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(20, 33, 43, 0.6);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.project-body {
  padding: 20px 24px 24px;
}

.project-body h3 {
  margin: 0 0 6px;
  font-size: 19px;
}

.project-body p {
  margin: 0 0 12px;
  color: #b8c6cf;
}

.project-body strong {
  color: var(--accent);
  font-size: 18px;
}

/* Reviews */
.review {
  margin: 0;
}

.stars {
  color: var(--accent);
  letter-spacing: 2px;
}

.review blockquote {
  margin: 12px 0 16px;
  font-size: 17px;
}

.review figcaption {
  color: var(--muted);
  font-size: 15px;
}

/* FAQ */
.faq-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 48px;
}

.faq details {
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
}

.faq summary {
  position: relative;
  padding: 18px 52px 18px 20px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  position: absolute;
  top: 50%;
  right: 20px;
  margin-top: -14px;
  font-size: 24px;
  line-height: 28px;
  color: var(--brand);
  transition: transform 0.2s ease;
}

.faq details[open] summary::after {
  transform: rotate(45deg);
}

.faq details p {
  margin: 0;
  padding: 0 20px 20px;
  color: var(--muted);
}

/* CTA band */
.cta-band {
  padding: 80px 0;
  background: radial-gradient(800px 300px at 80% 0%, rgba(242, 165, 65, 0.35) 0%, transparent 60%),
    linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: #fff;
  text-align: center;
}

.cta-band h2 {
  margin: 0 0 12px;
  font-size: clamp(28px, 3.4vw, 40px);
}

.cta-band p {
  margin: 0 0 28px;
  color: #d4ece4;
}

/* Prices table (Prices page) */
.price-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.price-table th,
.price-table td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.price-table th {
  background: var(--soft);
}

.price-table td:last-child {
  white-space: nowrap;
  font-weight: 800;
  color: var(--brand);
}

/* Footer */
.site-footer {
  padding: 56px 0 32px;
  background: var(--ink);
  color: #b8c6cf;
  font-size: 15px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 32px;
}

.site-footer .footer-title {
  margin: 0 0 12px;
  color: #fff;
  font-weight: 800;
}

.site-footer a {
  color: #dce6ea;
  text-decoration: none;
}

.site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer li {
  margin-bottom: 8px;
}

.footer-bottom {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 14px;
}

/* Floating actions */
.to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  display: none;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
}

.to-top.is-visible {
  display: block;
}

.mobile-cta {
  display: none;
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.no-js .reveal {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal,
  .float-card {
    opacity: 1;
    transform: none;
    animation: none;
    transition: none;
  }
}

/* WooCommerce pages */
.woocommerce .wrap,
.woocommerce-page .wrap {
  padding-top: 8px;
}

.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-family: var(--font);
}

.woocommerce #payment,
.woocommerce-checkout #payment {
  border-radius: var(--radius);
  background: var(--soft);
}

.woocommerce #payment div.payment_box {
  border-radius: var(--radius-sm);
  background: #fff;
  box-shadow: var(--shadow);
}

.woocommerce #payment div.payment_box::before {
  display: none;
}

.woocommerce-order-overview,
.woocommerce-order-details,
.woocommerce-customer-details {
  max-width: 760px;
}

@media (max-width: 1024px) {
  .cards-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .steps {
    grid-template-columns: repeat(2, 1fr);
  }

  .header-phone {
    display: none;
  }
}

@media (max-width: 860px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    padding: 16px 20px;
    background: #fff;
    border-bottom: 1px solid var(--line);
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    gap: 14px;
  }

  .header-actions .btn {
    display: none;
  }

  .hero {
    padding: 36px 0 56px;
  }

  .hero-grid,
  .ba-grid,
  .faq-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-art {
    order: -1;
  }

  .float-card-top {
    left: 8px;
    top: -14px;
  }

  .float-card-bottom {
    right: 8px;
    bottom: -14px;
  }

  .cards-3 {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 64px 0;
  }

  .trust {
    gap: 22px;
  }

  .mobile-cta {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 25;
    display: flex;
    transform: translateY(140%);
    transition: transform 0.25s ease;
  }

  .mobile-cta.is-visible {
    transform: none;
  }

  .mobile-cta .btn {
    flex: 1;
  }

  .to-top {
    bottom: 84px;
  }

  body {
    padding-bottom: 8px;
  }
}

@media (max-width: 560px) {
  .cards-4,
  .steps {
    grid-template-columns: 1fr;
  }

  body {
    font-size: 16px;
  }
}
