/* DoorBell landing pages — pieces shared by index.html and landlord.html.
 * Page colours stay in each page's own <style>; --accent is set there. Behaviour: assets/js/landing.js. */

/* Skip link + focus */
.skip-link { position: absolute; left: 8px; top: -60px; z-index: 2000; background: #0f172a; color: #fff; padding: 10px 14px; border-radius: 8px; font-weight: 600; text-decoration: none; }
.skip-link:focus { top: 8px; outline: 3px solid #93c5fd; }
:focus-visible { outline: 3px solid #93c5fd; outline-offset: 2px; }

/* Sticky header: transparent over the hero, solid once the page scrolls */
.site-head { position: fixed; top: 0; left: 0; right: 0; z-index: 60; transition: background 150ms, box-shadow 150ms; }
.site-head.scrolled { background: #fff; box-shadow: 0 1px 0 #e2e8f0, 0 6px 20px rgba(15,23,42,.06); }
.site-head.scrolled .navbar a { color: #0f172a !important; opacity: 1 !important; }
.site-head .navbar a:hover { text-decoration: underline !important; }
body.has-banner .hero { padding-top: 9rem; }

/* Announcement banner (text comes from SITE_BANNER via /student/stats.php) */
.site-banner { background: #0f172a; color: #f8fafc; font-size: .875rem; padding: .5rem 1rem; display: flex; align-items: center; justify-content: center; gap: .75rem; text-align: center; }
.site-banner[hidden] { display: none; }
.site-banner a { color: #fff; font-weight: 600; text-decoration: underline; }
.site-banner .banner-close { background: none; border: 0; color: #cbd5e1; padding: 4px 8px; line-height: 1; border-radius: 6px; flex-shrink: 0; font-size: 1.1rem; }
.site-banner .banner-close:hover { color: #fff; background: rgba(255,255,255,.12); }

/* Hero search */
.hero-search { max-width: 520px; }
.hero-search .form-control { border: 0; min-height: 48px; border-radius: .75rem 0 0 .75rem; }
.hero-search .btn { min-height: 48px; border-radius: 0 .75rem .75rem 0; background: #0f172a; color: #fff; font-weight: 600; padding: 0 1.25rem; border: 0; }
.hero-search .btn:hover { background: #1e293b; color: #fff; }
.hero-search label { font-size: .9rem; opacity: .9; }

/* Hover and focus feedback on cards and FAQ rows */
.listing-card { transition: transform 150ms, box-shadow 150ms; }
.listing-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(15,23,42,.12) !important; }
summary:hover { color: var(--accent, #2563eb); }
footer a:hover { color: #fff !important; text-decoration: underline !important; }
/* Footer text on the dark background: Bootstrap's .text-secondary falls short of 4.5:1 there */
footer, footer .text-secondary, footer .credit { color: #94a3b8 !important; }
footer .credit img { opacity: .7; }

/* Skeleton shown while recent listings load */
.skeleton { border-radius: .75rem; background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 37%, #e2e8f0 63%); background-size: 400% 100%; animation: skeleton 1.4s ease infinite; }
.skeleton-card { aspect-ratio: 4/4; }
@keyframes skeleton { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* Reading progress */
.scroll-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 70; pointer-events: none; }
.scroll-progress > div { height: 100%; width: 0; background: var(--accent, #2563eb); }
.site-head:not(.scrolled) ~ .scroll-progress > div { background: #fff; }

/* Floating stack, bottom right: back-to-top above the support button */
.float-stack { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 55; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; pointer-events: none; }
.float-stack > * { pointer-events: auto; }
/* lift the stack above the phone-only bottom bar on pages that have one */
@media (max-width: 991.98px) { body:has(.sticky-cta) .float-stack { bottom: calc(88px + env(safe-area-inset-bottom)); } }
.to-top { width: 44px; height: 44px; border-radius: 50%; border: 1px solid #e2e8f0; background: #fff; color: #0f172a; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 14px rgba(15,23,42,.12); transition: background 150ms, transform 150ms; }
.to-top[hidden], .float-contact[hidden] { display: none; }
.to-top:hover { background: #f8fafc; transform: translateY(-2px); }
.float-contact { height: 48px; padding: 0 16px; border-radius: 9999px; background: #128c7e; color: #fff; display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: .875rem; text-decoration: none; box-shadow: 0 6px 18px rgba(15,23,42,.2); transition: background 150ms, transform 150ms; }
.float-contact:hover { background: #0e7569; color: #fff; transform: translateY(-2px); }
.float-contact svg, .to-top svg { width: 20px; height: 20px; }
@media (max-width: 575.98px) { .float-contact { width: 48px; padding: 0; justify-content: center; } .float-contact span { position: absolute; left: -9999px; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Print: the content only, with every FAQ answer open (landing.js opens them before printing) */
@media print {
  .site-head, .sticky-cta, .float-stack, .scroll-progress, .skip-link, .hero-search, .btn { display: none !important; }
  body { padding: 0 !important; color: #000; }
  .hero { background: none !important; color: #000 !important; padding: 0 0 1rem !important; }
  .hero .text-white, .hero.text-white { color: #000 !important; }
  section { padding: .75rem 0 !important; break-inside: avoid; }
  .bg-light, .guarantee, footer { background: none !important; }
  footer, footer * { color: #000 !important; }
  details { break-inside: avoid; }
  a[href] { color: inherit; text-decoration: none; }
  @page { margin: 15mm; }
}
