/* ===================================================================
   Kai — Shinrin-yoku (Forest Bathing) Theme
   Colors of moss, ancient cedar, aged stone, and morning mist.
=================================================================== */

/* --- CSS Custom Properties ----------------------------------- */

:root {
    /* Forest palette */
    --color-forest-deep: #1a2818;
    --color-forest: #2d4828;
    --color-moss: #3d5c35;
    --color-moss-mid: #557a4a;
    --color-sage: #7fa370;
    --color-sage-light: #b8d4ae;

    /* Stone & earth */
    --color-bark: #7a5c38;
    --color-gold: #b08d3c;
    --color-stone: #6b6860;
    --color-stone-light: #9b9890;

    /* Paper & mist */
    --color-parchment: #f2ede3;
    --color-paper: #faf8f2;
    --color-fog: #ffffff;
    --color-border: #d4cec2;
    --color-border-light: #e8e3d8;

    /* Text */
    --color-text: #1e2b1d;
    --color-text-muted: #6b6860;
    --color-text-dim: #9b9890;
}

/* --- Reset & Base -------------------------------------------- */

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

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: "Lora", Georgia, "Times New Roman", serif;
    background: var(--color-parchment);
    color: var(--color-text);
    line-height: 1.7;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

img,
svg {
    max-width: 100%;
    display: block;
}

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

a:hover {
    color: var(--color-forest);
}

h1,
h2,
h3,
h4 {
    font-family: "Shippori Mincho B1", "Noto Serif JP", Georgia, serif;
    line-height: 1.25;
    font-weight: 600;
    color: var(--color-forest-deep);
}

/* --- Layout helpers ------------------------------------------ */

.container {
    width: 100%;
    max-width: 1100px;
    margin-inline: auto;
    padding-inline: 1.25rem;
}

/* --- Buttons ------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1.2rem;
    border-radius: 4px;
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: "Lora", Georgia, serif;
    text-decoration: none;
    cursor: pointer;
    border: 1.5px solid transparent;
    transition:
        background 0.2s,
        border-color 0.2s,
        color 0.2s;
    letter-spacing: 0.01em;
}

.btn--primary {
    background: var(--color-moss);
    color: var(--color-paper);
    border-color: var(--color-moss);
}

.btn--primary:hover {
    background: var(--color-forest);
    border-color: var(--color-forest);
    color: var(--color-paper);
}

.btn--ghost {
    background: transparent;
    color: var(--color-moss);
    border-color: var(--color-moss);
}

.btn--ghost:hover {
    background: rgba(61, 92, 53, 0.07);
    color: var(--color-forest);
}

.btn--lg {
    padding: 0.75rem 1.75rem;
    font-size: 1.0625rem;
}

.btn--sm {
    padding: 0.35rem 0.85rem;
    font-size: 0.875rem;
}

.btn--full {
    width: 100%;
    justify-content: center;
}

button.btn {
    font-family: "Lora", Georgia, serif;
    font-size: inherit;
    line-height: inherit;
}

.btn--danger {
    background: transparent;
    color: #9a3020;
    border-color: #9a3020;
}

.btn--danger:hover {
    background: #f0e8e4;
}

.btn-link {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    font-size: 0.8125rem;
    text-decoration: underline;
}

.btn-link--danger {
    color: #9a3020;
}

/* --- Navigation ---------------------------------------------- */

.site-header {
    border-bottom: 1px solid var(--color-border);
    background: var(--color-paper);
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 1px 8px rgba(26, 40, 24, 0.06);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 3.5rem;
    gap: 1rem;
}

.nav__brand {
    font-family: "Shippori Mincho B1", Georgia, serif;
    font-size: 1.375rem;
    font-weight: 800;
    color: var(--color-forest);
    text-decoration: none;
    letter-spacing: -0.01em;
    text-align: left;
}

.nav__brand:hover {
    color: var(--color-forest-deep);
}

.nav__links {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav__links a {
    text-decoration: none;
    font-weight: 600;
    color: var(--color-stone);
    font-size: 0.9375rem;
    transition: color 0.15s;
}

.nav__links a:hover {
    color: var(--color-moss);
}

.inline-form {
    display: inline;
}

/* --- Flash messages ------------------------------------------ */

.flash {
    padding: 0.75rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 500;
    text-align: center;
}

.flash--success {
    background: #e4ede0;
    color: #2d4828;
    border-bottom: 1px solid #c0d8b8;
}

.flash--error {
    background: #f0e8e4;
    color: #6b2c1a;
    border-bottom: 1px solid #d9beba;
}

.flash--info {
    background: #e8ece6;
    color: #3a4a38;
    border-bottom: 1px solid #c4cec0;
}

/* --- Keyboard focus ring ------------------------------------ */

a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 2.5px solid var(--color-moss);
    outline-offset: 2px;
    border-radius: 3px;
}

/* --- sr-only (screen reader only) ---------------------------- */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* --- Footer -------------------------------------------------- */

.site-footer {
    border-top: 1px solid var(--color-border);
    padding: 1.5rem 0;
    color: var(--color-stone);
    font-size: 0.875rem;
    text-align: center;
    margin-top: auto;
    background: var(--color-paper);
    font-style: italic;
}

.site-footer .container {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.site-footer__actions {
    display: flex;
    gap: 0.5rem;
}

@media (max-width: 768px) {
    .site-footer .container {
        flex-direction: column;
    }
    .site-footer__actions {
        flex-direction: column;
    }
}
