/* Action Advisors site styles — first-pass; frontend agent will refine. */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background: var(--bg-page);
  color: var(--t-1);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }

.skip-to-main {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: #fff;
  padding: 8px 12px; z-index: 1000; border-radius: var(--radius-sm);
}
.skip-to-main:focus { left: 8px; top: 8px; }

/* ===== TOP BAR ===== */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250,250,249,0.92);
  backdrop-filter: saturate(150%) blur(10px);
  -webkit-backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar__inner {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 14px var(--page-pad);
  display: flex;
  align-items: center;
  gap: var(--s-5);
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--t-1);
  font-family: var(--font-display);
  letter-spacing: -0.01em;
}
.brand__mark { color: var(--accent); flex-shrink: 0; }
.brand__lockup { display: flex; flex-direction: column; line-height: 1.1; }
.brand__name { font-weight: 600; font-size: 17px; }
.brand__sub  { font-size: 11px; color: var(--t-3); letter-spacing: 0.06em; text-transform: uppercase; font-family: var(--font-body); }

.primary-nav { display: flex; gap: var(--s-5); margin-left: auto; }
.primary-nav a {
  font-size: 14px; color: var(--t-2); padding: 6px 0;
  position: relative; transition: color var(--dur-fast) var(--ease);
}
.primary-nav a:hover { color: var(--t-1); }
.primary-nav a[aria-current="page"] { color: var(--t-1); }
.primary-nav a[aria-current="page"]::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -2px;
  height: 1px; background: var(--accent);
}

.topbar__cta { display: flex; gap: 8px; }
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 16px; border-radius: var(--radius);
  font-size: 13.5px; font-weight: 500;
  border: 1px solid transparent;
  transition: all var(--dur-fast) var(--ease);
  cursor: pointer; text-decoration: none;
}
.btn--ghost {
  border-color: var(--border-strong); color: var(--t-1); background: transparent;
}
.btn--ghost:hover { background: var(--bg-surface); border-color: var(--t-1); }
.btn--primary {
  background: var(--t-1); color: var(--bg-page); border-color: var(--t-1);
}
.btn--primary:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

.nav-toggle { display: none; }

@media (max-width: 880px) {
  .primary-nav, .topbar__cta { display: none; }
  .nav-toggle {
    display: flex; flex-direction: column; gap: 4px;
    margin-left: auto; padding: 10px;
    background: transparent; border: none; cursor: pointer;
  }
  .nav-toggle span {
    display: block; width: 22px; height: 1.5px; background: var(--t-1);
  }
  body.nav-open .primary-nav,
  body.nav-open .topbar__cta {
    display: flex; flex-direction: column; gap: 0;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bg-raised); border-bottom: 1px solid var(--border);
    padding: var(--s-5) var(--page-pad);
  }
  body.nav-open .primary-nav a {
    padding: 12px 0; border-bottom: 1px solid var(--border);
  }
  body.nav-open .topbar__cta { padding-top: var(--s-3); }
}

/* ===== LAYOUT ===== */
.section {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: var(--s-9) var(--page-pad);
}
.section--tight { padding: var(--s-7) var(--page-pad); }

.eyebrow {
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent); font-weight: 600;
  margin-bottom: var(--s-3);
}

h1, h2, h3 { font-family: var(--font-display); letter-spacing: -0.02em; line-height: 1.15; color: var(--t-1); }
h1 { font-size: clamp(36px, 5vw, 56px); font-weight: 600; }
h2 { font-size: clamp(28px, 3.5vw, 40px); font-weight: 600; }
h3 { font-size: clamp(20px, 2.2vw, 26px); font-weight: 600; }

p { font-size: 16px; color: var(--t-2); max-width: 64ch; }
.lead { font-size: clamp(18px, 2vw, 22px); color: var(--t-2); line-height: 1.5; max-width: 56ch; }

/* ===== HERO ===== */
.hero {
  padding: var(--s-9) var(--page-pad) var(--s-8);
  max-width: var(--page-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--s-8);
  align-items: center;
}
.hero__copy h1 { margin-bottom: var(--s-4); }
.hero__copy .lead { margin-bottom: var(--s-5); }
.hero__cta { display: flex; gap: var(--s-2); flex-wrap: wrap; }
.hero__featured {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--dur-mid) var(--ease), box-shadow var(--dur-mid) var(--ease);
}
.hero__featured:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(0,0,0,.08); }
.hero__featured-img {
  height: 280px; background: var(--bg-surface) center/cover no-repeat;
  position: relative;
}
.hero__featured-img::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 60%, rgba(14,17,22,0.4));
}
.hero__featured-body { padding: var(--s-5); }
.hero__featured-tag {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-strong);
  font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase;
  font-weight: 600; margin-bottom: var(--s-3);
}

@media (max-width: 880px) {
  .hero { grid-template-columns: 1fr; padding-top: var(--s-7); }
  .hero__featured-img { height: 200px; }
}

/* Reusable two-column layout that stacks on mobile */
.two-col-stack {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-7);
  align-items: center;
}
.home-agents-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-7);
  align-items: center;
}
@media (max-width: 880px) {
  .home-agents-grid,
  .two-col-stack { grid-template-columns: 1fr; }
}

/* ===== STAT STRIP ===== */
.stat-strip {
  background: var(--bg-inverse);
  color: var(--t-inverse);
  padding: var(--s-7) var(--page-pad);
}
.stat-strip__inner {
  max-width: var(--page-max); margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--s-6);
}
.stat {
  border-left: 2px solid var(--accent);
  padding-left: var(--s-4);
}
.stat__value {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 600;
  letter-spacing: -0.02em;
}
.stat__label {
  font-size: 12px; color: var(--t-3);
  letter-spacing: 0.06em; text-transform: uppercase;
  margin-top: 4px;
}

/* ===== CARD GRIDS ===== */
.grid {
  display: grid;
  gap: var(--s-5);
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--s-5);
  transition: border-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.card:hover { border-color: var(--t-1); transform: translateY(-1px); }
.card h3 { margin-bottom: var(--s-2); font-size: 20px; }
.card p { font-size: 14.5px; }

/* ===== LISTING CARDS ===== */
.listing-card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--dur-mid) var(--ease);
  display: flex; flex-direction: column;
}
.listing-card:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(0,0,0,0.06); border-color: var(--t-2); }
.listing-card__img {
  aspect-ratio: 4/3;
  background-color: var(--bg-surface);
  background-position: center; background-size: cover; background-repeat: no-repeat;
  position: relative;
}
/* When no real photo URL is set, show a brand-coherent star pattern placeholder */
.listing-card__img:not([style*="url("]) {
  background-image:
    radial-gradient(circle at 30% 30%, rgba(31,74,92,0.06), transparent 40%),
    radial-gradient(circle at 70% 70%, rgba(31,74,92,0.04), transparent 40%),
    linear-gradient(135deg, #EDE9DD 0%, #F2EFE6 50%, #E8E2D2 100%);
}
.listing-card__img:not([style*="url("])::after {
  content: "";
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><polygon points='50,12 56.1,33.4 78.4,33.6 60.6,46.6 67.0,67.7 50,55.0 33.0,67.7 39.4,46.6 21.6,33.6 43.9,33.4' fill='none' stroke='%231F4A5C' stroke-width='1.4' stroke-opacity='0.18'/></svg>");
  background-position: center; background-size: 40% auto; background-repeat: no-repeat;
}
.listing-card__body { padding: var(--s-4); display: flex; flex-direction: column; gap: 6px; }
.listing-card__type { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--t-3); }
.listing-card__name { font-family: var(--font-display); font-weight: 600; font-size: 18px; }
.listing-card__addr { font-size: 13px; color: var(--t-3); }
.listing-card__price {
  margin-top: auto; padding-top: var(--s-3);
  font-variant-numeric: tabular-nums; font-weight: 600; color: var(--t-1);
  border-top: 1px solid var(--border);
  font-size: 16px;
}

/* ===== FORMS ===== */
form.contact-form { display: grid; gap: var(--s-3); max-width: 540px; }
.contact-form label { font-size: 12px; color: var(--t-3); letter-spacing: 0.04em; text-transform: uppercase; }
.contact-form input, .contact-form textarea, .contact-form select {
  width: 100%; padding: 12px 14px;
  background: var(--bg-raised); color: var(--t-1);
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  font-family: inherit; font-size: 15px;
  transition: border-color var(--dur-fast) var(--ease);
}
.contact-form input:focus, .contact-form textarea:focus, .contact-form select:focus {
  outline: none; border-color: var(--accent);
}

/* ===== FOOTER ===== */
.footer {
  background: var(--bg-inverse);
  color: var(--t-inverse);
  margin-top: var(--s-10);
}
.footer__inner {
  max-width: var(--page-max); margin: 0 auto;
  padding: var(--s-8) var(--page-pad) var(--s-7);
  display: grid;
  grid-template-columns: 1.2fr 2.8fr;
  gap: var(--s-7);
}
@media (max-width: 880px) {
  .footer__inner { grid-template-columns: 1fr; }
}
.footer__brand { display: flex; gap: 12px; align-items: flex-start; }
.footer__mark { color: var(--accent); }
.footer__lockup strong { display: block; font-family: var(--font-display); font-size: 22px; }
.footer__lockup span { font-size: 12px; opacity: 0.7; letter-spacing: 0.06em; text-transform: uppercase; }

.footer__nav { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-5); }
@media (max-width: 700px) { .footer__nav { grid-template-columns: repeat(2, 1fr); } }
.footer__nav h4 {
  font-family: var(--font-body);
  font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  font-weight: 600; opacity: 0.85; margin-bottom: var(--s-3);
}
.footer__nav a {
  display: block; padding: 4px 0; font-size: 13.5px;
  color: rgba(245,245,243,0.72); transition: color var(--dur-fast) var(--ease);
}
.footer__nav a:hover { color: var(--accent); }

.footer__contact h4 {
  font-family: var(--font-body);
  font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase;
  font-weight: 600; margin-bottom: var(--s-3);
}
.footer__contact a, .footer__contact address {
  display: block; padding: 4px 0; font-size: 13.5px;
  color: rgba(245,245,243,0.72); font-style: normal;
  line-height: 1.5;
}
.footer__contact a:hover { color: var(--accent); }

.footer__legal {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: var(--s-5) var(--page-pad);
}
.footer__legal p {
  max-width: var(--page-max); margin: 0 auto;
  font-size: 11.5px; color: rgba(245,245,243,0.55);
  line-height: 1.55;
}
.footer__legal-disclaimer { margin-top: var(--s-2) !important; }
