/* ============================================
   El Rancho Taqueria — Stylesheet
   Clean Minimalist | Forest Green + Off-White
   ============================================ */

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --green-900: #0B3D2E;
    --green-800: #0F5132;
    --green-700: #146743;
    --green-600: #1A7A52;
    --green-500: #239B63;
    --green-400: #4DB882;
    --green-100: #D1E8DB;
    --green-50:  #EAF5EE;
    
    --cream:     #FAFAF7;
    --cream-dark:#F2F2EC;
    --warm:      #F7F6F2;
    --warm-dark: #EDECE6;
    
    --text-dark:  #1A1A18;
    --text-mid:   #3D3D38;
    --text-light: #6B6B64;
    --text-muted: #9A9A92;
    
    --line: rgba(26, 61, 46, 0.12);
    --line-strong: rgba(26, 61, 46, 0.25);
    
    --font-serif: 'Cormorant Garamond', Georgia, serif;
    --font-sans:  'Montserrat', 'Helvetica Neue', Arial, sans-serif;
    
    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    font-weight: 300;
    background-color: var(--cream);
    color: var(--text-dark);
    line-height: 1.7;
    overflow-x: hidden;
}

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

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

/* ---------- Skip Link ---------- */
.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    background: var(--green-800);
    color: #fff;
    padding: 0.75rem 1.25rem;
    z-index: 9999;
    font-size: 0.875rem;
    border-radius: 0 0 4px 4px;
}
.skip-link:focus {
    top: 0;
}

/* ---------- Container ---------- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

@media (max-width: 768px) {
    .container {
        padding: 0 1.25rem;
    }
}

/* ---------- Section System ---------- */
.section-eyebrow {
    font-family: var(--font-sans);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--green-600);
    margin-bottom: 1rem;
}

.section-title {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 4vw, 3.25rem);
    font-weight: 300;
    line-height: 1.15;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

.section-line {
    width: 48px;
    height: 1px;
    background: var(--line-strong);
    margin-bottom: 1.75rem;
}

.section-subtitle {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 300;
    font-style: italic;
    color: var(--text-light);
}

.section-header {
    text-align: center;
    max-width: 560px;
    margin: 0 auto 4rem;
}

/* ---------- Divider ---------- */
.divider {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem 0;
    color: var(--green-600);
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    padding: 1rem 2.25rem;
    border: 1px solid transparent;
    border-radius: 2px;
    cursor: pointer;
    transition: all 0.4s var(--ease-out);
    white-space: nowrap;
}

.btn--primary {
    background: var(--green-800);
    color: #fff;
    border-color: var(--green-800);
}

.btn--primary:hover {
    background: var(--green-700);
    border-color: var(--green-700);
    transform: translateY(-1px);
}

.btn--outline {
    background: transparent;
    color: #fff;
    border-color: rgba(255,255,255,0.5);
}

.btn--outline:hover {
    border-color: #fff;
    background: rgba(255,255,255,0.08);
}

.btn--large {
    padding: 1.125rem 2.75rem;
    font-size: 0.8rem;
}

/* ---------- Header / Nav ---------- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0 2rem;
    transition: all 0.5s var(--ease-out);
}

.site-header.scrolled {
    background: rgba(250, 250, 247, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 1px 0 var(--line);
}

.nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.nav__logo a {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-family: var(--font-serif);
    font-size: 1.15rem;
    font-weight: 500;
    color: #fff;
    letter-spacing: 0.02em;
    transition: color 0.4s var(--ease-out);
}

.site-header.scrolled .nav__logo a {
    color: var(--green-800);
}

.nav__logo svg {
    flex-shrink: 0;
}

.nav__list {
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.nav__link {
    font-size: 0.7rem;
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.8);
    position: relative;
    padding: 0.25rem 0;
    transition: color 0.4s var(--ease-out);
}

.nav__link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: currentColor;
    transition: width 0.4s var(--ease-out);
}

.nav__link:hover::after {
    width: 100%;
}

.nav__link:hover {
    color: #fff;
}

.site-header.scrolled .nav__link {
    color: var(--text-light);
}

.site-header.scrolled .nav__link:hover {
    color: var(--green-700);
}

.nav__cta {
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.4);
    padding: 0.625rem 1.25rem;
    border-radius: 2px;
    transition: all 0.4s var(--ease-out);
}

.nav__cta:hover {
    background: #fff;
    color: var(--green-800);
    border-color: #fff;
}

.site-header.scrolled .nav__cta {
    color: var(--green-800);
    border-color: var(--green-800);
}

.site-header.scrolled .nav__cta:hover {
    background: var(--green-800);
    color: #fff;
}

/* Mobile Nav Toggle */
.nav__toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.nav__toggle-line {
    display: block;
    width: 22px;
    height: 1px;
    background: #fff;
    transition: all 0.4s var(--ease-out);
    transform-origin: center;
}

.site-header.scrolled .nav__toggle-line {
    background: var(--green-800);
}

.nav__toggle[aria-expanded="true"] .nav__toggle-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}
.nav__toggle[aria-expanded="true"] .nav__toggle-line:nth-child(2) {
    opacity: 0;
}
.nav__toggle[aria-expanded="true"] .nav__toggle-line:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
}

@media (max-width: 768px) {
    .nav__toggle {
        display: flex;
    }
    
    .nav__menu {
        position: fixed;
        top: 0;
        right: 0;
        width: 100%;
        height: 100vh;
        height: 100dvh;
        background: var(--cream);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2rem;
        transform: translateX(100%);
        transition: transform 0.5s var(--ease-out);
        z-index: 999;
    }
    
    .nav__menu.open {
        transform: translateX(0);
    }
    
    .nav__list {
        flex-direction: column;
        gap: 1.75rem;
    }
    
    .nav__link {
        font-size: 0.85rem;
        color: var(--text-dark);
    }
    
    .nav__link:hover {
        color: var(--green-700);
    }
    
    .nav__cta {
        color: var(--green-800) !important;
        border-color: var(--green-800) !important;
    }
    
    .nav__cta:hover {
        background: var(--green-800) !important;
        color: #fff !important;
    }
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.hero__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(11, 61, 46, 0.72) 0%,
        rgba(11, 61, 46, 0.65) 40%,
        rgba(11, 61, 46, 0.78) 100%
    );
}

.hero__content {
    position: relative;
    z-index: 1;
    max-width: 780px;
    padding: 0 2rem;
    padding-top: 4rem;
}

.hero__eyebrow {
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.7);
    margin-bottom: 1.75rem;
}

.hero__headline {
    font-family: var(--font-serif);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 300;
    line-height: 1.1;
    color: #fff;
    margin-bottom: 1.75rem;
}

.hero__headline em {
    font-style: italic;
    font-weight: 300;
}

.hero__subheadline {
    font-family: var(--font-serif);
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    font-weight: 300;
    font-style: italic;
    color: rgba(255,255,255,0.8);
    line-height: 1.6;
    margin-bottom: 3rem;
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

.hero__actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero__scroll {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255,255,255,0.5);
    font-size: 0.65rem;
    font-weight: 400;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

@media (max-width: 768px) {
    .hero__content {
        padding-top: 2rem;
    }
    
    .hero__actions {
        flex-direction: column;
    }
    
    .hero__scroll {
        bottom: 1.5rem;
    }
}

/* ---------- About ---------- */
.about {
    padding: 7rem 0;
    background: var(--cream);
}

.about__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}

.about__image {
    position: relative;
}

.about__image::before {
    content: '';
    position: absolute;
    top: -1rem;
    left: -1rem;
    width: 100%;
    height: 100%;
    border: 1px solid var(--line-strong);
    z-index: 0;
}

.about__image img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 2px;
}

.about__text {
    max-width: 480px;
}

.about__text p {
    font-size: 1rem;
    color: var(--text-mid);
    line-height: 1.85;
    margin-bottom: 1.25rem;
}

.about__stats {
    display: flex;
    gap: 3rem;
    margin-top: 3rem;
    padding-top: 2.5rem;
    border-top: 1px solid var(--line);
}

.stat__number {
    display: block;
    font-family: var(--font-serif);
    font-size: 2.5rem;
    font-weight: 300;
    color: var(--green-700);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat__label {
    font-size: 0.7rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
}

@media (max-width: 900px) {
    .about__grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .about__image {
        max-width: 480px;
    }
    
    .about__text {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .about {
        padding: 4rem 0;
    }
    
    .about__stats {
        gap: 1.5rem;
        flex-wrap: wrap;
    }
}

/* ---------- Menu ---------- */
.menu {
    padding: 7rem 0;
    background: var(--warm);
}

.menu__categories {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
}

.category-title {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--green-800);
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--line);
}

.menu__list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.menu__item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--line);
}

.menu__item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.menu__item-name {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    font-weight: 400;
    color: var(--text-dark);
}

.menu__item-desc {
    font-size: 0.825rem;
    color: var(--text-light);
    font-weight: 300;
}

.menu__note {
    text-align: center;
    margin-top: 3rem;
    font-family: var(--font-serif);
    font-size: 1.05rem;
    font-style: italic;
    color: var(--text-light);
}

@media (max-width: 900px) {
    .menu__categories {
        grid-template-columns: 1fr 1fr;
        gap: 2.5rem;
    }
}

@media (max-width: 560px) {
    .menu {
        padding: 4rem 0;
    }
    
    .menu__categories {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
}

/* ---------- Gallery ---------- */
.gallery {
    padding: 7rem 0;
    background: var(--cream);
}

.gallery__grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: auto auto;
    gap: 1rem;
}

.gallery__item {
    overflow: hidden;
    border-radius: 2px;
}

.gallery__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s var(--ease-out);
}

.gallery__item:hover img {
    transform: scale(1.03);
}

.gallery__item--large {
    grid-column: 1 / 8;
    grid-row: 1 / 2;
    aspect-ratio: 4/3;
}

.gallery__item:not(.gallery__item--large):not(.gallery__item--tall) {
    aspect-ratio: 3/2;
}

.gallery__item--tall {
    grid-column: 8 / 13;
    grid-row: 1 / 3;
    aspect-ratio: auto;
}

@media (max-width: 900px) {
    .gallery__grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto;
    }
    
    .gallery__item--large {
        grid-column: 1 / -1;
        aspect-ratio: 16/9;
    }
    
    .gallery__item--tall {
        grid-column: 1 / -1;
        aspect-ratio: 4/3;
    }
}

@media (max-width: 480px) {
    .gallery {
        padding: 4rem 0;
    }
    
    .gallery__grid {
        grid-template-columns: 1fr;
    }
    
    .gallery__item--large,
    .gallery__item--tall {
        grid-column: 1 / -1;
        aspect-ratio: 4/3;
    }
}

/* ---------- Visit ---------- */
.visit {
    padding: 7rem 0;
    background: var(--warm);
}

.visit__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: start;
}

.visit__detail {
    display: flex;
    gap: 1.25rem;
    margin-bottom: 2.25rem;
    align-items: flex-start;
}

.visit__detail svg {
    flex-shrink: 0;
    margin-top: 0.2rem;
    color: var(--green-600);
}

.visit__detail strong {
    display: block;
    font-family: var(--font-sans);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-dark);
    margin-bottom: 0.35rem;
}

.visit__detail p {
    font-size: 1rem;
    color: var(--text-mid);
    line-height: 1.7;
}

.visit__detail a {
    color: var(--green-700);
    text-decoration: none;
    transition: color 0.3s var(--ease-out);
}

.visit__detail a:hover {
    color: var(--green-500);
    text-decoration: underline;
}

.visit__cta {
    margin-top: 2.5rem;
}

.visit__map {
    border-radius: 2px;
    overflow: hidden;
    min-height: 420px;
    border: 1px solid var(--line);
}

@media (max-width: 900px) {
    .visit__grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .visit__map {
        min-height: 300px;
    }
}

@media (max-width: 480px) {
    .visit {
        padding: 4rem 0;
    }
}

/* ---------- Footer ---------- */
.footer {
    background: var(--green-900);
    color: rgba(255,255,255,0.7);
    padding: 5rem 0 0;
}

.footer__grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    padding-bottom: 4rem;
}

.footer__brand svg {
    color: rgba(255,255,255,0.5);
    margin-bottom: 1.25rem;
}

.footer__brand p {
    font-size: 0.925rem;
    line-height: 1.75;
    max-width: 300px;
    color: rgba(255,255,255,0.55);
}

.footer__links strong,
.footer__contact strong {
    display: block;
    font-family: var(--font-sans);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.4);
    margin-bottom: 1.25rem;
}

.footer__links ul,
.footer__contact ul {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer__links a,
.footer__contact a {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.6);
    transition: color 0.3s var(--ease-out);
}

.footer__links a:hover,
.footer__contact a:hover {
    color: #fff;
}

.footer__bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 2rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
}

.footer__bottom p {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.35);
}

.footer__bottom a {
    color: rgba(255,255,255,0.5);
    transition: color 0.3s var(--ease-out);
}

.footer__bottom a:hover {
    color: rgba(255,255,255,0.8);
}

@media (max-width: 768px) {
    .footer__grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    
    .footer {
        padding: 3.5rem 0 0;
    }
}

/* ---------- Scroll Reveal (progressive enhancement) ---------- */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
    }
}
