/* ============================================================
   Findr — legal & support pages
   Shares the palette and type of the landing page (styles.css).
   ============================================================ */
:root {
    --cream: #f4eee3;
    --cream-2: #efe7d9;
    --paper: #fffdf8;
    --ink: #232b1f;
    --ink-soft: #4a5142;
    --muted: #7b8072;
    --green: #4e6146;
    --green-deep: #3a4733;
    --green-dark: #2c3626;
    --gold: #b98a3c;
    --danger: #a33228;
    --border: rgba(58, 71, 51, 0.12);
    --shadow-sm: 0 2px 10px rgba(44, 54, 38, 0.06);
    --shadow-md: 0 14px 40px rgba(44, 54, 38, 0.12);
    --serif: "Fraunces", Georgia, serif;
    --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --radius: 20px;
    --container: min(880px, calc(100% - 44px));
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; -webkit-text-size-adjust: 100%; overflow-x: hidden; }

body.legal-body {
    font-family: var(--sans);
    color: var(--ink);
    background: var(--cream);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; color: var(--ink); }

.container { width: var(--container); margin: 0 auto; }

/* ---------- Announce bar ---------- */
.announce {
    background: var(--green-dark); color: rgba(255, 255, 255, .85);
    text-align: center; font-size: .82rem; padding: 9px 16px; letter-spacing: .01em;
}
.announce strong { color: #fff; font-weight: 700; }

/* ---------- Nav ---------- */
.nav {
    position: sticky; top: 0; z-index: 40;
    background: rgba(244, 238, 227, 0.9);
    backdrop-filter: saturate(140%) blur(14px);
    -webkit-backdrop-filter: saturate(140%) blur(14px);
    border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; gap: 20px; padding: 13px 0; }
.logo {
    display: inline-flex; align-items: center; gap: 9px;
    font-family: var(--serif); font-weight: 700; font-size: 1.2rem; color: var(--ink);
}
.logo:hover { text-decoration: none; }
.app-icon { width: 30px; height: 30px; border-radius: 8px; }
.nav-wordmark { height: 30px; width: auto; }
.nav-links { display: flex; gap: 22px; margin-left: auto; }
.nav-links a { font-size: .92rem; font-weight: 600; color: var(--ink-soft); }
.nav-links a:hover { color: var(--green); text-decoration: none; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font-family: var(--sans); font-weight: 700; font-size: .9rem; border: none; cursor: pointer;
    border-radius: 999px; padding: 11px 22px; transition: transform .18s ease, background .18s ease;
    background: var(--green); color: #fff;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-ghost { background: var(--paper); color: var(--green-deep); border: 1px solid var(--border); }
.btn-ghost:hover { background: #fff; border-color: var(--green); }
.btn-danger { background: var(--danger); color: #fff; }

/* ---------- Page shell ---------- */
.legal-page, .safety-page { padding: 54px 0 84px; }
.legal-container { width: var(--container); margin: 0 auto; }

/* ---------- Page hero ---------- */
.legal-hero { text-align: center; margin-bottom: 44px; }
.legal-hero-icon {
    width: 68px; height: 68px; margin: 0 auto 20px; border-radius: 20px;
    display: grid; place-items: center; font-size: 1.9rem;
    background: var(--paper); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
.legal-hero h1 { font-size: clamp(2.1rem, 5vw, 3.1rem); }
.updated {
    display: inline-block; margin-top: 14px; font-size: .8rem; font-weight: 700;
    letter-spacing: .06em; text-transform: uppercase; color: var(--gold);
}
.legal-intro { margin-top: 18px; font-size: 1.05rem; color: var(--ink-soft); text-align: left; }

/* ---------- Content cards ---------- */
.legal-card {
    background: var(--paper); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 30px 32px; margin-bottom: 18px; box-shadow: var(--shadow-sm);
}
.legal-card h2 { font-size: 1.35rem; margin-bottom: 12px; }
.legal-card h3 { font-size: 1.05rem; margin: 20px 0 8px; }
.legal-card p { color: var(--ink-soft); margin-bottom: 12px; }
.legal-card p:last-child { margin-bottom: 0; }
.legal-card ul, .legal-card ol { margin: 0 0 12px 20px; color: var(--ink-soft); }
.legal-card li { margin-bottom: 7px; }
.legal-card strong { color: var(--ink); }
.legal-card address { font-style: normal; line-height: 1.75; color: var(--ink-soft); }

.legal-section-heading {
    font-size: 1.7rem; text-align: center; margin: 54px 0 24px;
}

/* Highlighted card (copyright banner) */
.copyright-highlight { background: var(--green-dark); border-color: var(--green-dark); }
.copyright-highlight h2, .copyright-highlight strong { color: #fff; }
.copyright-highlight p { color: rgba(255, 255, 255, .8); }
.copyright-highlight a { color: #cdd9c2; }
.copyright-logo { width: 54px; height: 54px; border-radius: 14px; margin: 0 auto 16px; }

/* ---------- FAQ (details/summary) ---------- */
.faq-list { display: grid; gap: 12px; }
.faq-item {
    background: var(--paper); border: 1px solid var(--border); border-radius: 16px;
    padding: 4px 22px; box-shadow: var(--shadow-sm);
}
.faq-item summary {
    cursor: pointer; list-style: none; padding: 16px 28px 16px 0; position: relative;
    font-family: var(--serif); font-weight: 600; font-size: 1.03rem; color: var(--ink);
}
.faq-item summary::-webkit-details-marker { display: none; }
/* One plus sign that rotates into a cross, so no dash character is needed. */
.faq-item summary::after {
    content: "+"; position: absolute; right: 0; top: 50%; transform: translateY(-50%);
    font-family: var(--sans); font-weight: 700; font-size: 1.2rem; color: var(--green);
    transition: transform .2s ease;
}
.faq-item[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq-item p { color: var(--ink-soft); padding-bottom: 18px; margin: 0; }
.faq-item + .faq-item { margin-top: 0; }

/* ---------- Safety tips grid ---------- */
/* Each grid holds four cards — 320px min keeps them as an even 2x2 instead of 3+1. */
.safety-tips-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; margin-bottom: 18px; }
.safety-tip-card {
    background: var(--paper); border: 1px solid var(--border); border-radius: 18px;
    padding: 24px 22px; box-shadow: var(--shadow-sm);
}
.safety-tip-icon {
    display: grid; place-items: center; width: 46px; height: 46px; border-radius: 13px;
    background: var(--cream-2); font-size: 1.2rem; margin-bottom: 14px;
}
.safety-tip-card h3 { font-size: 1.08rem; margin-bottom: 6px; }
.safety-tip-card p { color: var(--muted); font-size: .93rem; }

/* ---------- Support contact grid ---------- */
.support-contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 18px; }
.support-contact-card {
    display: flex; flex-direction: column; gap: 4px; text-align: center; align-items: center;
    background: var(--paper); border: 1px solid var(--border); border-radius: 18px;
    padding: 26px 20px; box-shadow: var(--shadow-sm); color: var(--ink);
    transition: transform .18s ease, border-color .18s ease;
}
.support-contact-card:hover { text-decoration: none; transform: translateY(-3px); border-color: var(--green); }
.support-contact-icon {
    display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
    background: var(--cream-2); font-size: 1.15rem; margin-bottom: 8px;
}
.support-contact-card strong { font-family: var(--serif); font-size: 1.05rem; }
.support-contact-card span:last-child { color: var(--green); font-size: .9rem; font-weight: 600; }

/* ---------- Emergency card ---------- */
.help-emergency-card {
    background: var(--cream-2); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 34px 32px; margin-top: 40px; text-align: center;
}
.help-emergency-card h2 { font-size: 1.6rem; margin-bottom: 10px; }
.help-emergency-card p { color: var(--ink-soft); max-width: 62ch; margin: 0 auto; }
.help-emergency-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 22px; }

/* ---------- Bottom links ---------- */
.legal-links-row {
    display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: center;
    margin-top: 40px; font-size: .92rem; font-weight: 600; color: var(--muted);
}
.legal-links-row span { color: var(--border); }

/* ---------- Footer ---------- */
.footer-minimal { background: #20281c; color: rgba(255, 255, 255, .68); padding: 30px 0; }
.footer-bottom {
    display: flex; justify-content: space-between; align-items: center; gap: 18px;
    flex-wrap: wrap; font-size: .86rem;
}
.footer-legal-links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-legal-links a { color: rgba(255, 255, 255, .68); font-weight: 600; }
.footer-legal-links a:hover { color: #fff; text-decoration: none; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 700px) {
    .nav-inner { flex-wrap: wrap; gap: 12px; padding: 11px 0; }
    .nav-links { gap: 16px; margin-left: 0; order: 3; width: 100%; }
    .nav-links a { font-size: .88rem; }
    .nav-inner .btn { margin-left: auto; }
    .legal-card { padding: 24px 20px; }
    .legal-page, .safety-page { padding: 36px 0 60px; }
    .footer-bottom { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
    * { scroll-behavior: auto; transition: none !important; }
}

/* ---------- Language switcher ---------- */
.lang {
    display: inline-flex; gap: 2px; flex: none;
    background: var(--cream-2); border-radius: 999px; padding: 3px;
}
.lang a {
    font-size: .76rem; font-weight: 700; letter-spacing: .04em;
    padding: 5px 10px; border-radius: 999px; color: var(--muted);
}
.lang a:hover { color: var(--green-deep); text-decoration: none; }
.lang a.on { background: var(--paper); color: var(--green-deep); box-shadow: var(--shadow-sm); }
