/* House 1316 Legal Suite — full-page black/gold legal presentation.
   v0.5.3 focuses on clarity: high-contrast fixed top actions + fixed bottom legal dock. */

html {
    scroll-behavior: smooth;
}

html:has(body.house1316-legal-page),
body.house1316-legal-page {
    min-height: 100% !important;
    height: auto !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    background: #070707 !important;
}

body.house1316-legal-page {
    margin: 0 !important;
    padding: 0 !important;
    color: #e8e2d8 !important;
}

/* Remove normal WordPress / Divi chrome on legal pages only. */
body.house1316-legal-page #top-header,
body.house1316-legal-page #main-header,
body.house1316-legal-page header.et-l--header,
body.house1316-legal-page #main-footer,
body.house1316-legal-page footer.et-l--footer,
body.house1316-legal-page .et-l--footer,
body.house1316-legal-page .et_pb_section_0_tb_header,
body.house1316-legal-page .et_pb_section_0_tb_footer,
body.house1316-legal-page #sidebar,
body.house1316-legal-page .widget-area {
    display: none !important;
}

body.house1316-legal-page #page-container,
body.house1316-legal-page #et-main-area,
body.house1316-legal-page #main-content,
body.house1316-legal-page article,
body.house1316-legal-page .entry-content,
body.house1316-legal-page .et-l,
body.house1316-legal-page .et_builder_inner_content,
body.house1316-legal-page .site,
body.house1316-legal-page .site-content,
body.house1316-legal-page .content-area,
body.house1316-legal-page #left-area {
    width: 100% !important;
    max-width: none !important;
    min-height: 0 !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    float: none !important;
    background: transparent !important;
}

body.house1316-legal-page #main-content .container,
body.house1316-legal-page #main-content .container.et_menu_container {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.house1316-legal-page #main-content .container::before {
    display: none !important;
}

body.house1316-legal-page .entry-title,
body.house1316-legal-page .post-meta {
    display: none !important;
}

/* Keep stale home-state classes from locking legal pages. */
body.house1316-legal-page.house1316-home-active,
body.house1316-legal-page.house1316-search-open {
    overflow-y: auto !important;
}

.house1316-legal-page-shell {
    position: relative;
    min-height: 100vh;
    background:
        radial-gradient(circle at 50% -20%, rgba(188, 145, 52, .12), transparent 36rem),
        linear-gradient(180deg, #070707 0%, #0b0a08 50%, #070707 100%);
    color: #e9e3d8;
}

.house1316-legal-page-shell::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: .22;
    background-image:
        linear-gradient(rgba(255,255,255,.012) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.009) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,.65), transparent 72%);
}

.house1316-legal-main {
    position: relative;
    z-index: 1;
    padding: 0 clamp(18px, 4vw, 58px);
}

body .house1316-legal-wrap {
    width: min(980px, 100%);
    margin: 0 auto;
    padding: clamp(104px, 10vw, 136px) 0 clamp(176px, 18vw, 218px);
    color: #e8e2d8;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    line-height: 1.78;
}

.house1316-legal-kicker {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 20px !important;
    color: #cba451 !important;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .21em;
    text-transform: uppercase;
}

.house1316-legal-kicker::before {
    content: "";
    width: 42px;
    height: 1px;
    background: linear-gradient(90deg, #8d6827, #d6ad50);
}

body .house1316-legal-wrap h1 {
    max-width: 900px;
    margin: 0 0 18px;
    color: #f3eee5 !important;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(44px, 7vw, 86px);
    font-weight: 400;
    line-height: .98;
    letter-spacing: -.045em;
}

.house1316-legal-effective {
    margin: 0 0 58px !important;
    padding-bottom: 28px;
    border-bottom: 1px solid rgba(214, 173, 80, .24);
    color: rgba(231, 222, 205, .48) !important;
    font-size: 12px;
    letter-spacing: .04em;
}

.house1316-legal-identity {
    margin: -22px 0 52px;
    padding: 18px 20px;
    border: 1px solid rgba(214, 173, 80, .18);
    border-left: 2px solid #c79c42;
    background: rgba(190, 145, 54, .05);
}

body .house1316-legal-wrap .house1316-legal-identity p {
    margin: 4px 0;
    color: rgba(233, 226, 211, .72) !important;
    font-size: 13px;
    line-height: 1.55;
}

body .house1316-legal-wrap .house1316-legal-identity strong {
    color: rgba(242, 234, 218, .88) !important;
}

body .house1316-legal-wrap h2 {
    position: relative;
    margin: 58px 0 18px;
    padding-top: 25px;
    border-top: 1px solid rgba(214, 173, 80, .14);
    color: #e2bd68 !important;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(23px, 3vw, 31px);
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: -.015em;
}

body .house1316-legal-wrap h2::before {
    content: "";
    position: absolute;
    top: -1px;
    left: 0;
    width: 74px;
    height: 1px;
    background: #d6ad50;
}

body .house1316-legal-wrap p,
body .house1316-legal-wrap li {
    color: rgba(235, 229, 218, .82) !important;
}

body .house1316-legal-wrap p {
    margin: 0 0 18px;
}

body .house1316-legal-wrap ul {
    margin: 15px 0 25px;
    padding: 0 0 0 1.1rem;
}

body .house1316-legal-wrap li {
    margin: 9px 0;
    padding-left: 6px;
}

body .house1316-legal-wrap li::marker {
    color: #bd9341;
}

body .house1316-legal-wrap strong {
    color: #f1eadf !important;
    font-weight: 600;
}

body .house1316-legal-wrap a {
    color: #d7b15a !important;
    text-decoration-color: rgba(215,177,90,.42) !important;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
    transition: color .16s ease, text-decoration-color .16s ease;
}

body .house1316-legal-wrap a:hover,
body .house1316-legal-wrap a:focus-visible {
    color: #f1d58d !important;
    text-decoration-color: #f1d58d !important;
    outline: none;
}

/* Top quick-actions dock: Search / Account / Back */
.house1316-legal-topdock {
    position: fixed;
    top: calc(22px + env(safe-area-inset-top, 0px));
    right: calc(24px + env(safe-area-inset-right, 0px));
    z-index: 10030;
    display: flex;
    gap: 9px;
    align-items: center;
}

.admin-bar .house1316-legal-topdock {
    top: calc(54px + env(safe-area-inset-top, 0px));
}

.house1316-legal-action {
    position: relative;
    display: inline-flex;
    min-width: 88px;
    height: 38px;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    border: 1px solid rgba(223,189,107,.24);
    border-radius: 4px;
    background: rgba(9, 9, 9, .66);
    color: rgba(255,255,255,.82) !important;
    box-shadow: 0 8px 26px rgba(0,0,0,.24), inset 0 1px 0 rgba(255,255,255,.025);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    cursor: pointer;
    text-decoration: none !important;
    transition: transform .16s ease, border-color .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease;
}

.house1316-legal-action span {
    display: block;
    font: 500 11px/1 Arial, Helvetica, sans-serif;
    letter-spacing: .17em;
    text-transform: uppercase;
    white-space: nowrap;
}

.house1316-legal-action:hover,
.house1316-legal-action:focus-visible {
    color: #e8c778 !important;
    border-color: rgba(221, 177, 77, .62);
    background: rgba(12, 11, 9, .82);
    box-shadow: 0 10px 32px rgba(0,0,0,.32), 0 0 18px rgba(205,153,51,.12), inset 0 0 0 1px rgba(232,199,120,.05);
    transform: translateY(-1px);
    outline: none;
}

.house1316-legal-action:active {
    transform: translateY(0) scale(.975);
}

/* Bottom floating legal dock */
.house1316-legal-bottomdock {
    position: fixed;
    left: 50%;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    z-index: 10020;
    width: min(1180px, calc(100% - 32px));
    min-height: 72px;
    padding: 14px 18px;
    border: 1px solid rgba(223,189,107,.28);
    border-radius: 18px;
    background: rgba(10,10,10,.92);
    box-shadow: 0 22px 54px rgba(0,0,0,.54), 0 0 36px rgba(202,148,39,.08);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) auto auto;
    gap: 18px 22px;
    align-items: center;
}

.house1316-legal-dock-copy {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 18px;
    min-width: 0;
}

.house1316-legal-dock-copytext,
.house1316-legal-dock-currency span,
.house1316-legal-dock-links a {
    color: rgba(236, 228, 215, .86) !important;
    font: 500 10px/1.3 Arial, Helvetica, sans-serif;
    letter-spacing: .12em;
    text-transform: uppercase;
    text-decoration: none !important;
}

.house1316-legal-dock-copytext {
    color: rgba(236, 228, 215, .72) !important;
}

.house1316-legal-dock-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
}

.house1316-legal-dock-links a {
    color: #ddb764 !important;
}

.house1316-legal-dock-links a:hover,
.house1316-legal-dock-links a:focus-visible {
    color: #f0cf7a !important;
    outline: none;
}

.house1316-legal-dock-currency {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 16px;
    min-height: 40px;
    border: 1px solid rgba(223,189,107,.20);
    border-radius: 999px;
    background: rgba(223,189,107,.07);
}

.house1316-legal-dock-currency span {
    color: rgba(238, 224, 195, .82) !important;
    white-space: nowrap;
}

.house1316-legal-dock-currency span + span::before {
    content: "·";
    margin-right: 10px;
    color: rgba(214,173,80,.56);
}

.house1316-legal-dock-socials {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.house1316-legal-social-link {
    display: inline-flex;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(223,189,107,.20);
    border-radius: 999px;
    background: rgba(223,189,107,.06);
    color: rgba(243, 224, 180, .82) !important;
    text-decoration: none !important;
    transition: color .16s ease, border-color .16s ease, background .16s ease, transform .16s ease;
}

.house1316-legal-social-link svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
    stroke: currentColor;
}

.house1316-legal-social-link:hover,
.house1316-legal-social-link:focus-visible {
    color: #f5da96 !important;
    border-color: rgba(223,189,107,.42);
    background: rgba(223,189,107,.12);
    transform: translateY(-1px);
    outline: none;
}

.house1316-legal-social-link.is-pending {
    opacity: .62;
    cursor: default;
}

/* Search overlay for legal pages */
.house1316-legal-search-panel[hidden] { display: none !important; }

.house1316-legal-search-panel {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: clamp(90px, 16vh, 170px) 24px 24px;
}

.house1316-legal-search-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: rgba(0, 0, 0, .74);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
    cursor: default;
}

.house1316-legal-search-dialog {
    position: relative;
    width: min(680px, 100%);
    padding: 30px;
    border: 1px solid rgba(205, 163, 74, .42);
    border-radius: 18px;
    background: rgba(12, 12, 12, .95);
    box-shadow: 0 24px 70px rgba(0,0,0,.58), 0 0 36px rgba(202,148,39,.08);
}

.house1316-legal-search-close {
    position: absolute;
    top: 10px;
    right: 13px;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #c9a44f;
    font: 300 30px/1 Arial, sans-serif;
    cursor: pointer;
}

.house1316-legal-search-form label {
    display: block;
    margin-bottom: 16px;
    color: #f3dca1;
    font: 600 11px/1 Arial, Helvetica, sans-serif;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.house1316-legal-search-field-wrap {
    display: flex;
    align-items: stretch;
    gap: 10px;
}

.house1316-legal-search-field-wrap input[type="search"] {
    flex: 1 1 auto;
    min-height: 52px;
    padding: 0 18px;
    border: 1px solid rgba(223,189,107,.22);
    border-radius: 12px;
    background: rgba(255,255,255,.03);
    color: #f3eee5;
    font: 400 16px/1.2 Arial, Helvetica, sans-serif;
}

.house1316-legal-search-field-wrap input[type="search"]::placeholder {
    color: rgba(255,255,255,.42);
}

.house1316-legal-search-field-wrap button[type="submit"] {
    width: 56px;
    min-width: 56px;
    border: 1px solid rgba(223,189,107,.26);
    border-radius: 12px;
    background: rgba(223,189,107,.10);
    color: #e9cb84;
    cursor: pointer;
    transition: background .16s ease, color .16s ease, border-color .16s ease, transform .16s ease;
}

.house1316-legal-search-field-wrap button[type="submit"] svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
}

.house1316-legal-search-field-wrap button[type="submit"]:hover,
.house1316-legal-search-field-wrap button[type="submit"]:focus-visible {
    background: rgba(223,189,107,.18);
    border-color: rgba(223,189,107,.44);
    color: #f3da9a;
    transform: translateY(-1px);
    outline: none;
}

/* Keep the global chat above the new bottom dock on legal pages. */
body.house1316-legal-page #house1316-chat-shell {
    bottom: calc(114px + env(safe-area-inset-bottom, 0px));
}

@media (max-width: 1024px) {
    .house1316-legal-bottomdock {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .house1316-legal-dock-socials {
        justify-content: flex-start;
    }
}

@media (max-width: 767px) {
    .house1316-legal-main {
        padding: 0 18px;
    }

    body .house1316-legal-wrap {
        padding: 86px 0 230px;
        font-size: 15px;
        line-height: 1.72;
    }

    body .house1316-legal-wrap h1 {
        font-size: clamp(41px, 13vw, 62px);
    }

    .house1316-legal-effective {
        margin-bottom: 42px !important;
    }

    body .house1316-legal-wrap h2 {
        margin-top: 45px;
    }

    .house1316-legal-identity {
        margin-top: -14px;
        margin-bottom: 38px;
        padding: 14px 15px;
    }

    .house1316-legal-topdock {
        top: calc(12px + env(safe-area-inset-top, 0px));
        right: calc(12px + env(safe-area-inset-right, 0px));
        gap: 7px;
    }

    .admin-bar .house1316-legal-topdock {
        top: calc(46px + env(safe-area-inset-top, 0px));
    }

    .house1316-legal-action {
        min-width: 0;
        height: 36px;
        padding: 0 12px;
    }

    .house1316-legal-action span {
        font-size: 9px;
        letter-spacing: .12em;
    }

    .house1316-legal-bottomdock {
        width: calc(100% - 20px);
        bottom: calc(10px + env(safe-area-inset-bottom, 0px));
        padding: 12px 13px;
        border-radius: 16px;
    }

    .house1316-legal-dock-copy {
        gap: 9px 12px;
    }

    .house1316-legal-dock-copytext,
    .house1316-legal-dock-currency span,
    .house1316-legal-dock-links a {
        font-size: 8px;
        letter-spacing: .08em;
    }

    .house1316-legal-dock-currency {
        justify-content: flex-start;
        padding: 0 12px;
        min-height: 36px;
        flex-wrap: wrap;
    }

    .house1316-legal-social-link {
        width: 32px;
        height: 32px;
    }

    .house1316-legal-social-link svg {
        width: 14px;
        height: 14px;
    }

    .house1316-legal-search-panel {
        padding: 76px 12px 12px;
    }

    .house1316-legal-search-dialog {
        padding: 22px 18px;
        border-radius: 16px;
    }

    .house1316-legal-search-field-wrap {
        gap: 8px;
    }

    .house1316-legal-search-field-wrap input[type="search"] {
        min-height: 48px;
        font-size: 15px;
    }

    .house1316-legal-search-field-wrap button[type="submit"] {
        width: 50px;
        min-width: 50px;
    }

    body.house1316-legal-page #house1316-chat-shell {
        bottom: calc(176px + env(safe-area-inset-bottom, 0px));
        right: calc(12px + env(safe-area-inset-right, 0px));
    }
}


/* v0.5.4: floating controls mount outside the_content / Divi document. */
.house1316-legal-fixed-ui {
    position: relative;
    z-index: 10000;
}

.house1316-legal-fixed-ui .house1316-legal-topdock,
.house1316-legal-fixed-ui .house1316-legal-bottomdock,
.house1316-legal-fixed-ui .house1316-legal-search-panel {
    box-sizing: border-box;
}


/* v0.5.5 reliability polish */
.house1316-legal-action {
    background: rgba(9, 9, 9, .58);
}

.house1316-legal-bottomdock {
    background: rgba(10, 10, 10, .78);
}

.house1316-legal-dock-currency,
.house1316-legal-social-link {
    background: rgba(223,189,107,.05);
}


/* v0.5.6 disable obsolete parallel legal UI.
   The legal pages now use the same proven utility nav/footer as the homepage. */
.house1316-legal-fixed-ui,
.house1316-legal-topdock,
.house1316-legal-bottomdock,
.house1316-legal-search-panel {
    display: none !important;
}
