/* ==========================================================================
   Licea's Carpet Cleaning — design system
   Aesthetic: "clinically clean, quietly confident"
   ========================================================================== */

@font-face {
  font-family: 'Fraunces';
  src: url('../fonts/fraunces-var.woff2') format('woff2-variations');
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: 'Space Grotesk';
  src: url('../fonts/space-grotesk-var.woff2') format('woff2-variations');
  font-weight: 300 700;
  font-display: swap;
}

:root {
  /* color */
  --ink: #0e2433;
  --ink-soft: #40586a;
  --paper: #fdfefe;
  --wash: #eef5fa;
  --wash-deep: #ddebf5;
  --powder: #a9cde8;
  --accent: #1d6a9e;
  --accent-deep: #14547f;
  --line: #d7e4ee;
  --good: #2c7a4b;

  /* type */
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Space Grotesk', 'Avenir Next', sans-serif;

  /* rhythm */
  --space-section: clamp(4.5rem, 10vw, 8rem);
  --radius: 18px;
  --radius-lg: 28px;
  --shadow-soft: 0 20px 50px -20px rgba(14, 36, 51, 0.18);
  --shadow-lift: 0 30px 70px -25px rgba(14, 36, 51, 0.28);
  --header-h: 76px;
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; }

::selection { background: var(--powder); color: var(--ink); }

/* ---------- typography ---------- */
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.08; letter-spacing: -0.01em; }
.display { font-size: clamp(2.6rem, 6.5vw, 4.6rem); }
h2 { font-size: clamp(2rem, 4.2vw, 3rem); }
h3 { font-size: 1.35rem; line-height: 1.25; }
.lede { font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: var(--ink-soft); max-width: 56ch; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.6em;
  font-size: 0.78rem; font-weight: 500; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before { content: ''; width: 2.2em; height: 1px; background: var(--accent); opacity: 0.6; }

.accent-word { position: relative; }
.accent-word em {
  font-style: italic; font-weight: 600; color: var(--accent);
}

/* ---------- layout ---------- */
.wrap { width: min(1180px, 92vw); margin-inline: auto; }
section { padding-block: var(--space-section); }
.section-head { max-width: 60ch; margin-bottom: clamp(2.2rem, 5vw, 3.6rem); display: grid; gap: 1rem; }

.wash-band { background: linear-gradient(180deg, var(--wash) 0%, var(--paper) 100%); }
.wash-band-full { background: var(--wash); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.55em;
  padding: 0.95em 1.7em; border-radius: 999px; border: 0;
  font-weight: 500; font-size: 1rem; text-decoration: none; line-height: 1.2;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}
.btn svg { width: 1.1em; height: 1.1em; flex: none; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 12px 30px -12px rgba(29, 106, 158, 0.55); }
.btn-primary:hover { background: var(--accent-deep); transform: translateY(-2px); box-shadow: 0 18px 36px -14px rgba(29, 106, 158, 0.6); }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1.5px var(--accent); color: var(--accent); transform: translateY(-2px); }
.btn-light { background: #fff; color: var(--accent-deep); }
.btn-light:hover { transform: translateY(-2px); box-shadow: var(--shadow-soft); }
.btn-lg { padding: 1.1em 2.1em; font-size: 1.06rem; }

/* ---------- header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--header-h);
  display: flex; align-items: center;
  background: var(--paper);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 2rem; }

.brand { display: flex; align-items: center; text-decoration: none; }
.brand-logo { height: 62px; width: auto; display: block; }

.site-nav { display: flex; gap: 1.8rem; margin-left: auto; }
.site-nav a {
  text-decoration: none; font-size: 0.95rem; font-weight: 500; color: var(--ink-soft);
  padding: 0.3em 0; position: relative; transition: color 0.15s ease;
}
.site-nav a::after {
  content: ''; position: absolute; left: 0; right: 100%; bottom: 0; height: 2px;
  background: var(--accent); transition: right 0.2s ease;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }
.site-nav a:hover::after, .site-nav a[aria-current="page"]::after { right: 0; }

.header-call { margin-left: 0.5rem; }
.nav-toggle {
  display: none; margin-left: auto; background: none; border: 0; padding: 0.5rem;
  flex-direction: column; gap: 5px;
}
.nav-toggle span { width: 24px; height: 2px; background: var(--ink); transition: transform 0.25s ease, opacity 0.25s ease; }

@media (max-width: 900px) {
  .site-nav {
    position: fixed; inset: var(--header-h) 0 auto 0; z-index: 49;
    flex-direction: column; gap: 0; padding: 0.6rem 4vw 1.4rem;
    background: rgba(253, 254, 254, 0.97); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    transform: translateY(-115%); transition: transform 0.28s ease;
  }
  .site-nav.open { transform: translateY(0); }
  .site-nav a { padding: 0.85em 0; font-size: 1.05rem; border-bottom: 1px solid var(--wash-deep); }
  .site-nav a::after { display: none; }
  .nav-toggle { display: flex; }
  .nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .header-call { margin-left: auto; }
  .header-call .btn-label { display: none; }
}
@media (max-width: 480px) {
  .brand-logo { height: 50px; }
  .display { font-size: clamp(2.1rem, 11vw, 2.6rem); }
}

/* ---------- hero ---------- */
.hero { padding-top: calc(var(--header-h) + clamp(3rem, 8vw, 6rem)); padding-bottom: var(--space-section); position: relative; }
.hero::before {
  content: ''; position: absolute; inset: 0 0 20% 45%; z-index: -1;
  background: radial-gradient(ellipse at 70% 20%, var(--wash-deep) 0%, transparent 65%);
}
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(2.5rem, 5vw, 5rem); align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

.hero-copy { display: grid; gap: 1.6rem; justify-items: start; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 0.4rem; }
.hero-note { font-size: 0.88rem; color: var(--ink-soft); display: flex; align-items: center; gap: 0.5em; }
.hero-note .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 4px rgba(44, 122, 75, 0.15); }

.hero-media { position: relative; }
.hero-media .ba-slider { box-shadow: var(--shadow-lift); transform: rotate(1.2deg); }
.hero-media::after {
  content: ''; position: absolute; z-index: -1; inset: 12% -6% -8% 10%;
  background: var(--powder); opacity: 0.35; border-radius: var(--radius-lg); transform: rotate(-2deg);
}

/* ---------- trust strip ---------- */
.trust-strip { border-block: 1px solid var(--line); padding-block: 1.6rem; }
.trust-strip .wrap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
@media (max-width: 800px) { .trust-strip .wrap { grid-template-columns: repeat(2, 1fr); } }
.trust-item { display: grid; gap: 0.15rem; justify-items: center; text-align: center; }
.trust-item strong { font-family: var(--font-display); font-size: 1.35rem; font-weight: 600; }
.trust-item span { font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft); }
.stars { color: #e8a33d; letter-spacing: 0.1em; }

/* ---------- service cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
@media (max-width: 980px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .card-grid { grid-template-columns: 1fr; } }

.service-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.8rem 1.6rem 1.6rem; display: grid; gap: 0.7rem; align-content: start;
  text-decoration: none; position: relative; overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.service-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-soft); border-color: var(--powder); }
.service-card .icon {
  width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
  background: var(--wash); color: var(--accent);
}
.service-card .icon svg { width: 26px; height: 26px; }
.service-card p { color: var(--ink-soft); font-size: 0.95rem; }
.service-card .go { color: var(--accent); font-weight: 500; font-size: 0.92rem; margin-top: 0.3rem; }
.service-card .go::after { content: ' →'; transition: margin 0.15s ease; }
.service-card:hover .go::after { margin-left: 0.3em; }

/* ---------- before/after slider ---------- */
.ba-slider {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  aspect-ratio: 4 / 3; user-select: none; touch-action: none;
  background: var(--wash-deep);
}
.ba-slider:focus { outline: none; }
.ba-slider:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.ba-slider img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.ba-after-wrap { position: absolute; inset: 0; overflow: hidden; clip-path: inset(0 0 0 var(--pos, 50%)); }
.ba-after-wrap img { position: absolute; inset: 0; }
.ba-handle {
  position: absolute; top: 0; bottom: 0; left: var(--pos, 50%); width: 3px;
  background: #fff; transform: translateX(-50%); box-shadow: 0 0 18px rgba(0,0,0,0.35);
}
.ba-handle::after {
  content: '⟷'; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 52px; height: 52px; border-radius: 50%; background: #fff; color: var(--accent-deep);
  display: grid; place-items: center; font-size: 1.25rem; font-weight: 700;
  box-shadow: 0 8px 24px rgba(14, 36, 51, 0.35);
}
.ba-label {
  position: absolute; top: 14px; z-index: 2; padding: 0.35em 0.9em; border-radius: 999px;
  font-size: 0.72rem; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase;
  background: rgba(14, 36, 51, 0.55); color: #fff; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.ba-label-before { left: 14px; }
.ba-label-after { right: 14px; }
.ba-caption { margin-top: 0.8rem; font-size: 0.9rem; color: var(--ink-soft); }

/* ---------- gallery ---------- */
.ba-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
@media (max-width: 800px) { .ba-grid { grid-template-columns: 1fr; } }

.video-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; }
@media (max-width: 900px) { .video-strip { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .video-strip { grid-template-columns: 1fr; } }
.video-card {
  border-radius: var(--radius); overflow: hidden; background: var(--ink);
  aspect-ratio: 9 / 14; position: relative; box-shadow: var(--shadow-soft);
}
.video-card video { width: 100%; height: 100%; object-fit: cover; }

/* ---------- reviews ---------- */
.review-summary { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; }
.review-summary .big-rating { font-family: var(--font-display); font-size: 3.4rem; font-weight: 700; line-height: 1; }
.review-summary .stars { font-size: 1.3rem; }
.review-summary p { color: var(--ink-soft); font-size: 0.95rem; }

.review-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; align-items: start; }
@media (max-width: 980px) { .review-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .review-grid { grid-template-columns: 1fr; } }

.review-grid-sparse { grid-template-columns: minmax(0, 640px); justify-content: center; }
.review-grid-sparse .review-card { padding: 2rem; }
.review-grid-sparse blockquote { font-size: 1.1rem; }

.review-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem; display: grid; gap: 0.8rem; align-content: start;
}
.review-card .stars { font-size: 0.95rem; }
.review-card blockquote { color: var(--ink-soft); font-size: 0.97rem; }
.review-card footer { display: flex; align-items: center; gap: 0.7rem; }
.review-card .avatar {
  width: 40px; height: 40px; border-radius: 50%; background: var(--wash-deep); color: var(--accent-deep);
  display: grid; place-items: center; font-weight: 700; flex: none;
}
.review-card .who { line-height: 1.25; }
.review-card .who strong { font-size: 0.95rem; }
.review-card .who span { font-size: 0.8rem; color: var(--ink-soft); }
.sample-note { font-size: 0.82rem; color: var(--ink-soft); font-style: italic; margin-top: 1.2rem; }

/* ---------- steps ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.4rem; counter-reset: step; }
@media (max-width: 800px) { .steps { grid-template-columns: 1fr; } }
.step { position: relative; padding: 1.8rem 1.6rem; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); display: grid; gap: 0.6rem; align-content: start; }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  font-family: var(--font-display); font-size: 2.6rem; font-weight: 700; color: var(--powder); line-height: 1;
}
.step p { color: var(--ink-soft); font-size: 0.95rem; }
.step.no-num::before { content: none; }

/* ---------- area ---------- */
.city-cloud { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.city-cloud li {
  list-style: none; padding: 0.45em 1em; border-radius: 999px; background: #fff;
  border: 1px solid var(--line); font-size: 0.9rem; color: var(--ink-soft);
}

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(135deg, var(--accent-deep) 0%, var(--accent) 60%, #2f83bb 100%);
  color: #fff; border-radius: var(--radius-lg); padding: clamp(2.5rem, 6vw, 4.5rem);
  display: grid; gap: 1.4rem; justify-items: center; text-align: center;
  position: relative; overflow: hidden;
}
.cta-band::before {
  content: ''; position: absolute; inset: -40% -20% auto auto; width: 60%; aspect-ratio: 1;
  background: radial-gradient(circle, rgba(255,255,255,0.14) 0%, transparent 65%);
}
.cta-band h2 { max-width: 22ch; }
.cta-band p { opacity: 0.85; max-width: 48ch; }
.cta-band .hero-ctas { justify-content: center; }
.cta-phone { font-family: var(--font-display); font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 700; text-decoration: none; }

/* ---------- forms ---------- */
.quote-form { display: grid; gap: 1.1rem; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(1.6rem, 4vw, 2.6rem); box-shadow: var(--shadow-soft); }
.form-row { display: grid; gap: 1.1rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 620px) { .form-row { grid-template-columns: 1fr; } }
.field { display: grid; gap: 0.35rem; }
.field label { font-size: 0.85rem; font-weight: 500; letter-spacing: 0.04em; }
.field input, .field select, .field textarea {
  padding: 0.85em 1em; border-radius: 12px; border: 1.5px solid var(--line); background: var(--paper);
  transition: border-color 0.15s ease, box-shadow 0.15s ease; width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px rgba(29, 106, 158, 0.12);
}
.field textarea { resize: vertical; min-height: 110px; }
.form-msg { font-size: 0.95rem; display: none; padding: 0.9em 1.2em; border-radius: 12px; }
.form-msg.ok { display: block; background: #e8f5ec; color: var(--good); }
.form-msg.err { display: block; background: #fdeeee; color: #a33; }
.hp-field { position: absolute; left: -9999px; opacity: 0; pointer-events: none; }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: #c8d9e6; padding: clamp(3rem, 6vw, 4.5rem) 0 2rem; margin-top: var(--space-section); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2.5rem; margin-bottom: 2.5rem; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { color: #fff; font-size: 0.85rem; letter-spacing: 0.18em; text-transform: uppercase; margin-bottom: 0.9rem; }
.site-footer a { color: #c8d9e6; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.footer-links { display: grid; gap: 0.5rem; padding: 0; list-style: none; }
.footer-badge { max-width: 210px; height: auto; margin-bottom: 1rem; }
.footer-meta { border-top: 1px solid rgba(255,255,255,0.12); padding-top: 1.4rem; font-size: 0.82rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; opacity: 0.7; }

/* ---------- sticky mobile call bar ---------- */
.mobile-bar {
  position: fixed; inset: auto 0 0 0; z-index: 60; display: none;
  grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line);
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -10px 30px rgba(14, 36, 51, 0.12);
}
.mobile-bar a {
  display: flex; align-items: center; justify-content: center; gap: 0.5em;
  padding: 1em; font-weight: 600; text-decoration: none; font-size: 1rem;
}
.mobile-bar .bar-call { background: var(--accent); color: #fff; }
.mobile-bar .bar-text { background: #fff; color: var(--accent-deep); }
.mobile-bar svg { width: 1.15em; height: 1.15em; }
@media (max-width: 700px) {
  .mobile-bar { display: grid; }
  body { padding-bottom: 62px; }
}

/* ---------- page hero (inner pages) ---------- */
.page-hero { padding-top: calc(var(--header-h) + clamp(2.5rem, 6vw, 4.5rem)); padding-bottom: clamp(2rem, 5vw, 3.5rem); }
.page-hero .wrap { display: grid; gap: 1.2rem; justify-items: start; }

/* ---------- service detail rows ---------- */
.service-row { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; padding-block: clamp(2rem, 5vw, 3.5rem); }
@media (max-width: 850px) { .service-row { grid-template-columns: 1fr; } }
.service-row:nth-child(even) .service-row-media { order: -1; }
@media (max-width: 850px) { .service-row:nth-child(even) .service-row-media { order: 0; } }
.service-row-copy { display: grid; gap: 1rem; justify-items: start; }
.service-row-copy ul { padding-left: 1.2rem; color: var(--ink-soft); display: grid; gap: 0.35rem; }
.service-row-media { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-soft); }
.service-row-media img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.service-row + .service-row { border-top: 1px solid var(--line); }

/* ---------- reveal animations ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  * { animation: none !important; transition-duration: 0.01s !important; }
}
