/*
Theme Name: SF Realtor
Theme URI: https://sfrealtor.online/
Description: San Francisco and Bay Area real estate theme: painted-lady hero, International Orange accents, SF district guide. Pairs with the SF Realtor Tools plugin for the offer builder, loan options, calculators and assistant.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 7.4
Author: SF Realtor
License: GPL-2.0-or-later
Text Domain: sfrealtor
*/

/*
  SF Realtor
  Palette: bay-night blue-green for text and dark surfaces, fog greys,
  and Golden Gate International Orange as the single accent.
  Type: Archivo (condensed, like Muni and street signage) for headings,
  Public Sans for everything else.
*/
:root {
  --ink: #0f2a33;
  --ink-2: #22434d;
  --muted: #56686d;
  --line: #dde3e1;
  --line-strong: #c3cdca;
  --paper: #eef2f0;
  --fog: #e6ecea;
  --white: #ffffff;
  --accent: #c4402b;
  --accent-dark: #a23422;
  --good: #1c7c4a;  --good-bg: #e6f4ec;
  --warn: #8a5300;  --warn-bg: #fdf1dc;
  --idle: #5c6778;  --idle-bg: #eef1f5;
  --on-ink: #ffffff;
  --on-ink-muted: rgba(255, 255, 255, .72);
  --on-ink-line: rgba(255, 255, 255, .14);
  --radius: 6px;
  --radius-sm: 4px;
  --display: "Archivo", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --sans: "Public Sans", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
body {
  margin: 0;
  font: 400 1rem/1.6 var(--sans);
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--display); font-weight: 700; font-stretch: 82%; line-height: 1.08; margin: 0 0 .5em; text-wrap: balance; letter-spacing: -.01em; }
h1 { font-size: clamp(2.4rem, 5.2vw, 4rem); font-weight: 800; line-height: 1; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
a { color: var(--ink); text-decoration-color: var(--accent); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.container { width: min(1160px, 100% - 32px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hp { position: absolute; left: -9999px; }
[hidden] { display: none !important; }

.eyebrow {
  font: 600 .75rem/1.4 var(--sans);
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--muted);
  margin: 0 0 .9em;
}
.lead { font-size: 1.12rem; color: var(--muted); max-width: 60ch; }
.meta { color: var(--muted); font-size: .92rem; margin: 0; }
.small { font-size: .82rem; }

/* Buttons and links */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: var(--on-ink);
  border: 1px solid var(--accent); border-radius: var(--radius-sm);
  padding: .8em 1.4em;
  font: 600 .95rem/1.2 var(--sans);
  text-decoration: none; cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn:disabled { opacity: .6; cursor: default; }
.btn-small { padding: .55em 1em; font-size: .88rem; }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.text-link { color: var(--ink); font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--line-strong); padding-bottom: 1px; }
.text-link:hover { border-color: var(--accent); }
.text-link::after, .tool-link::after { content: " →"; }

/* Header */
.site-header {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 10;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark { width: 32px; height: 32px; color: var(--accent); flex: none; }
.brand-text { display: flex; flex-direction: column; }
.brand-name { font: 800 1.35rem/1 var(--display); font-stretch: 78%; text-transform: uppercase; letter-spacing: .02em; }
.brand-sub { font: 500 .66rem/1.4 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }
.nav-links { display: flex; gap: 26px; align-items: center; }
.nav-links a:not(.btn) { text-decoration: none; color: var(--ink-2); font-size: .93rem; font-weight: 500; }
.nav-links a:not(.btn):hover { color: var(--ink); text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }
.nav-links .nav-phone { font-variant-numeric: tabular-nums; padding-left: 26px; border-left: 1px solid var(--line); }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px 0; }

/* Home hero: fog-grey sky over the painted ladies */
.hero { background: linear-gradient(180deg, var(--fog) 0%, var(--paper) 70%, var(--white) 100%); padding-top: clamp(48px, 7vw, 88px); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: start; position: relative; z-index: 1; }
.hero-kicker { font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 1.2em; }
.hero-cred { font-size: .85rem; color: var(--muted); margin: 0; }
.hero-panel { background: var(--white); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); display: grid; box-shadow: 0 14px 40px rgba(15, 42, 51, .10); }
.hero-option { padding: 26px 28px; }
.hero-option + .hero-option { border-top: 1px solid var(--line); }
.hero-option h2 { font-size: 1.45rem; margin-bottom: .25em; text-transform: uppercase; letter-spacing: .02em; }
.hero-option p { color: var(--muted); font-size: .95rem; margin-bottom: 1em; }
.hero-form { display: flex; gap: 8px; }
.hero-form input { flex: 1; min-width: 0; font: inherit; padding: .75em .9em; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); color: var(--ink); background: var(--white); }
.hero-links { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.hero-art { margin-top: clamp(16px, 3vw, 32px); }
.hero-art img { display: block; width: 100%; max-width: 100%; height: auto; min-height: 220px; object-fit: cover; object-position: left bottom; }

/* Numbers to know */
.numbers { background: var(--ink); color: var(--on-ink); padding-block: 44px 48px; }
.numbers .eyebrow { color: var(--on-ink-muted); font-family: var(--sans); font-stretch: 100%; margin-bottom: 22px; }
.numbers-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; margin: 0; }
.numbers-grid > div { border-top: 2px solid var(--accent); padding-top: 14px; }
.numbers-grid dt { font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--on-ink-muted); }
.numbers-grid dd { margin: 0; font-size: .9rem; color: var(--on-ink-muted); }
.numbers-grid .num { font: 800 2rem/1.1 var(--display); font-stretch: 78%; color: var(--on-ink); margin: .2em 0 .35em; font-variant-numeric: tabular-nums; }

/* SF districts */
.districts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0 24px; }
.districts li { display: flex; gap: 12px; padding: 18px 0 20px; border-top: 1px solid var(--line-strong); }
.d-num { font: 800 2.4rem/.9 var(--display); font-stretch: 75%; color: var(--accent); min-width: 1.4em; font-variant-numeric: tabular-nums; }
.districts h3 { font-size: 1.05rem; margin: 0 0 .25em; text-transform: uppercase; letter-spacing: .02em; }
.districts p { margin: 0; font-size: .88rem; color: var(--muted); line-height: 1.45; }
.section-head.across { margin-top: clamp(48px, 6vw, 72px); }

/* Sections */
.section { padding-block: clamp(56px, 8vw, 96px); }
.section-alt { background: var(--paper); }
.section-head { margin-bottom: 2.2rem; max-width: 62ch; }
.section-lead { color: var(--muted); margin: 0; }
.section-foot { margin: 2rem 0 0; }

/* Tool list */
.tool-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.tool-card {
  display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--ink);
  padding: 28px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  transition: background .15s;
}
.tool-card:hover { background: var(--paper); }
.tool-card h3 { margin: 6px 0 0; }
.tool-card p { color: var(--muted); margin: 0 0 .6em; flex: 1; font-size: .95rem; }
.tool-icon { color: var(--ink); }
.tool-icon svg { width: 26px; height: 26px; }
.tool-link { color: var(--accent-dark); font-weight: 600; font-size: .92rem; text-decoration: none; }

/* Buy / sell */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 56px); }
.split > .panel { align-self: start; }
.panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; }
.panel .btn { margin-top: 1.2rem; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: .65em; }
.checks li { padding-left: 1.6em; position: relative; }
.checks li::before { content: ""; position: absolute; left: 2px; top: .45em; width: .45em; height: .8em; border: solid var(--accent); border-width: 0 2px 2px 0; transform: rotate(45deg); }

/* Areas */
.hoods { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 32px; }
.hoods li { padding: 20px 0; border-top: 1px solid var(--line); }
.hoods h3 { font-size: 1.15rem; margin-bottom: .3em; }
.hoods p { margin: 0; color: var(--muted); font-size: .95rem; }
.area-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 0 40px; }
.area-card { padding: 28px 0; border-top: 1px solid var(--line); }
.area-card h2 { font-size: 1.5rem; }
.area-card p { color: var(--muted); }

/* About */
img.headshot { display: block; width: 100%; height: auto; object-fit: cover; }
.about { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: clamp(28px, 5vw, 64px); align-items: center; }
.headshot {
  aspect-ratio: 4 / 5; max-width: 100%; border-radius: var(--radius);
  /* To use a photo: add assets/headshot.jpg and set background: url("headshot.jpg") center / cover; */
  background: linear-gradient(170deg, var(--fog), var(--line-strong));
}

/* Contact and forms */
.contact-line { font-size: 1.1rem; font-weight: 600; margin: .3em 0; font-variant-numeric: tabular-nums; }
.contact-line a { text-decoration: none; color: var(--ink); }
.form { display: grid; gap: 14px; background: var(--white); padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); }
.form label, .lead-cta label { display: grid; gap: 6px; font-weight: 500; font-size: .9rem; min-width: 0; }
.form input, .form select, .form textarea {
  width: 100%; min-width: 0; font: inherit; color: var(--ink);
  padding: .7em .85em; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--white);
}
.form .btn, .lead-cta .btn { justify-self: start; }
.form-status { margin: 0; min-height: 1.4em; color: var(--muted); font-size: .92rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-row.three { grid-template-columns: repeat(3, 1fr); }
.form-row .full { grid-column: 1 / -1; }
.opt { color: var(--muted); font-weight: 400; }
.form-title { font-size: 1.25rem; margin: .5em 0 0; }
.form-title:first-of-type { margin-top: 0; }
.form fieldset { border: 0; padding: 0; margin: 0; }
.form legend { font-weight: 500; font-size: .9rem; margin-bottom: 8px; }
.check-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.form label.check { display: flex; align-items: center; gap: 8px; font-weight: 400; }
.form label.check input { width: auto; accent-color: var(--ink); }

/* Inner page header */
.page-hero { background: linear-gradient(180deg, var(--fog), var(--paper)); border-bottom: 1px solid var(--line); padding-block: clamp(44px, 7vw, 76px) clamp(32px, 5vw, 52px); }
.page-hero h1 { max-width: 22ch; }
.page-hero .lead { margin-bottom: 0; }
.tool-section { padding-top: clamp(36px, 5vw, 56px); }

/* Footer */
.site-footer { background: var(--ink); color: var(--on-ink-muted); padding: 56px 0 96px; font-size: .92rem; }
.site-footer a { color: var(--on-ink); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer p { margin: .3em 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; padding-bottom: 28px; border-bottom: 1px solid var(--on-ink-line); }
.footer-grid ul { list-style: none; padding: 0; margin: 0; columns: 2; }
.footer-grid li { margin-bottom: .45em; }
.footer-head { font-weight: 600; color: var(--on-ink); }
.brand-light { color: var(--on-ink); font: 800 1.35rem/1.2 var(--display); font-stretch: 78%; text-transform: uppercase; letter-spacing: .02em; margin-bottom: .5em !important; }
.legal { padding-top: 22px; }
.legal .small { opacity: .8; }

/* WordPress content */
.entry-content { max-width: 72ch; font-size: 1.05rem; }
.entry-content > * + * { margin-top: 1.1em; }
.entry-content h2 { font-size: 1.8rem; margin-top: 1.6em; }
.entry-content h3 { font-size: 1.3rem; margin-top: 1.4em; }
.entry-content img { max-width: 100%; height: auto; border-radius: var(--radius); }
.entry-content ul, .entry-content ol { padding-left: 1.3em; }
.entry-content blockquote { margin: 1.4em 0; padding-left: 1em; border-left: 3px solid var(--accent); color: var(--ink-2); }
.alignwide { max-width: 1160px; }
.alignfull { max-width: none; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 100; clip: auto; width: auto; height: auto; background: var(--white); padding: 10px 14px; }
.post-list { display: grid; gap: 28px; }
.post-list article { padding-top: 24px; border-top: 1px solid var(--line); }
.post-list h2 { font-size: 1.6rem; }
.post-list h2 a { text-decoration: none; }
.post-meta { color: var(--muted); font-size: .88rem; }
.pagination { margin-top: 32px; display: flex; gap: 12px; }
.nav-links .current-menu-item > a { color: var(--ink); text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 1px; }
.nav-links ul { list-style: none; margin: 0; padding: 0; display: contents; }
.nav-links li { display: contents; }

@media (max-width: 960px) {
  .nav-links .nav-phone { display: none; }
  .numbers-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .districts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 1rem;
    background: var(--white); padding: 20px 16px; border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links .nav-phone { display: block; padding-left: 0; border-left: 0; }
  .hero-grid, .split, .about, .tool, .lead-cta, .qualifier, .ob { grid-template-columns: 1fr; }
  .ob-summary { position: static; max-height: none; overflow: visible; }
  .ob-strategies, .ob-review-grid { grid-template-columns: 1fr; }
  .about .headshot { max-width: 240px; }
  .tool-results { position: static; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .tool-inputs, .form-row, .lead-cta .form-row, .check-grid { grid-template-columns: 1fr; }
  .form-row.three { grid-template-columns: repeat(3, 1fr); }
  .hero-form { flex-direction: column; }
  .tool-inputs, .tool-results, .lead-cta, .ai-card, .panel, .form, .hero-option { padding: 20px; }
  .tool-card { padding: 22px 20px; }
  .tool-grid, .numbers-grid, .districts, .ob-grid { grid-template-columns: 1fr; }
  .ob-step { padding: 20px; }
  .ob-steps button { font-size: 0; gap: 0; }
  .ob-steps button span { font-size: 1.05rem; }
  .hero-art img { min-height: 170px; }
  .ai-widget { right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
  .ai-panel { width: calc(100vw - 24px); height: calc(100vh - 90px); }
}

