/*
Theme Name: PrimeFlipz
Theme URI: https://primeflipz.com
Author: PrimeFlipz
Description: Clean, minimal WordPress theme for PrimeFlipz — a Dallas–Fort Worth cash home-buying / house-flipping business. Includes a custom homepage (front-page.php) with hero, how-it-works, comparison, before/after, about, reviews, a multi-step "get a cash offer" lead form, and FAQ.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: primeflipz
*/

/* =====================================================================
   PrimeFlipz theme styles
   Palette and type kept from the approved design (warm off-white, ink,
   hairline rules, Hanken Grotesk). To switch the type system or imagery
   treatment, change data-type / data-imagery on the .site wrapper in
   header.php (options: type = grotesque | editorial | modern,
   imagery = bw | color | duotone).
   ===================================================================== */

:root {
  color-scheme: light;
  --bg: #F5F4F1;
  --surface: #EDEBE6;
  --ink: #221F1B;
  --ink-soft: #3A372F;
  --muted: #6E6A61;
  --hair: #DAD6CE;
  --hair-soft: #E6E2DB;
  --accent: #221F1B;

  --font-head: 'Hanken Grotesk', system-ui, sans-serif;
  --font-body: 'Hanken Grotesk', system-ui, sans-serif;
  --head-weight: 500;
  --head-tracking: -0.02em;
  --head-leading: 1.04;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-size: 17px;
}
section[id] { scroll-margin-top: 88px; }

/* ---- type systems ---- */
.site[data-type="editorial"] {
  --font-head: 'Newsreader', Georgia, serif;
  --head-weight: 400;
  --head-tracking: -0.005em;
  --head-leading: 1.06;
}
.site[data-type="modern"] {
  --font-head: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'IBM Plex Sans', system-ui, sans-serif;
  --head-weight: 500;
  --head-tracking: -0.03em;
}

/* ---- imagery treatment ---- */
.site[data-imagery="bw"] .photo { filter: grayscale(1) contrast(1.03); }
.site[data-imagery="duotone"] .photo { filter: grayscale(1) sepia(0.35) saturate(1.1) brightness(0.98); }
.site[data-imagery="color"] .photo { filter: none; }

.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 40px; }

h1, h2, h3 { font-family: var(--font-head); font-weight: var(--head-weight); letter-spacing: var(--head-tracking); line-height: var(--head-leading); margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
img { max-width: 100%; }

/* ---- buttons ---- */
.btn {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 13px 22px;
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.btn:hover { text-decoration: none; }
.btn-lg { padding: 16px 28px; font-size: 1rem; }
.btn-solid { background: var(--accent); color: var(--bg); }
.btn-solid:hover { transform: translateY(-1px); filter: brightness(1.12); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--hair); }
.btn-ghost:hover { border-color: var(--ink); }

.eyebrow, .section-kicker {
  font-family: var(--font-body);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--muted);
  font-weight: 500;
}

/* ---- header ---- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in oklab, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.1) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, background .25s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--hair); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 24px; }
.brand { background: none; border: 0; padding: 0; cursor: pointer; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; line-height: 1; }
.brand-logo, .brand .custom-logo { height: 44px; width: auto; display: block; mix-blend-mode: multiply; }
.brand-mark { font-family: var(--font-head); font-weight: 600; font-size: 1.18rem; letter-spacing: -0.02em; color: var(--ink); }
.brand-sub { font-size: 0.64rem; text-transform: uppercase; letter-spacing: 0.18em; color: var(--muted); }

.nav-desktop { display: flex; gap: 30px; align-items: center; }
.nav-desktop ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 30px; align-items: center; }
.nav-link { background: none; border: 0; padding: 4px 0; cursor: pointer; font-family: var(--font-body); font-size: 0.92rem; color: var(--ink-soft); position: relative; }
.nav-link::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 0; height: 1px; background: var(--ink); transition: width .2s ease; }
.nav-link:hover { text-decoration: none; }
.nav-link:hover::after { width: 100%; }

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

.hamburger { display: none; flex-direction: column; justify-content: center; gap: 5px; width: 40px; height: 40px; background: none; border: 1px solid var(--hair); border-radius: 2px; cursor: pointer; padding: 0 9px; }
.hamburger span { display: block; height: 1.5px; width: 100%; background: var(--ink); transition: transform .22s ease, opacity .22s ease; }
.hamburger.is-open span:nth-child(1) { transform: translateY(3.25px) rotate(45deg); }
.hamburger.is-open span:nth-child(2) { transform: translateY(-3.25px) rotate(-45deg); }

.nav-mobile { display: none; flex-direction: column; gap: 4px; padding: 0 40px; max-height: 0; overflow: hidden; transition: max-height .3s ease, padding .3s ease; border-bottom: 1px solid transparent; }
.nav-mobile.is-open { max-height: 420px; padding: 8px 40px 24px; border-bottom-color: var(--hair); }
.nav-mobile ul { list-style: none; margin: 0; padding: 0; }
.nav-mobile-link { display: block; background: none; border: 0; text-align: left; padding: 14px 0; font-size: 1.05rem; color: var(--ink); border-bottom: 1px solid var(--hair-soft); cursor: pointer; font-family: var(--font-body); width: 100%; }
.nav-mobile-link:hover { text-decoration: none; }
.nav-mobile .btn { margin-top: 16px; }

/* ---- hero ---- */
.hero { padding: 72px 0 90px; border-bottom: 1px solid var(--hair); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 64px; align-items: center; }
.hero-copy { max-width: 600px; }
.hero-title { font-size: clamp(2.6rem, 5vw, 4.1rem); margin: 22px 0 0; }
.hero-sub { margin-top: 26px; font-size: 1.12rem; color: var(--ink-soft); line-height: 1.62; max-width: 540px; }
.hero-cta-row { display: flex; gap: 14px; margin-top: 34px; flex-wrap: wrap; }
.hero-trust { display: flex; gap: 12px; align-items: center; margin-top: 30px; font-size: 0.86rem; color: var(--muted); flex-wrap: wrap; }
.hero-trust .dot { opacity: 0.5; }

.hero-media { position: relative; }
.photo-frame { position: relative; width: 100%; }
.hero-photo { width: 100%; }
.hero-badge { position: absolute; left: -22px; bottom: 34px; background: var(--ink); color: var(--bg); padding: 18px 22px; border-radius: 2px; box-shadow: 0 18px 40px -18px rgba(0,0,0,.5); }
.hero-badge-num { font-family: var(--font-head); font-size: 1.7rem; font-weight: 600; line-height: 1; }
.hero-badge-label { font-size: 0.74rem; letter-spacing: 0.04em; margin-top: 5px; opacity: 0.82; max-width: 140px; }

/* ---- photo placeholders / fills ---- */
.photo { position: absolute; inset: 0; width: 100%; height: 100%; background-size: cover; background-position: center; background-color: #E7E3DB; border: 1px solid var(--hair); border-radius: 4px; transition: filter .25s ease; }
.photo--empty { background-image: repeating-linear-gradient(135deg, #E7E3DB 0 16px, #E1DCD3 16px 32px); display: flex; align-items: center; justify-content: center; }
.photo-label { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 0.7rem; letter-spacing: 0.03em; color: #8A857B; text-align: center; padding: 0 14px; }

/* ---- generic section ---- */
.section { padding: 92px 0; border-bottom: 1px solid var(--hair); }
.section-alt { background: var(--surface); }
.section-head { margin-bottom: 52px; max-width: 760px; }
.section-kicker { display: block; margin-bottom: 16px; }
.section-title { font-size: clamp(1.9rem, 3.4vw, 2.9rem); }

/* ---- steps ---- */
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; background: var(--hair); border: 1px solid var(--hair); }
.step { background: var(--bg); padding: 40px 36px 44px; }
.section-alt .step { background: var(--surface); }
.step-num { font-family: var(--font-head); font-size: 0.9rem; font-weight: 600; color: var(--accent); letter-spacing: 0.04em; }
.step-title { font-size: 1.3rem; margin: 18px 0 12px; }
.step-body { color: var(--ink-soft); font-size: 1rem; }

/* ---- why grid ---- */
.why-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-top: 1px solid var(--hair); }
.why-item { padding: 36px 40px 36px 0; border-bottom: 1px solid var(--hair); }
.why-item:nth-child(odd) { padding-right: 56px; border-right: 1px solid var(--hair); }
.why-item:nth-child(even) { padding-left: 56px; }
.why-title { font-size: 1.28rem; margin-bottom: 12px; }
.why-body { color: var(--ink-soft); }

/* ---- compare ---- */
.compare { border: 1px solid var(--hair); }
.compare-row { display: grid; grid-template-columns: 1.4fr 1fr 1fr; border-bottom: 1px solid var(--hair); }
.compare-row:last-child { border-bottom: 0; }
.compare-cell { padding: 18px 24px; font-size: 0.98rem; }
.compare-label { color: var(--ink); font-weight: 500; }
.compare-us { background: color-mix(in oklab, var(--accent) 7%, var(--bg)); color: var(--ink); font-weight: 500; border-left: 1px solid var(--hair); border-right: 1px solid var(--hair); }
.compare-them { color: var(--muted); }
.compare-head .compare-cell { font-family: var(--font-head); font-weight: 600; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; padding-top: 22px; padding-bottom: 22px; }
.compare-head .compare-them { color: var(--muted); }
.section-alt .compare-us { background: color-mix(in oklab, var(--accent) 9%, var(--surface)); }

/* ---- work / before-after ---- */
.work-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.work-media { position: relative; }
.work-card .photo--after { display: flex; }
.work-card .photo--before { display: none; }
.work-card[data-mode="before"] .photo--after { display: none; }
.work-card[data-mode="before"] .photo--before { display: flex; }
.work-toggle { position: absolute; top: 14px; left: 14px; z-index: 2; display: flex; background: color-mix(in oklab, var(--bg) 86%, transparent); backdrop-filter: blur(6px); border: 1px solid var(--hair); border-radius: 2px; overflow: hidden; }
.work-tab { background: none; border: 0; padding: 7px 15px; font-size: 0.78rem; font-family: var(--font-body); letter-spacing: 0.04em; cursor: pointer; color: var(--muted); }
.work-tab.is-active { background: var(--ink); color: var(--bg); }
.work-meta { margin-top: 16px; display: flex; flex-direction: column; gap: 4px; }
.work-name { font-size: 1.12rem; }
.work-city { font-size: 0.84rem; color: var(--muted); }

/* ---- about ---- */
.about-grid { display: grid; grid-template-columns: 0.92fr 1.08fr; gap: 64px; align-items: center; }
.about-copy .section-title { margin: 16px 0 0; }
.about-body { color: var(--ink-soft); margin-top: 22px; font-size: 1.05rem; line-height: 1.66; }
.stats-row { display: flex; gap: 48px; margin-top: 40px; flex-wrap: wrap; }
.stat-num { font-family: var(--font-head); font-size: 2.3rem; font-weight: 600; color: var(--ink); line-height: 1; }
.stat-label { font-size: 0.84rem; color: var(--muted); margin-top: 8px; letter-spacing: 0.02em; }

/* ---- reviews ---- */
.reviews-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.review { margin: 0; background: var(--bg); border: 1px solid var(--hair); padding: 34px 32px; display: flex; flex-direction: column; justify-content: space-between; gap: 28px; }
.review-quote { margin: 0; font-family: var(--font-head); font-size: 1.12rem; line-height: 1.5; font-weight: var(--head-weight); letter-spacing: -0.01em; color: var(--ink); }
.site[data-type="editorial"] .review-quote { font-style: italic; }
.review-by { display: flex; flex-direction: column; gap: 2px; }
.review-name { font-weight: 600; font-family: var(--font-body); font-size: 0.95rem; }
.review-city { font-size: 0.82rem; color: var(--muted); }

/* ---- faq ---- */
.faq-wrap { max-width: 880px; }
.faq-list { border-top: 1px solid var(--hair); }
.faq-item { border-bottom: 1px solid var(--hair); }
.faq-q { width: 100%; background: none; border: 0; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 26px 0; text-align: left; font-family: var(--font-head); font-size: 1.18rem; font-weight: var(--head-weight); letter-spacing: -0.01em; color: var(--ink); }
.faq-icon { position: relative; flex: 0 0 16px; width: 16px; height: 16px; }
.faq-icon::before, .faq-icon::after { content: ""; position: absolute; background: var(--ink); transition: transform .25s ease, opacity .25s ease; }
.faq-icon::before { top: 50%; left: 0; width: 100%; height: 1.5px; transform: translateY(-50%); }
.faq-icon::after { left: 50%; top: 0; width: 1.5px; height: 100%; transform: translateX(-50%); }
.faq-item.is-open .faq-icon::after { opacity: 0; transform: translateX(-50%) rotate(90deg); }
.faq-a-wrap { overflow: hidden; max-height: 0; transition: max-height .3s ease; }
.faq-item.is-open .faq-a-wrap { max-height: 320px; }
.faq-a { color: var(--ink-soft); padding-bottom: 26px; max-width: 680px; }

/* ---- offer / lead form ---- */
.offer { background: var(--ink); color: var(--bg); border-bottom: 0; }
.offer-grid { display: grid; grid-template-columns: 0.95fr 1.05fr; gap: 64px; align-items: start; }
.offer .section-kicker-light { color: color-mix(in oklab, var(--bg) 60%, transparent); }
.offer-title { color: var(--bg); }
.offer-lede { color: color-mix(in oklab, var(--bg) 78%, transparent); margin-top: 22px; font-size: 1.08rem; line-height: 1.62; max-width: 460px; }
.offer-list { list-style: none; padding: 0; margin: 30px 0 0; display: flex; flex-direction: column; gap: 12px; }
.offer-list li { position: relative; padding-left: 26px; color: color-mix(in oklab, var(--bg) 85%, transparent); font-size: 0.98rem; }
.offer-list li::before { content: ""; position: absolute; left: 0; top: 8px; width: 9px; height: 9px; border: 1.5px solid var(--bg); border-radius: 50%; }

.offer-card { background: var(--bg); color: var(--ink); border-radius: 3px; padding: 34px 34px 30px; box-shadow: 0 30px 70px -30px rgba(0,0,0,.6); }
.stepper { display: flex; gap: 8px; margin-bottom: 30px; }
.stepper-item { display: flex; align-items: center; gap: 9px; flex: 1; opacity: 0.5; }
.stepper-item.is-active, .stepper-item.is-done { opacity: 1; }
.stepper-dot { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--ink); display: grid; place-items: center; font-size: 0.82rem; font-weight: 600; font-family: var(--font-head); flex: 0 0 26px; }
.stepper-item.is-active .stepper-dot { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.stepper-item.is-done .stepper-dot { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.stepper-label { font-size: 0.82rem; letter-spacing: 0.04em; }

.form-step { display: none; flex-direction: column; gap: 20px; min-height: 220px; }
.form-step.is-active { display: flex; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field-label { font-size: 0.82rem; font-weight: 500; color: var(--ink-soft); letter-spacing: 0.02em; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.input { font-family: var(--font-body); font-size: 1rem; padding: 13px 14px; border: 1px solid var(--hair); border-radius: 2px; background: #fff; color: var(--ink); transition: border-color .18s ease; width: 100%; }
.input:focus { outline: none; border-color: var(--ink); }
.input::placeholder { color: #B4AFA6; }
.field-error { font-size: 0.76rem; color: #B23B2E; display: none; }
.field.has-error .field-error { display: block; }
.field.has-error .input { border-color: #B23B2E; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font-family: var(--font-body); font-size: 0.9rem; padding: 9px 15px; border: 1px solid var(--hair); border-radius: 2px; background: #fff; cursor: pointer; color: var(--ink-soft); transition: all .16s ease; }
.chip:hover { border-color: var(--ink); }
.chip.is-active { background: var(--accent); border-color: var(--accent); color: var(--bg); }

.form-fineprint { font-size: 0.78rem; color: var(--muted); }
.form-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 26px; }
.form-nav .spacer { width: 1px; }

.offer-success { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.success-check { width: 46px; height: 46px; border-radius: 50%; background: var(--accent); position: relative; }
.success-check::after { content: ""; position: absolute; left: 16px; top: 13px; width: 9px; height: 17px; border: solid var(--bg); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.success-title { font-size: 1.5rem; }
.success-body { color: var(--ink-soft); }

/* ---- footer ---- */
.site-footer { background: var(--bg); padding: 72px 0 36px; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 48px; padding-bottom: 56px; border-bottom: 1px solid var(--hair); }
.footer-brand { font-family: var(--font-head); font-weight: 600; font-size: 1.5rem; letter-spacing: -0.02em; }
.footer-tagline { color: var(--ink-soft); margin: 14px 0 24px; line-height: 1.5; }
.footer-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.16em; color: var(--muted); margin-bottom: 16px; }
.footer-text { color: var(--ink-soft); margin-bottom: 14px; line-height: 1.6; }
.footer-base { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding-top: 24px; font-size: 0.8rem; color: var(--muted); flex-wrap: wrap; }
.footer-fine { max-width: 520px; text-align: right; }

/* ---- responsive ---- */
@media (max-width: 980px) {
  .nav-desktop, .header-cta { display: none; }
  .hamburger { display: flex; }
  .nav-mobile { display: flex; }
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .hero-media { max-width: 460px; }
  .offer-grid, .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .steps-grid, .work-grid, .reviews-grid { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: 1fr; }
  .why-item, .why-item:nth-child(odd) { padding: 30px 0; border-right: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-fine { text-align: left; }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  .wrap { padding: 0 22px; }
  .section { padding: 64px 0; }
  .hero { padding: 48px 0 64px; }
  .field-row { grid-template-columns: 1fr; }
  .compare-row { grid-template-columns: 1fr; }
  .compare-cell { border-left: 0 !important; border-right: 0 !important; }
  .compare-us, .compare-them { padding-top: 8px; }
  .compare-head { display: none; }
  .footer-grid { grid-template-columns: 1fr; gap: 36px; }
  .footer-base { flex-direction: column; align-items: flex-start; }
  .hero-badge { left: 0; }
  .stats-row { gap: 32px; }
}
