/*
Theme Name: WFM Native
Theme URI: https://wfmhomes.com/
Author: WFM Homes
Description: Lightweight custom theme for Works for Me Homes in Tucson, Arizona.
Version: 1.0.0
Requires at least: 6.6
Requires PHP: 8.1
Text Domain: wfm-native
*/

:root {
  --ink: #17211b;
  --ink-soft: #435148;
  --forest: #173d2a;
  --forest-deep: #0c291b;
  --moss: #6f8b70;
  --sage: #dfe8dc;
  --cream: #f5f1e8;
  --sand: #e8dcc8;
  --white: #fff;
  --line: rgba(23, 61, 42, .16);
  --shadow: 0 22px 60px rgba(16, 43, 29, .12);
  --radius: 1.5rem;
  --container: min(1180px, calc(100% - 2.5rem));
  --serif: Georgia, 'Times New Roman', serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}
body.nav-open { overflow: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--forest); text-decoration-thickness: .08em; text-underline-offset: .18em; }
a:hover { color: var(--moss); }
button, input, select, textarea { font: inherit; }
h1, h2, h3, h4 {
  margin: 0 0 .55em;
  color: var(--forest-deep);
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -.035em;
}
h1 { font-size: clamp(3rem, 7vw, 6.75rem); }
h2 { font-size: clamp(2.3rem, 4.7vw, 4.5rem); }
h3 { font-size: clamp(1.35rem, 2.4vw, 2rem); }
p { margin: 0 0 1.25rem; }
.container { width: var(--container); margin-inline: auto; }
.narrow { max-width: 760px; margin-inline: auto; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  margin-bottom: 1.25rem;
  color: var(--forest);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .15em;
  line-height: 1.2;
  text-transform: uppercase;
}
.eyebrow::before { width: 2.35rem; height: 1px; background: currentColor; content: ''; }
.lead { max-width: 680px; color: var(--ink-soft); font-size: clamp(1.08rem, 1.6vw, 1.28rem); line-height: 1.65; }
.section { padding: clamp(4.5rem, 9vw, 8.5rem) 0; }
.section-tight { padding: clamp(3.5rem, 7vw, 6rem) 0; }
.section-sage { background: var(--sage); }
.section-white { background: var(--white); }
.section-dark { color: rgba(255,255,255,.82); background: var(--forest-deep); }
.section-dark h2, .section-dark h3, .section-dark .eyebrow { color: var(--white); }
.section-dark .lead { color: rgba(255,255,255,.78); }
.skip-link { position: fixed; top: -100px; left: 1rem; z-index: 9999; padding: .7rem 1rem; background: var(--white); }
.skip-link:focus { top: 1rem; }

.topbar { color: rgba(255,255,255,.86); background: var(--forest-deep); font-size: .78rem; }
.topbar-inner { min-height: 2.55rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.topbar a { color: var(--white); text-decoration: none; }
.topbar-note { letter-spacing: .04em; }
.topbar-contact { display: flex; gap: 1.2rem; }
.site-header { position: sticky; top: 0; z-index: 1000; border-bottom: 1px solid var(--line); background: rgba(245,241,232,.96); backdrop-filter: blur(16px); }
.header-inner { min-height: 5.8rem; display: flex; align-items: center; gap: 2rem; }
.brand { display: flex; align-items: center; gap: .75rem; color: var(--forest-deep); text-decoration: none; }
.brand img { width: 54px; height: 54px; border-radius: 50%; object-fit: cover; }
.brand-copy { display: grid; line-height: 1; }
.brand-name { font-family: var(--serif); font-size: 1.45rem; letter-spacing: -.035em; }
.brand-tagline { margin-top: .35rem; color: var(--ink-soft); font-size: .62rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.primary-nav { margin-left: auto; }
.primary-nav ul { display: flex; align-items: center; gap: clamp(.9rem, 1.8vw, 1.7rem); margin: 0; padding: 0; list-style: none; }
.primary-nav a { color: var(--ink); font-size: .83rem; font-weight: 750; letter-spacing: .035em; text-decoration: none; }
.primary-nav .current-menu-item > a, .primary-nav a:hover { color: var(--moss); }
.header-cta { flex: 0 0 auto; }
.nav-toggle { display: none; margin-left: auto; padding: .65rem; border: 0; color: var(--forest); background: transparent; cursor: pointer; }
.nav-toggle-lines, .nav-toggle-lines::before, .nav-toggle-lines::after { display: block; width: 1.65rem; height: 2px; background: currentColor; transition: .2s ease; content: ''; }
.nav-toggle-lines { position: relative; }
.nav-toggle-lines::before { position: absolute; top: -.5rem; }
.nav-toggle-lines::after { position: absolute; top: .5rem; }
.nav-open .nav-toggle-lines { background: transparent; }
.nav-open .nav-toggle-lines::before { top: 0; transform: rotate(45deg); }
.nav-open .nav-toggle-lines::after { top: 0; transform: rotate(-45deg); }

.button, .wpforms-submit {
  display: inline-flex !important;
  min-height: 3.25rem;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  padding: .85rem 1.35rem !important;
  border: 1px solid var(--forest) !important;
  border-radius: 999px !important;
  color: var(--white) !important;
  background: var(--forest) !important;
  box-shadow: none !important;
  font-size: .78rem !important;
  font-weight: 850 !important;
  letter-spacing: .08em;
  line-height: 1 !important;
  text-decoration: none;
  text-transform: uppercase;
  transition: transform .2s ease, background .2s ease, color .2s ease;
}
.button:hover, .wpforms-submit:hover { color: var(--white) !important; background: var(--forest-deep) !important; transform: translateY(-2px); }
.button-light { border-color: var(--white) !important; color: var(--forest-deep) !important; background: var(--white) !important; }
.button-outline { color: var(--forest) !important; background: transparent !important; }
.button-outline:hover { color: var(--white) !important; background: var(--forest) !important; }
.text-link { display: inline-flex; align-items: center; gap: .6rem; font-size: .82rem; font-weight: 850; letter-spacing: .08em; text-decoration: none; text-transform: uppercase; }
.text-link::after { content: '→'; transition: transform .2s ease; }
.text-link:hover::after { transform: translateX(.3rem); }
.button-row { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }

.hero { position: relative; overflow: hidden; background: var(--sage); }
.hero-grid { min-height: min(780px, calc(100vh - 8rem)); display: grid; grid-template-columns: minmax(0, 1.03fr) minmax(380px, .97fr); align-items: center; }
.hero-copy { position: relative; z-index: 2; padding: clamp(4rem, 9vw, 8rem) clamp(2rem, 6vw, 6.5rem) clamp(4rem, 9vw, 8rem) max(1.25rem, calc((100vw - 1180px)/2)); }
.hero h1 { max-width: 840px; }
.hero .lead { max-width: 610px; }
.hero-media { position: relative; align-self: stretch; min-height: 620px; overflow: hidden; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-media::after { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(223,232,220,.3), transparent 30%); content: ''; }
.hero-note { position: absolute; right: clamp(1rem, 4vw, 3rem); bottom: clamp(1rem, 4vw, 3rem); z-index: 2; max-width: 270px; padding: 1.3rem; color: var(--white); background: rgba(12,41,27,.9); box-shadow: var(--shadow); }
.hero-note strong { display: block; font-family: var(--serif); font-size: 1.35rem; font-weight: 500; }
.hero-note span { display: block; margin-top: .3rem; font-size: .76rem; line-height: 1.5; }
.trust-strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--white); }
.trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.trust-item { padding: 1.55rem clamp(1rem, 3vw, 2.4rem); border-right: 1px solid var(--line); text-align: center; }
.trust-item:last-child { border-right: 0; }
.trust-item strong { display: block; color: var(--forest); font-family: var(--serif); font-size: 1.35rem; font-weight: 500; }
.trust-item span { color: var(--ink-soft); font-size: .76rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }

.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; gap: clamp(2.5rem, 7vw, 7.5rem); }
.split-reverse .split-media { order: 2; }
.split-media { position: relative; }
.split-media img { width: 100%; aspect-ratio: 4 / 5; border-radius: var(--radius); object-fit: cover; box-shadow: var(--shadow); }
.split-media.landscape img { aspect-ratio: 6 / 4; }
.image-badge { position: absolute; right: -1rem; bottom: 2rem; max-width: 210px; padding: 1.2rem 1.35rem; color: var(--white); background: var(--forest); box-shadow: var(--shadow); }
.image-badge strong { display: block; font-family: var(--serif); font-size: 1.5rem; font-weight: 500; line-height: 1.1; }
.image-badge span { display: block; margin-top: .35rem; font-size: .72rem; }
.check-list { display: grid; gap: .85rem; margin: 1.8rem 0 0; padding: 0; list-style: none; }
.check-list li { position: relative; padding-left: 2rem; }
.check-list li::before { position: absolute; top: .3rem; left: 0; width: 1.2rem; height: 1.2rem; border-radius: 50%; color: var(--white); background: var(--forest); content: '✓'; font-size: .72rem; font-weight: 900; line-height: 1.2rem; text-align: center; }

.section-head { display: flex; align-items: end; justify-content: space-between; gap: 2rem; margin-bottom: clamp(2.5rem, 6vw, 4.5rem); }
.section-head > div { max-width: 760px; }
.card-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.card { position: relative; min-height: 300px; padding: 2rem; border: 1px solid var(--line); background: rgba(255,255,255,.72); overflow: hidden; }
.card-number { display: block; margin-bottom: 4rem; color: var(--moss); font-size: .72rem; font-weight: 900; letter-spacing: .14em; }
.card p { color: var(--ink-soft); font-size: .94rem; }
.card::after { position: absolute; right: -2rem; bottom: -3rem; width: 8rem; height: 8rem; border: 1px solid var(--line); border-radius: 50%; content: ''; }
.process-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid rgba(255,255,255,.2); }
.process-step { position: relative; padding: 2.3rem 2rem 1rem 0; }
.process-step::before { position: absolute; top: -.38rem; left: 0; width: .72rem; height: .72rem; border-radius: 50%; background: var(--sand); content: ''; }
.process-step strong { display: block; margin-bottom: 1rem; color: var(--sand); font-size: .7rem; letter-spacing: .15em; }
.process-step p { color: rgba(255,255,255,.72); font-size: .94rem; }

.gallery-grid { display: grid; grid-template-columns: repeat(12, 1fr); grid-auto-flow: dense; gap: .8rem; }
.gallery-item { grid-column: span 4; margin: 0; overflow: hidden; background: var(--sage); }
.gallery-item.wide { grid-column: span 8; }
.gallery-item.tall { grid-row: span 2; }
.gallery-item img { width: 100%; height: 100%; min-height: 310px; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .5s ease; }
.gallery-item.tall img { aspect-ratio: 3 / 4; }
.gallery-item:hover img { transform: scale(1.025); }
.gallery-item figcaption { padding: .8rem 0 1.1rem; color: var(--ink-soft); font-size: .75rem; }
.gallery-preview { display: grid; grid-template-columns: 1.25fr .75fr .75fr; gap: .8rem; }
.gallery-preview img { width: 100%; height: 420px; object-fit: cover; }
.gallery-preview > :nth-child(2) img, .gallery-preview > :nth-child(3) img { height: 330px; margin-top: 90px; }

.page-hero { position: relative; overflow: hidden; color: var(--white); background: var(--forest-deep); }
.page-hero-grid { min-height: 510px; display: grid; grid-template-columns: 1.05fr .95fr; align-items: stretch; }
.page-hero-copy { align-self: center; padding: clamp(4rem, 8vw, 7rem) clamp(2rem, 7vw, 7rem) clamp(4rem, 8vw, 7rem) max(1.25rem, calc((100vw - 1180px)/2)); }
.page-hero h1, .page-hero .eyebrow { color: var(--white); }
.page-hero .lead { color: rgba(255,255,255,.75); }
.page-hero-media img { width: 100%; height: 100%; min-height: 510px; object-fit: cover; }
.page-hero-simple { padding: clamp(5rem, 10vw, 9rem) 0; text-align: center; }
.page-hero-simple .lead { margin-inline: auto; }

.feature-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; margin-top: 2.5rem; }
.feature { padding: 1.7rem; border-left: 2px solid var(--moss); background: rgba(255,255,255,.62); }
.feature h3 { font-size: 1.35rem; }
.feature p { margin: 0; color: var(--ink-soft); font-size: .9rem; }
.story-quote { margin: 2rem 0; padding: 2rem 0 2rem 2rem; border-left: 3px solid var(--moss); color: var(--forest); font-family: var(--serif); font-size: clamp(1.5rem, 3vw, 2.25rem); line-height: 1.25; }
.profile-card { display: grid; grid-template-columns: 220px 1fr; align-items: center; gap: 2rem; padding: 1.5rem; background: var(--white); box-shadow: var(--shadow); }
.profile-card img { width: 220px; height: 260px; object-fit: cover; }
.profile-card p:last-child { margin-bottom: 0; }

.lifestyle-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1rem; }
.lifestyle-card { min-height: 420px; display: flex; flex-direction: column; justify-content: end; padding: clamp(1.6rem, 4vw, 3rem); color: var(--white); background-position: center; background-size: cover; overflow: hidden; position: relative; }
.lifestyle-card::before { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 20%, rgba(8,28,18,.92)); content: ''; }
.lifestyle-card > * { position: relative; z-index: 1; }
.lifestyle-card h2, .lifestyle-card h3 { color: var(--white); }
.lifestyle-card p { max-width: 540px; margin-bottom: 0; color: rgba(255,255,255,.82); }

.faq-list { border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.35rem 0; color: var(--forest-deep); font-family: var(--serif); font-size: 1.3rem; cursor: pointer; list-style: none; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: '+'; font-family: var(--sans); font-weight: 300; }
.faq-list details[open] summary::after { content: '−'; }
.faq-list details p { max-width: 780px; color: var(--ink-soft); }

.finance-panel { display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 3rem; padding: clamp(2rem, 6vw, 5rem); background: var(--white); box-shadow: var(--shadow); }
.finance-points { display: grid; gap: 1rem; margin: 0; padding: 0; list-style: none; }
.finance-points li { padding: 1rem 0 1rem 3.2rem; border-bottom: 1px solid var(--line); position: relative; }
.finance-points li::before { position: absolute; left: 0; top: .8rem; color: var(--moss); font-family: var(--serif); font-size: 1.8rem; content: attr(data-step); }
.disclosure { margin-top: 2rem; padding: 1rem 1.2rem; border: 1px solid var(--line); color: var(--ink-soft); background: var(--cream); font-size: .8rem; }

.contact-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(2.5rem, 7vw, 7rem); align-items: start; }
.contact-card { padding: 2rem; color: rgba(255,255,255,.8); background: var(--forest-deep); }
.contact-card h2, .contact-card h3, .contact-card a { color: var(--white); }
.contact-list { display: grid; gap: 1.4rem; margin: 2rem 0 0; padding: 0; list-style: none; }
.contact-list span { display: block; color: var(--sand); font-size: .7rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.contact-list a { text-decoration: none; }
.wpforms-container { margin: 0 !important; }
.wpforms-field { padding: .5rem 0 !important; }
.wpforms-field-label { margin-bottom: .4rem !important; color: var(--ink) !important; font-size: .75rem !important; font-weight: 800 !important; letter-spacing: .08em; text-transform: uppercase; }
.wpforms-field input, .wpforms-field textarea, .wpforms-field select {
  width: 100% !important;
  max-width: none !important;
  min-height: 3.2rem !important;
  padding: .75rem 1rem !important;
  border: 1px solid var(--line) !important;
  border-radius: .25rem !important;
  color: var(--ink) !important;
  background: var(--white) !important;
}
.wpforms-field textarea { min-height: 150px !important; }
.wpforms-field input:focus, .wpforms-field textarea:focus { border-color: var(--moss) !important; box-shadow: 0 0 0 3px rgba(111,139,112,.15) !important; outline: 0 !important; }

.cta-band { position: relative; overflow: hidden; color: var(--white); background: var(--forest); }
.cta-inner { min-height: 390px; display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: 3rem; }
.cta-band h2 { color: var(--white); }
.cta-band p { max-width: 650px; color: rgba(255,255,255,.76); }
.cta-ring { width: min(330px, 70vw); aspect-ratio: 1; justify-self: end; border: 1px solid rgba(255,255,255,.35); border-radius: 50%; display: grid; place-items: center; }
.cta-ring::before { width: 72%; aspect-ratio: 1; border: 1px solid rgba(255,255,255,.22); border-radius: 50%; content: ''; }

.site-footer { color: rgba(255,255,255,.72); background: #081c12; }
.footer-main { display: grid; grid-template-columns: 1.35fr .7fr .8fr; gap: 3rem; padding: 5rem 0 3.5rem; }
.footer-brand .brand { color: var(--white); }
.footer-brand .brand-tagline { color: rgba(255,255,255,.55); }
.footer-brand p { max-width: 430px; margin-top: 1.5rem; font-size: .9rem; }
.footer-heading { margin-bottom: 1rem; color: var(--sand); font-family: var(--sans); font-size: .7rem; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.footer-nav { margin: 0; padding: 0; list-style: none; }
.footer-nav li { margin-bottom: .55rem; }
.footer-nav a, .footer-contact a { color: rgba(255,255,255,.8); text-decoration: none; }
.footer-nav a:hover, .footer-contact a:hover { color: var(--white); }
.footer-contact p { margin-bottom: .7rem; }
.footer-bottom { display: flex; justify-content: space-between; gap: 1rem; padding: 1.3rem 0; border-top: 1px solid rgba(255,255,255,.12); font-size: .72rem; }
.footer-bottom a { color: inherit; }

.post-shell { padding: 5rem 0; }
.post-shell article { max-width: 800px; margin-inline: auto; }
.post-shell h1 { font-size: clamp(2.5rem, 6vw, 5rem); }
.not-found { min-height: 60vh; display: grid; place-items: center; text-align: center; }

@media (max-width: 1050px) {
  .header-cta { display: none; }
  .primary-nav ul { gap: 1rem; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .process-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-preview { grid-template-columns: 1fr 1fr; }
  .gallery-preview > :first-child { grid-column: span 2; }
  .gallery-preview > :nth-child(2) img, .gallery-preview > :nth-child(3) img { height: 330px; margin-top: 0; }
}

@media (max-width: 860px) {
  .topbar-note { display: none; }
  .topbar-inner { justify-content: center; }
  .header-inner { min-height: 4.8rem; }
  .brand img { width: 44px; height: 44px; }
  .brand-name { font-size: 1.25rem; }
  .nav-toggle { display: block; }
  .primary-nav { position: fixed; top: calc(4.8rem + 2.55rem); right: 0; bottom: 0; left: 0; display: none; margin: 0; padding: 2rem 1.25rem; background: var(--cream); overflow-y: auto; }
  .nav-open .primary-nav { display: block; }
  .primary-nav ul { display: grid; gap: 0; }
  .primary-nav li { border-bottom: 1px solid var(--line); }
  .primary-nav a { display: block; padding: 1.1rem .2rem; font-family: var(--serif); font-size: 1.5rem; font-weight: 500; }
  .hero-grid, .page-hero-grid { grid-template-columns: 1fr; }
  .hero-copy { padding: 4.5rem 1.25rem; }
  .hero-media { min-height: 480px; }
  .page-hero-copy { padding: 4.5rem 1.25rem; }
  .page-hero-media img { min-height: 430px; }
  .split, .finance-panel, .contact-grid, .cta-inner { grid-template-columns: 1fr; }
  .split-reverse .split-media { order: initial; }
  .section-head { align-items: start; flex-direction: column; }
  .gallery-item, .gallery-item.wide { grid-column: span 6; }
  .cta-ring { display: none; }
  .footer-main { grid-template-columns: 1.3fr .7fr; }
  .footer-brand { grid-column: span 2; }
}

@media (max-width: 620px) {
  :root { --container: min(100% - 1.5rem, 1180px); }
  body { font-size: 16px; }
  .topbar-contact span:first-child { display: none; }
  .brand-tagline { display: none; }
  h1 { font-size: clamp(2.7rem, 15vw, 4.25rem); }
  .hero-media { min-height: 410px; }
  .hero-note { right: .75rem; bottom: .75rem; left: .75rem; max-width: none; }
  .trust-grid { grid-template-columns: 1fr; }
  .trust-item { border-right: 0; border-bottom: 1px solid var(--line); }
  .trust-item:last-child { border-bottom: 0; }
  .card-grid, .process-grid, .feature-list, .lifestyle-grid, .gallery-preview { grid-template-columns: 1fr; }
  .process-step { padding-left: 0; }
  .gallery-preview > :first-child { grid-column: auto; }
  .gallery-preview img, .gallery-preview > :nth-child(2) img, .gallery-preview > :nth-child(3) img { height: 280px; }
  .gallery-item, .gallery-item.wide { grid-column: span 12; }
  .gallery-item img { min-height: 270px; }
  .profile-card { grid-template-columns: 1fr; }
  .profile-card img { width: 100%; height: 360px; }
  .lifestyle-card { min-height: 360px; }
  .image-badge { right: .75rem; bottom: .75rem; }
  .footer-main { grid-template-columns: 1fr; }
  .footer-brand { grid-column: auto; }
  .footer-bottom { align-items: start; flex-direction: column; }
}

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

/* Menu repair: keep the call-to-action out of compact headers and align the mobile panel. */
@media (max-width:1050px) {
 .site-header .header-cta { display:none !important; }
}
@media (max-width:860px) {
 .site-header .header-inner { gap:1rem; }
 .site-header .brand { min-width:0; }
 .site-header .nav-toggle { flex:0 0 44px; min-height:44px; display:block; }
 .site-header .primary-nav { position:absolute; top:100%; right:0; left:0; bottom:auto; max-height:calc(100dvh - 4.8rem); padding:1rem 1.25rem; overflow-y:auto; }
 .site-header .primary-nav ul { align-items:stretch; }
}
