/* Kingsgate Estate — resident app & landing. */
.topbar { position: sticky; top: 0; z-index: 100; background: rgba(255, 248, 241, .88); backdrop-filter: saturate(160%) blur(12px); border-bottom: 1px solid var(--line); }
.topbar .inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 1.15rem; color: var(--ink); letter-spacing: -0.02em; }
.brand img { height: 36px; width: auto; }
.brand:hover { text-decoration: none; }
.nav-links { display: none; gap: var(--space-1); align-items: center; }
.nav-links a { padding: 10px 14px; border-radius: var(--r-pill); font-weight: 800; color: var(--ink-2); min-height: 44px; display: inline-flex; align-items: center; }
.nav-links a:hover { background: var(--sand); text-decoration: none; }
.nav-links a[aria-current="page"] { background: var(--jac-soft); color: var(--jac); }
.nav-actions { display: flex; gap: var(--space-2); align-items: center; }
@media (min-width: 960px) { .nav-links { display: flex; } }
.user-chip { display: none; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: var(--r-pill); background: var(--paper); border: 1px solid var(--line); font-weight: 800; font-size: .9rem; }
.user-chip .avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--jac); color: #fff; display: grid; place-items: center; font-size: .85rem; }
@media (min-width: 720px) { .user-chip { display: inline-flex; } }

/* Mobile bottom tab bar */
.tabbar { position: fixed; bottom: 0; left: 0; right: 0; z-index: 100; background: var(--paper); border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(5, 1fr); padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -8px 24px rgba(42, 31, 45, .06); }
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 58px; font-size: .7rem; font-weight: 800; color: var(--ink-3); }
.tabbar a:hover { text-decoration: none; }
.tabbar a[aria-current="page"] { color: var(--sun); }
.tabbar a svg { width: 24px; height: 24px; }
.tabbar a.panic-tab { color: var(--rose); }
@media (min-width: 960px) { .tabbar { display: none; } }
main { padding-bottom: 84px; min-height: 60vh; }
@media (min-width: 960px) { main { padding-bottom: var(--space-6); } }

/* Hero */
.hero { position: relative; min-height: min(86vh, 760px); display: grid; align-items: end; color: #fff; background: var(--jac) url('/assets/hero-generated.webp') center / cover no-repeat; border-radius: 0 0 var(--r-lg) var(--r-lg); overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(42, 31, 45, .15) 0%, rgba(42, 31, 45, .55) 55%, rgba(94, 63, 148, .92) 100%); }
.hero .container { position: relative; padding-block: var(--space-8) var(--space-7); }
.hero h1 { font-size: clamp(3rem, 7vw, 5rem); line-height: 1.02; max-width: 14ch; margin-bottom: var(--space-4); text-shadow: 0 2px 20px rgba(0, 0, 0, .25); }
.hero .lede { font-size: clamp(1.1rem, 2vw, 1.35rem); max-width: 56ch; color: rgba(255, 255, 255, .92); margin-bottom: var(--space-5); }
.hero .eyebrow { color: var(--gold); }
.hero .cta-row { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.hero .btn-ghost { border-color: rgba(255, 255, 255, .6); color: #fff; }
.hero .btn-ghost:hover { background: rgba(255, 255, 255, .12); }
.hero-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: var(--space-3); margin-top: var(--space-6); }
.hero-stats div { background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .25); border-radius: var(--r); padding: var(--space-3) var(--space-4); backdrop-filter: blur(6px); }
.hero-stats b { display: block; font-size: 1.6rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hero-stats span { font-size: .8rem; opacity: .9; }

/* Landing sections */
.journey { counter-reset: step; }
.journey .card { position: relative; padding-top: var(--space-6); }
.journey .card::before { counter-increment: step; content: counter(step); position: absolute; top: -16px; left: var(--space-5); width: 40px; height: 40px; border-radius: 50%; background: var(--sun); color: #fff; font-weight: 900; display: grid; place-items: center; box-shadow: var(--shadow); }
.blob { position: absolute; border-radius: 50%; filter: blur(40px); opacity: .5; pointer-events: none; }
.tile-grid { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.tile { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-5); border-radius: var(--r); color: var(--ink); background: var(--paper); box-shadow: var(--shadow); min-height: 150px; transition: transform .15s ease, box-shadow .15s ease; }
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); text-decoration: none; }
.tile .icon { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; color: #fff; font-size: 1.3rem; }
.tile h3 { margin: 0; }
.tile p { margin: 0; color: var(--ink-3); font-size: .92rem; }
.bg-sun { background: var(--sun); } .bg-jac { background: var(--jac); } .bg-leaf { background: var(--leaf); } .bg-gold { background: var(--gold); } .bg-rose { background: var(--rose); } .bg-sky { background: var(--sky); }
.pricing .card { text-align: left; }
.pricing .price-row { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-3); flex-wrap: wrap; }
.pricing .price { font-size: 1.9rem; }
.trust { display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-5); color: var(--ink-3); font-weight: 700; font-size: .9rem; }
footer.site { background: var(--ink); color: rgba(255, 255, 255, .8); padding-block: var(--space-7) var(--space-6); margin-top: var(--space-7); border-radius: var(--r-lg) var(--r-lg) 0 0; }
footer.site a { color: #fff; }
footer.site .cols { display: grid; gap: var(--space-5); grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
footer.site h4 { color: var(--gold); font-size: .85rem; text-transform: uppercase; letter-spacing: .12em; }
footer.site .legal { margin-top: var(--space-6); padding-top: var(--space-4); border-top: 1px solid rgba(255, 255, 255, .15); font-size: .82rem; display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-5); justify-content: space-between; }

/* Resident home */
.page-head { padding-block: var(--space-6) var(--space-4); display: flex; justify-content: space-between; align-items: flex-end; gap: var(--space-4); flex-wrap: wrap; }
.stand-card { background: linear-gradient(135deg, var(--jac) 0%, var(--jac-light) 100%); color: #fff; border-radius: var(--r-lg); padding: var(--space-5); position: relative; overflow: hidden; }
.stand-card .stand-no { font-size: clamp(2rem, 6vw, 2.8rem); font-weight: 900; letter-spacing: -0.02em; white-space: nowrap; }
.stand-card .blob { background: var(--gold); width: 220px; height: 220px; right: -60px; top: -80px; opacity: .35; }
.quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: var(--space-3); }
.quick a { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; padding: var(--space-4); border-radius: var(--r); background: var(--paper); box-shadow: var(--shadow); color: var(--ink); font-weight: 800; min-height: 96px; }
.quick a:hover { text-decoration: none; box-shadow: var(--shadow-lg); }
.quick a .icon { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; color: #fff; }
.panic-hero { background: linear-gradient(135deg, #B8324C, var(--sun)); color: #fff; border-radius: var(--r-lg); padding: var(--space-6); text-align: center; }
.panic-btn { width: min(260px, 70vw); aspect-ratio: 1; border-radius: 50%; border: 10px solid rgba(255, 255, 255, .35); background: #fff; color: var(--rose); font-size: 1.6rem; font-weight: 900; letter-spacing: .06em; cursor: pointer; margin: var(--space-5) auto; display: grid; place-items: center; box-shadow: 0 20px 60px rgba(0, 0, 0, .25); transition: transform .12s; }
.panic-btn:active { transform: scale(.96); }
.panic-btn:disabled { opacity: .6; }
.signin { max-width: 460px; margin: var(--space-7) auto; }
.signin .card { padding: var(--space-6); }
.otp-input { text-align: center; font-size: 1.8rem; letter-spacing: .3em; font-weight: 900; }
.install-banner { display: none; align-items: center; justify-content: space-between; gap: var(--space-3); background: var(--gold-soft); border-radius: var(--r); padding: var(--space-3) var(--space-4); margin-top: var(--space-4); }
.install-banner.show { display: flex; flex-wrap: wrap; }
.statement { background: var(--paper); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.statement .line { display: grid; grid-template-columns: 1fr auto; gap: var(--space-3); padding: 12px 16px; border-bottom: 1px solid var(--line); align-items: center; }
.statement .line:last-child { border-bottom: 0; }
.statement .line .desc { min-width: 0; }
.statement .line .desc b { display: block; }
.statement .line .desc span { color: var(--ink-3); font-size: .82rem; }
.ageing { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-2); }
.ageing div { background: var(--sand); border-radius: var(--r-sm); padding: var(--space-3); text-align: center; }
.ageing div span { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); font-weight: 800; }
.meter { display: grid; grid-template-columns: auto 1fr auto; gap: var(--space-3); align-items: center; }
.meter .icon { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; color: #fff; font-size: 1.2rem; }
.meter .icon svg { width: 26px; height: 26px; }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: var(--space-2); }
.slot-grid button { min-height: 44px; border-radius: var(--r-sm); border: 2px solid var(--line); background: var(--paper); font-weight: 800; cursor: pointer; }
.slot-grid button[aria-pressed="true"] { background: var(--leaf); border-color: var(--leaf); color: #fff; }
.slot-grid button:disabled { background: var(--sand); color: var(--ink-3); text-decoration: line-through; cursor: not-allowed; }
.sla-bar { height: 8px; border-radius: 4px; background: var(--sand); overflow: hidden; }
.sla-bar i { display: block; height: 100%; background: var(--leaf); }
.sla-bar.late i { background: var(--rose); }
