/*
Theme Name: Twain Harte Lake Homes
Theme URI: https://twainhartelakehomes.com
Author: Twain Harte Lake Homes
Description: Lead-generation theme for buyers searching for Twain Harte homes with active Twain Harte Lake membership. Built-in buyer sign-up form, lead inbox with CSV export, SEO meta and structured data (RealEstateAgent + FAQPage).
Version: 1.2.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: thlh
*/

/* Layout: full-bleed photo hero with a "lake pass" sign-up card; below, left-aligned reading
   sections that alternate photo/text, a membership comparison, gallery, narrow-your-list form, FAQ. */
:root {
  --ink: #12303a;        /* deep lake water, primary text */
  --pine: #1f4a3d;       /* Sierra pine, dark bands */
  --lake: #2c7486;       /* summer lake blue, links */
  --granite: #edf1ef;    /* granite mist, alt section ground */
  --paper: #fbfcfb;      /* page */
  --sun: #f0b43a;        /* afternoon sun on the dock, CTA */
  --sun-deep: #d99a1e;
  --muted: #4f6668;
  --line: #d3ddda;
  --white: #ffffff;

  --display: "Young Serif", Georgia, "Times New Roman", serif;
  --body: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3125rem;
  --step-2: 1.75rem;
  --step-3: clamp(2rem, 1.4rem + 2.4vw, 2.75rem);
  --step-4: clamp(2.5rem, 1.6rem + 4vw, 4.25rem);

  --wrap: 1180px;
  --gutter-l: max(20px, env(safe-area-inset-left, 0px));
  --gutter-r: max(20px, env(safe-area-inset-right, 0px));
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--step-0);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--lake); text-underline-offset: 3px; }
a:hover { color: var(--pine); }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.12; margin: 0; text-wrap: balance; color: var(--ink); letter-spacing: -0.01em; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); line-height: 1.3; }
p { margin: 0; }
.prose { display: grid; gap: 1.1em; max-width: 64ch; }
.prose ul { margin: 0; padding-left: 1.2em; display: grid; gap: .4em; }

.wrap { width: 100%; max-width: calc(var(--wrap) + 40px); margin: 0 auto; padding-left: var(--gutter-l); padding-right: var(--gutter-r); }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--sun); color: var(--ink); padding: .6em 1em; z-index: 100; }
.skip-link:focus { left: 12px; top: 12px; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap; }

/* ---------- Header ---------- */
.site-header { position: absolute; top: 0; left: 0; right: 0; z-index: 20; color: var(--white); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 22px; flex-wrap: wrap; }
.brand { color: var(--white); text-decoration: none; display: flex; flex-direction: column; line-height: 1.1; }
.brand:hover { color: var(--white); }
.brand-name { font-family: var(--display); font-size: 1.35rem; }
.brand-sub { font-size: .8rem; opacity: .85; letter-spacing: .02em; }
.header-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.header-link { color: var(--white); text-decoration: none; font-weight: 600; }
.header-link:hover { color: var(--sun); }
.site-header-solid { position: static; background: var(--pine); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; font-family: var(--body); font-weight: 700; font-size: 1rem; line-height: 1.2; padding: .95em 1.4em; border-radius: 999px; border: 0; cursor: pointer; text-decoration: none; transition: background-color .15s ease, transform .15s ease; }
.btn-sun { background: var(--sun); color: var(--ink); }
.btn-sun:hover { background: var(--sun-deep); color: var(--ink); }
.btn-ghost { background: transparent; color: var(--white); box-shadow: inset 0 0 0 2px rgba(255,255,255,.7); padding: .7em 1.15em; }
.btn-ghost:hover { background: rgba(255,255,255,.12); color: var(--white); }
.btn-block { width: 100%; }

/* ---------- Hero ---------- */
.hero { position: relative; color: var(--white); background: var(--pine); isolation: isolate; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: -2; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: center 60%; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(100deg, rgba(10,32,38,.86) 0%, rgba(10,32,38,.62) 45%, rgba(10,32,38,.25) 100%); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(32px, 5vw, 72px); align-items: center; padding-block: 150px 96px; }
.hero-copy { display: grid; gap: 22px; min-width: 0; }
.hero-kicker { font-size: var(--step-0); font-weight: 600; color: var(--sun); }
.hero h1 { color: var(--white); font-size: var(--step-4); }
.hero-lede { font-size: var(--step-1); line-height: 1.5; max-width: 34ch; color: rgba(255,255,255,.92); }
.hero-points { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 10px; }
.hero-points li { display: flex; gap: 12px; align-items: baseline; color: rgba(255,255,255,.92); }
.hero-points li::before { content: ""; flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--sun); transform: translateY(-1px); }

/* ---------- The lake pass (sign-up card) ---------- */
.pass { position: relative; background: var(--white); color: var(--ink); border-radius: 22px; box-shadow: 0 30px 60px -20px rgba(4,20,24,.55); min-width: 0; }
.pass::before { /* punched hole, like a season pass on a lanyard */
  content: ""; position: absolute; top: 16px; left: 50%; width: 46px; height: 12px; margin-left: -23px; border-radius: 999px; background: var(--pine); box-shadow: inset 0 2px 3px rgba(0,0,0,.35); }
.pass-head { padding: 44px 28px 22px; display: grid; gap: 8px; }
.pass-tag { display: inline-flex; align-self: start; justify-self: start; gap: 8px; align-items: center; background: var(--pine); color: var(--white); font-size: .82rem; font-weight: 600; padding: .35em .85em; border-radius: 999px; }
.pass-tag::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #6fd39b; box-shadow: 0 0 0 3px rgba(111,211,155,.25); }
.pass h2 { font-size: var(--step-2); color: var(--ink); }
.pass-sub { color: var(--muted); font-size: .97rem; }
.pass-body { padding: 22px 28px 28px; border-top: 2px dashed var(--line); position: relative; }
.pass-body::before, .pass-body::after { /* perforation notches */
  content: ""; position: absolute; top: -12px; width: 22px; height: 22px; border-radius: 50%; background: var(--pine); }
.pass-body::before { left: -11px; }
.pass-body::after { right: -11px; }
.hero .pass-body::before, .hero .pass-body::after { background: #1b3b3c; }
.pass-foot { font-size: .8rem; color: var(--muted); margin-top: 12px; line-height: 1.45; }

/* ---------- Forms ---------- */
.lead-form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field label { font-size: .88rem; font-weight: 600; color: var(--ink); }
.field input, .field select, .field textarea { width: 100%; font: inherit; font-size: 1rem; color: var(--ink); background: var(--paper); border: 1.5px solid var(--line); border-radius: 12px; padding: .8em .95em; transition: border-color .15s ease; }
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--lake); box-shadow: 0 0 0 3px rgba(44,116,134,.18); }
.field-row { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 14px; }
.field-row-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.opt { font-weight: 400; color: var(--muted); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .85rem; color: var(--muted); line-height: 1.45; }
.check input { margin-top: .25em; width: 18px; height: 18px; flex: none; accent-color: var(--pine); }
.hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
.form-note { border-radius: 12px; padding: 14px 16px; font-size: .95rem; line-height: 1.5; }
.form-note.ok { background: #e3f3ea; color: #164a31; }
.form-note.err { background: #fbeaea; color: #7a1f1f; }

/* ---------- Sections ---------- */
.section { padding-block: clamp(64px, 9vw, 112px); }
.section-alt { background: var(--granite); }
.section-dark { background: var(--pine); color: rgba(255,255,255,.9); }
.section-dark h2, .section-dark h3 { color: var(--white); }
.section-head { display: grid; gap: 14px; max-width: 60ch; margin-bottom: clamp(32px, 5vw, 52px); }
.section-head p { color: var(--muted); font-size: var(--step-1); line-height: 1.5; }
.section-dark .section-head p { color: rgba(255,255,255,.8); }


.split { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.split-media { position: relative; }
.split-media img { width: 100%; aspect-ratio: 4 / 3.2; object-fit: cover; border-radius: 20px; }
.split-media .stamp { position: absolute; left: -14px; bottom: 26px; background: var(--sun); color: var(--ink); font-weight: 700; font-size: .9rem; padding: .55em 1em; border-radius: 999px; box-shadow: 0 10px 24px -10px rgba(0,0,0,.4); }
.split-copy { display: grid; gap: 20px; min-width: 0; }

/* Active vs eligible comparison */
.compare { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 0; background: var(--white); border: 1.5px solid var(--line); border-radius: 20px; overflow: hidden; }
.compare-col { padding: clamp(24px, 4vw, 40px); display: grid; gap: 14px; align-content: start; }
.compare-col + .compare-col { border-left: 1.5px solid var(--line); }
.compare-col h3 { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.badge { font-family: var(--body); font-size: .78rem; font-weight: 700; padding: .3em .75em; border-radius: 999px; }
.badge-yes { background: #e3f3ea; color: #164a31; }
.badge-wait { background: #fdf1d8; color: #6b4a07; }
.compare-col ul { margin: 0; padding-left: 1.1em; display: grid; gap: 8px; color: var(--ink); }
.compare-note { margin-top: 20px; color: var(--muted); font-size: .92rem; max-width: 72ch; }


/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); grid-auto-rows: 220px; gap: 14px; }
.gallery figure { margin: 0; position: relative; overflow: hidden; border-radius: 16px; background: var(--granite); }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
.gallery figcaption { position: absolute; left: 12px; bottom: 12px; background: rgba(18,48,58,.78); color: var(--white); font-size: .82rem; padding: .3em .75em; border-radius: 999px; }
.g1 { grid-column: span 4; grid-row: span 2; }
.g2 { grid-column: span 2; }
.g3 { grid-column: span 2; }

/* CTA band */
.cta-band .wrap { display: grid; grid-template-columns: minmax(0,.95fr) minmax(0,1.05fr); gap: clamp(32px, 6vw, 72px); align-items: start; }
.cta-band .pass-body::before, .cta-band .pass-body::after { background: var(--granite); }
.cta-band .pass::before { background: var(--granite); box-shadow: inset 0 2px 3px rgba(0,0,0,.12); }
.cta-band .pass { box-shadow: 0 24px 50px -24px rgba(18,48,58,.35); }

/* FAQ */
.faq { display: grid; gap: 0; max-width: 820px; border-top: 1.5px solid var(--line); }
.faq details { border-bottom: 1.5px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 20px; align-items: center; padding: 22px 4px; font-family: var(--display); font-size: var(--step-1); line-height: 1.3; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--body); font-weight: 400; font-size: 1.6rem; color: var(--lake); flex: none; transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .answer { padding: 0 4px 24px; color: var(--muted); max-width: 68ch; display: grid; gap: .8em; }


/* Footer */
.site-footer { background: var(--ink); color: rgba(255,255,255,.78); font-size: .92rem; }
.site-footer .wrap { padding-block: 56px 40px; display: grid; gap: 32px; }
.footer-top { display: grid; grid-template-columns: minmax(0,1.3fr) minmax(0,1fr); gap: 32px; }
.site-footer h3 { color: var(--white); font-size: 1.15rem; margin-bottom: 10px; }
.site-footer a { color: var(--white); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.legal { border-top: 1px solid rgba(255,255,255,.14); padding-top: 24px; font-size: .8rem; line-height: 1.6; color: rgba(255,255,255,.62); display: grid; gap: 8px; }

/* Mobile sticky CTA */
.mobile-cta { display: none; }

/* Inner pages (buyer's guide) */
.page-hero { background: var(--pine); color: var(--white); }
.page-hero .wrap { padding-block: 40px 52px; display: grid; gap: 14px; }
.page-hero h1 { color: var(--white); font-size: var(--step-4); max-width: 18ch; }
.crumbs a { color: rgba(255,255,255,.75); font-size: .9rem; text-decoration: none; }
.crumbs a:hover { color: var(--sun); }
.page-lede { font-size: var(--step-1); line-height: 1.5; max-width: 52ch; color: rgba(255,255,255,.9); }
.page-date { font-size: .88rem; color: rgba(255,255,255,.65); }
.entry { padding-block: 56px 88px; }
.entry-content { max-width: 72ch; display: grid; gap: 1.15em; min-width: 0; }
.entry-content > * { margin: 0; min-width: 0; }
.entry-content h2 { font-size: var(--step-3); margin-top: 1.1em; scroll-margin-top: 24px; }
.entry-content ul, .entry-content ol { padding-left: 1.3em; display: grid; gap: .5em; }
.entry-content ol li::marker { font-family: var(--display); color: var(--lake); }
.entry-content figure { margin: .6em 0; }
.entry-content img { border-radius: 16px; width: 100%; }
.entry-content figcaption { font-size: .88rem; color: var(--muted); margin-top: 8px; }
.entry-content .wp-block-table { overflow-x: auto; }
.entry-content table { width: 100%; border-collapse: collapse; font-size: .97rem; background: var(--white); border: 1.5px solid var(--line); border-radius: 14px; overflow: hidden; }
.entry-content th, .entry-content td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.entry-content thead th { background: var(--granite); font-weight: 700; }
.entry-content tbody tr:last-child td { border-bottom: 0; }
.entry-content td:first-child { white-space: nowrap; }
.guide-note { background: var(--granite); border-left: 4px solid var(--lake); padding: 14px 18px; border-radius: 0 12px 12px 0; font-size: .95rem; color: var(--muted); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero .wrap, .cta-band .wrap, .split { grid-template-columns: minmax(0,1fr); }
  .hero .wrap { padding-block: 128px 64px; }
  .split-media { order: -1; }
}
@media (max-width: 720px) {
  .compare { grid-template-columns: minmax(0,1fr); }
  .compare-col + .compare-col { border-left: 0; border-top: 1.5px solid var(--line); }
  .gallery { grid-template-columns: minmax(0,1fr) minmax(0,1fr); grid-auto-rows: 160px; }
  .g1 { grid-column: span 2; grid-row: span 2; }
  .g2, .g3 { grid-column: span 1; }
  .field-row { grid-template-columns: minmax(0,1fr); }
  .footer-top { grid-template-columns: minmax(0,1fr); }
  .header-actions { display: none; }
  .entry-content td:first-child { white-space: normal; }
  .split-media .stamp { left: 12px; }
  .mobile-cta { display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--white); box-shadow: 0 -8px 24px -12px rgba(0,0,0,.35);
    padding: 10px var(--gutter-r) calc(10px + env(safe-area-inset-bottom, 0px)) var(--gutter-l); }
  body { padding-bottom: 76px; }
}

/* Membership boundary map */
.map-figure { margin: 0; display: grid; gap: 16px; }
.map-scroll { border-radius: 20px; overflow: hidden; box-shadow: 0 30px 60px -28px rgba(0,0,0,.6); background: var(--granite); }
.map-scroll > a { display: block; }
.map-hint { display: none; font-size: .9rem; color: rgba(255,255,255,.75); margin: -4px 0 0; }
.map-figure img { width: 100%; height: auto; transition: transform .3s ease; }
.map-scroll > a:hover img { transform: scale(1.01); }
@media (max-width: 720px) {
  .map-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .map-scroll img { width: 900px; max-width: none; }
  .map-scroll > a:hover img { transform: none; }
  .map-hint { display: block; }
}
