/* ==========================================================================
   Vistaar Homes — Base
   Reset · document · typography · focus · shared utilities · reveal motion
   ========================================================================== */

/* ---------- 1. Document & mobile browser behaviour ---------- */
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 16px);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  overflow-x: clip;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

img,
video,
iframe,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

button,
input,
select,
textarea {
  font: inherit;
}

a,
button {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

a {
  color: var(--brand-700);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  transition: color var(--duration) ease;
}

address {
  margin: 0;
  font-style: normal;
}

p {
  margin-top: 0;
}

[hidden] {
  display: none !important;
}

/* ---------- 2. Typography ---------- */
h1,
h2,
h3,
h4,
.h1 {
  margin-top: 0;
  color: inherit;
  font-family: var(--font-display);
  font-weight: 600;
  line-height: var(--lh-tight);
  letter-spacing: -0.015em;
  text-wrap: balance;
  font-variant-numeric: lining-nums;   /* straight numbers (14, 317) instead of old-style */
}

h1, .h1 { font-size: var(--fs-h1); }
h2      { font-size: var(--fs-h2); }
h3      { font-size: var(--fs-h3); }
h4      { font-size: 1.25rem; }

strong {
  font-weight: 700;
}

/* ---------- 3. Focus (keyboard users only) ---------- */
:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--brand-600);
  outline-offset: 3px;
  box-shadow: none;
}

.section--dark :focus-visible,
.site-footer :focus-visible,
.hero :focus-visible,
.page-hero :focus-visible,
.cta-band :focus-visible {
  outline-color: var(--brand);
}

/* ---------- 4. Skip link ---------- */
.skip-link {
  position: fixed;
  z-index: 2000;
  top: max(8px, env(safe-area-inset-top));
  left: max(8px, env(safe-area-inset-left));
  padding: 0.75rem 1.1rem;
  transform: translateY(-200%);
  background: var(--ink);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: none;
  color: #fff;
}

/* ---------- 5. Container width ---------- */
@media (min-width: 1400px) {
  .container {
    max-width: var(--container-max);
  }
}

/* ---------- 6. Sections ---------- */
.section {
  position: relative;
  padding-block: var(--section-space);
}

.section--white { background: var(--surface); }
.section--alt   { background: var(--surface-alt); }

.section--dark {
  background: var(--ink);
  color: var(--on-dark);
}

.section--dark .section-intro,
.section--dark p {
  color: var(--on-dark-soft);
}

/* Hairline rule at the top of consecutive light sections — a crisp editorial rhythm */
.section--white + .section--white::before,
.section--alt + .section--alt::before {
  position: absolute;
  top: 0;
  right: var(--gutter);
  left: var(--gutter);
  max-width: calc(var(--container-max) - 24px);
  height: 1px;
  margin-inline: auto;
  background: var(--line);
  content: "";
}

/* ---------- 7. Section headings ---------- */
.section-heading {
  max-width: 760px;
  margin-bottom: 2.5rem;
}

.section-heading--center {
  margin-inline: auto;
  text-align: center;
}

.section-heading--center .eyebrow {
  justify-content: center;
}

.section-heading--split {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 2rem;
  max-width: none;
}

.section-title {
  margin-bottom: 0.9rem;
}

.section-heading .section-title:last-child {
  margin-bottom: 0;
}

.section-intro {
  max-width: 640px;
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: var(--fs-lg);
}

.section-heading--center .section-intro {
  margin-inline: auto;
}

.subheading {
  margin: 2rem 0 1rem;
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
}

/* Eyebrow: small caps label with a short orange rule */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  color: var(--brand-700);
  font-family: var(--font-body);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: var(--tracking-caps);
  line-height: 1.4;
  text-transform: uppercase;
}

.eyebrow::before {
  flex: 0 0 28px;
  width: 28px;
  height: 1px;
  background: currentColor;
  content: "";
}

.eyebrow--light,
.section--dark .eyebrow {
  color: var(--brand);
}

/* ---------- 8. Text links with arrow ---------- */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 44px;
  color: var(--ink);
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
  text-transform: uppercase;
}

.link-arrow .bi {
  color: var(--brand-600);
  transition: transform var(--duration) var(--ease-out);
}

.link-arrow--light {
  color: #fff;
}

.link-arrow--light .bi {
  color: var(--brand);
}

/* ---------- 9. Prose blocks ---------- */
.prose p {
  color: var(--ink-soft);
}

.prose p:last-child {
  margin-bottom: 0;
}

.lead-quote {
  margin: 2rem 0 0;
  padding-left: 1.25rem;
  border-left: 2px solid var(--brand);
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-style: italic;
  line-height: 1.35;
}

/* ---------- 10. Scroll reveal (fade + rise). Content is visible without JavaScript ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.7s ease,
    transform 0.7s var(--ease-out);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- 11. Visually hidden form honeypot ---------- */
.form-honeypot {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- 12. Phone gutters: 16px side padding on every container ---------- */
.container,
.container-fluid {
  --bs-gutter-x: 2rem;
}

/* ---------- 13. Straight (lining) numbers everywhere the display font is used ---------- */
.hero__title,
.page-hero__title,
.fact-bar__item dd,
.property-card__dates dd,
.price-card__price,
.distance-list strong,
.process__number,
.offer-card strong,
.not-found__code,
.sold-card__body strong,
.quick-card strong {
  font-variant-numeric: lining-nums;
  font-feature-settings: "lnum" 1;
}
