/* ================================================================
   CGK Realties - the free-apartment cards and the warm accent.

   One card per free apartment (or per group of identical ones), drawn
   by the server every 15 minutes (backend/sheet-sync/fragments_publisher.py).
   Used by the city pages, the size pages and the home page, so it lives
   in shared/ (moved out of city-page.css when the home page needed it,
   2026-10-13).

   THE WARM ACCENT (Ludmila, 2026-10-12): a terracotta for prices, the
   "free now" pill and the "Book a visit" button on these cards, nothing
   else. #A84A26 carries white text at 5.7:1 (WCAG AA); in dark mode it
   lightens to #E8A07E and carries the dark ink at 8.5:1.
   ================================================================ */

:root {
  --accent:      #A84A26;
  --accent-deep: #8A3A1C;
  --accent-wash: #F8EBE4;
  --accent-ink:  #8A3A1C;
  --on-accent:   #FFFFFF;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --accent:      #E8A07E;
    --accent-deep: #F2C2A8;
    --accent-wash: #3A2219;
    --accent-ink:  #F2C2A8;
    --on-accent:   #08161D;
  }
}
:root[data-theme="dark"] {
  --accent:      #E8A07E;
  --accent-deep: #F2C2A8;
  --accent-wash: #3A2219;
  --accent-ink:  #F2C2A8;
  --on-accent:   #08161D;
}

.btn-accent { background: var(--accent); color: var(--on-accent); }
.btn-accent:hover { background: var(--accent-deep); }

/* What is free: one card per apartment, or per group of identical ones.
   A row that scrolls sideways on a phone, two or three across on a computer. */
.cb-free-h { margin-top: clamp(3rem, 6vw, 4.5rem); }
.city-units { margin-top: 1.25rem; }
.city-cards {
  list-style: none; margin: 0; padding: 0 0 0.75rem;
  display: grid; grid-auto-flow: column; grid-auto-columns: min(80%, 17rem); gap: 1rem;
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
}
@media (min-width: 760px) {
  .city-cards { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-columns: auto; overflow: visible; gap: 1.25rem; padding: 0; }
}
@media (min-width: 1100px) { .city-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.city-card {
  position: relative; display: flex; flex-direction: column; scroll-snap-align: start;
  background: var(--surface); border: 1px solid var(--line); border-radius: 2px; overflow: hidden;
  box-shadow: 0 6px 20px rgba(9,20,26,.06);
}
.city-card img { width: 100%; aspect-ratio: 3 / 2; height: auto; object-fit: cover; display: block; background: var(--brand-wash); }
.cc-when {
  position: absolute; top: 0.75rem; left: 0.75rem; margin: 0;
  padding: 0.375rem 0.625rem; border-radius: 2px;
  background: var(--accent); color: var(--on-accent);
  font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
}
.cc-when.is-soon { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-strong); }
.cc-body { display: flex; flex-direction: column; flex: 1 1 auto; padding: 1.125rem 1.125rem 1.25rem; }
.cc-size { margin: 0; font-family: var(--serif); font-size: 1.875rem; line-height: 1.1; color: var(--ink); }
.cc-where { margin: 0.375rem 0 0; font-size: 0.875rem; color: var(--muted); }
.cc-price { margin: 0.75rem 0 0; font-family: var(--serif); font-size: 1.75rem; line-height: 1.1; color: var(--accent); font-variant-numeric: tabular-nums; }
.cc-price small { margin-left: 0.1875rem; font-family: var(--sans); font-size: 0.875rem; color: var(--muted); }
.city-card .btn { margin-top: auto; text-align: center; }
.cc-price + .btn, .cc-where + .btn { margin-top: 1rem; }
.cc-incl { margin: 0.5rem 0 0; font-size: 0.875rem; color: var(--ink-soft); }

/* A card's picture with a caption over it (a staged room says so). */
.cc-pic { position: relative; margin: 0; }
.cc-pic figcaption {
  position: absolute; right: 0; bottom: 0; padding: 0.3125rem 0.625rem;
  background: rgba(9,20,26,.72); color: #FFFFFF;
  font-size: 0.625rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
}

/* The home page's cards, in the renter's order: the area first, the size with
   its bedrooms, the rent, what it covers, then the address in small type. */
.cc-place { margin: 0 0 0.375rem; font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted); }
.cc-size small { margin-left: 0.5rem; font-family: var(--sans); font-size: 0.875rem; color: var(--ink-soft); }
.cc-price + .cc-incl { margin-top: 0.375rem; }
.cc-incl + .cc-where, .cc-price + .cc-where { margin-top: 0.5rem; font-size: 0.8125rem; }
