/*
Theme Name: Metaesthetics Child
Template: twentytwentyfour
Description: Brand customization for the Metaesthetics WordPress install at /suisse. Mirrors the Next.js header/footer design.
Version: 1.2.0
Author: Metaesthetics
Text Domain: metaesthetics-child
*/

:root {
    /* Header colors — taken from Next.js Header.module.scss */
    --brand-link: #766658;          /* nav link default ($pro-text-soft) */
    --brand-ink: #67574a;           /* link hover, Download App bg ($ink) */
    --brand-ink-medium: #514239;    /* button hover bg ($ink-2) */
    --brand-ink-deep: #3d3128;      /* footer bg ($ink-3) */

    --brand-brown: #a48a76;         /* primary brand brown */
    --brand-body: #67574a;          /* page body text */
    --brand-line: #e8e0d6;          /* hairlines */

    --container-max: 1440px;
}

/* Prevent any wide element (parent-theme content wrapper, oversized image,
   etc.) from forcing horizontal scroll. */
*, *::before, *::after { box-sizing: border-box; }

html, body {
    max-width: 100%;
    overflow-x: hidden;
}

/* Page body — white, body-brown text, Google Sans matching the Next.js site */
body {
    background: #ffffff;
    color: var(--brand-body);
    margin: 0;
    font-family: 'Google Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Focus rings — hide on mouse click, keep for keyboard nav (accessibility).
   :focus-visible fires only when focus came from keyboard. */
:focus { outline: none; }
:focus-visible {
    outline: 2px solid var(--brand-brown);
    outline-offset: 2px;
    border-radius: 2px;
}

/* ============================================================
   SHORTCODE LISTS — default (page body) styling
   ============================================================ */
.suisse-cities,
.suisse-blogs {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* ============================================================
   CITIES — pill buttons on body, vertical list in footer
   (footer override is further down)
   ============================================================ */
.suisse-cities {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 24px 0 0;
    padding: 0;
    list-style: none;
}

.suisse-cities li {
    list-style: none;
}

.suisse-cities a {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    background: #ffffff;
    border: 1px solid var(--brand-line);
    border-radius: 999px;
    color: var(--brand-body);
    text-decoration: none;
    font-size: 14.5px;
    font-weight: 500;
    transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.12s;
}

.suisse-cities a:hover {
    background: var(--brand-brown);
    color: #ffffff;
    border-color: var(--brand-brown);
}

.suisse-cities a:active { transform: translateY(1px); }

/* ============================================================
   BLOG GRID — card layout on the home page
   ============================================================ */
.suisse-blogs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
    margin: 24px 0 0;
    padding: 0;
    list-style: none;
}

.suisse-blogs__card {
    background: #ffffff;
    border: 1px solid var(--brand-line);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.suisse-blogs__card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px -16px rgba(103, 87, 74, 0.25);
    border-color: rgba(164, 138, 118, 0.4);
}

.suisse-blogs__card a {
    display: block;
    text-decoration: none;
    color: inherit;
}

.suisse-blogs__img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    background: var(--brand-line);
}

.suisse-blogs__img--empty {
    background: linear-gradient(135deg, var(--brand-line), #f0e9df);
}

.suisse-blogs__body {
    padding: 18px 18px 22px;
}

.suisse-blogs__date {
    display: block;
    font-size: 11.5px;
    color: var(--brand-link);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.suisse-blogs__title {
    font-size: 17px;
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 8px;
    color: var(--brand-ink);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.suisse-blogs__excerpt {
    font-size: 14px;
    color: var(--brand-link);
    line-height: 1.55;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============================================================
   ARTICLE TABLES — horizontal scroll on narrow viewports.
   The .table-wrapper is injected by the_content filter in the
   mu-plugin so individual posts don't need to be edited.
   ============================================================ */
.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    /* margin: 28px 0; */
    border: 1px solid var(--brand-line);
    border-radius: 8px;
    background: #ffffff;
}

.table-wrapper table {
    width: 100%;
    min-width: 640px;
    margin: 0;
    border-collapse: collapse;
    font-size: 14px;
}

.table-wrapper th,
.table-wrapper td {
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid var(--brand-line);
    vertical-align: top;
    line-height: 1.5;
}

.table-wrapper thead th {
    background: var(--brand-cream);
    color: var(--brand-ink);
    font-weight: 600;
    font-size: 12.5px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 2px solid var(--brand-line);
    white-space: nowrap;
}

.table-wrapper tbody tr:last-child td {
    border-bottom: none;
}

.table-wrapper tbody tr:nth-child(even) {
    background: rgba(164, 138, 118, 0.04);
}

.table-wrapper tbody tr:hover {
    background: rgba(164, 138, 118, 0.09);
}

/* ============================================================
   ARTICLE CONTENT — section numbers, editorial footer
   ============================================================ */

/* Numbered badge above each <h2> in article body.
   Source HTML uses two class names interchangeably across cities
   (section-num and section-number) — match both. */
.entry-content .section-num,
.entry-content .section-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--brand-cream);
    color: var(--brand-brown);
    border: 1px solid var(--brand-line);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    margin: 56px 0 12px;
    line-height: 1;
}

.entry-content .section-num + h2,
.entry-content .section-number + h2 {
    margin-top: 0;
}

/* Internal editorial blocks — "Alternatives H1" etc. left over from
   the source HTML. Styled as a soft note, NOT hidden by default; if
   you'd rather hide them from public view, change display to none. */
.entry-content .h1-alt {
    margin: 32px 0;
    padding: 14px 18px;
    background: var(--brand-cream);
    border-left: 3px solid var(--brand-brown);
    border-radius: 0 6px 6px 0;
    font-size: 13.5px;
    color: var(--brand-link);
    line-height: 1.55;
}

.entry-content .h1-alt strong {
    display: block;
    color: var(--brand-ink);
    margin-bottom: 6px;
    font-size: 11.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* Editorial footer at end of article. Constrained to the same width as
   content because some article HTML files have a stray </div> that
   knocks the footer out of WP's content-width container. */
.entry-content footer {
    max-width: 1100px;
    margin: 64px auto 0;
    padding-top: 32px;
    border-top: 1px solid var(--brand-line);
}

.entry-content footer p {
    font-size: 13.5px;
    color: var(--brand-link);
    line-height: 1.6;
    margin: 0 0 12px;
}

.entry-content footer p:last-child {
    margin-bottom: 0;
}

.entry-content footer .disclaimer {
    font-size: 12.5px;
    font-style: italic;
    opacity: 0.85;
}

/* ============================================================
   HEADER
   ============================================================ */
.meta-header {
    background: #ffffff;
    border-bottom: 1px solid var(--brand-line);
    position: sticky;
    top: 0;
    z-index: 100;
}

.meta-header__inner {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 16px;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    position: relative;
}

@media (min-width: 768px) {
    .meta-header__inner { padding: 0 32px; }
}

.meta-header__brand {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--brand-ink);
    white-space: nowrap;
    transition: opacity 0.15s;
}

.meta-header__brand:hover { opacity: 0.85; }

.meta-header__brand-icon  { height: 32px; width: auto; display: block; }
.meta-header__brand-wordmark { height: 18px; width: auto; display: block; }

/* drawer wraps nav + actions. display:contents on desktop = children participate in parent flex */
.meta-header__drawer {
    display: contents;
}

.meta-header__nav {
    display: flex;
    gap: 32px;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.meta-header__nav a {
    color: var(--brand-link);
    text-decoration: none;
    font-size: 14.5px;
    font-weight: 500;
    white-space: nowrap;
    transition: color 0.15s;
}

.meta-header__nav a:hover { color: var(--brand-ink); }

.meta-header__actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.meta-header__cta {
    background: var(--brand-ink);
    color: #fff;
    text-decoration: none;
    padding: 10px 18px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    box-shadow: 0 1px 0 rgba(255,255,255,0.08) inset, 0 4px 14px -4px rgba(103,87,74,0.4);
    transition: background 0.15s, box-shadow 0.15s, transform 0.12s;
}

.meta-header__cta:hover {
    background: var(--brand-ink-medium);
    color: #fff;
    box-shadow: 0 1px 0 rgba(255,255,255,0.08) inset, 0 6px 18px -4px rgba(103,87,74,0.5);
}

.meta-header__cta:active { transform: translateY(1px); }

/* hidden checkbox toggle */
.meta-header__menu-toggle {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.meta-header__menu-btn {
    display: none;
    cursor: pointer;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;
    background: transparent;
    border: none;
}

.meta-header__menu-btn .bar {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--brand-ink);
    transition: transform 0.2s, opacity 0.2s;
    transform-origin: center;
}

/* -- Mobile (≤ 991px) -- */
@media (max-width: 991px) {
    .meta-header__menu-btn { display: inline-flex; }

    .meta-header__drawer {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #ffffff;
        padding: 12px 16px 20px;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        border-bottom: 1px solid var(--brand-line);
        box-shadow: 0 8px 24px -12px rgba(0,0,0,0.08);
    }

    .meta-header__nav {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    .meta-header__nav a {
        padding: 14px 4px;
        font-size: 16px;
        border-bottom: 1px solid var(--brand-line);
    }

    .meta-header__nav a:last-child { border-bottom: none; }

    .meta-header__actions {
        flex-direction: column;
        align-items: stretch;
        margin-top: 16px;
    }

    .meta-header__cta {
        justify-content: center;
        padding: 14px 18px;
    }

    /* open state */
    .meta-header__menu-toggle:checked ~ .meta-header__inner .meta-header__drawer {
        display: flex;
    }

    .meta-header__menu-toggle:checked ~ .meta-header__inner .meta-header__menu-btn .bar:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }
    .meta-header__menu-toggle:checked ~ .meta-header__inner .meta-header__menu-btn .bar:nth-child(2) {
        opacity: 0;
    }
    .meta-header__menu-toggle:checked ~ .meta-header__inner .meta-header__menu-btn .bar:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
    }
}

/* ============================================================
   FOOTER
   ============================================================ */
.meta-footer {
    background: var(--brand-ink-deep);
    color: rgba(255,255,255,0.7);
    padding: 70px 0 40px;
}

.meta-footer__inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}

@media (min-width: 768px) {
    .meta-footer__inner { padding: 0 32px; }
}

.meta-footer__grid {
    display: grid;
    grid-template-columns: 1.6fr repeat(5, 1fr);
    gap: 40px;
    padding-bottom: 50px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

@media (max-width: 1199px) {
    .meta-footer__grid {
        grid-template-columns: 1.4fr repeat(2, 1fr);
        gap: 32px;
    }
}

@media (max-width: 767px) {
    .meta-footer__grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
        padding-bottom: 36px;
    }
    .meta-footer__brand-col { grid-column: 1 / -1; }
}

@media (max-width: 575px) {
    .meta-footer__grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }
}

.meta-footer__brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #fff;
    transition: opacity 0.15s;
}

.meta-footer__brand:hover { opacity: 0.85; }

.meta-footer__brand-icon { height: 32px; width: auto; display: block; }
.meta-footer__brand-wordmark { height: 18px; width: auto; display: block; }

.meta-footer__brand-text {
    font-size: 13.5px;
    line-height: 1.6;
    color: rgba(255,255,255,0.55);
    max-width: 36ch;
    margin: 16px 0 0;
}

/* Stack store badges vertically */
.meta-footer__stores {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-top: 24px;
}

.meta-footer__store-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 9px 16px;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    text-decoration: none;
    color: #fff;
    white-space: nowrap;
    transition: background 0.15s, border-color 0.15s, transform 0.12s;
}

.meta-footer__store-badge:hover {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.22);
    color: #fff;
}

.meta-footer__store-badge:active { transform: translateY(1px); }

.meta-footer__store-icon { flex-shrink: 0; }

.meta-footer__store-text {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.05;
}

.meta-footer__store-small {
    font-size: 9.5px;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.6);
}

.meta-footer__store-large {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
}

.meta-footer__col {
    display: flex;
    flex-direction: column;
}

.meta-footer__col-head {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.45);
    margin: 0 0 16px;
}

/* Footer link styling (overrides default body-link styling) */
.meta-footer__col a,
.meta-footer .suisse-cities a,
.meta-footer .suisse-blogs a {
    display: block;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 13.5px;
    padding: 5px 0;
    transition: color 0.15s;
}

.meta-footer__col a:hover,
.meta-footer .suisse-cities a:hover,
.meta-footer .suisse-blogs a:hover {
    color: #fff;
}

/* In footer, strip the pill styling that body .suisse-cities uses */
.meta-footer .suisse-cities {
    display: block;
    margin: 0;
    padding: 0;
}

.meta-footer .suisse-cities a {
    background: transparent;
    border: 0;
    border-radius: 0;
    font-weight: normal;
    padding: 5px 0;
}

.meta-footer .suisse-cities a:hover {
    background: transparent;
    border-color: transparent;
    transform: none;
}

.meta-footer__bottom {
    padding-top: 24px;
    font-size: 12.5px;
    color: rgba(255,255,255,0.5);
    text-align: center;
}

.meta-footer__bottom p { margin: 0; color: rgba(255,255,255,0.5); }
