/* Adrian Hicks Group website.
   Brand lives in the :root tokens; swap these to restyle the whole site. */
:root {
  --ink: #1a1c20;          /* nav, headings */
  --ink-2: #2b2d32;
  --text: #34373d;
  --muted: #6a6e75;
  --line: #e6e2db;         /* warm hairline */
  --bg: #ffffff;
  --bg-soft: #f7f5f1;      /* warm off-white for alternate bands */
  --accent: #b4532c;       /* copper: every primary call to action */
  --accent-dark: #974321;
  --accent-soft: #f8ede6;
  --active: #2f855a;
  --radius: 10px;
  --nav-w: 252px;
  --shadow: 0 1px 2px rgba(26, 28, 32, .05), 0 10px 30px rgba(26, 28, 32, .09);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Fraunces", Georgia, "Times New Roman", serif;   /* headings only */
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 16px/1.5 var(--font); color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { color: var(--ink); line-height: 1.12; margin: 0 0 .45em; }
h1, h2 { font-family: var(--display); font-weight: 500; font-optical-sizing: auto; }
h1 { font-size: clamp(2.2rem, 4.8vw, 3.9rem); letter-spacing: -.015em; }
h2 { font-size: clamp(1.6rem, 2.7vw, 2.3rem); letter-spacing: -.01em; }
h3 { font-size: 1.12rem; font-weight: 700; letter-spacing: -.005em; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 28px; }
.section { padding: 84px 0; }
.section.soft { background: var(--bg-soft); }
.eyebrow { font-size: .74rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); margin-bottom: 12px; }

/* ---------- Shell: vertical nav on the left ---------- */
.shell { display: grid; grid-template-columns: var(--nav-w) minmax(0, 1fr); min-height: 100vh; }
.sidenav { position: sticky; top: 0; height: 100vh; background: var(--ink); color: #fff; display: flex; flex-direction: column; padding: 22px 18px; overflow-y: auto; z-index: 1200; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-bottom: 28px; }
.brand img { width: 42px; height: 42px; border-radius: 10px; }
.brand b { display: block; font: 600 1.14rem/1.1 var(--display); letter-spacing: -.005em; color: #fff; }
.brand small { display: block; font-size: .64rem; font-weight: 600; color: #a9aeb6; letter-spacing: .2em; text-transform: uppercase; margin-top: 4px; }
.navlinks { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.navlinks a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; text-decoration: none; color: #cfd2d7; font-weight: 500; font-size: .95rem; }
.navlinks a:hover { background: rgba(255,255,255,.07); color: #fff; }
.navlinks a[aria-current="page"] { background: rgba(255,255,255,.09); color: #fff; font-weight: 600; box-shadow: inset 2px 0 0 var(--accent); }
.navlinks svg { width: 19px; height: 19px; flex: none; opacity: .75; }
.nav-cta { margin-top: 22px; display: grid; gap: 10px; }
.nav-phone { color: #d9dde3; text-decoration: none; font-weight: 700; text-align: center; font-size: .95rem; }
.nav-foot { margin-top: auto; padding-top: 24px; font-size: .72rem; color: #8c93a0; line-height: 1.45; }

.topbar { display: none; }
.scrim { display: none; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 8px; padding: 13px 22px; font: 600 .98rem var(--font); letter-spacing: .005em; text-decoration: none; cursor: pointer; transition: background .15s, box-shadow .15s, transform .05s; }
.btn:active { transform: translateY(1px); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-dark); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-ghost { background: transparent; color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.55); }
.btn-ghost:hover { background: rgba(255,255,255,.1); }
.btn-line { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-line:hover { box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn-huge { font-size: 1.16rem; font-weight: 700; padding: 20px 24px; border-radius: 10px; width: 100%; letter-spacing: .01em; box-shadow: 0 6px 18px rgba(180, 83, 44, .28); }
.btn-block { width: 100%; }

/* ---------- Preview banner (off unless PREVIEW_BANNER.text is set in site.js) ---------- */
.preview-banner { background: #f6efd9; color: #6b5a26; font-size: .78rem; font-weight: 500; text-align: center; padding: 7px 12px; border-bottom: 1px solid #eadfbd; }

/* ---------- Home ---------- */
/* Hero photo: a wide view over a Davis County-style neighborhood toward the valley (no particular home). */
.hero { position: relative; min-height: 78vh; display: grid; place-items: center; color: #fff; text-align: center; background: #222 url("img/hero-valley-1200.webp") center/cover no-repeat; }
@media (min-width: 1201px) { .hero { background-image: url("img/hero-valley-2400.webp"); } }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(14,15,18,.30) 0%, rgba(14,15,18,.18) 35%, rgba(14,15,18,.62) 100%); }
.hero-inner { position: relative; width: min(860px, 92%); padding: 60px 0; }
.hero h1 { color: #fff; text-shadow: 0 2px 24px rgba(0,0,0,.25); }
.hero p.lead { font-size: 1.16rem; color: #eceef1; margin-bottom: 30px; }
.hero-search { display: flex; background: #fff; border-radius: 10px; padding: 6px; box-shadow: 0 14px 40px rgba(0,0,0,.22); max-width: 640px; margin: 0 auto 28px; }
.hero-search input { flex: 1; border: 0; font: 500 1.05rem var(--font); padding: 14px 16px; min-width: 0; outline: none; color: var(--ink); background: transparent; }
.cta-trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; max-width: 860px; margin: 0 auto; }
.cta-tile { display: grid; gap: 4px; text-align: left; background: rgba(255,255,255,.97); color: var(--ink); text-decoration: none; padding: 20px 22px 18px; border-radius: 10px; box-shadow: var(--shadow); border-top: 3px solid var(--accent); transition: transform .15s; }
.cta-tile b { font-size: 1.08rem; font-weight: 700; }
.cta-tile span { color: var(--muted); font-size: .9rem; }
.cta-tile:hover { transform: translateY(-2px); }

.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
.value-band { background: var(--ink); color: #fff; border-radius: 14px; padding: 52px; display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.value-band h2 { color: #fff; }

/* Town tiles: text only (no photos until real ones exist) */
.town-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.town-tile { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); font: 500 1.15rem/1.2 var(--display); transition: border-color .15s, box-shadow .15s; }
.town-tile span { color: var(--accent); font: 700 1rem var(--font); }
.town-tile:hover { border-color: #d9d4cb; box-shadow: var(--shadow); }

/* ---------- Coming soon (home search, listings) ---------- */
.soon { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 520px); gap: 48px; align-items: start; }
.soon h1 { font-size: clamp(2rem, 4vw, 3rem); }
.lead-dark { font-size: 1.1rem; color: var(--text); }
.soon-list { padding-left: 20px; color: var(--text); }
.soon-list li { margin: 6px 0; }
.soon-list a { color: var(--accent); font-weight: 600; white-space: nowrap; }
.soon-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 28px; align-items: center; background: var(--accent-soft); border: 1px solid #efd9cc; border-radius: 14px; padding: 36px 40px; }
.soon-card p { margin: 0; max-width: 640px; }
.fine { font-size: .78rem; color: var(--muted); margin: 8px 0 0; }
.fine a { color: inherit; }
.form-card .btn-huge { margin-top: 6px; }

/* ---------- Privacy and terms ---------- */
.prose { max-width: 760px; }
.prose h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
.prose h2 { font-size: 1.4rem; margin-top: 1.6em; }
.prose li { margin: 6px 0; }
.prose a { color: var(--accent); font-weight: 600; }

/* ---------- Forms ---------- */
.field { display: grid; gap: 5px; margin-bottom: 10px; }
.field label { font-size: .8rem; font-weight: 600; color: var(--ink); letter-spacing: .01em; }
.field input, .field select, .field textarea { border: 1px solid #d8d3ca; border-radius: 8px; padding: 12px 13px; font: 400 1rem var(--font); color: var(--ink); background: #fff; width: 100%; transition: border-color .15s, box-shadow .15s; }
.field select { -webkit-appearance: none; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23646b76' stroke-width='1.8'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 12px 8px; padding-right: 34px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: .78rem; line-height: 1.4; color: var(--muted); margin: 8px 0; }
.consent input { margin-top: 2px; width: 18px; height: 18px; flex: none; accent-color: var(--accent); }
.thanks { text-align: center; padding: 26px 10px; }
.thanks .tick { width: 56px; height: 56px; border-radius: 50%; background: var(--active); color: #fff; display: grid; place-items: center; font-size: 1.8rem; margin: 0 auto 12px; }
.form-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 28px; box-shadow: var(--shadow); color: var(--text); }

/* ---------- Agent + team ---------- */
.agent-hero { background: var(--ink); color: #fff; }
.agent-hero .wrap { display: grid; grid-template-columns: 220px 1fr; gap: 36px; align-items: center; padding-top: 48px; padding-bottom: 48px; }
.agent-hero img { width: 220px; height: 220px; border-radius: 12px; object-fit: cover; }
.agent-hero h1 { color: #fff; margin-bottom: 4px; }
.agent-hero .role { color: #c3c8d0; font-size: 1.05rem; margin-bottom: 18px; }
.agent-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.pills span { background: rgba(255,255,255,.12); padding: 5px 12px; border-radius: 999px; font-size: .85rem; font-weight: 600; }
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; }
.team-card { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: inherit; background: #fff; transition: box-shadow .2s; }
.team-card:hover { box-shadow: var(--shadow); }
.team-card img { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; }
.team-card > div { padding: 14px 16px 16px; }
.team-card b { display: block; font: 500 1.16rem/1.25 var(--display); color: var(--ink); }
.join { background: linear-gradient(135deg, var(--ink), var(--ink-2)); color: #fff; border-radius: 14px; padding: 52px; display: grid; grid-template-columns: 1.3fr 1fr; gap: 30px; align-items: center; }
.join h2 { color: #fff; }
.join ul { margin: 0 0 18px; padding-left: 20px; color: #d9dde3; }

/* ---------- Footer ---------- */
.footer { background: var(--bg-soft); border-top: 1px solid var(--line); padding: 56px 0 32px; font-size: .86rem; color: var(--muted); line-height: 1.6; }
.footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; }
.footer b { color: var(--ink); }
.footer a { color: var(--muted); text-decoration: none; display: block; padding: 2px 0; }
.footer a.inline { display: inline; text-decoration: underline; }
.eho { display: flex; gap: 10px; align-items: center; margin-top: 14px; }
.eho svg { width: 42px; height: 42px; flex: none; }
.legal { margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line); font-size: .76rem; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 10px; font-weight: 600; z-index: 4000; box-shadow: var(--shadow); }

/* ============ Tablet & phone ============ */

@media (max-width: 900px) {
  .shell { display: block; }
  .topbar { display: flex; position: sticky; top: 0; z-index: 1100; height: 60px; align-items: center; justify-content: space-between; padding: 0 12px 0 14px; background: var(--ink); color: #fff; }
  .topbar .brand { margin: 0; }
  .topbar .brand img { width: 36px; height: 36px; }
  .menu-btn { background: transparent; border: 0; color: #fff; padding: 10px; cursor: pointer; display: flex; align-items: center; gap: 8px; font: 700 .9rem var(--font); }
  .menu-btn svg { width: 26px; height: 26px; }
  .sidenav { position: fixed; left: 0; top: 0; bottom: 0; width: min(84vw, 320px); height: 100%; transform: translateX(-100%); transition: transform .22s ease; box-shadow: var(--shadow); }
  body.nav-open .sidenav { transform: none; }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 1150; }
  .navlinks a { padding: 14px 12px; font-size: 1.05rem; }

  .wrap { padding: 0 16px; }
  .section { padding: 52px 0; }
  .hero { min-height: 0; }
  .hero-inner { padding: 56px 0 40px; }
  .cta-trio { grid-template-columns: 1fr; }
  .split, .value-band, .join { grid-template-columns: minmax(0, 1fr); }
  .value-band, .join { padding: 32px 22px; }
  .footer .cols { grid-template-columns: 1fr; }

  .soon { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .soon-card { grid-template-columns: minmax(0, 1fr); padding: 26px 22px; }
  .form-card { padding: 20px 16px; }

  .agent-hero .wrap { grid-template-columns: 1fr; gap: 18px; padding-top: 28px; padding-bottom: 28px; }
  .agent-hero img { width: 140px; height: 140px; }
}

@media (max-width: 520px) {
  .soon .row2 { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .town-tile { padding: 14px; font-size: 1.05rem; }
  .team-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .team-card > div { padding: 10px 12px 12px; }
  .team-card b { font-size: 1.02rem; }
  .value-band .hero-search { flex-direction: column; gap: 6px; }
}

/* Forms: the hidden honeypot field, and the message when a send fails */
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.form-error { background: #fdecea; color: #8a1c12; border-radius: 8px; padding: 10px 12px; font-size: .9rem; margin: 10px 0 0; }
[hidden] { display: none !important; }

/* Agent pages: the Book's questions and answers */
.faq-section .wrap { max-width: 860px; }
.agent-faq h3 { font: 600 1.08rem/1.35 var(--font); margin: 26px 0 6px; }
.agent-faq p { color: #3d4047; margin: 0; }
.turnstile-slot:not(:empty) { margin: 10px 0 0; }
.form-error a { color: inherit; font-weight: 600; text-decoration: underline; }

/* Agent pages: recent sales and what clients say (from the Book's feed; tools/agent-page.mjs) */
.sold-list, .review-list { list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sold-card, .review-card { overflow-wrap: anywhere; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.sold-street { font: 600 1.15rem/1.25 var(--display); color: var(--ink); }
.sold-city { color: var(--muted); margin-bottom: 10px; }
.sold-when { font-weight: 600; color: var(--ink); }
.sold-price { font-weight: 600; color: var(--ink); }
.sold-side { color: var(--text); font-size: .95rem; }
.sold-note { margin: 10px 0 0; padding-top: 10px; border-top: 1px solid var(--line); font-size: .95rem; color: #3d4047; }
.review-card { display: flex; flex-direction: column; }
.stars { color: var(--accent); font-size: 1.1rem; letter-spacing: .08em; margin-bottom: 8px; }
.star-off { color: #d8d1c5; }
.review-text { margin: 0 0 12px; white-space: pre-line; overflow-wrap: anywhere; color: var(--text); }
.review-by { margin: auto 0 0; font-weight: 600; color: var(--ink); }
.review-from { margin: 2px 0 0; font-size: .85rem; color: var(--muted); }
.show-all { margin-top: 16px; }
.show-all > summary { display: inline-block; cursor: pointer; color: var(--accent); font-weight: 600; padding: 8px 0; list-style: none; }
.show-all > summary::-webkit-details-marker { display: none; }
.show-all > summary:hover { text-decoration: underline; }
.show-all > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.show-all .when-open, .show-all[open] .when-closed { display: none; }
.show-all[open] .when-open { display: inline; }
@media (max-width: 1100px) {
  .sold-list, .review-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .sold-list, .review-list { grid-template-columns: minmax(0, 1fr); }
}
