/* ==========================================================
   Loma Ranchito — Azuero & Herrera guide
   Design system v2: "Bandera de Herrera"
   Exact provincial flag tones:
     yellow #FCDD09 · blue #0F47AF (+ #1147AF, gold #FBBB00)
   Premium treatment: deep-blue gradients, gold accents,
   7-star arc motif, scroll-reveal motion.
   ========================================================== */

:root {
    /* Herrera flag — exact tones */
    --h-yellow:     #FCDD09;
    --h-gold:       #FBBB00;
    --h-blue:       #0F47AF;
    --h-blue-2:     #1147AF;

    /* derived support shades */
    --blue-deep:    #0A2F73;
    --blue-ink:     #071E49;
    --blue-soft:    #E8EEFA;
    --blue-mist:    #F2F6FD;
    --yellow-soft:  #FFF7C2;
    --cream:        #FBFAF5;
    --white:        #FFFFFF;
    --ink:          #10203F;
    --ink-soft:     #46536E;

    /* legacy aliases (kept for inline references) */
    --clay:         #0F47AF;
    --clay-dark:    #0A2F73;
    --green:        #0A2F73;
    --green-mid:    #1147AF;
    --green-soft:   #E8EEFA;
    --gold:         #FBBB00;
    --gold-soft:    #FFF7C2;
    --sand:         #F2F6FD;
    --sky:          #1147AF;
    --sky-soft:     #E8EEFA;
    --flag-red:     #D21034;

    --shadow-sm: 0 2px 10px rgba(7, 30, 73, 0.08);
    --shadow-md: 0 10px 30px rgba(7, 30, 73, 0.14);
    --shadow-lg: 0 22px 60px rgba(7, 30, 73, 0.22);
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Public Sans', 'Segoe UI', sans-serif;
    background: var(--cream);
    color: var(--ink);
    line-height: 1.75;
    font-size: 1.02rem;
    -webkit-font-smoothing: antialiased;
}

::selection { background: var(--h-yellow); color: var(--blue-ink); }

h1, h2, h3, h4, .display {
    font-family: 'Fraunces', Georgia, serif;
    color: var(--blue-deep);
    line-height: 1.2;
    font-weight: 600;
}

a { color: var(--h-blue); }
a:hover { color: var(--blue-deep); }

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

/* ---------- Herrera flag ribbon (yellow over blue) ---------- */
.ribbon {
    height: 10px;
    background: linear-gradient(
        to bottom,
        var(--h-yellow) 0 50%,
        var(--h-blue) 50% 100%
    );
}

/* ---------- header + nav: sticky together as one unit ---------- */
.site-top {
    position: sticky;
    top: 0;
    z-index: 100;
    transition: box-shadow 0.35s var(--ease);
}

.site-top.scrolled {
    box-shadow: 0 10px 30px rgba(7, 30, 73, 0.35);
}

header.site-head {
    background: linear-gradient(140deg, var(--blue-ink) 0%, var(--blue-deep) 55%, var(--h-blue) 100%);
    color: var(--cream);
    padding: 1.1rem 1.5rem 0.9rem;
}

.head-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 2rem;
}

.brand {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 2.2rem;
    color: var(--white);
    text-decoration: none;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
}

.brand-logo {
    width: 92px;
    height: 92px;
    object-fit: contain;
    filter: drop-shadow(0 3px 10px rgba(7, 30, 73, 0.45));
    transition: transform 0.3s var(--ease);
}

.brand:hover .brand-logo { transform: rotate(-6deg) scale(1.06); }

.brand em {
    font-style: italic;
    color: var(--h-yellow);
}

.brand-tag {
    font-size: 0.78rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--blue-soft);
    opacity: 0.9;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}

.flag-pa {
    width: 27px;
    height: 18px;
    border-radius: 2px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 8px rgba(7, 30, 73, 0.35);
    flex-shrink: 0;
}

nav.site-nav {
    background: var(--blue-ink);
    border-top: 1px solid rgba(252, 221, 9, 0.18);
    padding: 0 1.5rem;
}

nav.site-nav ul {
    max-width: 1100px;
    margin: 0 auto;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0 1.6rem;
}

nav.site-nav a {
    display: inline-block;
    padding: 0.7rem 0;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 0.85rem;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    border-bottom: 3px solid transparent;
    transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}

nav.site-nav a:hover { color: var(--h-yellow); }

nav.site-nav a.here {
    color: var(--h-yellow);
    border-bottom-color: var(--h-yellow);
}

/* ---------- hero banner: title copy sits in the illustration's own
   sky color above it; artwork stays undistorted at natural size
   below, in normal document flow (scrolls with the page) ---------- */
.hero-banner {
    background: var(--cream);
    text-align: center;
}

.hero-banner-text {
    max-width: 720px;
    margin: 0 auto;
    min-height: 300px;
    padding: 3.2rem 1.5rem 1.8rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Home has more content (bigger headline + buttons) — give it its
   own taller floor instead of stretching every interior page to match */
.hero-banner-text.home {
    min-height: 420px;
}

.hero-banner .eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    font-size: 0.78rem;
    letter-spacing: 4.5px;
    text-transform: uppercase;
    color: var(--h-blue);
    margin-bottom: 1.2rem;
    animation: riseIn 0.9s 0.05s var(--ease) both;
}

.hero-banner .eyebrow::before, .hero-banner .eyebrow::after {
    content: '';
    width: 34px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--h-gold));
}

.hero-banner .eyebrow::after {
    background: linear-gradient(90deg, var(--h-gold), transparent);
}

.hero-banner h1 {
    color: var(--blue-deep);
    max-width: 880px;
    margin: 0 auto 1.2rem;
    animation: riseIn 0.9s var(--ease) both;
}

.hero-banner h1.big { font-size: clamp(2.4rem, 6vw, 4.2rem); }
.hero-banner h1.small { font-size: clamp(2rem, 5vw, 3.2rem); margin-bottom: 0.8rem; }

.hero-banner h1 em { color: var(--h-blue); font-style: italic; }

.hero-banner p.lede {
    max-width: 660px;
    margin: 0 auto 2.2rem;
    font-size: 1.14rem;
    color: var(--ink-soft);
    font-weight: 300;
    animation: riseIn 0.9s 0.12s var(--ease) both;
}

/* hero CTAs (home page only) */
.cta-row {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 0.4rem;
    animation: riseIn 0.9s 0.2s var(--ease) both;
}

.btn {
    display: inline-block;
    padding: 0.85rem 2.1rem;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    text-decoration: none;
    transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease);
}

.btn-gold {
    background: linear-gradient(180deg, var(--h-yellow), var(--h-gold));
    color: var(--blue-ink);
    box-shadow: 0 8px 24px rgba(251, 187, 0, 0.35);
}

.btn-gold:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 34px rgba(251, 187, 0, 0.45);
    color: var(--blue-ink);
}

.btn-ghost {
    border: 1.5px solid var(--h-blue);
    color: var(--h-blue);
}

.btn-ghost:hover {
    border-color: var(--blue-deep);
    color: var(--blue-deep);
    background: var(--blue-soft);
    transform: translateY(-3px);
}

.hero-banner-img {
    width: 100%;
    display: block;
}

/* ---------- layout ---------- */
main { display: block; }

section.band { padding: 4.5rem 1.5rem; }
section.band.sand  { background: var(--blue-mist); }
section.band.green-soft { background: var(--blue-soft); }
section.band.sky-soft { background: var(--blue-soft); }

.wrap { max-width: 1100px; margin: 0 auto; }
.wrap-narrow { max-width: 780px; margin: 0 auto; }

.kicker {
    font-size: 0.75rem;
    letter-spacing: 4.5px;
    text-transform: uppercase;
    color: var(--h-blue);
    font-weight: 600;
    margin-bottom: 0.6rem;
}

h2.sec {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    margin-bottom: 1rem;
}

.rule {
    width: 64px;
    height: 4px;
    background: linear-gradient(90deg, var(--h-yellow), var(--h-gold));
    border-radius: 2px;
    margin: 0 0 1.8rem;
}

.center { text-align: center; }
.center .rule { margin-left: auto; margin-right: auto; }

p + p { margin-top: 1rem; }

.prose p { color: var(--ink-soft); }
.prose p strong { color: var(--ink); }
.prose h3 { margin: 2.4rem 0 0.7rem; font-size: 1.4rem; position: relative; padding-left: 1rem; }
.prose h3::before {
    content: '';
    position: absolute;
    left: 0; top: 0.28em;
    width: 4px; height: 1.1em;
    border-radius: 2px;
    background: linear-gradient(180deg, var(--h-yellow), var(--h-blue));
}
.prose ul, .prose ol { margin: 1rem 0 1rem 1.4rem; color: var(--ink-soft); }
.prose li { margin-bottom: 0.55rem; }
.prose li::marker { color: var(--h-gold); }

/* ---------- cards ---------- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.7rem; }

.card {
    background: var(--white);
    border-radius: 14px;
    padding: 2rem 1.9rem;
    position: relative;
    box-shadow: var(--shadow-sm);
    transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--h-blue), var(--h-blue-2) 55%, var(--h-yellow));
    transition: height 0.3s var(--ease);
}

.card:hover {
    transform: translateY(-7px);
    box-shadow: var(--shadow-md);
}

.card:hover::before { height: 8px; }

.card.alt-gold::before { background: linear-gradient(90deg, var(--h-yellow), var(--h-gold) 55%, var(--h-blue)); }
.card.alt-sky::before { background: linear-gradient(90deg, var(--h-blue-2), var(--h-blue) 55%, var(--h-yellow)); }
.card.alt-green::before { background: linear-gradient(90deg, var(--blue-deep), var(--h-blue) 55%, var(--h-yellow)); }

.card h3 { font-size: 1.22rem; margin-bottom: 0.6rem; }
.card p { font-size: 0.95rem; color: var(--ink-soft); }

.card .card-label {
    font-size: 0.72rem;
    letter-spacing: 2.8px;
    text-transform: uppercase;
    color: var(--h-gold);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.card a.more {
    display: inline-block;
    margin-top: 1rem;
    font-size: 0.85rem;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    text-decoration: none;
    font-weight: 700;
    color: var(--h-blue);
    position: relative;
}

.card a.more::after {
    content: '';
    position: absolute;
    left: 0; bottom: -4px;
    width: 0; height: 2px;
    background: var(--h-yellow);
    transition: width 0.3s var(--ease);
}

.card a.more:hover::after { width: 100%; }

/* feature split (image/art + text) */
.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.split .art {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    position: relative;
}

.split .art::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    border: 1px solid rgba(252, 221, 9, 0.35);
    pointer-events: none;
}

.split .art img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.split .art:hover img { transform: scale(1.04); }

/* stat blocks */
.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.4rem;
    margin-top: 2rem;
}

.stat {
    border-left: 4px solid var(--h-yellow);
    padding-left: 1rem;
    background: linear-gradient(90deg, rgba(252, 221, 9, 0.07), transparent 70%);
    border-radius: 0 8px 8px 0;
}

.stat .n {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 1.6rem;
    color: var(--h-blue);
}

.stat .l {
    font-size: 0.74rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--ink-soft);
}

/* info table */
table.info {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    font-size: 0.95rem;
}

table.info th, table.info td {
    text-align: left;
    padding: 0.85rem 1.15rem;
    border-bottom: 1px solid var(--blue-mist);
    vertical-align: top;
}

table.info th {
    background: linear-gradient(140deg, var(--blue-deep), var(--h-blue));
    color: var(--white);
    font-weight: 600;
    letter-spacing: 1.5px;
    font-size: 0.82rem;
    text-transform: uppercase;
    border-bottom: 3px solid var(--h-yellow);
}

table.info tr:last-child td { border-bottom: none; }
table.info tr:hover td { background: var(--blue-mist); }
table.info td:first-child { font-weight: 600; color: var(--h-blue); white-space: nowrap; }

/* callout */
.callout {
    background: linear-gradient(120deg, var(--yellow-soft), #FFFDF0);
    border-left: 5px solid var(--h-yellow);
    border-radius: 6px;
    padding: 1.3rem 1.6rem;
    margin: 1.8rem 0;
    font-size: 0.97rem;
    color: var(--ink);
    box-shadow: var(--shadow-sm);
}

.callout strong { color: var(--h-blue); }

/* breadcrumbs */
.crumbs {
    font-size: 0.82rem;
    letter-spacing: 0.5px;
    color: var(--ink-soft);
    max-width: 1100px;
    margin: 0 auto;
    padding: 1rem 1.5rem 0;
}

.crumbs a { color: var(--h-blue); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

/* next-page links */
.next-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.7rem;
    margin-top: 1rem;
}

/* ---------- footer ---------- */
footer.site-foot {
    background: linear-gradient(160deg, var(--blue-ink) 0%, var(--blue-deep) 70%, #0C3A8F 100%);
    color: var(--blue-soft);
    padding: 3.2rem 1.5rem 2rem;
    font-size: 0.9rem;
    border-top: 6px solid var(--h-yellow);
}

.foot-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2.5rem;
}

footer.site-foot h4 {
    color: var(--h-yellow);
    font-size: 0.85rem;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    margin-bottom: 0.9rem;
}

footer.site-foot ul { list-style: none; }
footer.site-foot li { margin-bottom: 0.45rem; }

footer.site-foot a { color: rgba(255, 255, 255, 0.92); text-decoration: none; transition: color 0.2s var(--ease); }
footer.site-foot a:hover { color: var(--h-yellow); }

.foot-logo {
    max-width: 1100px;
    margin: 2.2rem auto 0;
    display: flex;
    justify-content: center;
}

.foot-logo img {
    width: 220px;
    height: 220px;
    object-fit: contain;
    filter: drop-shadow(0 8px 20px rgba(7, 30, 73, 0.5));
}

.foot-bottom {
    max-width: 1100px;
    margin: 2.5rem auto 0;
    padding-top: 1.2rem;
    border-top: 1px solid rgba(252, 221, 9, 0.2);
    font-size: 0.78rem;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 0.5rem 2.5rem;
    align-items: start;
    color: rgba(232, 238, 250, 0.7);
}

/* copyright text sits in column 1, matching "Loma Ranchito" above it;
   Privacy Policy sits flush-left in column 3, matching "Festivals" etc
   above it - aligned to where that column's text actually starts,
   not the outer track edge (which was the reported issue) */
.foot-bottom span:first-child { grid-column: 1; }
.foot-bottom span:last-child { grid-column: 3; justify-self: start; }

.foot-bottom a { color: rgba(255, 255, 255, 0.85); }

/* ---------- motion ---------- */
@keyframes riseIn {
    from { opacity: 0; transform: translateY(26px); }
    to { opacity: 1; transform: translateY(0); }
}

.rv {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.rv.in {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .rv { opacity: 1; transform: none; transition: none; }
    .hero h1, .hero p.lede, .hero .eyebrow, .cta-row,
    .page-hero h1, .page-hero p.lede, .page-hero .eyebrow { animation: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 820px) {
    .grid-3 { grid-template-columns: 1fr; }
    .grid-2, .split, .next-links { grid-template-columns: 1fr; }
    .stats { grid-template-columns: 1fr 1fr; }
    .foot-inner { grid-template-columns: 1fr; gap: 1.8rem; }
    .foot-bottom { grid-template-columns: 1fr; gap: 0.6rem; }
    .foot-bottom span:first-child, .foot-bottom span:last-child { grid-column: 1; }
    nav.site-nav ul { gap: 0 1.1rem; }
}

/* ---------- phone-specific pass (2026-07-22) ----------
   Scoped to <=600px only, so tablet (601-820px) and desktop (>820px)
   rules above are untouched. Goals: bigger tap targets, tighter
   vertical rhythm, decluttered header/nav for small screens. */
@media (max-width: 600px) {
    /* buttons: comfortable 48px+ tap target */
    .btn {
        min-height: 48px;
        padding: 0.95rem 1.8rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* hero CTAs stack full-width — each becomes one large, obvious target
       instead of two buttons squeezed side by side */
    .cta-row {
        flex-direction: column;
        align-items: stretch;
    }
    .cta-row .btn { width: 100%; }

    /* nav: scroll as a single row instead of wrapping 10 links into a
       cramped multi-row block; each link gets real padding so it's a
       thumb-sized target, not just bare text */
    nav.site-nav ul {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 0 0.2rem;
        padding-bottom: 2px;
    }
    nav.site-nav ul::-webkit-scrollbar { display: none; }
    nav.site-nav a {
        padding: 0.85rem 0.9rem;
        white-space: nowrap;
        flex-shrink: 0;
    }

    /* tighter vertical rhythm — less empty scroll before content on
       small screens */
    section.band { padding: 2.6rem 1.25rem; }
    .hero-banner-text { padding: 2.2rem 1.25rem 1.5rem; min-height: 0; }
    .hero-banner-text.home { min-height: 0; }
    header.site-head { padding: 0.9rem 1rem 0.75rem; }
}

/* declutter the header on very small phones — drop the flag/tagline
   row, keep brand name + nav so the header doesn't feel crowded */
@media (max-width: 420px) {
    .brand-tag { display: none; }
}
