﻿/* ==========================================================================
   Tokens expected from theme.css:
     --brand  --accent  --text  --text-muted  --bg  --surface
     --border  --footer-line  --radius  --shadow  --icon-size
     --font-serif --font-sans --font-mono
   ========================================================================== */

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

body {
    font-family: var(--font-serif);
}

h1, h2, h3, nav, .button, .lang-toggles {
    font-family: var(--font-sans);
}

code, pre, kbd {
    font-family: var(--font-mono);
}

body {
    font-size: large;
    line-height: 1.7;
    color: var(--text);
    background: var(--bg);
}

/* ── HEADINGS ── */
h1 {
    font-size: 2em;
}

h2 {
    font-size: 1.5em;
}

h3 {
    font-size: 1.25em;
}

em {
    font-weight: bold;
    font-style: normal;
    color: var(--brand);
}

a {
    color: var(--brand);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
    color: var(--accent);
}

#sticky-wrap {
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* - header - */
/* ── HEADER ── */
#top-bar {
    background: var(--brand);
}

.top-bar-inner {
    padding: 1em 2em;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1em;
}

.top-bar-inner .logo-img {
    height: 2.5em;
    flex-shrink: 0;
}

.top-bar-inner .hermes-img {
    height: 4em;
    width: 4em;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

/* Sized by its text (flex-basis auto), so extra header items such as
   language toggles wrap onto a new line before the title itself wraps. */
.site-title {
    flex: 1 1 auto;
    min-width: 0;
}

/* Site branding, sized separately from the page heading scale. */
.site-title h1 {
    font-size: 1.4em;
    font-weight: 600;
    color: #fff;
    line-height: 1.3;
}

.site-title p {
    font-size: 0.85em;
    color: rgba(255, 255, 255, 0.72);
    margin-top: 0.2rem;
}

.site-title a {
    color: rgba(255, 255, 255, 0.88);
    text-decoration: none;
}

.site-title a:hover {
    color: #fff;
    text-decoration: underline;
}

/* Optional group of extra header links (e.g. language toggles). */
.lang-toggles {
    display: flex;
    gap: 1em;
}

/* Optional short title: wrap the title in .title-full and .title-short
   spans; the short one replaces the full one on small screens. */
.title-short {
    display: none;
}

/* ── NAV ── */
nav {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    padding: 0 2em;
}

nav a {
    padding: 0.75em 1em;
    color: var(--text-muted);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: color 0.15s, border-color 0.15s;
    white-space: nowrap;
    font-size: 0.85em;
}

nav a:hover,
nav a.active {
    color: var(--brand);
    border-bottom-color: var(--brand);
    text-decoration: none;
}

/* ── MAIN ── */
main {
    margin: 1.5em 4em;
    padding: 2em 2.5em;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: auto;
}

main h2 {
    font-weight: 600;
    color: var(--brand-dark);
    border-bottom: 2px solid var(--accent);
    padding-bottom: 0.5rem;
    margin-bottom: 1em;
    margin-top: 1em;
    clear: both;
}

main p {
    margin-bottom: 1rem;
}

main ul {
    margin: 0.5rem 0 1rem 1.25rem;
}

main li {
    margin-bottom: 0.5em;
}

main img {
    float: right;
    width: 40%;
    max-width: 60%;
    height: auto;
    margin: 0 0 5% 5%;
    border-radius: 5%;
}

/* ── FOOTER ── */
footer {
    margin: 0 4em 2em;
    padding: 1.2em 2.5em 0;
    border-top: 1.5px solid var(--footer-line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    color: var(--text-muted);
    clear: both;
}

.footer-credits {
    font-size: 0.85em;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.footer-credits a {
    color: var(--text-muted);
    text-decoration: none;
}

.footer-credits a:hover {
    color: var(--brand);
    text-decoration: underline;
}

.footer-credits strong {
    font-weight: 600;
    color: var(--text);
}

#talk-form label {
    display: block;
    font-weight: 600;
    color: var(--brand);
    margin-bottom: 1rem;
}

#talk-form input,
#talk-form textarea {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    padding: 0.5rem 0.75rem;
    font: inherit;
    color: var(--text);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

#talk-form input:focus,
#talk-form textarea:focus {
    outline: none;
    border-color: var(--brand);
}

#talk-form button {
    padding: 0.6rem 1.25rem;
    font: inherit;
    color: #fff;
    background: var(--brand);
    border: 0;
    border-radius: var(--radius);
    cursor: pointer;
}

#talk-form button:hover {
    background: var(--accent);
}

/* Map */

.map-container {
    display: flex;
    flex-direction: column;
    height: 30vh;
    width: 40%;
    position: relative;
    z-index: 0;
}

.map {
    background-color: var(--bg);
    width: 100%;
    height: 100%;
    border: 0;
}

/* ── SMALL SCREENS ── */
@media (max-width: 60em) {
    /* Extra header links get their own row. */
    .lang-toggles {
        flex-basis: 100%;
    }

    .title-full {
        display: none;
    }

    .title-short {
        display: inline;
    }

    .top-bar-inner,
    nav {
        padding-left: 1em;
        padding-right: 1em;
    }

    main {
        margin: 1em;
        padding: 1.25em;
    }

    footer {
        margin: 0 1em 2em;
        padding: 1.2em 1.25em 0;
    }
}