/* LexiLearn site styles: implements DESIGN.md ("The Reading Room").
   Shared by About Us and FAQ. The landing page still carries its own inline copy. */

:root {
    --green: #4a9d6f;
    --green-deep: #2d5a3d;
    --green-ink: #17301f;
    --green-hover: #234a31;
    --tint: #f4f9f6;
    --tint-line: #d9e8df;
    --ink: #1d2823;
    --muted: #52605a;
    --line: #e1e7e3;
    --nav-h: 72px;
    --footer-h: 72px;
    --pad: clamp(1.25rem, 4vw, 3rem);
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --display: 'Poppins', system-ui, sans-serif;
    --body: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

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

@media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: var(--body);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--ink);
    background: #fff;
    overflow-x: hidden;
    scrollbar-color: var(--green) var(--tint);
}
main { flex: 1; }

::selection { background: var(--tint-line); color: var(--green-ink); }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; border-radius: 4px; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; }

h1, h2, h3 {
    font-family: var(--display);
    font-weight: 700;
    color: var(--green-deep);
    text-wrap: balance;
}
h1 {
    font-size: clamp(2rem, 1.2rem + 2.8vw, 3.2rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
}
h2 {
    font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.1rem);
    line-height: 1.15;
    letter-spacing: -0.015em;
}

.wrap {
    width: 100%;
    max-width: 1120px;
    margin-inline: auto;
    padding-inline: var(--pad);
}

.lede {
    font-size: clamp(1.05rem, 1rem + 0.35vw, 1.25rem);
    color: var(--muted);
    max-width: 34rem;
}

/* ---------- Buttons and links ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 1.6rem;
    border-radius: 10px;
    background: var(--green-deep);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    transition: background-color 0.2s var(--ease);
}
.btn:hover { background: var(--green-hover); }

.text-link {
    color: var(--green-deep);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-color: var(--tint-line);
    text-decoration-thickness: 2px;
    text-underline-offset: 5px;
    transition: text-decoration-color 0.2s;
}
.text-link:hover { text-decoration-color: var(--green); }

/* ---------- Nav ---------- */
.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--nav-h);
    background: rgba(255, 255, 255, 0.72);
    -webkit-backdrop-filter: saturate(1.6) blur(16px);
    backdrop-filter: saturate(1.6) blur(16px);
}
.nav-inner {
    height: 100%;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1.5rem;
}
.brand {
    justify-self: start;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
    font-weight: 800;
    font-size: 1.3rem;
    letter-spacing: -0.01em;
    color: var(--green-deep);
}
.brand-mark {
    width: 40px;
    height: 40px;
    background: var(--green-deep);
    -webkit-mask: var(--logo) center / contain no-repeat;
    mask: var(--logo) center / contain no-repeat;
}
.menu { display: contents; }
.menu-center { display: flex; align-items: center; gap: 0.5rem; }
.home-btn {
    flex: none;
    position: relative;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(23, 48, 31, 0.05);
    color: var(--green-deep);
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
}
.home-btn:hover { background: var(--green-deep); color: #fff; }
.home-btn svg { width: 20px; height: 20px; }
.home-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}
.menu-links {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    padding: 0.25rem;
    border-radius: 999px;
    background: rgba(23, 48, 31, 0.05);
}
.menu-links a {
    padding: 0.45rem 0.95rem;
    border-radius: 999px;
    color: var(--muted);
    font-weight: 600;
    font-size: 0.92rem;
    text-decoration: none;
    transition: color 0.2s, background-color 0.2s, box-shadow 0.2s;
}
.menu-links a:hover { color: var(--green-deep); }
.menu-links a.active {
    background: #fff;
    color: var(--green-deep);
    box-shadow: 0 1px 2px rgba(23, 48, 31, 0.12);
}
.menu-actions {
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.menu-actions .login {
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    color: var(--muted);
    font-weight: 600;
    font-size: 0.92rem;
    text-decoration: none;
    transition: color 0.2s;
}
.menu-actions .login:hover { color: var(--green-deep); }
.menu-actions .btn { padding: 0.55rem 1.2rem; font-size: 0.92rem; border-radius: 999px; }
.menu-btn {
    display: none;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    background: var(--tint);
    border: 0;
    border-radius: 999px;
    color: var(--green-deep);
    cursor: pointer;
}
.menu-btn svg { width: 22px; height: 22px; }

/* ---------- Page ---------- */
.page { padding-block: clamp(2.5rem, 8vh, 5rem) clamp(3rem, 9vh, 6rem); }
.page-narrow { max-width: 760px; margin-inline: auto; }
.page-head { margin-bottom: clamp(2rem, 6vh, 3.5rem); }
.page-head h1 { margin-bottom: 1rem; max-width: 22ch; }

/* ---------- Footer ---------- */
footer { min-height: var(--footer-h); background: var(--green-ink); color: #fff; }
.footer-inner {
    min-height: var(--footer-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    font-size: 0.92rem;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
.footer-links a { color: #fff; text-underline-offset: 4px; }

@media (max-width: 900px) {
    .nav-inner { display: flex; justify-content: space-between; }
    .menu-btn { display: inline-flex; }
    .menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0.75rem;
        padding: 0.75rem var(--pad) 1.25rem;
        background: #fff;
        box-shadow: 0 16px 28px rgba(23, 48, 31, 0.08);
    }
    .menu.open { display: flex; }
    .menu-center { flex-direction: column; align-items: stretch; gap: 0.25rem; }
    .home-btn {
        width: auto;
        height: auto;
        display: flex;
        justify-content: flex-start;
        gap: 0.7rem;
        padding: 0.8rem 0.6rem;
        border-radius: 10px;
        background: none;
        font-weight: 600;
        color: var(--muted);
    }
    .home-btn:hover { background: var(--tint); color: var(--green-deep); }
    .home-label { position: static; width: auto; height: auto; overflow: visible; clip-path: none; font-size: 1rem; }
    .menu-links { flex-direction: column; align-items: stretch; padding: 0; border-radius: 0; background: none; }
    .menu-links a { padding: 0.8rem 0.6rem; border-radius: 10px; font-size: 1rem; }
    .menu-links a.active { background: var(--tint); box-shadow: none; }
    .menu-actions { justify-content: space-between; padding-top: 0.5rem; }
}

@media (max-width: 560px) {
    .footer-inner { padding-block: 1rem; }
}
