/* ============================================================
   BASE — Custom properties, reset, typography
   ============================================================ */

:root {
  /* --- Colors --- */
  --color-red:          #da291c;
  --color-red-cta:      #ee4f4f;
  --color-text-dark:    #212121;
  --color-text-gray:    #929497;
  --color-text-med:     #4f5054;
  --color-bg-light:     #e6e7e8;
  --color-white:        #ffffff;
  --color-header-bg:     rgba(255, 255, 255, 0.9);
  --color-header-border: #4f5054;
  --color-footer-bg:    #f2f2f2;
  --color-footer-bar:   #e6e7e8;

  /* --- Typography --- */
  --font-primary: 'Lato', sans-serif;

  /* Font sizes (px, matching Figma exactly) */
  --text-footer:   16px;
  --text-nav:      18px;
  --text-body:     18px;
  --text-card:     18px;
  --text-sub:      32px;
  --text-heading:  42px;

  /* .section-heading optical trim: at line-height 1.1, uppercase glyph
     ink sits measurably below the line box's top edge (measured via
     canvas actualBoundingBoxAscent), which makes the gap above a large
     heading read as bigger than an equal-px gap bounded by a hard-edge
     divider below it. This pulls the heading up to compensate — kept
     in lockstep with --text-heading at each breakpoint below. */
  --heading-optical-trim: -13px;

  /* --- Spacing --- */
  --space-xs:   8px;
  --space-sm:  16px;
  --space-md:  24px;
  --space-lg:  46px;
  --space-xl:  80px;
  --space-2xl: 120px;
  --space-amenity-gap: 32px;  /* Figma-exact column pitch for apt amenities grid */

  /* --- Layout --- */
  --container-max:   1920px;
  --container-inner: 1488px;
  --header-height:   130px;
}

/* --- Reset --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-primary);
  font-weight: 400;
  color: var(--color-text-dark);
  background-color: var(--color-white);
  line-height: 1.5;
  min-width: 375px;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

ul,
ol {
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

/* --- Image placeholders --- */
.img-placeholder {
  background-color: var(--color-bg-light);
  width: 100%;
  display: block;
}

.img-placeholder--hero {
  aspect-ratio: 1920 / 1280;
}

.img-placeholder--circle {
  width: 424px;
  height: 424px;
  border-radius: 50%;
  flex-shrink: 0;
}

.img-placeholder--wide {
  aspect-ratio: 573 / 383;
}

.img-placeholder--building {
  aspect-ratio: 16 / 9;
}

.img-placeholder--thumb {
  aspect-ratio: 4 / 3;
}


.img-placeholder--logo {
  width: 336px;
  height: 100px;
}

/* --- Typography helpers --- */
.text-red      { color: var(--color-red); }
.text-gray     { color: var(--color-text-gray); }
.text-med      { color: var(--color-text-med); }
.text-white    { color: var(--color-white); }
.text-center   { text-align: center; }
.text-upper    { text-transform: uppercase; }
.font-light    { font-weight: 300; }
.font-regular  { font-weight: 400; }
.font-bold     { font-weight: 700; }
.font-black    { font-weight: 900; }
.font-italic   { font-style: italic; }

/* --- Accessibility --- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* 4-card layout: progressive reduction as cards narrow (1025–1920px) */
@media (max-width: 1600px) {
  :root {
    --text-card:     18px;
    --header-height: 130px;
  }
}

@media (max-width: 1400px) {
  :root {
    --text-heading: 42px;
    --text-sub:     28px;
    --text-body:    18px;
    --text-card:    18px;
    --text-nav:     18px;
    --header-height: 100px;
    --heading-optical-trim: -10px;
  }
}

@media (max-width: 1200px) {
  :root {
    --text-card: 18px;
  }
}

@media (max-width: 1024px) {
  :root {
    --header-height: 80px;
    --text-card:     24px; /* 2-card layout resets: cards double in width */
  }
}

@media (max-width: 768px) {
  :root {
    --text-heading: 36px;
    --text-sub:     24px;
    --text-body:    17px;
    --text-card:    20px;
    --text-nav:     18px;
    --text-footer:  16px; /* keep smaller than --text-body (17px) at this breakpoint */
    --heading-optical-trim: -8.8px;
  }
}

@media (max-width: 375px) {
  :root {
    --text-heading: 28px;
    --text-sub:     20px;
    --heading-optical-trim: -6.4px;
    --text-card:    18px; /* narrow 1-card: prevent address wrapping */
  }
}
