/* ==========================================================
   _99-MISC.CSS
   ========================================================== */

/* Anpassad muspekare */
a, button, input[type=submit], select, label, [role=button] {
    cursor: url('https://studiokl.se/wp-content/uploads/2025/07/kl_mini_gra.png') 8 8, pointer;
}

/* Footer-fade vid scroll */
body.footer-in-view { background-color: var(--color-dark-bg) !important; }

/* Gutenberg-bilder */
.wp-block-image { margin: var(--sp-16) 0; }
.wp-block-image figcaption { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--color-muted); text-align: center; margin-top: var(--sp-3); }

/* Hjälpklass */
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }


/* ==========================================================
   SINGLE PROJECT HERO
   ========================================================== */

/* Entry-header inuti hero — all horisontell padding sitter HÄR */
.single-project-hero .entry-header {
    position: relative;
    z-index: 2;
    padding: 0 var(--padding-x) clamp(40px, 5vw, 80px);
    width: 100%;
    box-sizing: border-box;
}

/* ── Kategoriknappar ── */
.back-to-portfolio {
    display: flex;
    gap: var(--sp-3);
    margin-bottom: clamp(16px, 2vw, 28px);
    flex-wrap: wrap;
}

.hero-button {
    font-family: var(--font-display);
    font-size: clamp(0.7rem, 0.8vw, 0.85rem);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text);
    background: var(--color-highlight);
    text-decoration: none;
    padding: 6px 14px;
    transition: background var(--t-base), color var(--t-base);
    display: inline-block;
}
.hero-button:hover { background: var(--color-text); color: #fff; }

/* ── Titel — Space Grotesk, stor, ingen radbrytning ── */
.entry-title-wrap {
    margin-bottom: clamp(12px, 1.5vw, 24px);
}

.entry-title {
    display: inline !important;
    font-family: var(--font-display) !important;      /* Space Grotesk */
    font-size: clamp(2.6rem, 5vw, 6.5rem) !important;
    font-weight: 700 !important;
    line-height: 1.05 !important;
    white-space: nowrap;
    background-color: transparent;
    color: #fff !important;
    text-shadow: 0 2px 20px rgba(0,0,0,0.3);
    padding: 0.06em 0.18em;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
    margin: 0 !important;
}

/* ── Meta — Kund / År / Läs mer ── */
.project-meta {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: clamp(12px, 1.5vw, 20px);
}

.meta-item {
    display: inline-block;
    background-color: var(--color-highlight);
    color: var(--color-text);
    font-family: var(--font-display);
    font-size: clamp(0.95rem, 1.1vw, 1.2rem);        /* större än tidigare */
    font-weight: 500;
    padding: 5px 12px;
    line-height: 1.5;
    white-space: nowrap;
}

.meta-item strong { font-weight: 700; }

/* Läs mer — ingen extra indragning */
.meta-item.about-project-link,
.about-project-link {
    background: transparent;
    padding: 0;
    margin-left: 0;                                   /* ta bort indrag */
}

.meta-item.about-project-link a,
.about-project-link a {
    background-color: var(--color-highlight);
    color: var(--color-text);
    text-decoration: none;
    font-family: var(--font-display);
    font-size: clamp(0.95rem, 1.1vw, 1.2rem);
    font-weight: 600;
    padding: 5px 12px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: background var(--t-base);
}
.meta-item.about-project-link a:hover { background: #fff; }


/* ── Rullgardin-animation — varje rad åker upp sekventiellt ──
   clip-path börjar med 100% bottom (gömd) och öppnas uppåt.
   animation-fill-mode: both säkerställer att "from"-staten
   gäller direkt (ingen FOUC där elementen syns oclipade).   */

@keyframes heroRevealUp {
    from { clip-path: inset(0 0 100% 0); opacity: 0; }
    to   { clip-path: inset(0 0 0%   0); opacity: 1; }
}

/* Initial state: dubbelt säkrad — varken opacity eller clip syns
   innan animationen startar (förhindrar FOUC / spöktextblinkningar) */
.single-project-hero .back-to-portfolio,
.single-project-hero .entry-title-wrap,
.single-project-hero .project-meta {
    opacity: 0;
    clip-path: inset(0 0 100% 0);
}

.single-project-hero .back-to-portfolio {
    animation: heroRevealUp 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-delay: 0.05s;
}

.single-project-hero .entry-title-wrap {
    animation: heroRevealUp 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-delay: 0.25s;
}

.single-project-hero .project-meta {
    animation: heroRevealUp 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-delay: 0.45s;
}


/* ── Mobil ── */
@media (max-width: 900px) {
    .entry-title { white-space: normal !important; }
    .project-meta { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 767px) {
    .entry-title { font-size: clamp(1.8rem, 8vw, 3rem) !important; }
    .meta-item,
    .meta-item.about-project-link a { font-size: 1rem; }
}


/* ── Featured projects — VIKTIGT: INGEN overflow:hidden på sektionen ──
   Det dödar position:sticky på child-elementen. Sticky-stacking kräver
   att .featured-projects-fullwidth har overflow: visible. Ghost-text
   hanteras nu via display:none på .fp-category/.fp-info istället. */
.project-card-fullwidth {
    position: relative;
    /* overflow hanteras i _10-frontpage.css */
}