/* BadassHOA component library */

/* ============ layout ============ */
.container {
    width: 100%;
    max-width: var(--container);
    padding: 0 var(--sp-6);
    margin: 0 auto;
}
.container--narrow {
    max-width: var(--container-narrow);
}
.section {
    padding: var(--sp-20) 0;
}
.section--tight { padding: var(--sp-12) 0; }
.section--alt   { background: var(--color-white); }
.section--dark  { background: var(--color-navy); color: var(--color-white); }
.section--dark h1, .section--dark h2, .section--dark h3 { color: var(--color-white); }

.stack > * + * { margin-top: var(--sp-4); }
.stack-lg > * + * { margin-top: var(--sp-6); }

.grid { display: grid; gap: var(--sp-6); }
.grid--2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.grid--5 { grid-template-columns: repeat(5, minmax(0,1fr)); gap: var(--sp-4); }
@media (max-width: 1100px) {
    .grid--5 { grid-template-columns: repeat(3, minmax(0,1fr)); }
}
@media (max-width: 900px) {
    .grid--3, .grid--4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .grid--5 { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 640px) {
    .grid--2, .grid--3, .grid--4, .grid--5 { grid-template-columns: 1fr; }
}

/* ============ brand mark ============ */
.brand {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-2);
}
.brand__logo {
    height: 56px;
    width: auto;
    display: block;
    max-width: 100%;
}
.brand__mark { width: 32px; height: 32px; flex: 0 0 32px; }
.brand--small .brand__mark { width: 28px; height: 28px; flex-basis: 28px; }
.brand__word { line-height: 1; }

/* ============ Per-association public landing ============ */
.landing-hero {
    position: relative;
    padding: var(--sp-24) 0 var(--sp-20);
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    overflow: hidden;
    text-align: center;
}
.landing-hero__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(800px 480px at 80% -10%, color-mix(in srgb, var(--assoc-color, #0f1f3d) 28%, transparent), transparent 60%),
        radial-gradient(700px 480px at 8% 110%, color-mix(in srgb, var(--assoc-color, #0f1f3d) 16%, transparent), transparent 60%);
}
.landing-hero__inner {
    position: relative; z-index: 1;
    max-width: 760px;
}
.landing-hero__logo {
    max-width: 320px;
    max-height: 180px;
    width: auto; height: auto;
    margin: 0 auto var(--sp-6);
    display: block;
    filter: drop-shadow(0 4px 12px rgba(15,31,61,0.10));
}
.landing-hero__eyebrow {
    display: inline-block;
    font-size: var(--fs-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--assoc-color, var(--color-orange-600));
    background: color-mix(in srgb, var(--assoc-color, var(--color-orange)) 15%, transparent);
    padding: var(--sp-2) var(--sp-4);
    border-radius: var(--r-pill);
    margin-bottom: var(--sp-5);
}
.landing-hero__title {
    font-size: clamp(2rem, 5vw, 3.75rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    margin: 0 0 var(--sp-3);
    color: var(--color-text);
    line-height: 1.05;
}
.landing-hero__address {
    color: var(--color-text-soft);
    font-size: var(--fs-lg);
    margin: 0 0 var(--sp-8);
}
.landing-hero__ctas {
    display: flex; flex-wrap: wrap; gap: var(--sp-3);
    justify-content: center;
    margin-bottom: var(--sp-6);
}
.landing-hero__ctas .btn--primary {
    background: var(--assoc-color, var(--color-orange));
}
.landing-hero__ctas .btn--primary:hover {
    background: color-mix(in srgb, var(--assoc-color, var(--color-orange)) 85%, #000);
}
.landing-hero__hint {
    font-size: var(--fs-sm);
    margin: 0;
}
/* Hero with banner image variant */
.landing-hero--banner {
    color: var(--color-white);
    min-height: 520px;
}
.landing-hero--banner .landing-hero__banner {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    z-index: 0;
}
.landing-hero--banner .landing-hero__overlay {
    position: absolute; inset: 0; z-index: 1;
    background:
        linear-gradient(180deg, rgba(15,31,61,0.30) 0%, rgba(15,31,61,0.70) 100%);
}
.landing-hero--banner .landing-hero__inner { z-index: 2; position: relative; }
.landing-hero--banner .landing-hero__title { color: var(--color-white); text-shadow: 0 2px 24px rgba(15,31,61,0.55); }
.landing-hero--banner .landing-hero__address { color: rgba(255,255,255,0.92); }
.landing-hero--banner .landing-hero__hint { color: rgba(255,255,255,0.85) !important; }
.landing-hero--banner .landing-hero__eyebrow {
    background: rgba(255,255,255,0.18);
    color: var(--color-white);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.landing-hero--banner .btn--ghost {
    background: rgba(255,255,255,0.14);
    border-color: rgba(255,255,255,0.55);
    color: var(--color-white);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.landing-hero--banner .btn--ghost:hover {
    background: rgba(255,255,255,0.22); color: var(--color-white); border-color: var(--color-white);
}

/* Section heading shared across landing sections */
.landing-section__heading {
    font-size: var(--fs-3xl);
    margin: 0 0 var(--sp-6);
    letter-spacing: -0.02em;
}
.landing-section__heading.center { text-align: center; }

.landing-about {
    background: var(--color-white);
    padding: var(--sp-16) 0;
    border-bottom: 1px solid var(--color-border);
}
.landing-about__body {
    font-size: var(--fs-lg);
    line-height: var(--lh-loose);
    color: var(--color-text-soft);
}
.landing-about__body p { margin: 0 0 var(--sp-4); }
.landing-about__body img { max-width: 100%; border-radius: var(--r-md); margin: var(--sp-4) 0; }
.landing-about__body a { color: var(--assoc-color, var(--color-orange)); }

.landing-amenities {
    background: var(--color-surface);
    padding: var(--sp-16) 0;
    border-bottom: 1px solid var(--color-border);
}
.landing-amenities__list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--sp-3) var(--sp-6);
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: var(--fs-md);
}
.landing-amenities__list li {
    padding: var(--sp-3) var(--sp-4);
    background: var(--color-white);
    border-left: 3px solid var(--assoc-color, var(--color-orange));
    border-radius: 0 var(--r-md) var(--r-md) 0;
}
@media (max-width: 700px) {
    .landing-amenities__list { grid-template-columns: 1fr; }
}

.landing-gallery {
    background: var(--color-white);
    padding: var(--sp-16) 0;
    border-bottom: 1px solid var(--color-border);
}
.landing-gallery__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: var(--sp-3);
}
.landing-gallery__item {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    border-radius: var(--r-md);
    background: var(--color-surface-2);
    display: block;
    transition: transform var(--t-fast);
}
.landing-gallery__item:hover { transform: translateY(-2px); }
.landing-gallery__item img { width: 100%; height: 100%; object-fit: cover; }
.landing-gallery__caption {
    position: absolute; left: 0; right: 0; bottom: 0;
    padding: var(--sp-2) var(--sp-3);
    background: linear-gradient(180deg, transparent, rgba(15,31,61,0.85));
    color: var(--color-white);
    font-size: var(--fs-xs);
}

.landing-hero__map-link {
    display: inline-block;
    margin-left: var(--sp-2);
    color: var(--assoc-color, var(--color-orange));
    font-size: var(--fs-sm);
    font-weight: 600;
    white-space: nowrap;
}
.landing-hero--banner .landing-hero__map-link { color: #ffd1bf; }

.landing-board {
    background: var(--color-white);
    padding: var(--sp-16) 0;
    border-bottom: 1px solid var(--color-border);
}
.landing-board__grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: var(--sp-4);
    max-width: 1100px;
    margin: 0 auto;
}
@media (max-width: 900px) {
    .landing-board__grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 560px) {
    .landing-board__grid { grid-template-columns: repeat(2, 1fr); }
}
.landing-board__card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--r-lg);
    padding: var(--sp-6) var(--sp-4);
    text-align: center;
    transition: transform var(--t-fast), box-shadow var(--t-fast);
}
.landing-board__card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-2);
}
.landing-board__avatar {
    width: 64px; height: 64px;
    border-radius: 50%;
    background: var(--assoc-color, var(--color-orange));
    color: var(--color-white);
    font-size: var(--fs-2xl);
    font-weight: 800;
    display: inline-flex;
    align-items: center; justify-content: center;
    margin-bottom: var(--sp-3);
}
.landing-board__name {
    font-weight: 600;
    margin-bottom: var(--sp-2);
    color: var(--color-text);
}

.landing-docs {
    background: var(--color-surface);
    padding: var(--sp-16) 0;
    border-bottom: 1px solid var(--color-border);
}
.landing-docs__list {
    display: flex; flex-direction: column;
    gap: var(--sp-2);
    margin-top: var(--sp-6);
}
.landing-docs__item {
    display: flex;
    align-items: center;
    gap: var(--sp-4);
    padding: var(--sp-4) var(--sp-5);
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--r-md);
    color: var(--color-text);
    text-decoration: none;
    transition: border-color var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
}
.landing-docs__item:hover {
    border-color: var(--assoc-color, var(--color-orange));
    transform: translateY(-1px);
    box-shadow: var(--shadow-1);
    color: var(--color-text);
}
.landing-docs__ext {
    flex: 0 0 56px;
    height: 56px;
    border-radius: var(--r-sm);
    background: var(--assoc-color, var(--color-orange));
    color: var(--color-white);
    display: inline-flex;
    align-items: center; justify-content: center;
    font-weight: 800; font-size: var(--fs-sm);
    letter-spacing: 0.05em;
}
.landing-docs__meta {
    flex: 1;
    display: flex; flex-direction: column;
    gap: 2px;
    min-width: 0;
    overflow: hidden;
}
.landing-docs__meta strong {
    font-size: var(--fs-md);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.landing-docs__download {
    flex: 0 0 auto;
    color: var(--color-muted);
    font-size: var(--fs-xl);
}

.landing-events {
    background: var(--color-white);
    padding: var(--sp-16) 0;
    border-bottom: 1px solid var(--color-border);
}
.landing-events__list {
    display: flex; flex-direction: column;
    gap: var(--sp-3);
}
.landing-events__item {
    display: flex; gap: var(--sp-5);
    padding: var(--sp-5);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--r-md);
    transition: transform var(--t-fast), box-shadow var(--t-fast);
}
.landing-events__item:hover { transform: translateY(-2px); box-shadow: var(--shadow-1); }
.landing-events__date {
    flex: 0 0 80px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    background: var(--color-white);
    border: 2px solid var(--assoc-color, var(--color-orange));
    border-radius: var(--r-md);
    padding: var(--sp-2);
    text-align: center;
}
.landing-events__month {
    font-size: var(--fs-xs); font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.1em;
    color: var(--assoc-color, var(--color-orange-600));
}
.landing-events__day {
    font-size: var(--fs-3xl); font-weight: 800;
    line-height: 1; color: var(--color-text);
    margin: 2px 0;
}
.landing-events__weekday {
    font-size: var(--fs-xs); color: var(--color-muted);
}
.landing-events__body { flex: 1; min-width: 0; }

.landing-map {
    background: var(--color-surface);
    padding: var(--sp-16) 0;
    border-bottom: 1px solid var(--color-border);
}
.landing-map__frame {
    aspect-ratio: 16 / 9;
    border-radius: var(--r-lg);
    overflow: hidden;
    box-shadow: var(--shadow-2);
    background: var(--color-surface-2);
    max-width: 1100px;
    margin: 0 auto;
}
.landing-map__frame iframe {
    width: 100%; height: 100%; border: 0;
}

.landing-faq {
    background: var(--color-surface);
    padding: var(--sp-16) 0;
    border-bottom: 1px solid var(--color-border);
}
.landing-faq + .landing-contact { background: var(--color-white); } /* alternate */
.landing-faq__list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0 var(--sp-6);
    margin-top: var(--sp-8);
    align-items: start;
}
@media (max-width: 700px) {
    .landing-faq__list { grid-template-columns: 1fr; }
}
.landing-faq__item {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--r-md);
    margin-bottom: var(--sp-3);
    transition: box-shadow var(--t-fast);
    align-self: start;
}
.landing-faq__item[open] { box-shadow: var(--shadow-2); }
.landing-faq__item summary {
    padding: var(--sp-4) var(--sp-5);
    font-weight: 600;
    font-size: var(--fs-md);
    cursor: pointer;
    list-style: none;
    position: relative;
    padding-right: var(--sp-12);
}
.landing-faq__item summary::-webkit-details-marker { display: none; }
.landing-faq__item summary::after {
    content: "+";
    position: absolute;
    right: var(--sp-5); top: 50%;
    transform: translateY(-50%);
    color: var(--assoc-color, var(--color-orange));
    font-size: var(--fs-xl);
    font-weight: 700;
    transition: transform var(--t-fast);
}
.landing-faq__item[open] summary::after { content: "−"; }
.landing-faq__answer {
    padding: 0 var(--sp-5) var(--sp-5);
    color: var(--color-text-soft);
    line-height: var(--lh-loose);
}

.landing-contact {
    background: var(--color-surface);
    padding: var(--sp-16) 0;
    border-bottom: 1px solid var(--color-border);
}
.landing-contact__form-wrap {
    background: var(--color-white);
    padding: var(--sp-8);
    border-radius: var(--r-lg);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-1);
}
.landing-contact__row {
    display: flex;
    gap: var(--sp-4);
    justify-content: center;
    flex-wrap: wrap;
}
.landing-contact__item {
    display: flex; flex-direction: column; align-items: center; gap: var(--sp-1);
    padding: var(--sp-5) var(--sp-8);
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--r-lg);
    color: var(--color-text);
    text-decoration: none;
    transition: transform var(--t-fast), box-shadow var(--t-fast), border-color var(--t-fast);
    min-width: 240px;
}
.landing-contact__item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-2);
    border-color: var(--assoc-color, var(--color-orange));
    color: var(--color-text);
}
.landing-contact__item strong {
    font-size: var(--fs-xs);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-muted);
}
.landing-contact__item span { font-size: var(--fs-lg); font-weight: 600; }

.landing-news {
    background: var(--color-white);
    padding: var(--sp-16) 0;
    border-bottom: 1px solid var(--color-border);
}
.landing-news__heading {
    font-size: var(--fs-2xl);
    margin: 0;
    text-align: center;
    letter-spacing: -0.02em;
}
.landing-news__sub {
    text-align: center;
    margin: var(--sp-2) 0 0;
}
.landing-news__item {
    border-left: 3px solid var(--assoc-color, var(--color-orange));
    padding: var(--sp-5) var(--sp-6);
    background: var(--color-surface);
    border-radius: var(--r-md);
}
.landing-foot {
    background: var(--color-text);
    color: rgba(255,255,255,0.8);
    padding: var(--sp-6) 0;
}
.landing-foot__inner {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: var(--sp-3);
    font-size: var(--fs-sm);
}
.landing-foot__social {
    display: flex; gap: var(--sp-2);
    flex: 0 0 auto;
}
.landing-foot__social a {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px;
    border-radius: var(--r-pill);
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.85);
    transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast);
}
.landing-foot__social a:hover {
    background: var(--assoc-color, var(--color-orange));
    color: var(--color-white);
    transform: translateY(-2px);
}

/* ============ public site nav ============ */
.site-nav {
    position: sticky; top: 0; z-index: var(--z-nav);
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 1px 0 rgba(15,31,61,0.04);
}
.site-nav__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--nav-h);
    gap: var(--sp-4);
}
.site-nav__links {
    display: flex; align-items: center; gap: var(--sp-6);
}
/* Scope the link color to non-button anchors only — buttons (.btn--primary etc)
 * keep their own white-on-orange / dark-on-ghost styling. */
.site-nav__links > a:not(.btn) {
    color: var(--color-text-soft);
    font-weight: 500;
    font-size: var(--fs-sm);
}
.site-nav__links > a:not(.btn):hover { color: var(--color-orange); }

/* ============ Rule body expand-on-click ===========================
   Used on /dashboard/search.php — clamps long rule bodies to 4 lines and
   the JS in app.js inserts a "Show more / Show less" toggle whenever the
   content actually overflows. */
.rule-body-clamp {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}
.rule-body-clamp.is-expanded {
    display: block;
    -webkit-line-clamp: unset;
}
.rule-body-toggle {
    background: none; border: 0; padding: 4px 0;
    margin-top: 4px;
    color: var(--color-orange);
    font-size: var(--fs-xs); font-weight: 600;
    cursor: pointer;
}
.rule-body-toggle:hover { text-decoration: underline; }

/* ============ Email-paused banner (super-admin only, prod-only) ===========
   Renders when config.mail.driver === 'log' in production so the super admin
   sees a clear "no email is going out right now" signal on every page. */
.mail-paused-banner {
    background: #fff8d6;
    color: #5d4a00;
    border-bottom: 2px solid #e9c41a;
    padding: var(--sp-3) var(--sp-4);
    font-size: var(--fs-sm);
    position: relative;
    z-index: calc(var(--z-nav) + 1);
}
.mail-paused-banner strong { color: #5d4a00; }

/* ============ Impersonation banner (super-admin "Log in as") ============ */
.impersonation-banner {
    background: var(--color-orange);
    color: var(--color-white);
    padding: var(--sp-3) var(--sp-4);
    font-size: var(--fs-sm);
    border-bottom: 2px solid rgba(0,0,0,0.15);
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    /* Stay above the sidebar so it's never visually buried. */
    position: relative;
    z-index: calc(var(--z-nav) + 1);
}
.impersonation-banner strong { color: var(--color-white); }
.impersonation-banner .btn { white-space: nowrap; }

/* ============ View-as banner (manager previewing as homeowner/renter) === */
.view-as-banner {
    background: var(--color-navy);
    color: var(--color-white);
    padding: var(--sp-3) var(--sp-4);
    font-size: var(--fs-sm);
    border-bottom: 2px solid rgba(0,0,0,0.15);
    position: relative;
    z-index: calc(var(--z-nav) + 1);
}
.view-as-banner strong { color: var(--color-white); }

/* View-as toggle in the sidebar bottom (for managers, hidden when already in view-as) */
.side-nav__view-as { margin: var(--sp-2) 0; }
.side-nav__view-as-btn {
    flex: 1; min-width: 0;
    padding: 6px 8px;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.7);
    border-radius: var(--r-sm);
    font-size: var(--fs-xs);
    cursor: pointer;
    transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.side-nav__view-as-btn:hover {
    background: var(--color-navy-700);
    color: var(--color-white);
    border-color: rgba(255,255,255,0.3);
}
.side-nav.collapsed .side-nav__hide-when-collapsed { display: none; }

/* ============ App top bar (tenant dashboard only) =================
   Persistent header with the association's branding. Sits above the
   sidebar visually (z-index) and flows with the document so banners
   remain easy to stack. The collapse toggle lives here so it stays
   reachable when the sidebar is collapsed. */
.app-topbar {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    padding: var(--sp-3) var(--sp-5);
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    height: 64px;
    box-sizing: border-box;
    /* Sit above sidebar in the upper-left corner so its top edge isn't
       hidden under the fixed sidebar. */
    position: relative;
    z-index: calc(var(--z-nav) + 2);
}
.app-topbar__brand {
    display: flex; align-items: center; gap: var(--sp-3);
    flex: 1; min-width: 0;
    color: var(--color-navy);
    text-decoration: none;
}
.app-topbar__logo {
    height: 40px; width: auto; max-width: 180px;
    object-fit: contain;
    border-radius: var(--r-sm);
    flex-shrink: 0;
}
.app-topbar__avatar {
    width: 40px; height: 40px; flex: 0 0 40px;
    border-radius: var(--r-sm);
    background: var(--color-navy);
    color: var(--color-white);
    font-weight: 700; font-size: var(--fs-lg);
    display: inline-flex; align-items: center; justify-content: center;
}
.app-topbar__text {
    display: flex; flex-direction: column;
    line-height: 1.15;
    min-width: 0;
}
.app-topbar__name {
    color: var(--color-navy);
    font-size: var(--fs-md);
    font-weight: 700;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.app-topbar__sub {
    color: var(--color-text-soft);
    font-size: var(--fs-xs);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.app-topbar__toggle {
    background: transparent; border: 0;
    color: var(--color-navy);
    padding: var(--sp-2);
    border-radius: var(--r-sm);
    cursor: pointer;
    transition: background var(--t-fast), color var(--t-fast);
    flex: 0 0 auto;
}
.app-topbar__toggle:hover { color: var(--color-navy); background: var(--color-surface); }

/* Topbar user cluster (avatar + name + sign out + view-as) */
.topbar-user {
    display: flex; align-items: center; gap: var(--sp-1);
    flex: 0 0 auto;
    margin-left: var(--sp-1);
}
.topbar-view-as {
    display: flex; align-items: center; gap: 5px;
    border-right: 1px solid var(--color-border);
    padding-right: var(--sp-3);
    margin-right: var(--sp-1);
}
.topbar-view-as__label {
    font-size: var(--fs-xs);
    color: var(--color-text-soft);
    white-space: nowrap;
}
.topbar-view-as__btn {
    font-size: var(--fs-xs);
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 999px;
    border: 1px solid var(--color-border);
    background: transparent;
    color: var(--color-text-soft);
    cursor: pointer;
    transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.topbar-view-as__btn:hover { background: var(--color-navy); color: #fff; border-color: var(--color-navy); }
@media (max-width: 900px) { .topbar-view-as { display: none; } }

.topbar-user__profile {
    display: flex; align-items: center; gap: var(--sp-2);
    text-decoration: none; color: inherit;
    padding: var(--sp-1) var(--sp-2);
    border-radius: var(--r-sm);
    transition: background var(--t-fast);
}
.topbar-user__profile:hover { background: var(--color-surface); }
.topbar-user__avatar {
    width: 30px; height: 30px; flex: 0 0 30px;
    border-radius: 50%;
    background: var(--color-orange);
    color: #fff;
    font-weight: 700; font-size: var(--fs-xs);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
}
.topbar-user__avatar img { width: 100%; height: 100%; object-fit: cover; }
.topbar-user__name {
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--color-navy);
    white-space: nowrap;
}
@media (max-width: 700px) { .topbar-user__name { display: none; } }
.topbar-user__signout {
    display: flex; align-items: center; gap: 5px;
    padding: var(--sp-1) var(--sp-2);
    color: var(--color-text-soft);
    font-size: var(--fs-sm);
    font-weight: 500;
    border-radius: var(--r-sm);
    text-decoration: none;
    transition: background var(--t-fast), color var(--t-fast);
    white-space: nowrap;
}
.topbar-user__signout:hover { background: var(--color-surface); color: var(--color-navy); }
.topbar-user__signout-label { /* hidden on narrow screens */ }
@media (max-width: 860px) { .topbar-user__signout-label { display: none; } }

.topbar-user__help {
    display: flex; align-items: center; justify-content: center;
    width: 32px; height: 32px;
    color: var(--color-orange);
    border: 1.5px solid var(--color-orange);
    border-radius: 50%;
    text-decoration: none;
    transition: background var(--t-fast), color var(--t-fast);
    flex-shrink: 0;
    opacity: 0.85;
}
.topbar-user__help:hover { background: var(--color-orange); color: #fff; opacity: 1; text-decoration: none; }

/* Alerts bell */
.topbar-alerts { position: relative; flex: 0 0 auto; }
.topbar-alerts__btn {
    position: relative;
    background: transparent; border: 0;
    color: var(--color-text-soft);
    padding: var(--sp-2);
    border-radius: var(--r-sm);
    cursor: pointer;
    display: flex; align-items: center;
    transition: background var(--t-fast), color var(--t-fast);
}
.topbar-alerts__btn:hover { color: var(--color-navy); background: var(--color-surface); }
.topbar-alerts__badge {
    position: absolute;
    top: 2px; right: 2px;
    min-width: 16px; height: 16px;
    background: var(--color-orange);
    color: #fff;
    font-size: 10px; font-weight: 700;
    border-radius: 999px;
    display: flex; align-items: center; justify-content: center;
    padding: 0 4px;
    line-height: 1;
}
.topbar-alerts__dropdown {
    position: absolute;
    top: calc(100% + 8px); right: 0;
    min-width: 260px;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--r-md);
    box-shadow: 0 8px 32px rgba(15,31,61,0.14);
    z-index: 200;
    overflow: hidden;
}
.topbar-alerts__head {
    font-size: var(--fs-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-soft);
    padding: var(--sp-2) var(--sp-3);
    border-bottom: 1px solid var(--color-border);
}
.topbar-alerts__item {
    display: flex; align-items: center; justify-content: space-between;
    gap: var(--sp-3);
    padding: var(--sp-2) var(--sp-3);
    text-decoration: none;
    color: var(--color-text);
    font-size: var(--fs-sm);
    transition: background var(--t-fast);
}
.topbar-alerts__item:hover { background: var(--color-surface); }
.topbar-alerts__item-count {
    background: var(--color-orange);
    color: #fff;
    font-size: 11px; font-weight: 700;
    border-radius: 999px;
    min-width: 20px; height: 20px;
    display: flex; align-items: center; justify-content: center;
    padding: 0 6px;
    flex: 0 0 auto;
}

/* Hide the topbar's name text when sidebar is collapsed too keeps the bar tidy */
@media (max-width: 600px) {
    .app-topbar__sub { display: none; }
}

/* When the app-topbar is rendered (tenant dashboard only), the sidebar
   should not duplicate brand/toggle real estate. The topbar already has
   them, so nudge the sidebar's content down past the topbar height and
   relax body padding-left if nothing else changes. */
body[data-layout="app"] .side-nav__inner { padding-top: var(--sp-2); }

/* ============ Left sidebar (app + admin layouts) ============ */
:root {
    --side-nav-w:           232px;
    --side-nav-w-collapsed: 64px;
}

body.app-shell {
    padding-left: var(--side-nav-w);
    transition: padding-left .18s ease;
}
body.app-shell.nav-collapsed { padding-left: var(--side-nav-w-collapsed); }

/* Pre-paint hint (set by inline script in <head>) */
html[data-nav-collapsed="1"] body.app-shell { padding-left: var(--side-nav-w-collapsed); }
html[data-nav-collapsed="1"] body.app-shell .side-nav { width: var(--side-nav-w-collapsed); }

.side-nav {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: var(--side-nav-w);
    background: var(--color-navy);
    color: rgba(255,255,255,0.85);
    border-right: 1px solid var(--color-navy-700);
    z-index: var(--z-nav);
    transition: width .18s ease, transform .25s ease;
    overflow: hidden;
}
.side-nav.collapsed { width: var(--side-nav-w-collapsed); }

/* Floating edge toggle — fixed at the right edge of the sidebar, always visible */
.side-nav__edge-toggle {
    position: fixed;
    top: 80px;
    left: calc(var(--side-nav-w) - 14px);
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    box-shadow: 0 2px 6px rgba(15,31,61,0.18);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    z-index: calc(var(--z-nav) + 1);
    color: var(--color-navy);
    transition: left .18s ease, background var(--t-fast), box-shadow var(--t-fast);
}
.side-nav__edge-toggle:hover { background: var(--color-surface-2); box-shadow: 0 3px 10px rgba(15,31,61,0.22); }
.side-nav__edge-toggle svg { transition: transform 0.18s ease; }
/* Collapsed state — button slides left with sidebar, chevron flips */
html[data-nav-collapsed="1"] .side-nav__edge-toggle { left: calc(var(--side-nav-w-collapsed) - 14px); }
html[data-nav-collapsed="1"] .side-nav__edge-toggle svg { transform: rotate(180deg); }

.side-nav__inner {
    display: flex; flex-direction: column;
    height: 100%;
    padding: var(--sp-3);
    gap: var(--sp-2);
    position: relative;
}

.side-nav__brand-row {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
    padding: var(--sp-2);
}
.side-nav__brand {
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
    color: var(--color-white);
    text-decoration: none;
    border-radius: var(--r-sm);
    padding: var(--sp-1);
    transition: background var(--t-fast);
}
.side-nav__brand:hover { background: var(--color-navy-700); }
.side-nav__logo {
    display: block;
    width: 100%;
    max-width: 180px;
    height: auto;
    max-height: 56px;
    object-fit: contain;
    object-position: left center;
}
.side-nav__mark {
    width: 36px;
    height: auto;
    display: none;
    object-fit: contain;
}
.side-nav__brand-sub {
    padding: 0 var(--sp-3) var(--sp-2);
    margin-top: -4px;
}
.side-nav__brand-tag {
    display: inline-block;
    padding: 2px 8px;
    background: var(--color-orange);
    color: var(--color-white);
    border-radius: var(--r-sm);
    font-size: var(--fs-xs);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.side-nav__toggle {
    background: transparent; border: 0;
    color: rgba(255,255,255,0.5);
    padding: var(--sp-1) var(--sp-2);
    border-radius: var(--r-sm);
    cursor: pointer;
    transition: background var(--t-fast), color var(--t-fast);
    flex: 0 0 auto;
}
.side-nav__toggle:hover { color: var(--color-white); background: var(--color-navy-700); }

.side-nav__links {
    flex: 1;
    display: flex; flex-direction: column; gap: 0;
    overflow-y: auto;
    margin-top: var(--sp-2);
    padding-right: var(--sp-1);
}
.side-nav__group { margin-bottom: 2px; }

.side-nav__group-toggle {
    display: flex; align-items: center; justify-content: space-between;
    width: 100%;
    background: transparent; border: 0;
    cursor: pointer;
    padding: var(--sp-2) var(--sp-3) 0;
    gap: var(--sp-2);
    border-radius: var(--r-sm);
    transition: background var(--t-fast);
}
.side-nav__group-toggle:hover { background: rgba(255,255,255,0.05); }

.side-nav__group-label {
    flex: 1;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.45);
    white-space: nowrap;
    overflow: hidden;
    text-align: left;
}
.side-nav__group-chevron {
    color: rgba(255,255,255,0.25);
    transition: transform 200ms ease;
    flex: 0 0 11px;
}
.side-nav__group--collapsed .side-nav__group-chevron { transform: rotate(-90deg); }

.side-nav__group-links {
    overflow: hidden;
    max-height: 600px;
    transition: max-height 220ms ease;
}
.side-nav__group--collapsed .side-nav__group-links { max-height: 0; }

/* Scroll-fade "more below" hint — clickable, scrolls the nav links panel down */
.side-nav__scroll-hint {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 64px;
    background: linear-gradient(to bottom, transparent 0%, rgba(15,31,61,0.85) 60%, var(--color-navy) 100%);
    display: flex; align-items: flex-end; justify-content: center;
    padding-bottom: 10px;
    gap: 5px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.75);
    border: 0;
    cursor: pointer;
    opacity: 0;
    /* Default to non-clickable so the invisible hint never swallows clicks
       meant for the bottom Help / Sign-out links underneath. JS toggles
       pointer-events back to 'auto' once content actually overflows. */
    pointer-events: none;
    transition: opacity 300ms ease;
    animation: sideNavBounce 1.4s ease-in-out infinite;
}
@keyframes sideNavBounce {
    0%, 100% { padding-bottom: 10px; }
    50%       { padding-bottom: 5px;  }
}

/* Collapsed sidebar: hide toggles, always show links, hide hint */
.side-nav.collapsed .side-nav__group-toggle { display: none; }
.side-nav.collapsed .side-nav__group-links { max-height: none; }
.side-nav.collapsed .side-nav__group { margin-bottom: 0; }
.side-nav.collapsed .side-nav__scroll-hint { display: none; }
.side-nav__link {
    display: flex; align-items: center; gap: var(--sp-3);
    padding: 5px var(--sp-3);
    border-radius: var(--r-sm);
    color: rgba(255,255,255,0.78);
    font-size: var(--fs-sm);
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    transition: background var(--t-fast), color var(--t-fast);
}
.side-nav__link:hover {
    background: var(--color-navy-700);
    color: var(--color-white);
}
.side-nav__link.active {
    background: rgba(240,90,40,0.15);
    color: var(--color-orange);
    font-weight: 600;
}
.side-nav__link svg { flex: 0 0 18px; }
.side-nav__label { min-width: 0; }

.side-nav__help-link {
    color: var(--color-orange);
    background: rgba(240,90,40,0.10);
}
.side-nav__help-link:hover {
    background: rgba(240,90,40,0.22);
    color: var(--color-orange);
}

.side-nav__bottom {
    border-top: 1px solid var(--color-navy-700);
    padding-top: var(--sp-3);
    margin-top: var(--sp-2);
}
.side-nav__user {
    display: flex; align-items: center; gap: var(--sp-3);
    padding: var(--sp-2);
}
.side-nav__avatar {
    width: 32px; height: 32px; flex: 0 0 32px;
    border-radius: var(--r-pill);
    background: var(--color-orange);
    color: var(--color-white);
    font-weight: 700; font-size: var(--fs-sm);
    display: inline-flex; align-items: center; justify-content: center;
}
.side-nav__user-text {
    flex: 1; min-width: 0;
    line-height: 1.2;
    overflow: hidden;
}
.side-nav__name {
    display: block;
    color: var(--color-white);
    font-size: var(--fs-sm);
    font-weight: 600;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.side-nav__role {
    display: block;
    color: rgba(255,255,255,0.55);
    font-size: var(--fs-xs);
    text-transform: capitalize;
}
.side-nav__signout {
    display: flex; align-items: center; gap: var(--sp-3);
    padding: var(--sp-2) var(--sp-3);
    margin-top: var(--sp-1);
    border-radius: var(--r-sm);
    color: rgba(255,255,255,0.55);
    font-size: var(--fs-sm);
    text-decoration: none;
    transition: background var(--t-fast), color var(--t-fast);
}
.side-nav__signout svg { flex: 0 0 18px; }
.side-nav__signout:hover { background: var(--color-navy-700); color: var(--color-orange); }

/* Collapsed state — hide labels and the brand link entirely; toggle stays
   visible so the user can click it to expand. */
.side-nav.collapsed .side-nav__logo,
.side-nav.collapsed .side-nav__mark,
.side-nav.collapsed .side-nav__brand,
.side-nav.collapsed .side-nav__brand-sub,
.side-nav.collapsed .side-nav__label,
.side-nav.collapsed .side-nav__user-text { display: none; }
.side-nav.collapsed .side-nav__user { justify-content: center; padding: var(--sp-1); }
.side-nav.collapsed .side-nav__brand-row { justify-content: center; padding: var(--sp-1); }
/* Visual cue: rotate the collapse icon 180° so it visibly points "outward" when
   the sidebar is collapsed, suggesting "click to expand." */
.side-nav.collapsed .side-nav__toggle svg { transform: rotate(180deg); }
.side-nav.collapsed .side-nav__link,
.side-nav.collapsed .side-nav__signout {
    justify-content: center;
    padding: var(--sp-2);
}

/* Mobile top bar (hidden ≥ 900px) */
.mobile-topbar {
    display: none;
    position: sticky; top: 0; z-index: var(--z-nav);
    background: var(--color-navy); color: var(--color-white);
    align-items: center; justify-content: space-between;
    padding: var(--sp-3) var(--sp-4);
    border-bottom: 1px solid var(--color-navy-700);
}
.mobile-topbar__menu {
    background: transparent; border: 0; color: var(--color-white);
    padding: var(--sp-2);
    border-radius: var(--r-sm);
    cursor: pointer;
}
.mobile-topbar__menu:hover { background: var(--color-navy-700); }
.mobile-topbar__title {
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--color-white);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    max-width: 240px;
}

.side-nav__overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: var(--z-overlay);
}

@media (max-width: 900px) {
    body.app-shell { padding-left: 0; }
    html[data-nav-collapsed="1"] body.app-shell { padding-left: 0; }
    .side-nav {
        transform: translateX(-100%);
        z-index: var(--z-modal);
        width: var(--side-nav-w) !important;
    }
    .side-nav.mobile-open { transform: translateX(0); }
    .side-nav.mobile-open ~ .side-nav__overlay { display: block; }
    /* Mobile always shows full logo + labels (no collapsed-icon state) */
    .side-nav.collapsed .side-nav__logo,
    .side-nav.collapsed .side-nav__brand-sub,
    .side-nav.collapsed .side-nav__label,
    .side-nav.collapsed .side-nav__user-text { display: block; }
    .side-nav.collapsed .side-nav__mark { display: none; }
    .side-nav.collapsed .side-nav__link,
    .side-nav.collapsed .side-nav__signout { justify-content: flex-start; }
    .mobile-topbar { display: flex; }
}

/* ============ mobile nav toggle (public site only) ============ */
.nav-toggle {
    display: none;
    background: transparent; border: 0; padding: var(--sp-2);
    flex-direction: column; gap: 5px;
    width: 40px; height: 40px;
    align-items: center; justify-content: center;
}
.nav-toggle span {
    display: block; width: 22px; height: 2px;
    background: var(--color-text);
    transition: transform var(--t-med), opacity var(--t-med);
}
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 820px) {
    .nav-toggle { display: inline-flex; }
    .site-nav__links {
        position: absolute;
        top: var(--nav-h); left: 0; right: 0;
        flex-direction: column; align-items: stretch;
        background: var(--color-white);
        padding: var(--sp-4) var(--sp-6);
        gap: var(--sp-2);
        border-bottom: 1px solid var(--color-border);
        max-height: 0; overflow: hidden;
        transition: max-height var(--t-med);
    }
    .site-nav__links.is-open { max-height: 80vh; }
    .site-nav__links > a { padding: var(--sp-3) 0; }
}

/* ============ buttons ============ */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: var(--sp-2);
    padding: 0.7rem 1.15rem;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: var(--fs-sm);
    border-radius: var(--r-md);
    border: 1px solid transparent;
    cursor: pointer;
    text-align: center;
    line-height: 1.2;
    transition: transform var(--t-fast), background var(--t-fast), border-color var(--t-fast), box-shadow var(--t-fast), color var(--t-fast);
    white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--primary {
    background: var(--color-orange);
    color: var(--color-white);
    box-shadow: var(--shadow-1);
}
.btn--primary:hover {
    background: var(--color-orange-600);
    color: var(--color-white);
    box-shadow: var(--shadow-2), var(--shadow-pop);
}
.btn--ghost {
    background: transparent;
    color: var(--color-text);
    border-color: var(--color-border-strong);
}
.btn--ghost:hover {
    background: var(--color-white);
    border-color: var(--color-text);
    color: var(--color-text);
}
.btn--dark {
    background: var(--color-navy);
    color: var(--color-white);
}
.btn--dark:hover { background: var(--color-navy-700); color: var(--color-white); }
.btn--danger {
    background: var(--color-error);
    color: var(--color-white);
}
.btn--danger:hover { background: #9b2a20; color: var(--color-white); }
.btn--lg { padding: 0.95rem 1.6rem; font-size: var(--fs-md); border-radius: var(--r-lg); }
.btn--block { width: 100%; display: flex; }
.btn[disabled], .btn[aria-disabled="true"] {
    opacity: 0.55; cursor: not-allowed; pointer-events: none;
}

/* ============ hero ============ */
.hero {
    padding: var(--sp-20) 0 var(--sp-16);
    background:
        radial-gradient(900px 460px at 80% -10%, rgba(240,90,40,0.18), transparent 60%),
        radial-gradient(800px 480px at 8% 110%, rgba(15,31,61,0.10), transparent 60%),
        var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    overflow: hidden;
}

/* ============ Full-bleed video hero variant ============ */
.hero--video {
    position: relative;
    min-height: clamp(520px, 86vh, 880px);
    display: flex;
    align-items: center;
    color: var(--color-white);
    background: var(--color-navy); /* fallback color while video loads / if it fails */
    border-bottom: 1px solid var(--color-navy-700);
    padding: var(--sp-20) 0;
}
.hero--video .hero__video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 0;
}
.hero--video .hero__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        /* Darken-the-middle: radial scrim concentrated where copy + CTAs live, keeps video visible at edges */
        radial-gradient(60% 70% at 50% 55%, rgba(15,31,61,0.62) 0%, rgba(15,31,61,0.30) 70%, rgba(15,31,61,0.18) 100%),
        /* Soft top-to-bottom wash so the page isn't bottom-heavy */
        linear-gradient(180deg, rgba(15,31,61,0.18) 0%, rgba(15,31,61,0.45) 100%);
    pointer-events: none;
}
.hero--video .container { position: relative; z-index: 2; }

/* Color overrides so copy reads well over the dark video */
.hero--video h1 { color: var(--color-white); text-shadow: 0 2px 24px rgba(15,31,61,0.55); }
.hero--video .hero__lede { color: rgba(255,255,255,0.92); }
.hero--video .hero__eyebrow {
    background: rgba(240,90,40,0.28);
    color: #ffe4d8;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.hero--video .hero__meta { color: rgba(255,255,255,0.85); }
.hero--video .hero__meta strong { color: var(--color-white); }
.hero--video .btn--ghost {
    background: rgba(255,255,255,0.14);
    border-color: rgba(255,255,255,0.55);
    color: var(--color-white);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.30);
}
.hero--video .btn--ghost:hover {
    background: rgba(255,255,255,0.22);
    color: var(--color-white);
    border-color: var(--color-white);
    box-shadow: 0 10px 28px rgba(0,0,0,0.35);
}

/* Orange CTA over video: subtle white inner ring + strong drop shadow so the
 * button's silhouette stays defined no matter what color the video is showing. */
.hero--video .btn--primary {
    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,0.22),
        0 8px 24px rgba(0,0,0,0.38);
}
.hero--video .btn--primary:hover {
    box-shadow:
        inset 0 0 0 1px rgba(255,255,255,0.30),
        0 12px 32px rgba(0,0,0,0.45),
        var(--shadow-pop);
}

/* Centered single-column copy variant for the full-bleed hero */
.hero__copy--centered {
    max-width: 880px;
    margin: 0 auto;
    text-align: center;
}
.hero__copy--centered h1 {
    max-width: 22ch;
    margin-left: auto;
    margin-right: auto;
}
.hero__copy--centered .hero__lede { margin-left: auto; margin-right: auto; }
.hero__copy--centered .hero__ctas { justify-content: center; }
.hero__copy--centered .hero__meta { justify-content: center; }

/* Respect reduced-motion preference: pause the video */
@media (prefers-reduced-motion: reduce) {
    .hero--video .hero__video { animation: none; }
    /* The browser will still autoplay; users can pause via OS-level reduced motion. We can't
     * remove the autoplay attr from CSS, but we soften the brightness to be less distracting. */
    .hero--video .hero__overlay { background: rgba(15,31,61,0.85); }
}
.hero__inner {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: var(--sp-12);
    align-items: center;
}
@media (max-width: 960px) {
    .hero__inner { grid-template-columns: 1fr; gap: var(--sp-10); }
}
.hero__eyebrow {
    display: inline-flex; align-items: center; gap: var(--sp-2);
    font-size: var(--fs-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--color-orange-600);
    background: var(--color-orange-100);
    padding: var(--sp-2) var(--sp-3);
    border-radius: var(--r-pill);
    margin-bottom: var(--sp-5);
}
.hero h1 {
    max-width: 16ch;
    margin-bottom: var(--sp-5);
}
.hero__lede {
    font-size: var(--fs-xl);
    color: var(--color-text-soft);
    max-width: 56ch;
    margin-bottom: var(--sp-8);
    line-height: var(--lh-snug);
}
.hero__ctas { display: flex; flex-wrap: wrap; gap: var(--sp-3); }
.hero__meta {
    margin-top: var(--sp-8);
    display: flex; flex-wrap: wrap; gap: var(--sp-6);
    color: var(--color-muted);
    font-size: var(--fs-sm);
}
.hero__meta strong { color: var(--color-text); }
.hero__art {
    position: relative;
    aspect-ratio: 5 / 4;
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
    filter: drop-shadow(0 24px 48px rgba(15,31,61,0.18));
}
.hero__art svg { width: 100%; height: 100%; display: block; }
@media (max-width: 960px) {
    .hero__art { max-width: 480px; }
}

/* Video variant — 16:9 with rounded corners and a real shadow (drop-shadow filter
 * doesn't render on iframes consistently across browsers; switching to box-shadow). */
.hero__art--video {
    aspect-ratio: 16 / 9;
    border-radius: var(--r-lg);
    overflow: hidden;
    background: #000;
    filter: none;
    box-shadow: var(--shadow-3), 0 24px 48px rgba(15,31,61,0.18);
}
.hero__art--video iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

/* ============ feature cards ============ */
.feature {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--r-lg);
    padding: var(--sp-8);
    transition: transform var(--t-med), box-shadow var(--t-med), border-color var(--t-med);
}
.feature:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-3);
    border-color: var(--color-border-strong);
}
.feature__icon {
    width: 44px; height: 44px;
    border-radius: var(--r-md);
    background: var(--color-orange-100);
    color: var(--color-orange-600);
    display: inline-flex; align-items: center; justify-content: center;
    margin-bottom: var(--sp-4);
    font-size: 1.4rem;
}
.feature h3 { font-size: var(--fs-xl); margin-bottom: var(--sp-2); }
.feature p { color: var(--color-text-soft); margin: 0; }

/* Compact variant — used for the secondary "boring-but-essential" strip
   below the main feature grid. Less padding, no icon block, smaller text. */
.feature--compact {
    padding: var(--sp-4) var(--sp-5);
}
.feature--compact strong { font-size: var(--fs-md); display: block; }
.feature--compact p { font-size: var(--fs-sm); }

/* ============ pricing ============ */
.price-card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--r-xl);
    padding: var(--sp-8);
    display: flex; flex-direction: column;
    transition: transform var(--t-med), box-shadow var(--t-med), border-color var(--t-med);
}
.price-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-3); }
.price-card--featured {
    border-color: var(--color-orange);
    box-shadow: var(--shadow-pop);
    position: relative;
}
.price-card--featured::before {
    content: "Most popular";
    position: absolute; top: -12px; left: var(--sp-6);
    background: var(--color-orange);
    color: var(--color-white);
    font-size: var(--fs-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: var(--sp-1) var(--sp-3);
    border-radius: var(--r-pill);
}
.price-card__name { font-size: var(--fs-lg); font-weight: 700; margin-bottom: var(--sp-2); }
.price-card__price {
    font-family: var(--font-display);
    font-size: var(--fs-4xl);
    font-weight: 800;
    line-height: 1; letter-spacing: -0.02em;
    margin: var(--sp-3) 0 var(--sp-1);
}
.price-card__price small { font-size: var(--fs-md); color: var(--color-muted); font-weight: 500; }
.price-card__limit { color: var(--color-muted); font-size: var(--fs-sm); margin-bottom: var(--sp-5); }
.price-card ul {
    list-style: none; padding: 0; margin: 0 0 var(--sp-6);
    display: flex; flex-direction: column; gap: var(--sp-2);
    font-size: var(--fs-sm);
}
.price-card li::before {
    content: "✓";
    color: var(--color-success);
    font-weight: 700;
    margin-right: var(--sp-2);
}
.price-card .btn { margin-top: auto; }

/* ============ pricing calculator ============ */
.calc {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--r-xl);
    padding: var(--sp-8);
    box-shadow: var(--shadow-2);
}
.calc__row {
    display: grid; grid-template-columns: 1fr auto; gap: var(--sp-6);
    align-items: end; margin-bottom: var(--sp-6);
}
@media (max-width: 700px) { .calc__row { grid-template-columns: 1fr; } }
.calc__label {
    display: block;
    font-size: var(--fs-sm); color: var(--color-text-soft); font-weight: 600;
    margin-bottom: var(--sp-2);
}
.calc__output {
    text-align: right;
}
.calc__price {
    font-family: var(--font-display);
    font-size: var(--fs-4xl);
    font-weight: 800; line-height: 1;
    letter-spacing: -0.02em;
}
.calc__tier {
    color: var(--color-orange-600);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: var(--fs-xs);
    margin-bottom: var(--sp-2);
}
.calc input[type="range"] { width: 100%; accent-color: var(--color-orange); }
.calc input[type="number"] {
    margin-left: var(--sp-3);
    width: 100px;
}
.calc__breakdown {
    border-top: 1px solid var(--color-border);
    padding-top: var(--sp-4);
    color: var(--color-text-soft);
    font-size: var(--fs-sm);
}

/* ============ address autocomplete dropdown ============ */
.addr-wrap { position: relative; }
.addr-dropdown {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--color-white);
    border: 1px solid var(--color-border-strong);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-3);
    z-index: 30;
    max-height: 320px;
    overflow-y: auto;
    margin-top: var(--sp-1);
    display: none;
}
.addr-dropdown.is-open { display: block; }
.addr-dropdown__item {
    display: block; width: 100%;
    padding: var(--sp-3) var(--sp-4);
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--color-border);
    text-align: left;
    cursor: pointer;
    font-size: var(--fs-sm);
    color: var(--color-text);
    transition: background var(--t-fast);
}
.addr-dropdown__item:last-child { border-bottom: 0; }
.addr-dropdown__item:hover,
.addr-dropdown__item:focus { background: var(--color-surface-2); outline: none; }
.addr-dropdown__item strong { display: block; }
.addr-dropdown__sub {
    display: block;
    color: var(--color-muted);
    font-size: var(--fs-xs);
    margin-top: 2px;
}

/* ============ forms ============ */
.form { display: flex; flex-direction: column; gap: var(--sp-5); }
.form-row { display: grid; gap: var(--sp-4); }
.form-row--2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
@media (max-width: 600px) { .form-row--2 { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: var(--sp-2); }
.field__label {
    font-size: var(--fs-sm);
    font-weight: 600;
    color: var(--color-text);
}
.field__hint {
    font-size: var(--fs-xs);
    color: var(--color-muted);
}
.field__error {
    font-size: var(--fs-xs);
    color: var(--color-error);
    font-weight: 500;
}
.input, .select, .textarea {
    width: 100%;
    background: var(--color-white);
    border: 1px solid var(--color-border-strong);
    border-radius: var(--r-md);
    padding: 0.7rem 0.85rem;
    font-size: var(--fs-md);
    color: var(--color-text);
    transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
}
.input:focus, .select:focus, .textarea:focus {
    outline: none;
    border-color: var(--color-orange);
    box-shadow: var(--shadow-pop);
}
.textarea { min-height: 120px; resize: vertical; }

/* ============ cards ============ */
.card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--r-lg);
    padding: var(--sp-6);
}
.card--padded { padding: var(--sp-8); }
.card__head {
    display: flex; align-items: center; justify-content: space-between;
    gap: var(--sp-4);
    margin-bottom: var(--sp-5);
}
.card__title { font-size: var(--fs-lg); font-weight: 700; margin: 0; }

/* ============ stats ============ */
.stat {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--r-lg);
    padding: var(--sp-5) var(--sp-6);
    position: relative;
}
.stat__label { color: var(--color-muted); font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.1em; font-weight: 600; }
.stat__value { font-family: var(--font-display); font-size: var(--fs-3xl); font-weight: 800; line-height: 1; margin-top: var(--sp-2); letter-spacing: -0.02em; }

/* Clickable stat card variant (anchor wrapper) */
a.stat {
    display: block;
    color: inherit;
    text-decoration: none;
    transition: transform var(--t-fast), box-shadow var(--t-fast), border-color var(--t-fast);
}
a.stat:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-2);
    border-color: var(--color-border-strong);
    color: inherit;
}
a.stat:hover .stat__value { color: var(--color-orange-600); }
a.stat::after {
    content: "→";
    position: absolute;
    top: var(--sp-4);
    right: var(--sp-5);
    color: var(--color-muted);
    font-weight: 700;
    opacity: 0;
    transform: translateX(-4px);
    transition: opacity var(--t-fast), transform var(--t-fast);
}
a.stat:hover::after {
    opacity: 1;
    transform: translateX(0);
}

/* ============ table ============ */
.table {
    width: 100%;
    border-collapse: separate; border-spacing: 0;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--r-lg);
    overflow: hidden;
    font-size: var(--fs-sm);
}
.table th, .table td {
    padding: var(--sp-3) var(--sp-4);
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}
.table th {
    background: var(--color-surface-2);
    font-weight: 600;
    text-transform: uppercase;
    font-size: var(--fs-xs);
    letter-spacing: 0.08em;
    color: var(--color-text-soft);
}
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: var(--color-surface); }

/* ============ badges ============ */
.badge {
    display: inline-flex; align-items: center; gap: var(--sp-1);
    font-size: var(--fs-xs);
    font-weight: 600;
    padding: 0.18rem 0.55rem;
    border-radius: var(--r-pill);
    background: var(--color-surface-2);
    color: var(--color-text-soft);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.badge--success { background: var(--color-success-bg); color: var(--color-success); }
.badge--error   { background: var(--color-error-bg);   color: var(--color-error); }
.badge--warning { background: var(--color-warning-bg); color: var(--color-warning); }
.badge--info    { background: var(--color-info-bg);    color: var(--color-info); }
.badge--orange  { background: var(--color-orange-100); color: var(--color-orange-600); }
.badge--navy    { background: var(--color-navy); color: var(--color-white); }

/* ============ flash messages ============ */
.flash-stack { padding-top: var(--sp-4); }
.flash {
    border-radius: var(--r-md);
    padding: var(--sp-3) var(--sp-4);
    font-size: var(--fs-sm);
    margin-bottom: var(--sp-3);
    border: 1px solid transparent;
}
.flash--success { background: var(--color-success-bg); color: var(--color-success); border-color: rgba(46,125,50,0.2); }
.flash--error   { background: var(--color-error-bg);   color: var(--color-error);   border-color: rgba(192,57,43,0.2); }
.flash--info    { background: var(--color-info-bg);    color: var(--color-info);    border-color: rgba(38,96,168,0.2); }

/* ============ steps (for signup) ============ */
.steps {
    display: flex; gap: var(--sp-4); margin-bottom: var(--sp-8);
    counter-reset: stepc;
}
.step {
    flex: 1;
    padding: var(--sp-3) var(--sp-4);
    border: 1px solid var(--color-border);
    border-radius: var(--r-md);
    background: var(--color-white);
    color: var(--color-muted);
    display: flex; align-items: center; gap: var(--sp-3);
    font-size: var(--fs-sm);
    counter-increment: stepc;
}
.step::before {
    content: counter(stepc);
    width: 26px; height: 26px;
    border-radius: var(--r-pill);
    background: var(--color-surface-2);
    color: var(--color-text-soft);
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: var(--fs-xs);
}
.step.is-active {
    border-color: var(--color-orange);
    color: var(--color-text);
    box-shadow: var(--shadow-pop);
}
.step.is-active::before {
    background: var(--color-orange); color: var(--color-white);
}
.step.is-done::before { background: var(--color-success); color: var(--color-white); content: "✓"; }
@media (max-width: 700px) { .steps { flex-direction: column; } }

/* ============ auth (login/signup) ============ */
.auth-shell {
    min-height: calc(100dvh - var(--nav-h));
    display: grid;
    place-items: center;
    padding: var(--sp-12) var(--sp-4);
}
.auth-card {
    width: 100%;
    max-width: 460px;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--r-xl);
    padding: var(--sp-10);
    box-shadow: var(--shadow-2);
}
.auth-card h1 { font-size: var(--fs-2xl); margin-bottom: var(--sp-2); }
.auth-card .muted { margin-bottom: var(--sp-6); }

/* ============ search ============ */
.search-bar {
    display: flex; align-items: center; gap: var(--sp-3);
    background: var(--color-white);
    border: 1px solid var(--color-border-strong);
    border-radius: var(--r-lg);
    padding: var(--sp-3) var(--sp-4);
    box-shadow: var(--shadow-1);
}
.search-bar input {
    flex: 1; border: 0; outline: none;
    background: transparent;
    font-size: var(--fs-lg);
    padding: var(--sp-2) 0;
}
.search-results { margin-top: var(--sp-6); display: flex; flex-direction: column; gap: var(--sp-3); }
.search-result {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--r-lg);
    padding: var(--sp-5);
}
.search-result mark { background: var(--color-orange-100); color: var(--color-orange-600); padding: 0 .15em; border-radius: 3px; }

/* ============ media gallery ============ */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: var(--sp-4);
}
.gallery__item {
    background: var(--color-surface-2);
    border-radius: var(--r-md);
    overflow: hidden;
    aspect-ratio: 4/3;
    position: relative;
}
.gallery__item img { width: 100%; height: 100%; object-fit: cover; }
.gallery__caption {
    position: absolute; left: 0; right: 0; bottom: 0;
    padding: var(--sp-2) var(--sp-3);
    background: linear-gradient(180deg, transparent, rgba(15,31,61,0.85));
    color: var(--color-white);
    font-size: var(--fs-xs);
}

/* ============ tabs ============ */
.tabs { display: flex; gap: var(--sp-1); border-bottom: 1px solid var(--color-border); margin-bottom: var(--sp-6); }
.tab {
    padding: var(--sp-3) var(--sp-4);
    border: 0; background: transparent;
    font-weight: 600; color: var(--color-text-soft);
    font-size: var(--fs-sm);
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}
.tab.is-active { color: var(--color-text); border-bottom-color: var(--color-orange); }

/* ============ footer ============ */
.site-foot {
    background: var(--color-navy);
    color: rgba(255,255,255,0.78);
    padding: var(--sp-12) 0;
    margin-top: var(--sp-20);
}
.site-foot__inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: var(--sp-6);
    align-items: center;
}
.site-foot a { color: rgba(255,255,255,0.85); }
.site-foot a:hover { color: var(--color-orange); }
.site-foot__brand {
    display: inline-flex; align-items: center; gap: var(--sp-3);
    color: var(--color-white);
}
.site-foot__logo {
    height: 32px;
    width: auto;
    display: block;
}
.site-foot__links {
    display: flex; gap: var(--sp-5); justify-content: center;
    font-size: var(--fs-sm);
}
.site-foot__legal {
    text-align: right; font-size: var(--fs-xs);
}
@media (max-width: 700px) {
    .site-foot__inner { grid-template-columns: 1fr; text-align: center; }
    .site-foot__legal { text-align: center; }
    .site-foot__links { justify-content: center; }
}

/* ============ utilities ============ */
.row { display: flex; gap: var(--sp-3); align-items: center; flex-wrap: wrap; }
.row--between { justify-content: space-between; }
.mt-0 { margin-top: 0; }
.mt-2 { margin-top: var(--sp-4); }
.mt-4 { margin-top: var(--sp-8); }
.mt-8 { margin-top: var(--sp-12); }
.mb-0 { margin-bottom: 0; }

/* ============ prose (Quill / rich-text body content) ============ */
.prose { font-size: var(--fs-md); line-height: 1.7; color: var(--color-text); }
.prose h1, .prose h2, .prose h3, .prose h4 {
    font-weight: 700;
    line-height: 1.3;
    margin: 1.4em 0 0.4em;
    letter-spacing: -0.01em;
}
.prose h1 { font-size: var(--fs-xl); }
.prose h2 { font-size: var(--fs-lg); }
.prose h3 { font-size: var(--fs-md); }
.prose h4 { font-size: var(--fs-sm); text-transform: uppercase; letter-spacing: 0.04em; }
.prose p  { margin: 0 0 0.75em; }
.prose ul, .prose ol { padding-left: 1.5em; margin: 0 0 0.75em; }
.prose li + li { margin-top: 0.25em; }
.prose strong { font-weight: 700; }
.prose em     { font-style: italic; }
.prose a      { color: var(--color-primary); text-decoration: underline; }
.prose a:hover { opacity: 0.8; }
.prose > *:first-child { margin-top: 0; }
.prose > *:last-child  { margin-bottom: 0; }
