/* ============================================
   Las Recetas de la Abuela Ana
   Minimal editorial — no gradients, no shadows
   Cormorant Garamond + DM Sans
   ============================================ */

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

:root {
    --black: #111;
    --white: #fff;
    --gray-100: #fafafa;
    --gray-200: #e8e8e8;
    --gray-400: #bbb;
    --gray-500: #999;
    --gray-600: #777;
    --gray-800: #333;
    --serif: 'Cormorant Garamond', serif;
    --sans: 'DM Sans', sans-serif;
    --max-width: 1200px;
    --narrow: 680px;
}

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

body {
    font-family: var(--sans);
    font-weight: 400;
    color: var(--black);
    background: var(--white);
    line-height: 1.6;
}

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

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

/* ---- Layout ---- */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 40px;
}

.container-narrow {
    max-width: var(--narrow);
    margin: 0 auto;
    padding: 0 40px;
}

.section {
    padding: 100px 0;
}

.site-main {
    min-height: 60vh;
}

/* ---- Header ---- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.header-logo {
    font-family: var(--serif);
    font-size: 22px;
    font-weight: 600;
    color: var(--black);
    letter-spacing: -0.02em;
}

.header-logo img {
    height: 32px;
}

.header-nav {
    display: flex;
    gap: 32px;
}

.nav-link {
    font-family: var(--sans);
    font-size: 12px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gray-500);
    transition: color 0.2s;
}

.nav-link:hover,
.nav-link.nav-current {
    color: var(--black);
}

/* Mobile toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 1px;
    background: var(--black);
    transition: all 0.3s;
}

.menu-toggle.active span:first-child {
    transform: rotate(45deg) translate(2.5px, 2.5px);
}

.menu-toggle.active span:last-child {
    transform: rotate(-45deg) translate(2.5px, -2.5px);
}

/* Mobile menu */
.mobile-menu {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    padding: 48px 40px;
    border-bottom: 1px solid var(--gray-200);
}

.mobile-menu.open {
    display: flex;
}

.mobile-link {
    font-family: var(--serif);
    font-size: 28px;
    font-weight: 400;
    color: var(--black);
}

.mobile-link.nav-current {
    font-style: italic;
}

/* ---- Hero ---- */
.hero {
    background: var(--white);
    padding: 120px 40px 100px;
    text-align: center;
    overflow: hidden;
}

.hero-inner {
    max-width: 900px;
    margin: 0 auto;
}

.hero-eyebrow {
    display: block;
    font-family: var(--sans);
    font-size: 11px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--gray-400);
    margin-bottom: 40px;
}

.hero-title {
    margin-bottom: 48px;
    position: relative;
    display: inline-block;
}

.hero-quote-open,
.hero-quote-close {
    font-family: var(--serif);
    font-weight: 200;
    font-style: italic;
    color: var(--gray-200);
    line-height: 1;
    position: absolute;
    user-select: none;
    pointer-events: none;
}

.hero-quote-open {
    font-size: 280px;
    top: -80px;
    left: -100px;
}

.hero-quote-close {
    font-size: 280px;
    bottom: -140px;
    right: -100px;
}

.hero-line {
    display: block;
    overflow: hidden;
}

.hero-line-1 {
    font-family: var(--serif);
    font-weight: 200;
    font-style: normal;
    font-size: 110px;
    line-height: 1.05;
    color: var(--black);
    opacity: 0;
    transform: translateY(-100%) skewY(-3deg);
    transition: opacity 1.1s cubic-bezier(0.16, 1, 0.3, 1),
                transform 1.1s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-line-2 {
    font-family: var(--serif);
    font-weight: 800;
    font-style: italic;
    font-size: 140px;
    line-height: 1.0;
    color: var(--black);
    margin-top: -42px;
    opacity: 0;
    transform: translateY(100%) skewY(3deg);
    transition: opacity 1.1s cubic-bezier(0.16, 1, 0.3, 1) 0.08s,
                transform 1.1s cubic-bezier(0.16, 1, 0.3, 1) 0.08s;
}

.hero-line-1.visible {
    opacity: 1;
    transform: translateY(0) skewY(0deg);
}

.hero-line-2.visible {
    opacity: 1;
    transform: translateY(0) skewY(0deg);
}

.hero-subtitle {
    font-family: var(--sans);
    font-weight: 300;
    font-size: 15px;
    color: var(--gray-600);
    max-width: 420px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ---- Shared card elements ---- */
.card-tag {
    display: inline-block;
    font-family: var(--sans);
    font-size: 10px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--gray-500);
    margin-bottom: 12px;
}

.card-meta {
    font-family: var(--sans);
    font-size: 12px;
    color: var(--gray-400);
}

.meta-sep {
    margin: 0 6px;
}

/* ---- Featured Recipe ---- */
.featured-section {
    border-top: 1px solid var(--gray-200);
}

.featured-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.featured-image-link {
    display: block;
    overflow: hidden;
}

.featured-image-link img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    transition: opacity 0.4s;
}

.featured-image-link:hover img {
    opacity: 0.9;
}

.featured-title {
    font-family: var(--serif);
    font-size: 42px;
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
}

.featured-title a {
    color: var(--black);
    transition: opacity 0.2s;
}

.featured-title a:hover {
    opacity: 0.6;
}

.featured-excerpt {
    font-family: var(--sans);
    font-size: 15px;
    font-weight: 300;
    color: var(--gray-600);
    line-height: 1.7;
    margin-bottom: 24px;
}

/* ---- Recipe Grid ---- */
.grid-section {
    border-top: 1px solid var(--gray-200);
}

.recipe-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

/* ---- Recipe Card ---- */
.recipe-card {
    display: flex;
    flex-direction: column;
}

.card-image-link {
    display: block;
    overflow: hidden;
    margin-bottom: 20px;
}

.card-image-link img {
    width: 100%;
    aspect-ratio: 3/2;
    object-fit: cover;
    transition: opacity 0.4s;
}

.card-image-link:hover img {
    opacity: 0.85;
}

.card-image-placeholder {
    width: 100%;
    aspect-ratio: 3/2;
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
}

.card-content {
    display: flex;
    flex-direction: column;
}

.card-title {
    font-family: var(--serif);
    font-size: 22px;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.01em;
    margin-bottom: 12px;
}

.card-title a {
    color: var(--black);
    transition: opacity 0.2s;
}

.card-title a:hover {
    opacity: 0.6;
}

/* ---- Recipe Article (post.hbs) ---- */
.recipe-hero-image {
    width: 100%;
    max-height: 600px;
    overflow: hidden;
}

.recipe-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    max-height: 600px;
}

.recipe-header {
    padding: 80px 0 48px;
    text-align: center;
}

.recipe-title {
    font-family: var(--serif);
    font-size: 52px;
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 24px;
    color: var(--black);
}

.recipe-description {
    font-family: var(--sans);
    font-size: 17px;
    font-weight: 300;
    color: var(--gray-600);
    max-width: 500px;
    margin: 0 auto 32px;
    line-height: 1.7;
}

.recipe-meta {
    font-family: var(--sans);
    font-size: 13px;
    color: var(--gray-400);
}

.recipe-author {
    color: var(--black);
    font-weight: 400;
}

/* ---- Ghost Content ---- */
.recipe-body {
    padding-bottom: 80px;
}

.gh-content {
    font-family: var(--sans);
    font-size: 17px;
    font-weight: 300;
    line-height: 1.8;
    color: var(--gray-800);
}

.gh-content > * + * {
    margin-top: 28px;
}

.gh-content h2 {
    font-family: var(--serif);
    font-size: 36px;
    font-weight: 600;
    color: var(--black);
    margin-top: 72px;
    margin-bottom: 8px;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.gh-content h3 {
    font-family: var(--serif);
    font-size: 26px;
    font-weight: 600;
    color: var(--black);
    margin-top: 56px;
    margin-bottom: 4px;
    line-height: 1.25;
}

.gh-content h4 {
    font-family: var(--sans);
    font-size: 12px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gray-500);
    margin-top: 48px;
}

.gh-content strong {
    font-weight: 400;
    color: var(--black);
}

.gh-content a {
    color: var(--black);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    text-decoration-color: var(--gray-200);
    transition: text-decoration-color 0.2s;
}

.gh-content a:hover {
    text-decoration-color: var(--black);
}

/* Ingredients — unordered lists */
.gh-content ul {
    list-style: none;
    padding: 32px 0;
    border-top: 1px solid var(--gray-200);
    border-bottom: 1px solid var(--gray-200);
    margin: 32px 0;
}

.gh-content ul li {
    padding: 8px 0;
    font-family: var(--sans);
    font-size: 16px;
    font-weight: 300;
    color: var(--gray-800);
    position: relative;
    padding-left: 20px;
}

.gh-content ul li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 16px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--gray-400);
}

/* Steps — ordered lists, typographic numbering */
.gh-content ol {
    list-style: none;
    counter-reset: step;
    margin: 32px 0;
    padding: 0;
}

.gh-content ol li {
    counter-increment: step;
    padding: 24px 0 24px 0;
    position: relative;
    padding-left: 64px;
    border-bottom: 1px solid var(--gray-200);
    font-family: var(--sans);
    font-size: 16px;
    font-weight: 300;
    line-height: 1.75;
}

.gh-content ol li:last-child {
    border-bottom: none;
}

.gh-content ol li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 22px;
    font-family: var(--serif);
    font-size: 32px;
    font-weight: 200;
    color: var(--gray-400);
    line-height: 1;
}

/* Blockquote */
.gh-content blockquote {
    margin: 48px 0;
    padding: 0 0 0 32px;
    border-left: 1px solid var(--gray-200);
    font-family: var(--serif);
    font-size: 24px;
    font-weight: 400;
    font-style: italic;
    color: var(--gray-800);
    line-height: 1.5;
}

.gh-content blockquote p {
    margin-bottom: 0;
}

/* Images */
.gh-content .kg-image-card {
    margin: 48px 0;
}

.gh-content .kg-image-card.kg-width-wide {
    max-width: 960px;
    margin-left: auto;
    margin-right: auto;
    width: calc(100% + 160px);
    margin-left: -80px;
}

.gh-content .kg-image-card.kg-width-full {
    width: 100vw;
    margin-left: calc(50% - 50vw);
}

.gh-content figcaption {
    font-family: var(--sans);
    font-size: 12px;
    color: var(--gray-400);
    text-align: center;
    margin-top: 12px;
}

/* Horizontal rule */
.gh-content hr {
    border: none;
    border-top: 1px solid var(--gray-200);
    margin: 64px 0;
}

/* ---- Recipe Footer ---- */
.recipe-footer {
    padding: 32px 0 64px;
    border-top: 1px solid var(--gray-200);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-link {
    font-family: var(--sans);
    font-size: 12px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gray-500);
    padding: 6px 16px;
    border: 1px solid var(--gray-200);
    transition: all 0.2s;
}

.tag-link:hover {
    color: var(--black);
    border-color: var(--black);
}

/* ---- Related ---- */
.related-section {
    border-top: 1px solid var(--gray-200);
}

.section-title {
    font-family: var(--serif);
    font-size: 14px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gray-400);
    margin-bottom: 48px;
}

/* ---- Tag Page ---- */
.tag-header {
    padding: 80px 0 0;
    text-align: center;
}

.tag-name {
    font-family: var(--serif);
    font-size: 52px;
    font-weight: 600;
    color: var(--black);
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.tag-description {
    font-family: var(--sans);
    font-size: 15px;
    font-weight: 300;
    color: var(--gray-600);
    margin-top: 16px;
    line-height: 1.7;
}

/* ---- Page ---- */
.page-header {
    padding: 80px 0 48px;
    text-align: center;
}

.page-title {
    font-family: var(--serif);
    font-size: 52px;
    font-weight: 600;
    color: var(--black);
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.page-body {
    padding-bottom: 100px;
}

/* ---- Error Page ---- */
.error-page {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 100px 0;
}

.error-code {
    font-family: var(--serif);
    font-size: 120px;
    font-weight: 200;
    color: var(--gray-200);
    line-height: 1;
    margin-bottom: 8px;
}

.error-message {
    font-family: var(--sans);
    font-size: 15px;
    color: var(--gray-500);
    margin-bottom: 40px;
}

.error-link {
    font-family: var(--sans);
    font-size: 12px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--black);
    border-bottom: 1px solid var(--black);
    padding-bottom: 2px;
    transition: opacity 0.2s;
}

.error-link:hover {
    opacity: 0.5;
}

/* ---- Pagination ---- */
.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 40px 0 100px;
    border-top: 1px solid var(--gray-200);
}

.pagination-link {
    font-family: var(--sans);
    font-size: 13px;
    color: var(--gray-500);
    transition: color 0.2s;
}

.pagination-link:hover {
    color: var(--black);
}

.pagination-info {
    font-family: var(--sans);
    font-size: 12px;
    color: var(--gray-400);
}

/* ---- Footer ---- */
.site-footer {
    border-top: 1px solid var(--gray-200);
    padding: 64px 0 0;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 64px;
}

.footer-logo {
    font-family: var(--serif);
    font-size: 20px;
    font-weight: 600;
    color: var(--black);
    display: block;
    margin-bottom: 12px;
}

.footer-text {
    font-family: var(--sans);
    font-size: 14px;
    font-weight: 300;
    color: var(--gray-500);
    max-width: 320px;
    line-height: 1.6;
}

.footer-nav {
    display: flex;
    gap: 28px;
}

.footer-link {
    font-family: var(--sans);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gray-500);
    transition: color 0.2s;
}

.footer-link:hover {
    color: var(--black);
}

.footer-bottom {
    border-top: 1px solid var(--gray-200);
    padding: 24px 0;
    font-family: var(--sans);
    font-size: 11px;
    color: var(--gray-400);
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
    .recipe-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px;
    }

    .featured-card {
        gap: 40px;
    }

    .featured-title {
        font-size: 34px;
    }

    .hero-line-1 { font-size: 80px; }
    .hero-line-2 { font-size: 100px; margin-top: -30px; }

    .hero-quote-open { font-size: 200px; top: -60px; left: -60px; }
    .hero-quote-close { font-size: 200px; bottom: -100px; right: -60px; }
}

@media (max-width: 768px) {
    .container, .container-narrow {
        padding: 0 24px;
    }

    .header-nav { display: none; }
    .menu-toggle { display: flex; }

    .hero {
        padding: 80px 24px 64px;
    }

    .hero-line-1 {
        font-size: 60px;
    }

    .hero-line-2 {
        font-size: 80px;
        margin-top: -22px;
    }

    .hero-eyebrow {
        margin-bottom: 28px;
    }

    .hero-subtitle {
        font-size: 14px;
    }

    .hero-quote-open { font-size: 140px; top: -40px; left: -20px; }
    .hero-quote-close { font-size: 140px; bottom: -70px; right: -20px; }

    .section {
        padding: 64px 0;
    }

    .featured-card {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .featured-title {
        font-size: 32px;
    }

    .recipe-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .recipe-title {
        font-size: 36px;
    }

    .recipe-header {
        padding: 56px 0 32px;
    }

    .recipe-hero-image,
    .recipe-hero-image img {
        max-height: 360px;
    }

    .footer-inner {
        flex-direction: column;
        gap: 32px;
    }

    .footer-nav {
        flex-wrap: wrap;
        gap: 16px;
    }

    .gh-content h2 {
        font-size: 28px;
        margin-top: 48px;
    }

    .gh-content h3 {
        font-size: 22px;
        margin-top: 40px;
    }

    .gh-content ol li {
        padding-left: 48px;
    }

    .gh-content ol li::before {
        font-size: 26px;
    }

    .gh-content .kg-image-card.kg-width-wide {
        width: 100%;
        margin-left: 0;
    }

    .tag-name, .page-title {
        font-size: 36px;
    }
}

@media (max-width: 480px) {
    .hero-line-1 { font-size: 44px; }
    .hero-line-2 { font-size: 58px; margin-top: -14px; }

    .hero-quote-open { font-size: 100px; top: -28px; left: -10px; }
    .hero-quote-close { font-size: 100px; bottom: -50px; right: -10px; }

    .card-title { font-size: 20px; }
    .recipe-title { font-size: 30px; }
    .error-code { font-size: 80px; }
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
    .hero-line-1,
    .hero-line-2 {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ---- Print ---- */
@media print {
    .site-header, .site-footer, .related-section, .pagination { display: none; }
    body { background: white; color: black; }
    .recipe-hero-image { max-height: 300px; }
}
