/* =========================================================
   LAKE DISTRICT MORTGAGES — LEGAL PAGES
   Cookie policy + terms and conditions.
   Depends on Switzer + --color-* tokens in header.css.
   Everything is scoped to .ldm-legal. No header/footer styles.
========================================================= */

.ldm-legal {
    --lg-forest: #142B20;
    --lg-forest-hover: #1D3A2B;
    --lg-green-soft: #A9E6BA;
    --lg-tint-mint: #E8F4EB;
    --lg-muted-on-tint: #4B5850;          /* 6.6:1 on mint */
    --lg-green-text: var(--color-primary-dark, #0C602D); /* 7.7:1 on white */
    --lg-radius: 14px;
    --lg-ease: cubic-bezier(.22, .61, .36, 1);

    width: 100%;
    overflow-x: clip;
    background: var(--color-white, #fff);
    color: var(--color-text, #354139);
    font-family: var(--font-primary, "Switzer", Arial, sans-serif);
    -webkit-font-smoothing: antialiased;
}

.ldm-legal *,
.ldm-legal *::before,
.ldm-legal *::after { box-sizing: border-box; }

.ldm-legal-container {
    width: min(100% - 48px, 1080px);
    margin-inline: auto;
}


/* ---------- Header band ---------- */

.ldm-legal-hero {
    position: relative;
    padding: clamp(72px, 9vw, 120px) 0 clamp(64px, 8vw, 104px);
    background:
        radial-gradient(50% 80% at 100% 0%, rgba(169, 230, 186, .34), transparent 70%),
        radial-gradient(40% 70% at 0% 100%, rgba(203, 226, 160, .22), transparent 70%),
        var(--lg-tint-mint);
    text-align: center;
}

.ldm-legal-hero__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 760px;
}

.ldm-legal-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 20px;
    color: var(--lg-green-text);
    font-size: 12px;
    font-weight: var(--font-weight-semibold, 600);
    letter-spacing: .12em;
    line-height: 1.5;
    text-transform: uppercase;
}

.ldm-legal-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    flex: 0 0 7px;
    border-radius: 50%;
    background: var(--color-primary, #11823B);
}

.ldm-legal-title {
    margin: 0;
    color: var(--color-heading, #19251E);
    font-size: clamp(40px, 5.2vw, 64px);
    font-weight: var(--font-weight-semibold, 600);
    letter-spacing: -.055em;
    line-height: 1.06;
    text-wrap: balance;
}

.ldm-legal-stop {
    color: var(--color-primary, #11823B);
    letter-spacing: 0;
}

.ldm-legal-lead {
    max-width: 640px;
    margin: 22px 0 0;
    color: var(--lg-muted-on-tint);
    font-size: 17px;
    line-height: 1.75;
    text-wrap: pretty;
}


/* ---------- Accordion stack ---------- */

.ldm-legal-body {
    padding: clamp(56px, 7vw, 96px) 0 clamp(80px, 9vw, 130px);
}

.ldm-legal-acc {
    display: flex;
    flex-direction: column;
    gap: 3px;
    border-radius: var(--lg-radius);
    overflow: hidden;           /* rounds the first and last panel only */
}

.ldm-legal-acc__item {
    background: var(--lg-forest);
    scroll-margin-top: 120px;   /* clears the sticky header when jumped to */
}

.ldm-legal-acc__summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 64px;
    padding: 18px clamp(20px, 3vw, 30px);
    color: #fff;
    cursor: pointer;
    list-style: none;
    transition: background-color .25s var(--lg-ease);
}

.ldm-legal-acc__summary::-webkit-details-marker { display: none; }
.ldm-legal-acc__summary::marker { content: ""; }

.ldm-legal-acc__summary:hover { background: var(--lg-forest-hover); }

.ldm-legal-acc__summary:focus-visible {
    outline: 2px solid var(--lg-green-soft);
    outline-offset: -4px;
    border-radius: 6px;
}

.ldm-legal-acc__heading {
    font-size: 17px;
    font-weight: var(--font-weight-semibold, 600);
    letter-spacing: -.01em;
    line-height: 1.4;
}

.ldm-legal-acc__icon {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    fill: none;
    stroke: var(--lg-green-soft);
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform .32s var(--lg-ease);
}

.ldm-legal-acc__item[open] > .ldm-legal-acc__summary .ldm-legal-acc__icon { transform: rotate(90deg); }

/* While closing (JS), the chevron turns back straight away */
.ldm-legal-acc__item[data-legal-closing] > .ldm-legal-acc__summary .ldm-legal-acc__icon { transform: rotate(0); }

.ldm-legal-acc__panel {
    overflow: hidden;
    background: #fff;
    border-inline: 1px solid var(--color-border, #E4EAE5);
}

.ldm-legal-acc__item:last-child .ldm-legal-acc__panel {
    border-bottom: 1px solid var(--color-border, #E4EAE5);
    border-radius: 0 0 var(--lg-radius) var(--lg-radius);
}


/* ---------- Panel content ---------- */

.ldm-legal-acc__content {
    max-width: 860px;
    padding: clamp(26px, 3.4vw, 40px) clamp(20px, 3.4vw, 40px) clamp(30px, 3.6vw, 44px);
    font-size: 16px;
    line-height: 1.75;
}

.ldm-legal-acc__content > :first-child { margin-top: 0; }
.ldm-legal-acc__content > :last-child { margin-bottom: 0; }

.ldm-legal-acc__content p {
    margin: 0 0 16px;
    text-wrap: pretty;
}

.ldm-legal-acc__content h3 {
    margin: 30px 0 10px;
    color: var(--color-heading, #19251E);
    font-size: 18px;
    font-weight: var(--font-weight-semibold, 600);
    letter-spacing: -.02em;
    line-height: 1.35;
}

.ldm-legal-acc__content ul {
    display: grid;
    gap: 10px;
    margin: 0 0 18px;
    padding: 0;
    list-style: none;
}

.ldm-legal-acc__content li {
    position: relative;
    padding-left: 22px;
}

.ldm-legal-acc__content li::before {
    content: "";
    position: absolute;
    top: .72em;
    left: 2px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--color-primary, #11823B);
}

.ldm-legal-acc__content a {
    color: var(--lg-green-text);
    font-weight: var(--font-weight-medium, 500);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: color .2s ease;
}

.ldm-legal-acc__content a:hover { color: var(--color-heading, #19251E); }

.ldm-legal-acc__content a:focus-visible {
    outline: 2px solid var(--color-primary, #11823B);
    outline-offset: 3px;
    border-radius: 2px;
}

.ldm-legal-warning {
    padding: 16px 20px;
    border-left: 3px solid var(--color-primary, #11823B);
    border-radius: 0 10px 10px 0;
    background: var(--lg-tint-mint);
    color: var(--color-heading, #19251E);
    font-weight: var(--font-weight-semibold, 600);
}


/* ---------- Mobile ---------- */

@media (max-width: 600px) {
    .ldm-legal-container { width: min(100% - 32px, 1080px); }
    .ldm-legal-lead { font-size: 16px; }
    .ldm-legal-acc { border-radius: 12px; }
    .ldm-legal-acc__summary { min-height: 58px; padding: 16px 18px; }
    .ldm-legal-acc__heading { font-size: 16px; }
    .ldm-legal-acc__content { font-size: 15.5px; }
}

@media (prefers-reduced-motion: reduce) {
    .ldm-legal-acc__summary,
    .ldm-legal-acc__icon { transition: none; }
}