/*
 * a-web-style.css – design of the public Language Index website
 * (/en/services/ and later pages and languages). Shared by all website
 * pages; the website is not copied into version folders.
 * Colours: Language Index colour code (_laindex/_README.md).
 * Desktop first, also usable on phones.
 *
 * 1. Colours, fonts, sizes
 * 2. Base
 * 3. Header and footer
 * 4. Intro
 * 5. Cards (target groups)
 * 6. Levels and languages
 * 7. FAQ
 * 8. Small screens
 */

/* ---------------------------------------------------------------------
   1. Colours, fonts, sizes
   --------------------------------------------------------------------- */
@font-face {
    font-family: "Noto Serif";
    src: url("/assets/fonts/noto-serif-regular.woff2") format("woff2");
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: "Noto Serif";
    src: url("/assets/fonts/noto-serif-700.woff2") format("woff2");
    font-weight: 700;
    font-display: swap;
}

:root {
    --font-text: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --font-heading: "Noto Serif", Georgia, serif;

    --page-bg: #ffffff;
    --text: #2e2a28;
    --muted: #6b6662;            /* secondary text */
    --line: #d6cfc4;
    --heading: #b5451f;          /* rust: headings, level codes */
    --light: #f8f6f2;            /* background 1: at rest (cards, closed questions) */
    --warm-grey: #efeae3;        /* background 2: active (question under the mouse or open) */
    --camel: #e8c48f;            /* small accents */

    /* Links: blue, dark blue with a thicker underline under the mouse */
    --link: #0b5cad;
    --link-hover: #094c8f;
    --link-line: 1px;
    --link-line-hover: 2px;
    --focus: #0b5cad;

    --flag-line: #d6cfc4;        /* thin edge of flags (white parts stay visible) */

    --radius: 6px;
    --width: 1040px;             /* maximum width of the content */
}

/* ---------------------------------------------------------------------
   2. Base
   --------------------------------------------------------------------- */
* {
    box-sizing: border-box;
}
body {
    margin: 0;
    background-color: var(--page-bg);
    color: var(--text);
    font-family: var(--font-text);
    font-size: 17px;
    line-height: 1.6;
}
.wrap {
    width: 100%;
    max-width: var(--width);
    margin: 0 auto;
    padding: 0 16px;
}
h1,
h2,
h3 {
    font-family: var(--font-heading);
    color: var(--heading);
    line-height: 1.25;
    font-weight: 700;
}
h1 {
    font-size: 2.1em;
    margin: 40px 0 16px;
}
h2 {
    font-size: 1.45em;
    margin: 48px 0 14px;
}
h3 {
    font-size: 1.15em;
    margin: 0 0 10px;
}
p {
    margin: 0 0 14px;
}
a {
    color: var(--link);
    text-decoration-thickness: var(--link-line);
    text-underline-offset: 0.2em;
}
a:hover,
a:focus-visible {
    color: var(--link-hover);
    text-decoration-thickness: var(--link-line-hover);
}
:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
}

/* ---------------------------------------------------------------------
   3. Header and footer
   --------------------------------------------------------------------- */
header.top {
    border-bottom: 1px solid var(--line);
}
header.top .wrap {
    display: flex;
    align-items: center;
    min-height: 72px;
}
.logo {
    display: block;
    height: 34px;
    width: auto;
}
footer.bottom {
    margin-top: 60px;
    padding: 22px 0;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.85em;
}
footer.bottom p {
    margin: 0 0 4px;
}

/* ---------------------------------------------------------------------
   4. Intro: band with the background image of the home page (very
   light, so the text stays readable), larger first paragraph, short
   facts in a row
   --------------------------------------------------------------------- */
.hero {
    padding: 24px 0 44px;
    border-bottom: 1px solid var(--line);
    background-color: var(--page-bg);
    background-image: url("/assets/img/li-bg-2.jpg");
    background-position: 50% 10%;
    background-size: cover;
    background-repeat: no-repeat;
}
.claim {
    margin: 0;
    color: var(--muted);
    font-size: 0.85em;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.hero h1 {
    margin-top: 10px;
}
.lead {
    max-width: 760px;
    font-size: 1.15em;
}
.facts {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 22px 0 0;
    padding: 0;
    list-style: none;
}
.facts li {
    padding: 6px 14px;
    border: 1px solid var(--line);
    border-left: 4px solid var(--camel);
    border-radius: 0;
    background-color: var(--light);
    font-size: 0.92em;
}

/* Flag after a language or country name (/assets/img/flags/, 4×3):
   16×12 px, on the line of the text, thin edge */
.flag {
    width: 16px;
    height: 12px;
    margin-left: 5px;
    vertical-align: -1px;
    outline: 1px solid var(--flag-line);
}

/* ---------------------------------------------------------------------
   5. Cards: one per target group, side by side
   --------------------------------------------------------------------- */
.cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}
.card {
    padding: 20px 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background-color: var(--light);
}
.card ul {
    margin: 0;
    padding-left: 1.2em;
}
.card li {
    margin-bottom: 6px;
}

/* ---------------------------------------------------------------------
   6. Levels and languages
   --------------------------------------------------------------------- */
.levels {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px 18px;
    margin: 0;
}
.levels div {
    padding: 12px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
}
.levels dt {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--heading);
}
.levels dd {
    margin: 0;
    color: var(--muted);
    font-size: 0.95em;
}

/* ---------------------------------------------------------------------
   7. FAQ: one question per box; question light at rest, warm grey under
   the mouse or open; answer white (no JavaScript needed)
   --------------------------------------------------------------------- */
.faq details {
    margin: 8px 0;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background-color: var(--page-bg);
    overflow: hidden;            /* question background keeps the round corners */
}
.faq summary {
    padding: 12px 16px;
    font-weight: bold;
    cursor: pointer;
    background-color: var(--light);
}
.faq summary:hover,
.faq details[open] summary {
    background-color: var(--warm-grey);
}
.faq details p {
    margin: 0;
    padding: 12px 16px 14px;
}

/* Contact note */
.note {
    padding: 14px 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background-color: var(--light);
}

/* ---------------------------------------------------------------------
   8. Small screens
   --------------------------------------------------------------------- */
@media (max-width: 860px) {
    .cards,
    .levels {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 600px) {
    body {
        font-size: 16px;
    }
    h1 {
        font-size: 1.7em;
        margin-top: 28px;
    }
}
