/*
Theme Name: Kartki Losu
Description: Story magazine theme with a dark intro band, a lead story and a card library.
Version: 1.0.0
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: kartki-losu
Tags: blog, news, custom-menu, featured-images
*/
:root{
    --th-deep: #12312d;
    --th-deep-2: #0b2421;
    --th-ink: #1d2422;
    --th-muted: #5d6763;
    --th-paper: #f6f3ec;
    --th-surface: #ffffff;
    --th-line: #e2ddd1;
    --th-accent: #c47a26;
    --th-accent-dark: #9a5b14;
    --th-accent-soft: #f6e7d2;
    --th-on-dark: #e8efe9;
    --th-on-dark-muted: #a9bdb6;
    --th-font-title: "Lora", Georgia, "Times New Roman", serif;
    --th-font-text: "Mulish", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
    --th-radius: 10px;
    --th-container: 1180px;
    --th-narrow: 720px;
    --th-gap: clamp(18px, 3vw, 32px);
}
@media screen{
    /*
    * BASE.
    */
    *,
    *::before,
    *::after{ box-sizing: border-box; }
    html{ -webkit-text-size-adjust: 100%; scroll-padding-top: 24px; }
    body{
        margin: 0px;
        background: var(--th-paper);
        color: var(--th-ink);
        font-family: var(--th-font-text);
        font-size: 17px;
        line-height: 1.65;
        -webkit-font-smoothing: antialiased;
    }
    img{ max-width: 100%; height: auto; }
    a{ color: var(--th-accent-dark); text-underline-offset: 3px; }
    a:hover{ color: var(--th-deep); }
    button,
    input{ font: inherit; }
    :focus-visible{ outline: 3px solid var(--th-accent); outline-offset: 3px; border-radius: 3px; }
    .tf{ font-family: var(--th-font-title); }
    .container{ width: min(100% - 36px, var(--th-container)); margin-inline: auto; }
    .container-narrow{ width: min(100% - 36px, var(--th-narrow)); margin-inline: auto; }
    .thumb-cover{ display: block; overflow: hidden; border-radius: var(--th-radius); background: var(--th-line); }
    .thumb-cover img{ display: block; width: 100%; height: 100%; object-fit: cover; }
    .screen-reader-text{
        position: absolute !important;
        width: 1px;
        height: 1px;
        padding: 0px;
        margin: -1px;
        overflow: hidden;
        clip: rect(0px, 0px, 0px, 0px);
        white-space: nowrap;
        border: 0px;
    }
    .skip-link{
        position: absolute;
        left: 16px;
        top: -60px;
        z-index: 100;
        padding: 10px 16px;
        background: var(--th-surface);
        color: var(--th-deep);
        font-weight: 700;
        border-radius: 6px;
    }
    .skip-link:focus{ top: 12px; }
    .kicker{
        display: inline-block;
        margin: 0px 0px 10px;
        color: var(--th-accent-dark);
        font: 800 12px/1.4 var(--th-font-text);
        letter-spacing: .12em;
        text-transform: uppercase;
    }
    .kicker a{ color: inherit; text-decoration: none; }
    .btn{
        display: inline-flex;
        align-items: center;
        gap: 10px;
        padding: 13px 22px;
        border: 0px;
        border-radius: 999px;
        background: var(--th-accent);
        color: #ffffff;
        font: 800 15px/1.2 var(--th-font-text);
        text-decoration: none;
        cursor: pointer;
    }
    .btn:hover{ background: var(--th-accent-dark); color: #ffffff; }
    .btn-ghost{ background: transparent; color: var(--th-deep); box-shadow: inset 0px 0px 0px 2px var(--th-deep); }
    .btn-ghost:hover{ background: var(--th-deep); color: #ffffff; }
    .meta{ color: var(--th-muted); font-size: 13px; }
    .meta-sep{ margin: 0px 6px; opacity: .6; }

    /*
    * HEADER.
    */
    .site-header{ background: var(--th-surface); border-top: 4px solid var(--th-accent); border-bottom: 1px solid var(--th-line); }
    .header-inner{ display: flex; align-items: center; gap: 28px; min-height: 76px; }
    .header-brand{ display: flex; align-items: center; gap: 12px; color: var(--th-deep); text-decoration: none; margin-right: auto; }
    .header-brand:hover{ color: var(--th-deep); }
    .header-brand-mark{ flex: 0 0 auto; width: 40px; height: 40px; }
    .header-brand-name{ font: 700 26px/1 var(--th-font-title); letter-spacing: -.01em; }
    .header-brand-name em{ color: var(--th-accent); font-style: italic; }
    .header-nav .menu{ display: flex; gap: 4px 24px; list-style: none; margin: 0px; padding: 0px; }
    .header-nav .menu a{ display: block; padding: 8px 0px; color: var(--th-ink); font-weight: 700; font-size: 15px; text-decoration: none; }
    .header-nav .menu a:hover,
    .header-nav .current-menu-item > a{ color: var(--th-accent-dark); }
    .header-nav .sub-menu{ display: none; }
    .header-actions{ display: flex; gap: 8px; }
    .header-icon{
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        height: 42px;
        min-width: 42px;
        padding: 0px 10px;
        border: 1px solid var(--th-line);
        border-radius: 999px;
        background: var(--th-paper);
        color: var(--th-deep);
        cursor: pointer;
    }
    .header-icon:hover{ border-color: var(--th-deep); }
    .header-toggle{ display: none; }
    .header-search{ border-top: 1px solid var(--th-line); background: var(--th-paper); padding: 14px 0px; }
    .header-search[hidden]{ display: none; }
    .search-form{ display: flex; gap: 8px; }
    .search-form .search-field{
        flex: 1 1 auto;
        min-width: 0px;
        padding: 12px 16px;
        border: 1px solid var(--th-line);
        border-radius: 999px;
        background: var(--th-surface);
        color: var(--th-ink);
    }
    .search-form .search-field:focus{ border-color: var(--th-deep); outline: none; }

    /*
    * HOME: INTRO BAND.
    */
    .home-hero{ background: var(--th-deep); color: var(--th-on-dark); padding: clamp(40px, 6vw, 72px) 0px 120px; }
    .home-hero-solo{ padding-bottom: clamp(40px, 6vw, 72px); }
    .home-hero-inner{ display: grid; grid-template-columns: minmax(0px, 1.15fr) minmax(0px, .85fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
    .home-hero .kicker{ color: var(--th-accent); }
    .home-hero-title{ margin: 0px 0px 18px; color: #ffffff; font: 700 clamp(34px, 5vw, 58px)/1.08 var(--th-font-title); letter-spacing: -.02em; }
    .home-hero-title em{ color: var(--th-accent); }
    .home-hero-text{ margin: 0px; max-width: 560px; color: var(--th-on-dark-muted); font-size: 18px; }
    .home-latest{ border-left: 1px solid rgba(255,255,255,.16); padding-left: clamp(20px, 3vw, 36px); }
    .home-latest-title{ margin: 0px 0px 6px; color: var(--th-on-dark-muted); font: 800 12px/1.4 var(--th-font-text); letter-spacing: .12em; text-transform: uppercase; }
    .home-latest-list{ list-style: none; margin: 0px; padding: 0px; counter-reset: latest; }
    .home-latest-item{ position: relative; counter-increment: latest; padding: 14px 0px 14px 46px; border-bottom: 1px solid rgba(255,255,255,.12); }
    .home-latest-item:last-child{ border-bottom: 0px; }
    .home-latest-item::before{ content: counter(latest, decimal-leading-zero); position: absolute; left: 0px; top: 13px; color: var(--th-accent); font: 700 22px/1 var(--th-font-title); }
    .home-latest-item a{ color: #ffffff; font-weight: 700; text-decoration: none; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
    .home-latest-item a:hover{ color: var(--th-accent); }
    .home-latest-item time{ display: block; margin-top: 4px; color: var(--th-on-dark-muted); font-size: 12px; }

    /*
    * HOME: LEAD STORY.
    */
    .home-lead{ margin-top: -88px; }
    .lead-card{ display: grid; grid-template-columns: minmax(0px, 1.2fr) minmax(0px, 1fr); background: var(--th-surface); border-radius: calc(var(--th-radius) + 6px); overflow: hidden; box-shadow: 0px 18px 50px rgba(11,36,33,.16); }
    .lead-card-thumb{ position: relative; aspect-ratio: 16 / 11; border-radius: 0px; }
    .lead-card-label{ position: absolute; left: 18px; top: 18px; padding: 6px 12px; border-radius: 999px; background: var(--th-accent); color: #ffffff; font: 800 11px/1.4 var(--th-font-text); letter-spacing: .1em; text-transform: uppercase; }
    .lead-card-body{ display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding: clamp(24px, 4vw, 48px); }
    .lead-card-title{ margin: 0px 0px 14px; font: 700 clamp(24px, 2.6vw, 34px)/1.22 var(--th-font-title); letter-spacing: -.01em; }
    .lead-card-title a{ color: var(--th-ink); text-decoration: none; }
    .lead-card-title a:hover{ color: var(--th-accent-dark); }
    .lead-card-excerpt{ margin: 0px 0px 22px; color: var(--th-muted); }
    .lead-card .meta{ margin: 0px 0px 22px; }

    /*
    * SECTIONS & CARDS.
    */
    .section{ padding: clamp(44px, 6vw, 72px) 0px 0px; }
    .section-head{ display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 26px; padding-bottom: 14px; border-bottom: 2px solid var(--th-deep); }
    .section-head .kicker{ margin-bottom: 4px; }
    .section-title{ margin: 0px; font: 700 clamp(24px, 3vw, 32px)/1.2 var(--th-font-title); }
    .section-link{ font-weight: 800; font-size: 14px; text-decoration: none; white-space: nowrap; }
    .card-grid{ display: grid; grid-template-columns: repeat(3, minmax(0px, 1fr)); gap: var(--th-gap); }
    .story-card{ position: relative; display: flex; flex-direction: column; background: var(--th-surface); border-radius: var(--th-radius); overflow: hidden; border: 1px solid var(--th-line); transition: box-shadow .2s, transform .2s; }
    .story-card:hover{ box-shadow: 0px 12px 30px rgba(11,36,33,.12); transform: translateY(-2px); }
    .story-card-thumb{ aspect-ratio: 3 / 2; border-radius: 0px; }
    .story-card-body{ display: flex; flex-direction: column; flex: 1 1 auto; padding: 18px 20px 20px; }
    .story-card-cat{ margin-bottom: 8px; color: var(--th-accent-dark); font: 800 11px/1.4 var(--th-font-text); letter-spacing: .1em; text-transform: uppercase; }
    .story-card-title{ margin: 0px 0px 14px; font: 700 19px/1.35 var(--th-font-title); }
    .story-card-title a{ color: var(--th-ink); text-decoration: none; }
    .story-card-title a::after{ content: ""; position: absolute; inset: 0px; }
    .story-card:hover .story-card-title a{ color: var(--th-accent-dark); }
    .story-card .meta{ margin-top: auto; }

    /*
    * HOME: CTA STRIP.
    */
    .home-cta{ margin-top: clamp(48px, 6vw, 80px); }
    .home-cta-inner{ display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: clamp(26px, 4vw, 44px); border-radius: calc(var(--th-radius) + 6px); background: var(--th-accent-soft); }
    .home-cta-title{ margin: 0px 0px 6px; font: 700 clamp(21px, 2.4vw, 28px)/1.25 var(--th-font-title); color: var(--th-deep); }
    .home-cta-text{ margin: 0px; color: var(--th-muted); }

    /*
    * ARCHIVE.
    */
    .archive-head{ padding: clamp(36px, 5vw, 60px) 0px 8px; }
    .archive-title{ margin: 0px; font: 700 clamp(30px, 4vw, 44px)/1.15 var(--th-font-title); }
    .archive-desc{ margin-top: 10px; color: var(--th-muted); max-width: 680px; }
    .archive-empty{ padding: 30px 0px; color: var(--th-muted); }
    .block-pagination{ margin-top: 40px; }
    .block-pagination ul{ display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; list-style: none; margin: 0px; padding: 0px; }
    .block-pagination a,
    .block-pagination span{ display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; padding: 0px 14px; border: 1px solid var(--th-line); border-radius: 999px; background: var(--th-surface); color: var(--th-ink); font-weight: 700; text-decoration: none; }
    .block-pagination .current{ background: var(--th-deep); border-color: var(--th-deep); color: #ffffff; }
    .block-pagination a:hover{ border-color: var(--th-deep); }

    /*
    * SINGLE & PAGE.
    */
    .entry-head{ padding: clamp(32px, 5vw, 56px) 0px 0px; }
    .entry-title{ margin: 0px 0px 16px; font: 700 clamp(30px, 4.4vw, 46px)/1.15 var(--th-font-title); letter-spacing: -.015em; overflow-wrap: break-word; }
    .entry-head .meta{ display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0px; padding-bottom: 22px; border-bottom: 1px solid var(--th-line); }
    .entry-thumb{ margin: 28px auto 0px; width: min(100% - 36px, 900px); }
    .entry-thumb img{ display: block; width: 100%; height: auto; border-radius: var(--th-radius); }
    .entry-thumb figcaption{ margin-top: 8px; color: var(--th-muted); font-size: 13px; }
    .entry-main{ padding-top: 28px; }
    .article-body{ font-size: 18px; line-height: 1.8; overflow-wrap: break-word; }
    .article-body > *:first-child{ margin-top: 0px; }
    .article-body p{ margin: 0px 0px 1.2em; }
    .article-body h2{ margin: 1.7em 0px .6em; font: 700 27px/1.3 var(--th-font-title); }
    .article-body h3{ margin: 1.5em 0px .5em; font: 700 22px/1.35 var(--th-font-title); }
    .article-body a{ color: var(--th-accent-dark); }
    .article-body img{ border-radius: 8px; }
    .article-body figure{ margin: 28px 0px; }
    .article-body figcaption{ color: var(--th-muted); font-size: 13px; line-height: 1.6; }
    .article-body blockquote{ margin: 28px 0px; padding: 14px 22px; border-left: 4px solid var(--th-accent); background: var(--th-accent-soft); border-radius: 0px 8px 8px 0px; font-family: var(--th-font-title); font-size: 20px; }
    .article-body ul,
    .article-body ol{ padding-left: 1.3em; }
    .la-rg-cta{ border-color: var(--th-accent) !important; background: var(--th-accent-soft) !important; }
    .la-rg-cta button{ background: var(--th-deep) !important; border-radius: 999px !important; font: 800 17px/1.4 var(--th-font-text) !important; }
    .la-rg-tail{ scroll-margin-top: 24px; }
    .entry-related{ padding-bottom: 8px; }

    /*
    * 404.
    */
    .not-found{ padding: clamp(48px, 8vw, 96px) 0px; text-align: center; }
    .not-found-code{ margin: 0px; color: var(--th-accent); font: 700 clamp(64px, 12vw, 120px)/1 var(--th-font-title); }
    .not-found-text{ color: var(--th-muted); }
    .not-found .search-form{ max-width: 460px; margin: 26px auto; }

    /*
    * FOOTER.
    */
    .site-footer{ margin-top: clamp(56px, 7vw, 96px); background: var(--th-deep-2); color: var(--th-on-dark-muted); font-size: 15px; }
    .footer-inner{ display: grid; grid-template-columns: minmax(0px, 1.4fr) minmax(0px, 1fr) minmax(0px, 1fr); gap: var(--th-gap); padding: 52px 0px 40px; }
    .footer-brand{ display: inline-flex; align-items: center; gap: 10px; color: #ffffff; text-decoration: none; font: 700 24px/1 var(--th-font-title); }
    .footer-brand em{ color: var(--th-accent); }
    .footer-brand-mark{ width: 34px; height: 34px; }
    .footer-brand:hover{ color: #ffffff; }
    .footer-about{ margin: 14px 0px 0px; max-width: 380px; }
    .footer-title{ margin: 0px 0px 12px; color: #ffffff; font: 800 12px/1.4 var(--th-font-text); letter-spacing: .12em; text-transform: uppercase; }
    .footer-list,
    .footer-col .menu{ list-style: none; margin: 0px; padding: 0px; }
    .footer-list li,
    .footer-col .menu li{ margin-bottom: 8px; }
    .footer-col a{ color: var(--th-on-dark); text-decoration: none; }
    .footer-col a:hover{ color: var(--th-accent); }
    .footer-bottom{ display: flex; justify-content: space-between; gap: 12px; padding: 18px 0px; border-top: 1px solid rgba(255,255,255,.1); font-size: 13px; }
}
@media screen and (prefers-reduced-motion: reduce){
    html{ scroll-behavior: auto; }
    .story-card{ transition: none; }
    .story-card:hover{ transform: none; }
}
