html {
    scroll-behavior: smooth;
}

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

body {
    margin: 0;
    background: var(--funobi-cream);
    color: var(--funobi-ink);
    font-family: 'Nunito', system-ui, sans-serif;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

body:not(.home) {
    overflow-x: hidden;
}

a {
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Bricolage Grotesque', 'Nunito', sans-serif;
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 0.95;
    margin: 0 0 0.75em;
}

.funobi-site-shell {
    min-height: 100vh;
    position: relative;
}

.funobi-site-shell::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image: radial-gradient(var(--funobi-dot-color) 1.4px, transparent 1.4px);
    background-size: 32px 32px;
    opacity: var(--funobi-dot-opacity);
}

.funobi-site-header,
.funobi-site-footer,
.funobi-page-shell {
    position: relative;
    z-index: 1;
}

.funobi-container {
    width: min(calc(100% - 36px), 1280px);
    margin: 0 auto;
}

.funobi-site-header {
    padding: 24px 0 16px;
}

.funobi-site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.funobi-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: 'Bricolage Grotesque', 'Nunito', sans-serif;
    font-size: 28px;
    font-weight: 800;
    text-decoration: none;
}

.funobi-brand__mark {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    background: var(--funobi-paper);
    border: var(--funobi-border);
    border-radius: 14px;
    box-shadow: var(--funobi-shadow);
    transform: rotate(-6deg);
    overflow: hidden;
}

.funobi-brand__mark-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.funobi-primary-nav,
.funobi-primary-nav > ul {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.funobi-primary-nav {
    justify-content: flex-end;
}

.funobi-primary-nav li,
.funobi-footer-nav li {
    list-style: none;
}

.funobi-primary-nav a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 18px;
    border-radius: 999px;
    font-weight: 800;
    text-decoration: none;
}

.funobi-primary-nav a:hover,
.funobi-primary-nav .current-menu-item > a,
.funobi-primary-nav .current_page_item > a {
    background: var(--funobi-paper);
    border: var(--funobi-border);
    padding: 7px 15px;
}

.funobi-page-shell {
    padding: 12px 0 80px;
}

.funobi-page-hero {
    margin: 16px auto 32px;
    padding: 40px;
    background: var(--funobi-page-hero-background, var(--funobi-sun));
    border: var(--funobi-border);
    border-radius: 40px;
    box-shadow: var(--funobi-shadow-lg);
}

.funobi-kicker,
.funobi-page-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 18px;
    padding: 8px 16px;
    border: var(--funobi-border);
    border-radius: 999px;
    background: var(--funobi-paper);
    box-shadow: 3px 3px 0 0 var(--funobi-ink);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.funobi-page-hero__title {
    font-size: clamp(52px, 7vw, 96px);
    margin-bottom: 16px;
}

.funobi-page-hero__intro {
    max-width: 760px;
    font-size: 22px;
    font-weight: 600;
    line-height: 1.45;
    margin: 0;
}

.funobi-page-body {
    display: grid;
    gap: 28px;
}

.funobi-entry-card {
    max-width: var(--funobi-wide-width);
    margin: 0 auto;
    padding: 36px;
    background: var(--funobi-panel);
    border: var(--funobi-border);
    border-radius: var(--funobi-radius);
    box-shadow: var(--funobi-shadow);
}

.funobi-entry-card > *:first-child {
    margin-top: 0;
}

.funobi-entry-card > *:last-child {
    margin-bottom: 0;
}

.funobi-site-footer {
    margin-top: 48px;
    padding: 56px 0 30px;
    background: var(--funobi-surface-dark);
    color: var(--funobi-surface-dark-ink);
    border-top-left-radius: 40px;
    border-top-right-radius: 40px;
    overflow: hidden;
}

.funobi-site-footer__inner {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 32px;
}

.funobi-site-footer h2,
.funobi-site-footer h3,
.funobi-site-footer h4 {
    margin-bottom: 12px;
}

.funobi-site-footer p,
.funobi-site-footer li,
.funobi-site-footer a {
    font-size: 15px;
    font-weight: 700;
    opacity: 0.92;
}

.funobi-site-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 10px;
}

.funobi-site-footer__meta {
    margin-top: 36px;
    padding-top: 18px;
    border-top: 1px solid var(--funobi-line-soft);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    font-size: 13px;
    font-weight: 700;
    opacity: 0.7;
}

.funobi-language-switcher {
    /* Keep menu-bound. Never change this back to fixed/absolute/sticky. */
    position: static;
    z-index: auto;
    display: inline-flex;
    align-items: center;
    margin-left: 4px;
}

.funobi-language-switcher__select {
    min-height: 40px;
    max-width: 180px;
    padding: 8px 36px 8px 12px;
    border: var(--funobi-border);
    border-radius: 999px;
    background: var(--funobi-panel-strong);
    color: var(--funobi-ink);
    box-shadow: var(--funobi-shadow);
    font: inherit;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.1;
    backdrop-filter: blur(6px);
}

.funobi-theme-switcher {
    position: static;
    z-index: auto;
    display: inline-flex;
    align-items: center;
    margin-left: 4px;
}

.funobi-theme-switcher__button {
    width: 44px;
    height: 44px;
    border: var(--funobi-border);
    border-radius: 999px;
    background: var(--funobi-paper);
    color: var(--funobi-ink);
    display: inline-grid;
    place-items: center;
    box-shadow: 3px 3px 0 0 var(--funobi-ink);
    cursor: pointer;
    padding: 0;
}

.funobi-theme-switcher__button:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 0 var(--funobi-ink);
}

.funobi-theme-switcher__button svg {
    width: 22px;
    height: 22px;
}

.funobi-theme-switcher__button .funobi-theme-switcher__icon--moon {
    display: none;
}

html[data-funobi-theme="dark"] .funobi-theme-switcher__button .funobi-theme-switcher__icon--sun {
    display: none;
}

html[data-funobi-theme="dark"] .funobi-theme-switcher__button .funobi-theme-switcher__icon--moon {
    display: block;
}

@media (prefers-color-scheme: dark) {
    html:not([data-funobi-theme="light"]):not([data-funobi-theme="dark"]) .funobi-theme-switcher__button .funobi-theme-switcher__icon--sun {
        display: none;
    }

    html:not([data-funobi-theme="light"]):not([data-funobi-theme="dark"]) .funobi-theme-switcher__button .funobi-theme-switcher__icon--moon {
        display: block;
    }
}

.wpml-ls-statics-footer,
#lang_sel_footer,
#wpml-als-footer {
    display: none !important;
}

@media (max-width: 900px) {
    .funobi-site-header__inner,
    .funobi-site-footer__inner {
        grid-template-columns: 1fr;
        display: grid;
    }

    .funobi-primary-nav {
        justify-content: flex-start;
    }

    .funobi-page-hero,
    .funobi-entry-card {
        padding: 28px;
    }
}

@media (max-width: 640px) {
    body {
        font-size: 17px;
    }

    .funobi-container {
        width: min(calc(100% - 20px), 1280px);
    }

    .funobi-page-hero {
        padding: 24px;
        border-radius: 28px;
    }

    .funobi-language-switcher__select {
        min-height: 34px;
        max-width: 140px;
        padding: 6px 30px 6px 10px;
    }

    .funobi-page-hero__title {
        font-size: clamp(40px, 12vw, 60px);
    }

    .funobi-page-hero__intro {
        font-size: 17px;
    }

    .funobi-entry-card {
        padding: 22px;
    }
}
