/* =========================================================
   MI PUEBLITO — MAIN STYLESHEET
   Concept V1
   ========================================================= */


/* =========================================================
   VARIABLES
   ========================================================= */

:root {
    --mp-red: #a61f19;
    --mp-red-dark: #7f1713;
    --mp-green: #174b35;
    --mp-green-dark: #103527;
    --mp-gold: #e5a51b;
    --mp-cream: #f2e2bc;
    --mp-cream-light: #fbf2dc;
    --mp-brown: #41251b;
    --mp-dark: #241713;

    --mp-max-width: 1280px;
}


/* =========================================================
   RESET / GLOBAL
   ========================================================= */

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--mp-cream);
    color: var(--mp-dark);
    font-family: Georgia, "Times New Roman", serif;
}

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

a {
    color: inherit;
}


/* =========================================================
   HEADER
   ========================================================= */

.site-header {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 50;

    width: 100%;
    padding: 28px 40px;
}

.site-header__inner {
    width: min(100%, var(--mp-max-width));
    margin: 0 auto;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}


/* =========================================================
   BRAND
   ========================================================= */

/*
 * Supports the original temporary text logo.
 * Once header.php uses the PNG, the image rules below
 * automatically take over.
 */

.site-brand {
    display: flex;
    flex-direction: column;

    line-height: .82;
    text-decoration: none;
    text-transform: uppercase;

    transform: rotate(-2deg);
}

.site-brand__mi {
    margin-left: 5px;

    color: var(--mp-red);

    font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
    font-size: 1.2rem;
    letter-spacing: .08em;
}

.site-brand__pueblito {
    color: var(--mp-green);

    font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
    font-size: clamp(2rem, 3vw, 3.25rem);
    letter-spacing: .025em;
}

.site-brand__cocina {
    margin-top: 8px;

    color: var(--mp-red);

    font-family: Arial, Helvetica, sans-serif;
    font-size: .68rem;
    font-weight: 900;
    letter-spacing: .28em;
}


/* Graphical logo support */

.site-brand:has(img) {
    display: block;

    width: 255px;

    line-height: normal;
    text-transform: none;
    transform: none;
}

.site-brand img {
    width: 100%;
    height: auto;
}


/* =========================================================
   NAVIGATION
   ========================================================= */

.primary-nav {
    display: flex;
    align-items: center;

    gap: clamp(20px, 2.5vw, 40px);

    font-family: Arial, Helvetica, sans-serif;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.primary-nav a {
    position: relative;
    text-decoration: none;
}

.primary-nav a:not(.primary-nav__order)::after {
    content: "";

    position: absolute;
    left: 0;
    bottom: -7px;

    width: 0;
    height: 3px;

    background: var(--mp-red);

    transition: width .2s ease;
}

.primary-nav a:not(.primary-nav__order):hover::after {
    width: 100%;
}

.primary-nav__order {
    padding: 14px 22px;

    background: var(--mp-red);
    color: #fff;

    border: 2px solid var(--mp-red-dark);

    box-shadow: 4px 4px 0 var(--mp-gold);

    transform: rotate(-1deg);
}


/* =========================================================
   HERO
   ========================================================= */

.hero {
    position: relative;
    isolation: isolate;

    min-height: 760px;
    overflow: hidden;

    display: grid;

    grid-template-columns:
        minmax(40px, 1fr)
        minmax(420px, 600px)
        minmax(500px, 720px)
        minmax(40px, 1fr);

    align-items: center;

    padding-top: 110px;

    background:
        radial-gradient(
            circle at 20% 40%,
            rgba(255, 255, 255, .55),
            transparent 38%
        ),
        linear-gradient(
            90deg,
            #f4e5bf 0%,
            #ecd6a8 53%,
            #d8bb85 100%
        );
}


/* Stucco texture */

.hero::before {
    content: "";

    position: absolute;
    inset: 0;
    z-index: -3;

    opacity: .28;

    background-image:
        repeating-radial-gradient(
            circle at 20% 30%,
            rgba(91, 56, 34, .14) 0,
            rgba(91, 56, 34, .14) 1px,
            transparent 1px,
            transparent 5px
        );

    background-size: 14px 13px;
}


/* Exposed brick along lower-left hero */

.hero::after {
    content: "";

    position: absolute;
    z-index: -2;

    left: -40px;
    bottom: -35px;

    width: 54%;
    height: 145px;

    opacity: .45;

    background:
        linear-gradient(
            rgba(244, 226, 185, .28),
            rgba(244, 226, 185, .28)
        ),
        repeating-linear-gradient(
            0deg,
            #9d4b31 0 27px,
            #d5b28c 27px 31px
        );

    clip-path: polygon(
        0 35%,
        9% 25%,
        18% 39%,
        28% 20%,
        39% 34%,
        49% 18%,
        60% 35%,
        70% 21%,
        82% 33%,
        91% 17%,
        100% 30%,
        100% 100%,
        0 100%
    );
}


/* =========================================================
   HERO CONTENT
   ========================================================= */

.hero__content {
    grid-column: 2;

    position: relative;
    z-index: 5;

    padding: 80px 0 100px;
}

.hero__eyebrow {
    display: inline-block;

    margin: 0 0 18px;
    padding: 8px 14px;

    background: var(--mp-gold);
    color: var(--mp-brown);

    font-family: Arial, Helvetica, sans-serif;
    font-size: .75rem;
    font-weight: 900;
    letter-spacing: .16em;
    text-transform: uppercase;

    transform: rotate(-1deg);
}

.hero h1 {
    margin: 0;

    color: var(--mp-red);

    font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
    font-size: clamp(4.2rem, 7vw, 7.2rem);
    font-weight: 900;
    line-height: .82;
    letter-spacing: -.025em;
    text-transform: uppercase;

    text-shadow:
        2px 2px 0 rgba(255, 255, 255, .25);
}

.hero h1 span {
    display: block;

    width: fit-content;

    margin-top: 17px;
    padding: 8px 16px 10px;

    background: var(--mp-gold);
    color: var(--mp-brown);

    font-family: Arial, Helvetica, sans-serif;
    font-size: clamp(.95rem, 1.6vw, 1.4rem);
    line-height: 1;
    letter-spacing: .11em;

    transform: rotate(-1.5deg);
}

.hero__intro {
    max-width: 440px;

    margin: 28px 0 30px;

    color: #56372b;

    font-size: 1.12rem;
    font-weight: 700;
    line-height: 1.6;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;

    gap: 16px;
}


/* =========================================================
   BUTTONS
   ========================================================= */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 50px;
    padding: 14px 25px;

    border: 2px solid transparent;

    font-family: Arial, Helvetica, sans-serif;
    font-size: .77rem;
    font-weight: 900;
    letter-spacing: .12em;

    text-decoration: none;
    text-transform: uppercase;

    transition:
        transform .15s ease,
        box-shadow .15s ease;
}

.button:hover {
    transform: translateY(-3px);
}

.button--primary {
    background: var(--mp-red);
    color: #fff;

    border-color: var(--mp-red-dark);

    box-shadow: 5px 5px 0 var(--mp-gold);
}

.button--secondary {
    background: transparent;
    color: var(--mp-green-dark);

    border-color: var(--mp-green-dark);
}


/* =========================================================
   HERO FOOD
   ========================================================= */

.hero__food {
    grid-column: 3 / 5;

    position: relative;
    align-self: stretch;

    min-height: 650px;

    overflow: hidden;

    clip-path: polygon(
        14% 0,
        100% 0,
        100% 100%,
        2% 100%,
        7% 85%,
        3% 69%,
        9% 52%,
        4% 36%,
        10% 19%
    );
}

.hero__food::after {
    content: "";

    position: absolute;
    inset: 0;

    pointer-events: none;

    background:
        linear-gradient(
            90deg,
            rgba(235, 211, 166, .82) 0%,
            rgba(235, 211, 166, .18) 22%,
            transparent 48%
        );
}

.hero__food img {
    width: 100%;
    height: 100%;

    min-height: 760px;

    object-fit: cover;
    object-position: center;

    filter:
        saturate(1.08)
        contrast(1.05);
}


/* =========================================================
   RESPONSIVE — TABLET
   ========================================================= */

@media (max-width: 1000px) {

    .site-header {
        position: relative;

        padding: 20px;

        background: var(--mp-cream-light);
    }

    .site-header__inner {
        align-items: flex-start;
    }

    .site-brand:has(img) {
        width: 210px;
    }

    .primary-nav {
        gap: 15px;

        font-size: .68rem;
    }

    .hero {
        min-height: auto;

        grid-template-columns: 1fr 1fr;

        padding-top: 0;
    }

    .hero__content {
        grid-column: 1;

        padding: 80px 35px;
    }

    .hero__food {
        grid-column: 2;

        min-height: 620px;
    }

    .hero h1 {
        font-size: clamp(3.7rem, 8vw, 6rem);
    }
}


/* =========================================================
   RESPONSIVE — MOBILE
   ========================================================= */

@media (max-width: 760px) {

    .site-header__inner {
        flex-direction: column;
        align-items: center;
    }

    .site-brand {
        align-items: center;
    }

    .site-brand:has(img) {
        width: min(260px, 78vw);
    }

    .primary-nav {
        justify-content: center;
        flex-wrap: wrap;
    }

    .hero {
        display: flex;
        flex-direction: column;
    }

    .hero__content {
        width: 100%;

        padding: 65px 24px 55px;

        text-align: center;
    }

    .hero__eyebrow,
    .hero h1 span {
        margin-left: auto;
        margin-right: auto;
    }

    .hero__intro {
        margin-left: auto;
        margin-right: auto;
    }

    .hero__actions {
        justify-content: center;
    }

    .hero__food {
        width: 100%;
        min-height: 420px;

        clip-path: polygon(
            0 8%,
            16% 4%,
            32% 9%,
            49% 3%,
            66% 8%,
            82% 4%,
            100% 9%,
            100% 100%,
            0 100%
        );
    }

    .hero__food img {
        min-height: 420px;
    }
}
/* =========================================================
   PAPEL PICADO
   ========================================================= */

.papel-picado {
    position: absolute;
    top: 110px;
    left: 275px;
    z-index: 40;

    width: 500px;

    transform: rotate(1deg);

    pointer-events: none;
}

.papel-picado img {
    display: block;
    width: 100%;
    height: auto;
}

@media (max-width: 1000px) {
    .papel-picado {
        top: 125px;
        width: min(500px, 55vw);
    }
}

@media (max-width: 760px) {
    .papel-picado {
        position: relative;
        top: auto;
        left: auto;

        width: 92%;
        margin: -8px auto -20px;

        transform: none;
    }
}