/* Ron Lockhart – Calgary real estate
   Palette: prairie ink, glacier, river teal, brokerage red */
:root {
  --ink: #1d2f45;
  --ink-soft: #46586d;
  --glacier: #eaf0f3;
  --line: #d3dde3;
  --river: #24686a;
  --red: #c8102e;
  --red-dark: #a10d25;
  --white: #ffffff;
  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --serif: "Source Serif 4", Georgia, serif;
  --wrap: 1140px;
  --radius: 6px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
}
img { max-width: 100%; display: block; }
a { color: var(--river); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }

h1, h2, h3, h4 {
  font-family: var(--sans);
  font-stretch: 87.5%;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(2.4rem, 5.5vw, 4.4rem); font-weight: 800; }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); font-weight: 750; }
h3 { font-size: 1.35rem; font-weight: 700; }
p { margin: 0 0 1em; }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.measure { max-width: 66ch; }

.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--ink); color: var(--white); padding: .6rem 1rem; z-index: 50;
}
.skip:focus { left: 1rem; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(6px);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 72px;
}
.brand { text-decoration: none; color: var(--ink); line-height: 1.15; }
.brand strong {
  display: block; font-family: var(--sans); font-stretch: 87.5%;
  font-size: 1.4rem; font-weight: 800; letter-spacing: -0.01em;
}
.brand span { font-family: var(--sans); font-size: .82rem; color: var(--ink-soft); }
.nav { display: flex; align-items: center; gap: 1.4rem; font-family: var(--sans); font-size: .98rem; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 600; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--red); }
.nav .btn { color: var(--white); }
.menu-toggle {
  display: none; font-family: var(--sans); font-weight: 700; font-size: 1rem;
  background: none; border: 1px solid var(--line); border-radius: var(--radius);
  padding: .45rem .8rem; color: var(--ink); cursor: pointer;
}

/* Buttons */
.btn {
  display: inline-block; font-family: var(--sans); font-weight: 700; font-size: 1rem;
  background: var(--red); color: var(--white); text-decoration: none;
  padding: .8rem 1.3rem; border-radius: var(--radius); border: 2px solid var(--red);
  line-height: 1.2; cursor: pointer;
}
.btn:hover { background: var(--red-dark); border-color: var(--red-dark); color: var(--white); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }
.on-dark .btn-ghost { color: var(--white); border-color: var(--white); }
.on-dark .btn-ghost:hover { background: var(--white); color: var(--ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }

/* Hero */
.hero {
  position: relative; color: var(--white);
  min-height: min(82vh, 720px); display: flex; align-items: flex-end;
  background: var(--ink);
}
.hero img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20,33,50,.15) 20%, rgba(20,33,50,.82) 100%);
}
.hero .wrap { position: relative; z-index: 1; padding-block: 4rem 3.5rem; }
.hero h1 { max-width: 13ch; margin-bottom: .35em; }
.hero p { font-size: 1.25rem; max-width: 52ch; color: #eef3f6; }

/* Page header (inner pages) */
.page-head { background: var(--glacier); padding-block: 3.5rem 3rem; border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: clamp(2.2rem, 4.5vw, 3.6rem); max-width: 18ch; }
.page-head p { font-size: 1.2rem; color: var(--ink-soft); max-width: 60ch; margin: 0; }
.crumbs { font-family: var(--sans); font-size: .9rem; margin-bottom: 1rem; color: var(--ink-soft); }
.crumbs a { color: var(--ink-soft); }

/* Sections */
.section { padding-block: 5rem; }
.section-tint { background: var(--glacier); }
.section-ink { background: var(--ink); color: var(--white); }
.section-ink a { color: #bfe3e1; }
.section-intro { max-width: 60ch; margin-bottom: 2.5rem; }
.section-intro p { color: var(--ink-soft); font-size: 1.15rem; }
.section-ink .section-intro p { color: #d5dee6; }

/* Services */
.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
.service img { aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); margin-bottom: 1.2rem; }
.service h3 { margin-bottom: .4em; }
.service p { color: var(--ink-soft); }
.service a.more { font-family: var(--sans); font-weight: 700; text-decoration: none; }
.service a.more:hover { text-decoration: underline; }

/* Steps */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; counter-reset: step; }
.steps li { counter-increment: step; border-top: 3px solid var(--white); padding-top: 1.2rem; }
.steps li::before {
  content: counter(step); display: block; font-family: var(--sans); font-stretch: 87.5%;
  font-size: 3rem; font-weight: 800; line-height: 1; margin-bottom: .6rem; color: #f2a8b4;
}
.steps h3 { color: var(--white); }
.steps p { color: #d5dee6; margin: 0; }

/* Neighbourhood index – the signature element */
.hood-index { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.hood-index li { border-bottom: 1px solid var(--line); }
.hood-index a {
  display: grid; grid-template-columns: 4.2rem 1fr auto; align-items: center; gap: 1.2rem;
  padding: 1.15rem .25rem; text-decoration: none; color: var(--ink);
}
.hood-index a:hover { background: var(--glacier); }
.hood-index a:hover .hood-name { color: var(--red); }
.quad {
  font-family: var(--sans); font-weight: 800; font-size: .95rem; text-align: center;
  color: var(--white); background: var(--river); border-radius: 4px; padding: .3rem 0;
}
.hood-name { font-family: var(--sans); font-stretch: 87.5%; font-size: clamp(1.4rem, 2.6vw, 2rem); font-weight: 750; line-height: 1.15; }
.hood-note { font-size: 1rem; color: var(--ink-soft); text-align: right; max-width: 34ch; }

/* Market */
.market { display: grid; grid-template-columns: 1.1fr 1fr; gap: 3rem; align-items: start; }
table.figures { width: 100%; border-collapse: collapse; font-family: var(--sans); font-size: 1rem; }
table.figures caption { text-align: left; font-weight: 700; margin-bottom: .6rem; font-size: 1rem; }
table.figures th, table.figures td { text-align: left; padding: .7rem .5rem; border-bottom: 1px solid var(--line); }
table.figures th[scope="col"] { font-size: .9rem; color: var(--ink-soft); font-weight: 600; border-bottom: 2px solid var(--ink); }
table.figures td.num { text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
table.figures th.num { text-align: right; }
.fine { font-size: .9rem; color: var(--ink-soft); }

/* About */
.about { display: grid; grid-template-columns: 1fr 1.4fr; gap: 3rem; align-items: center; }
.about-img { width: 100%; height: auto; aspect-ratio: 900 / 1067; object-fit: cover; border-radius: var(--radius); }
.about-photo {
  aspect-ratio: 4 / 5; border-radius: var(--radius); background: var(--glacier);
  border: 2px dashed var(--line); display: flex; align-items: center; justify-content: center;
  font-family: var(--sans); color: var(--ink-soft); text-align: center; padding: 1rem;
}

/* FAQ */
.faq details { border-bottom: 1px solid var(--line); padding: 1.1rem 0; }
.faq summary {
  font-family: var(--sans); font-weight: 700; font-size: 1.2rem; cursor: pointer;
  list-style: none; display: flex; justify-content: space-between; gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-weight: 800; color: var(--red); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: .8rem 0 0; color: var(--ink-soft); max-width: 66ch; }

/* CTA band */
.cta-band { background: var(--red); color: var(--white); padding-block: 3.5rem; }
.cta-band .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; }
.cta-band h2 { margin: 0; max-width: 22ch; }
.cta-band .btn { background: var(--white); color: var(--red); border-color: var(--white); }
.cta-band .btn:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }

/* Article (guides and service pages) */
.article { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 4rem; padding-block: 4rem 5rem; }
.prose { max-width: 68ch; }
.prose h2 { font-size: 1.9rem; margin-top: 2.2em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.3rem; }
.prose li { margin-bottom: .45em; }
.prose table { width: 100%; border-collapse: collapse; font-family: var(--sans); font-size: .98rem; margin: 1.5rem 0; }
.prose th, .prose td { text-align: left; padding: .65rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose thead th { border-bottom: 2px solid var(--ink); font-size: .9rem; color: var(--ink-soft); }
.prose .sources { font-size: .9rem; color: var(--ink-soft); }
.aside { position: sticky; top: 100px; align-self: start; }
.aside-box { border: 1px solid var(--line); border-top: 4px solid var(--red); border-radius: var(--radius); padding: 1.5rem; background: var(--white); }
.aside-box h3 { font-size: 1.2rem; }
.aside-box p { font-size: 1rem; color: var(--ink-soft); }
.aside-box .btn { width: 100%; text-align: center; margin-top: .4rem; }
.aside-links { list-style: none; padding: 0; margin: 1.5rem 0 0; font-family: var(--sans); font-size: .98rem; }
.aside-links li { border-bottom: 1px solid var(--line); }
.aside-links a { display: block; padding: .6rem 0; text-decoration: none; font-weight: 600; }

/* Forms */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem 1.2rem; }
.form-grid .full { grid-column: 1 / -1; }
label { display: block; font-family: var(--sans); font-weight: 600; font-size: .95rem; margin-bottom: .3rem; }
input, select, textarea {
  width: 100%; font: inherit; font-size: 1rem; padding: .75rem .8rem;
  border: 1px solid #9fb0bd; border-radius: var(--radius); background: var(--white); color: var(--ink);
}
textarea { min-height: 140px; resize: vertical; }
.hp { position: absolute; left: -9999px; }
.contact-layout { display: grid; grid-template-columns: 1.4fr 1fr; gap: 4rem; padding-block: 4rem 5rem; }
.contact-card dl { margin: 0; font-family: var(--sans); }
.contact-card dt { font-size: .9rem; color: var(--ink-soft); margin-top: 1rem; }
.contact-card dd { margin: 0; font-weight: 700; font-size: 1.1rem; }
.form-note { font-size: .9rem; color: var(--ink-soft); margin-top: 1rem; }

/* Footer */
.site-footer { background: var(--ink); color: #cfd9e2; padding-block: 3.5rem 2rem; font-family: var(--sans); font-size: .95rem; }
.site-footer a { color: var(--white); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 2.5rem; }
.site-footer h3 { color: var(--white); font-size: 1.05rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .4rem; }
.legal { border-top: 1px solid #3a4f66; margin-top: 2.5rem; padding-top: 1.5rem; font-size: .85rem; color: #a9b8c6; }

/* Responsive */
@media (max-width: 960px) {
  .services, .steps { grid-template-columns: 1fr; }
  .market, .about, .article, .contact-layout, .footer-grid { grid-template-columns: 1fr; }
  .aside { position: static; }
  .hood-note { display: none; }
  .hood-index a { grid-template-columns: 3.6rem 1fr auto; }
}
@media (max-width: 820px) {
  .menu-toggle { display: block; flex: none; }
  .brand span { font-size: .72rem; display: block; max-width: 30ch; }
  .hero { min-height: 0; }
  .hero .wrap { padding-block: 9rem 2.5rem; }
  .nav {
    display: none; position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--white); border-bottom: 1px solid var(--line); padding: .5rem 1.25rem 1.25rem;
  }
  .nav.open { display: flex; }
  .nav a { padding: .8rem 0; border-bottom: 1px solid var(--line); }
  .nav .btn { margin-top: .8rem; text-align: center; border-bottom: 0; }
  .form-grid { grid-template-columns: 1fr; }
  .prose table { display: block; overflow-x: auto; font-size: .9rem; }
  .prose th, .prose td { min-width: 6.5rem; }
  .section { padding-block: 3.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
