/* ==========================================================================
   Mex Tattoos v2 — loaded after the parent stylesheet.
   Global: font, header polish, footer. Homepage: .mxv2-home sections.
   Colours: black, orange, white/grey only.
   ========================================================================== */

@font-face {
    font-family: "Google Sans Flex";
    font-style: normal;
    font-display: swap;
    font-weight: 1 1000;
    src: url("../fonts/google-sans-flex-latin-wght-normal.woff2") format("woff2-variations");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "Google Sans Flex";
    font-style: normal;
    font-display: swap;
    font-weight: 1 1000;
    src: url("../fonts/google-sans-flex-latin-ext-wght-normal.woff2") format("woff2-variations");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
    --v2-black: #0b0b0b;
    --v2-orange: #f28c00;
    --v2-orange-hover: #ff9d1f;
    --v2-white: #ffffff;
    --v2-text: #b5b5b5;
    --v2-muted: #a8a8a8;
    --v2-line: #262626;
    --v2-line-soft: #1f1f1f;
    --v2-font: "Google Sans Flex", system-ui, -apple-system, "Segoe UI", sans-serif;
    --v2-gutter: clamp(20px, 5vw, 72px);
    --v2-sec: clamp(72px, 9vw, 112px);
}

/* --------------------------------------------------------------------------
   Header (parent markup, restyled on every page)
   -------------------------------------------------------------------------- */

body.mexv2 .site-header {
    font-family: var(--v2-font);
    background: rgba(11, 11, 11, 0.94);
    border-bottom-color: var(--v2-line-soft);
}

body.mexv2 .site-brand__fallback img,
body.mexv2 .custom-logo {
    max-height: 52px;
}

body.mexv2 .primary-menu a {
    font-size: 0.95rem;
    font-weight: 500;
    color: #cfcfcf;
    letter-spacing: 0;
}

body.mexv2 .primary-menu a:hover,
body.mexv2 .primary-menu .current-menu-item > a {
    color: var(--v2-white);
}

body.mexv2 .header-cta {
    min-height: 44px;
    padding: 0 20px;
    color: var(--v2-black);
    background: var(--v2-orange);
    border-radius: 999px;
    font-family: var(--v2-font);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
}

body.mexv2 .header-cta:hover,
body.mexv2 .header-cta:focus-visible {
    background: var(--v2-orange-hover);
}

/* --------------------------------------------------------------------------
   Shared bits
   -------------------------------------------------------------------------- */

.mxv2-home,
.mxv2-footer {
    font-family: var(--v2-font);
    color: var(--v2-white);
    background: var(--v2-black);
}

.mxv2-wrap {
    max-width: 1240px;
    margin: 0 auto;
    padding-inline: var(--v2-gutter);
    box-sizing: content-box;
}

.mxv2-home h1,
.mxv2-home h2,
.mxv2-home h3 {
    margin: 0;
    font-family: var(--v2-font);
    color: var(--v2-white);
    text-transform: none;
}

.mxv2-home h2 {
    max-width: 760px;
    font-size: clamp(2.1rem, 4.2vw, 3.5rem);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.01em;
}

.mxv2-lead {
    max-width: 560px;
    margin: 16px 0 0;
    color: var(--v2-text);
    font-size: 1.125rem;
    line-height: 1.6;
}

.mxv2-stars {
    color: var(--v2-orange);
    letter-spacing: 2px;
}

.mxv2-btn {
    display: inline-flex;
    gap: 10px;
    min-height: 56px;
    padding: 0 28px;
    align-items: center;
    color: var(--v2-black);
    background: var(--v2-orange);
    border-radius: 999px;
    font-size: 1.05rem;
    font-weight: 800;
    text-decoration: none;
    transition: background 160ms ease;
}

.mxv2-btn:hover,
.mxv2-btn:focus-visible {
    color: var(--v2-black);
    background: var(--v2-orange-hover);
}

.mxv2-link {
    display: inline-block;
    padding-bottom: 4px;
    color: var(--v2-white);
    border-bottom: 2px solid var(--v2-orange);
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
}

.mxv2-link--white {
    border-bottom-color: var(--v2-white);
}

.mxv2-link:hover {
    color: var(--v2-orange);
}

.mxv2-mt {
    margin-top: 48px;
}

.mxv2-sec {
    padding-block: var(--v2-sec);
}

.mxv2-sec--line {
    border-top: 1px solid var(--v2-line-soft);
}

.mxv2-two {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(40px, 6vw, 96px);
    align-items: center;
}

.mxv2-two--top {
    align-items: start;
}

.mxv2-three,
.mxv2-four {
    display: grid;
    gap: 32px 40px;
    margin-top: 48px;
}

.mxv2-three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mxv2-four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.mxv2-topline {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-top: 22px;
    color: var(--v2-white);
    border-top: 2px solid var(--v2-orange);
    text-decoration: none;
}

.mxv2-topline strong,
.mxv2-topline h3 {
    font-size: 1.25rem;
    font-weight: 700;
}

.mxv2-topline span,
.mxv2-topline p {
    margin: 0;
    color: var(--v2-text);
    font-size: 1rem;
    line-height: 1.6;
}

.mxv2-topline em {
    color: var(--v2-orange);
    font-size: 0.95rem;
    font-style: normal;
    font-weight: 700;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.mxv2-hero {
    position: relative;
    display: flex;
    min-height: 760px;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

.mxv2-hero__photo {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 62%;
}

.mxv2-hero__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 35%;
}

.mxv2-hero__photo::after {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, #0b0b0b 0%, rgba(11, 11, 11, 0.82) 18%, rgba(11, 11, 11, 0.2) 48%, rgba(11, 11, 11, 0) 70%),
        linear-gradient(0deg, #0b0b0b 0%, rgba(11, 11, 11, 0) 28%);
    content: "";
}

.mxv2-hero__inner {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: calc(1240px + 2 * var(--v2-gutter));
    padding-block: 96px;
    box-sizing: border-box;
}

.mxv2-hero__text {
    display: flex;
    max-width: 640px;
    flex-direction: column;
}

.mxv2-hero__eyebrow {
    margin: 0 0 18px;
    color: var(--v2-muted);
    font-size: 0.95rem;
    font-weight: 600;
}

.mxv2-home .mxv2-hero h1 {
    font-size: clamp(3.1rem, 6.4vw, 5.75rem);
    font-weight: 700;
    line-height: 1.02;
    letter-spacing: -0.015em;
}

.mxv2-hero__slogan {
    max-width: 560px;
    margin: 22px 0 0;
    color: var(--v2-orange);
    font-size: clamp(1.375rem, 2.2vw, 1.875rem);
    font-weight: 600;
    line-height: 1.25;
}

.mxv2-hero__intro {
    max-width: 520px;
    margin: 16px 0 0;
    color: var(--v2-text);
    font-size: 1.125rem;
    line-height: 1.6;
}

.mxv2-hero__intro strong {
    color: var(--v2-white);
    font-weight: 700;
}

.mxv2-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    align-items: center;
    margin-top: 40px;
}

.mxv2-hero__facts {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 40px;
    margin: 52px 0 0;
    padding-top: 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.mxv2-hero__facts dt {
    color: var(--v2-muted);
    font-size: 0.82rem;
}

.mxv2-hero__facts dd {
    margin: 4px 0 0;
    font-size: 1.5rem;
    font-weight: 800;
}

.mxv2-hero__facts .mxv2-stars {
    font-size: 0.95rem;
}

.mxv2-hero__quote {
    position: absolute;
    z-index: 1;
    right: var(--v2-gutter);
    bottom: 48px;
    max-width: 340px;
    margin: 0;
    padding: 18px 20px;
    background: rgba(11, 11, 11, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
}

.mxv2-hero__quote blockquote {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.45;
}

.mxv2-hero__quote figcaption {
    margin-top: 10px;
    color: var(--v2-muted);
    font-size: 0.82rem;
}

.mxv2-hero__quote a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* --------------------------------------------------------------------------
   Styles gallery
   -------------------------------------------------------------------------- */

.mxv2-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 32px;
}

.mxv2-chips a {
    padding: 10px 18px;
    color: var(--v2-white);
    border: 1px solid #333;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: border-color 160ms ease, color 160ms ease;
}

.mxv2-chips a:hover {
    color: var(--v2-orange);
    border-color: var(--v2-orange);
}

.mxv2-chips a.is-active {
    color: var(--v2-black);
    background: var(--v2-orange);
    border-color: var(--v2-orange);
    font-weight: 700;
}

.mxv2-styles {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 28px 12px;
    margin: 32px 0 0;
    padding: 0;
    list-style: none;
}

.mxv2-styles a {
    display: flex;
    flex-direction: column;
    gap: 12px;
    color: var(--v2-white);
    text-decoration: none;
}

.mxv2-styles img {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: 20px;
    transition: opacity 200ms ease;
}

.mxv2-styles a:hover img {
    opacity: 0.85;
}

.mxv2-styles span {
    font-size: 1.06rem;
    font-weight: 700;
}

.mxv2-styles small {
    margin-top: -6px;
    color: var(--v2-text);
    font-size: 0.92rem;
    line-height: 1.5;
}

.mxv2-styles__all a {
    height: 100%;
    justify-content: flex-end;
    padding-bottom: 4px;
}

.mxv2-styles__all strong {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.15;
}

.mxv2-styles__all .mxv2-link {
    align-self: flex-start;
}

/* --------------------------------------------------------------------------
   Why Mex
   -------------------------------------------------------------------------- */

.mxv2-why__photo {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: 24px;
}

.mxv2-why__list {
    margin: 36px 0 0;
}

.mxv2-why__list > div {
    padding: 20px 0;
    border-top: 1px solid var(--v2-line);
}

.mxv2-why__list > div:last-child {
    border-bottom: 1px solid var(--v2-line);
}

.mxv2-why__list dt {
    font-size: 1.2rem;
    font-weight: 700;
}

.mxv2-why__list dd {
    margin: 6px 0 0;
    color: var(--v2-text);
    font-size: 1rem;
    line-height: 1.6;
}

.mxv2-links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 28px;
    margin-top: 32px;
}

/* --------------------------------------------------------------------------
   Paths, reviews
   -------------------------------------------------------------------------- */

.mxv2-inline-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 24px;
    align-items: center;
    margin-top: 64px;
}

.mxv2-inline-cta p {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
}

.mxv2-row-head {
    display: flex;
    flex-wrap: wrap;
    gap: 20px 40px;
    align-items: flex-end;
    justify-content: space-between;
}

.mxv2-rating {
    display: inline-flex;
    gap: 12px;
    align-items: center;
    color: #cfcfcf;
    font-size: 0.95rem;
    text-decoration: none;
}

.mxv2-rating > strong {
    color: var(--v2-white);
    font-size: 2rem;
}

.mxv2-review {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin: 0;
    padding-top: 22px;
    border-top: 1px solid var(--v2-line);
}

.mxv2-review blockquote {
    margin: 0;
    font-size: 1.125rem;
    line-height: 1.6;
}

.mxv2-review figcaption {
    color: var(--v2-muted);
    font-size: 0.88rem;
}

.mxv2-review figcaption strong {
    color: var(--v2-white);
}

/* --------------------------------------------------------------------------
   About + FAQ
   -------------------------------------------------------------------------- */

.mxv2-home .mxv2-about-title {
    margin-top: 40px;
    font-size: 1.25rem;
    font-weight: 700;
}

.mxv2-about {
    margin: 12px 0 0;
    color: var(--v2-text);
    font-size: 1.06rem;
    line-height: 1.7;
}

.mxv2-faq {
    display: flex;
    flex-direction: column;
}

.mxv2-faq details {
    padding: 20px 0;
    border-top: 1px solid var(--v2-line);
}

.mxv2-faq details:last-of-type {
    border-bottom: 1px solid var(--v2-line);
}

.mxv2-faq summary {
    display: flex;
    gap: 16px;
    justify-content: space-between;
    font-size: 1.125rem;
    font-weight: 700;
    list-style: none;
    cursor: pointer;
}

.mxv2-faq summary::-webkit-details-marker {
    display: none;
}

.mxv2-faq summary span {
    color: var(--v2-orange);
    font-size: 1.5rem;
    line-height: 1;
    transition: transform 160ms ease;
}

.mxv2-faq details[open] summary span {
    transform: rotate(45deg);
}

.mxv2-faq details p {
    margin: 12px 0 0;
    color: var(--v2-text);
    font-size: 1rem;
    line-height: 1.65;
}

.mxv2-faq .mxv2-mt {
    align-self: flex-start;
    margin-top: 28px;
}

/* --------------------------------------------------------------------------
   Final CTA
   -------------------------------------------------------------------------- */

.mxv2-cta {
    position: relative;
    overflow: hidden;
    border-top: 1px solid var(--v2-line-soft);
}

.mxv2-cta > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.35;
}

.mxv2-cta::after {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, #0b0b0b 0%, rgba(11, 11, 11, 0.4) 50%, #0b0b0b 100%);
    content: "";
}

.mxv2-cta__inner {
    position: relative;
    z-index: 1;
    display: flex;
    max-width: 760px;
    margin: 0 auto;
    padding: 128px var(--v2-gutter);
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.mxv2-home .mxv2-cta h2 {
    font-size: clamp(2.4rem, 5vw, 4.25rem);
    line-height: 1.05;
    letter-spacing: -0.015em;
}

.mxv2-cta__inner p {
    margin: 18px 0 36px;
    color: #cfcfcf;
    font-size: 1.125rem;
    line-height: 1.6;
}

/* --------------------------------------------------------------------------
   Footer (every page)
   -------------------------------------------------------------------------- */

.mxv2-footer {
    padding: 72px 0 40px;
    border-top: 1px solid var(--v2-line-soft);
}

.mxv2-footer__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 40px;
}

.mxv2-footer__brand img {
    width: auto;
    height: 64px;
}

.mxv2-footer__brand p {
    margin: 16px 0 0;
    color: var(--v2-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.mxv2-footer nav,
.mxv2-footer address {
    display: flex;
    flex-direction: column;
    gap: 10px;
    color: #cfcfcf;
    font-size: 0.95rem;
    font-style: normal;
    line-height: 1.6;
}

.mxv2-footer h2 {
    margin: 0 0 4px;
    color: var(--v2-orange);
    font-family: var(--v2-font);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: none;
}

.mxv2-footer a {
    color: #cfcfcf;
    text-decoration: none;
}

.mxv2-footer a:hover {
    color: var(--v2-white);
}

.mxv2-footer__bottom {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
    justify-content: space-between;
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--v2-line-soft);
    color: #8a8a8a;
    font-size: 0.82rem;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1000px) {
    .mxv2-hero__photo {
        width: 100%;
        opacity: 0.45;
    }

    .mxv2-hero__quote {
        position: static;
        max-width: none;
        margin: 0 var(--v2-gutter) 40px;
    }

    .mxv2-two,
    .mxv2-three {
        grid-template-columns: 1fr;
    }

    .mxv2-four,
    .mxv2-footer__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mxv2-why__photo {
        max-width: 560px;
    }
}

@media (max-width: 640px) {
    .mxv2-hero {
        min-height: 0;
    }

    .mxv2-hero__inner {
        padding-block: 64px 48px;
    }

    .mxv2-styles {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mxv2-chips {
        flex-wrap: nowrap;
        margin-inline: calc(var(--v2-gutter) * -1);
        padding: 0 var(--v2-gutter) 4px;
        overflow-x: auto;
        scrollbar-width: none;
    }

    .mxv2-chips::-webkit-scrollbar {
        display: none;
    }

    .mxv2-chips a {
        flex: 0 0 auto;
    }

    .mxv2-four,
    .mxv2-footer__grid {
        grid-template-columns: 1fr;
    }

    .mxv2-cta__inner {
        padding-block: 96px;
    }
}

/* --------------------------------------------------------------------------
   Inner pages (stage 1): same look as the v2 homepage, markup unchanged.
   Scoped to body.mexv2:not(.home) so the homepage is not affected.
   -------------------------------------------------------------------------- */

body.mexv2:not(.home) {
    --mx-display-font: var(--v2-font);
    font-family: var(--v2-font);
    background: var(--v2-black);
}

body.mexv2:not(.home) .site-main {
    font-family: var(--v2-font);
}

body.mexv2:not(.home) .site-main h1,
body.mexv2:not(.home) .site-main h2,
body.mexv2:not(.home) .site-main h3,
body.mexv2:not(.home) .site-main h4 {
    font-family: var(--v2-font);
    font-weight: 600;
    letter-spacing: -0.025em;
}

body.mexv2:not(.home) .site-main h1 {
    font-size: clamp(2.6rem, 5.4vw, 4.6rem);
    line-height: 1.04;
}

body.mexv2:not(.home) .site-main h2 {
    line-height: 1.1;
}

/* Light and warm sections become black, like the homepage. */
body.mexv2:not(.home) .section-light,
body.mexv2:not(.home) .section-warm,
body.mexv2:not(.home) .detail-page,
body.mexv2:not(.home) .generic-page,
body.mexv2:not(.home) .single-post {
    --mx-ivory: #0b0b0b;
    --mx-paper: #141414;
    --mx-sand: #141414;
    --mx-ink: #f2f2f2;
    --mx-brown: #b5b5b5;
    --mx-muted: #a8a8a8;
    --mx-burnt: var(--v2-orange);
    --mx-border-light: #262626;
    --mx-black: #f2f2f2;
    color: #d4d4d4;
    background: var(--v2-black);
}

body.mexv2:not(.home) .section-light + .section-light,
body.mexv2:not(.home) .section-warm,
body.mexv2:not(.home) .section-light + .section-warm {
    border-top: 1px solid var(--v2-line);
}

body.mexv2:not(.home) :is(.section-light, .section-warm, .detail-page, .generic-page, .single-post) :is(h1, h2, h3, h4, strong, dt) {
    color: var(--v2-white);
}

body.mexv2:not(.home) :is(.section-light, .section-warm, .detail-page, .generic-page, .single-post) .text-link {
    color: var(--v2-white);
}

body.mexv2:not(.home) :is(.section-light, .section-warm, .detail-page, .generic-page, .single-post) :is(.mx-button--dark, .mx-button--outline-dark) {
    color: var(--v2-white);
    background: transparent;
    border-color: rgba(255, 255, 255, 0.45);
}

body.mexv2:not(.home) :is(.section-light, .section-warm, .detail-page, .generic-page, .single-post) :is(.mx-button--dark, .mx-button--outline-dark):is(:hover, :focus-visible) {
    color: var(--v2-black);
    background: var(--v2-orange);
    border-color: var(--v2-orange);
}

/* Buttons: same pill shape as the homepage. */
body.mexv2:not(.home) .mx-button {
    min-height: 50px;
    padding: 0 24px;
    border-radius: 999px;
    font-family: var(--v2-font);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: none;
}

/* Forms on dark. */
body.mexv2:not(.home) .site-main :is(input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]), textarea, select) {
    color: var(--v2-white);
    background: #141414;
    border: 1px solid #333;
    border-radius: 10px;
    color-scheme: dark;
}

body.mexv2:not(.home) .site-main :is(input, textarea)::placeholder {
    color: #8a8a8a;
}

body.mexv2:not(.home) .site-main label {
    color: #d4d4d4;
}

/* Dark blocks nested inside a converted page keep the original palette. */
body.mexv2:not(.home) :is(.detail-page, .generic-page, .single-post, .section-light, .section-warm) :is(.section-dark, .final-cta, .rv-summary, .video-thumbnail) {
    --mx-black: #0b0b0b;
    --mx-ivory: #f5f0e8;
    --mx-paper: #fffdf8;
    --mx-sand: #e8ddcf;
    --mx-ink: #17120e;
    --mx-brown: #4b3528;
    --mx-burnt: #b85d00;
    --mx-border-light: #d2c7ba;
}

body.mexv2:not(.home) .mx-button--primary,
body.mexv2:not(.home) .mx-button--primary:is(:hover, :focus-visible) {
    color: #0b0b0b;
}

body.mexv2:not(.home) .faq-list details[open] summary span {
    color: #0b0b0b;
    background: var(--v2-orange);
    border-color: var(--v2-orange);
}

/* Old theme bug: brown lead text on a dark section (hygiene page). */
body.mexv2:not(.home) .section-dark .artist-match__content > .lead {
    color: #b5b5b5;
}
