/* ============================================================
   ERIC MARTIN — Website
   Layout + components, built on colors_and_type.css tokens.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg1);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; }
a { color: var(--link); text-decoration: none; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 var(--s-5); }
.section { padding: var(--s-9) 0; }
.section-tight { padding: var(--s-8) 0; }
.center { text-align: center; }
.measure { max-width: 60ch; }

/* ---------- Eyebrow / rule ---------- */
.eyebrow {
  font-family: var(--font-eyebrow);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--accent-ink);
  margin: 0 0 var(--s-4);
}
.eyebrow.on-dark { color: var(--brass-400); }
.brass-rule { width: 56px; height: 1.5px; background: var(--accent); border: 0; margin: 0 0 var(--s-5); }
.center .brass-rule { margin-left: auto; margin-right: auto; }
.middot { color: var(--accent); padding: 0 .4em; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: var(--s-2);
  font-family: var(--sans); font-size: var(--fs-small); font-weight: 500;
  letter-spacing: .02em;
  padding: 14px 26px; border-radius: var(--r-md);
  border: 1.5px solid transparent; cursor: pointer;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease), transform var(--dur-fast) var(--ease),
              border-color var(--dur) var(--ease);
  white-space: nowrap;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--harbor-800); color: var(--fg-on-dark); }
.btn-primary:hover { background: var(--harbor-600); color: var(--white); box-shadow: var(--shadow-md); }
.btn-brass { background: var(--brass-500); color: var(--harbor-900); }
.btn-brass:hover { background: var(--brass-400); box-shadow: var(--shadow-brass); }
.btn-outline { background: transparent; color: var(--fg1); border-color: var(--border-strong); }
.btn-outline:hover { background: var(--fg1); color: var(--ivory); border-color: var(--fg1); }
.btn-outline.on-dark { color: var(--fg-on-dark); border-color: rgba(243,238,227,0.4); }
.btn-outline.on-dark:hover { background: var(--ivory); color: var(--harbor-900); border-color: var(--ivory); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
              border-color var(--dur) var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 84px;
}
.site-header.scrolled {
  background: rgba(16,42,62,0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom-color: var(--border-dark);
}
/* logo lockup */
.logo { display: flex; align-items: center; gap: var(--s-3); color: inherit; }
.logo-mark {
  width: 44px; height: 44px; border-radius: var(--r-pill);
  border: 1.5px solid var(--brass-500);
  display: grid; place-items: center;
  font-family: var(--serif-display); font-weight: 600; font-size: 1.35rem;
  color: var(--brass-400); letter-spacing: .02em; line-height: 1;
  flex: none;
}
.logo-text { display: flex; flex-direction: column; line-height: 1.05; }
.logo-name {
  font-family: var(--serif-display); font-weight: 600; font-size: 1.4rem;
  letter-spacing: .02em;
}
.logo-sub {
  font-family: var(--font-eyebrow); font-size: .58rem; font-weight: 600;
  letter-spacing: .22em; text-transform: uppercase; margin-top: 3px; white-space: nowrap;
}
/* header is light text over hero, switches with .scrolled (still light on harbor) */
.site-header .logo { color: var(--fg-on-dark); }
.site-header .logo-sub { color: var(--brass-400); }
.nav { display: flex; align-items: center; gap: var(--s-6); }
.nav a {
  font-family: var(--sans); font-size: var(--fs-small); font-weight: 500;
  color: var(--fg-on-dark); letter-spacing: .02em; position: relative;
  transition: color var(--dur) var(--ease);
}
.nav a:hover { color: var(--brass-400); }
.nav .btn-brass { color: var(--harbor-900); }
.nav .btn-brass:hover { color: var(--harbor-900); }
.nav-links { display: flex; align-items: center; gap: var(--s-6); }
.nav-toggle { display: none; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 92vh; display: flex; align-items: flex-end;
        color: var(--fg-on-dark); overflow: hidden; }
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.hero-scrim { position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(11,32,48,0.62) 0%, rgba(11,32,48,0.20) 34%, rgba(11,32,48,0.34) 58%, rgba(11,32,48,0.90) 100%); }
.hero .wrap { position: relative; z-index: 2; padding-top: 120px; padding-bottom: var(--s-9); width: 100%; }
.hero h1 {
  font-size: var(--fs-display); color: var(--white);
  max-width: 16ch; margin: 0 0 var(--s-5);
  text-shadow: 0 2px 30px rgba(11,32,48,0.4);
}
.hero h1 em { font-style: italic; color: var(--brass-400); }
.hero-sub { font-size: var(--fs-lead); font-weight: 300; color: var(--white);
            max-width: 46ch; margin: 0 0 var(--s-7); text-shadow: 0 1px 16px rgba(11,32,48,0.55); }
.hero-cta { display: flex; flex-wrap: wrap; gap: var(--s-4); }
.hero-eyebrow { color: var(--brass-400); }

/* ---------- Section headings ---------- */
.sec-head { margin-bottom: var(--s-7); }
.sec-head h2 { margin: 0; max-width: 18ch; }
.sec-head.center h2 { margin-left: auto; margin-right: auto; }
.sec-head p { color: var(--fg2); font-size: var(--fs-lead); font-weight: 300; max-width: 52ch; margin: var(--s-4) 0 0; }
.sec-head.center p { margin-left: auto; margin-right: auto; }

/* ---------- Listing cards ---------- */
.listings-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s-6); }
.listing-card {
  background: var(--surface); border-radius: var(--r-lg); overflow: hidden;
  box-shadow: var(--shadow-sm); display: flex; flex-direction: column;
  transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}
.listing-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.listing-photo { position: relative; aspect-ratio: 3/2; overflow: hidden; }
.listing-photo img { width: 100%; height: 100%; object-fit: cover;
  transition: transform var(--dur-slow) var(--ease-out); }
.listing-card:hover .listing-photo img { transform: scale(1.04); }
.tag {
  position: absolute; top: var(--s-4); left: var(--s-4); z-index: 2;
  font-family: var(--font-eyebrow); font-size: .68rem; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase;
  background: var(--brass-500); color: var(--harbor-900);
  padding: 7px 13px; border-radius: var(--r-pill);
}
.tag.tag-dark { background: rgba(16,42,62,0.92); color: var(--brass-400); }
.listing-body { padding: var(--s-5) var(--s-5) var(--s-6); display: flex; flex-direction: column; gap: var(--s-3); flex: 1; }
.listing-price { font-family: var(--serif-display); font-size: 2.1rem; font-weight: 600; line-height: 1; }
.listing-addr { font-family: var(--serif-display); font-size: var(--fs-h4); color: var(--fg1); margin: 0; }
.listing-city { color: var(--fg3); font-size: var(--fs-small); margin: -4px 0 0; }
.specs { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); margin-top: auto;
  padding-top: var(--s-4); border-top: 1px solid var(--border); color: var(--fg2); font-size: var(--fs-small); }
.specs span { display: inline-flex; align-items: center; gap: 6px; }
.specs b { font-weight: 600; color: var(--fg1); }
.listing-link { font-family: var(--sans); font-weight: 500; font-size: var(--fs-small);
  color: var(--link); display: inline-flex; align-items: center; gap: 6px; margin-top: var(--s-2); }
.listing-card:hover .listing-link { color: var(--lake-700); }

/* ---------- About band (harbor) ---------- */
.band-dark { background: var(--bg-dark); color: var(--fg-on-dark); }
.band-dark h2 { color: var(--white); }
.band-dark .eyebrow { color: var(--brass-400); }
.about-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: var(--s-8); align-items: center; }
.about-photo { border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-lg); aspect-ratio: 4/5; }
.about-photo img { width: 100%; height: 100%; object-fit: cover; }
.about-body p { color: var(--fg-on-dark-dim); margin: 0 0 var(--s-4); }
.about-body p.lead { color: var(--fg-on-dark); font-size: var(--fs-lead); font-weight: 300; }
.about-sign { font-family: var(--serif-display); font-style: italic; font-size: 1.7rem; color: var(--brass-400); margin-top: var(--s-5); }
.creds { display: flex; flex-wrap: wrap; gap: var(--s-6); margin-top: var(--s-6);
  padding-top: var(--s-6); border-top: 1px solid var(--border-dark); }
.cred { display: flex; flex-direction: column; gap: 4px; }
.cred-k { font-family: var(--serif-display); font-size: 1.5rem; font-weight: 600; color: var(--white); }
.cred-v { font-family: var(--font-eyebrow); font-size: .7rem; letter-spacing: .18em; text-transform: uppercase; color: var(--fg-on-dark-dim); }

/* ---------- Services ---------- */
.svc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-6); }
.svc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: var(--s-6); transition: box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease); }
.svc:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); }
.svc-ico { width: 48px; height: 48px; color: var(--lake-600); margin-bottom: var(--s-4); }
.svc-ico i { font-size: 44px; line-height: 1; }
.svc h3 { margin: 0 0 var(--s-3); }
.svc p { color: var(--fg2); margin: 0; font-size: var(--fs-small); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-8); align-items: start; }
.contact-intro h2 { margin: 0 0 var(--s-4); }
.contact-intro p { color: var(--fg2); margin: 0 0 var(--s-5); }
.contact-list { list-style: none; padding: 0; margin: var(--s-6) 0 0; display: flex; flex-direction: column; gap: var(--s-4); }
.contact-list li { display: flex; align-items: center; gap: var(--s-4); }
.contact-list i { font-size: 26px; color: var(--lake-600); width: 30px; text-align: center; flex: none; }
.contact-list .k { font-family: var(--font-eyebrow); font-size: .66rem; letter-spacing: .2em; text-transform: uppercase; color: var(--fg3); }
.contact-list .v { font-size: var(--fs-body); color: var(--fg1); }
.form-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl);
  padding: var(--s-7); box-shadow: var(--shadow-md); }
.field { margin-bottom: var(--s-4); }
.field label { display: block; font-family: var(--font-eyebrow); font-size: .68rem; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; color: var(--fg2); margin-bottom: var(--s-2); }
.field input, .field select, .field textarea {
  width: 100%; font-family: var(--sans); font-size: var(--fs-body); color: var(--fg1);
  padding: 12px 14px; border: 1px solid var(--border-strong); border-radius: var(--r-md);
  background: var(--ivory); transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--lake-600); box-shadow: 0 0 0 3px rgba(46,111,149,0.15); }
.field textarea { resize: vertical; min-height: 96px; }
.form-success { display: none; text-align: center; padding: var(--s-6) 0; }
.form-success.show { display: block; }
.form-success i { font-size: 56px; color: var(--positive); }
.form-success h3 { margin: var(--s-4) 0 var(--s-2); }
.form-success p { color: var(--fg2); margin: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--harbor-900); color: var(--fg-on-dark-dim); padding: var(--s-8) 0 var(--s-6); }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: var(--s-7); padding-bottom: var(--s-7);
  border-bottom: 1px solid var(--border-dark); }
.footer-brand .logo { color: var(--fg-on-dark); margin-bottom: var(--s-4); }
.footer-brand p { font-size: var(--fs-small); max-width: 40ch; margin: 0; }
.footer-col h4 { font-family: var(--font-eyebrow); font-size: .7rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--brass-400); margin: 0 0 var(--s-4); }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: var(--s-3); }
.footer-col a, .footer-col li { color: var(--fg-on-dark-dim); font-size: var(--fs-small); }
.footer-col a:hover { color: var(--brass-400); }
.footer-legal { padding-top: var(--s-6); display: flex; flex-wrap: wrap; gap: var(--s-5); align-items: flex-start;
  justify-content: space-between; }
.footer-legal p { font-size: var(--fs-caption); color: var(--fg-on-dark-dim); margin: 0 0 var(--s-2); max-width: 70ch; line-height: 1.6; }
.eho { display: inline-flex; align-items: center; gap: var(--s-2); font-size: var(--fs-caption); color: var(--fg-on-dark-dim); }
.eho svg { width: 30px; height: 30px; flex: none; }
.footer-disclaim { opacity: .75; }

/* ============================================================
   DETAIL PAGE
   ============================================================ */
.detail-hero { padding-top: 84px; }
.detail-gallery-hero { position: relative; height: 64vh; min-height: 440px; overflow: hidden; background: var(--harbor-900); }
.detail-gallery-hero img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.detail-hero-bar { position: absolute; bottom: 0; left: 0; right: 0; z-index: 2;
  background: linear-gradient(0deg, rgba(11,32,48,0.88), transparent); color: var(--fg-on-dark);
  padding: var(--s-8) 0 var(--s-5); }
.detail-hero-bar .wrap { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: var(--s-5); }
.detail-hero-bar h1 { color: var(--white); margin: 0; font-size: var(--fs-h1); }
.detail-hero-bar .addr-city { color: var(--brass-400); font-family: var(--sans); font-size: var(--fs-body); margin-top: 6px; }
.detail-price { font-family: var(--serif-display); font-size: clamp(2.4rem,4vw,3.4rem); font-weight: 600; color: var(--white); line-height: 1; }
.gallery-count { position: absolute; top: 100px; right: var(--s-5); z-index: 3;
  background: rgba(16,42,62,0.82); color: var(--fg-on-dark); backdrop-filter: blur(6px);
  font-family: var(--font-eyebrow); font-size: .72rem; letter-spacing: .12em; padding: 9px 16px; border-radius: var(--r-pill);
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer; border: 1px solid var(--border-dark);
  transition: background var(--dur) var(--ease); }
.gallery-count:hover { background: rgba(30,70,96,0.95); }

.detail-main { display: grid; grid-template-columns: 1.7fr 1fr; gap: var(--s-8); }
.spec-bar { display: flex; flex-wrap: wrap; gap: var(--s-6); padding: var(--s-6) 0; margin-bottom: var(--s-6);
  border-bottom: 1px solid var(--border); }
.spec-bar .item { display: flex; flex-direction: column; gap: 2px; }
.spec-bar .item .n { font-family: var(--serif-display); font-size: 1.9rem; font-weight: 600; line-height: 1; }
.spec-bar .item .l { font-family: var(--font-eyebrow); font-size: .66rem; letter-spacing: .16em; text-transform: uppercase; color: var(--fg3); }
.detail-desc h2 { margin: 0 0 var(--s-4); }
.detail-desc p { color: var(--fg2); margin: 0 0 var(--s-4); }
.feature-list { columns: 2; column-gap: var(--s-6); list-style: none; padding: 0; margin: var(--s-5) 0 0; }
.feature-list li { break-inside: avoid; padding: 8px 0 8px 26px; position: relative; color: var(--fg1); font-size: var(--fs-small); }
.feature-list li::before { content: ""; position: absolute; left: 0; top: 15px; width: 9px; height: 9px;
  border-radius: var(--r-pill); background: var(--brass-500); }
.agent-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: var(--s-6); box-shadow: var(--shadow-sm); position: sticky; top: 104px; }
.agent-card .ac-top { display: flex; align-items: center; gap: var(--s-4); margin-bottom: var(--s-5); }
.agent-card .ac-top img { width: 64px; height: 64px; border-radius: var(--r-pill); object-fit: cover; flex: none; }
.agent-card .ac-name { font-family: var(--serif-display); font-size: 1.4rem; font-weight: 600; line-height: 1.1; }
.agent-card .ac-role { font-family: var(--font-eyebrow); font-size: .62rem; letter-spacing: .18em; text-transform: uppercase; color: var(--fg3); margin-top: 4px; }
.agent-card .btn { width: 100%; justify-content: center; margin-bottom: var(--s-3); }
.agent-card .ac-contact { font-size: var(--fs-small); color: var(--fg2); text-align: center; margin: var(--s-3) 0 0; }

/* gallery grid */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-3); }
.gallery-grid img { width: 100%; aspect-ratio: 3/2; object-fit: cover; border-radius: var(--r-md);
  cursor: zoom-in; transition: opacity var(--dur) var(--ease); }
.gallery-grid img:hover { opacity: .9; }
.gallery-grid .span-2 { grid-column: span 2; aspect-ratio: 3/1.32; }

/* lightbox */
.lightbox { position: fixed; inset: 0; z-index: 1000; background: rgba(8,22,33,0.96);
  display: none; align-items: center; justify-content: center; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 84vh; object-fit: contain; border-radius: var(--r-sm); box-shadow: var(--shadow-lg); }
.lb-btn { position: absolute; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.18);
  color: #fff; width: 54px; height: 54px; border-radius: var(--r-pill); cursor: pointer; font-size: 22px;
  display: grid; place-items: center; transition: background var(--dur) var(--ease); }
.lb-btn:hover { background: rgba(255,255,255,0.2); }
.lb-prev { left: 3vw; top: 50%; transform: translateY(-50%); }
.lb-next { right: 3vw; top: 50%; transform: translateY(-50%); }
.lb-close { top: 28px; right: 3vw; }
.lb-count { position: absolute; bottom: 28px; left: 0; right: 0; text-align: center; color: rgba(255,255,255,0.7);
  font-family: var(--font-eyebrow); font-size: .76rem; letter-spacing: .16em; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .listings-grid, .about-grid, .svc-grid, .contact-grid, .detail-main, .footer-top { grid-template-columns: 1fr; }
  .about-grid { gap: var(--s-6); }
  .about-photo { aspect-ratio: 16/10; max-height: 360px; }
  .detail-main { gap: var(--s-6); }
  .agent-card { position: static; }
  .feature-list { columns: 1; }
  .nav-links { display: none; position: absolute; top: 84px; left: 0; right: 0; flex-direction: column;
    background: rgba(16,42,62,0.98); padding: var(--s-5); gap: var(--s-4); border-bottom: 1px solid var(--border-dark); }
  .nav-links.open { display: flex; }
  .nav-toggle { display: grid; place-items: center; width: 44px; height: 44px; background: transparent;
    border: 0; color: var(--fg-on-dark); cursor: pointer; }
  .nav-toggle i { font-size: 28px; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid .span-2 { grid-column: span 2; aspect-ratio: 16/9; }
  .section { padding: var(--s-8) 0; }
}
@media (max-width: 560px) {
  .hero { min-height: 86vh; }
  .detail-hero-bar .wrap { flex-direction: column; align-items: flex-start; }
}
