/* FAGGOT.CZ — tech / cutting-mat aesthetic */

:root {
    --bg: #04301f;
    --text: #d6cebf;
    --accent: #d6cebf;
    --accent-muted: #d6cebf;
    --h1-underline-color: var(--accent);
    --chrome-bg: #121111;
}

body.light-mode {
    --bg: #04301f;
    --text: #d6cebf;
    --accent: #d6cebf;
    --accent-muted: #d6cebf;
    --h1-underline-color: var(--accent);
    --chrome-bg: #121111;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Satoshi", system-ui, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    border-bottom: 1px solid var(--accent-muted);
    line-height: 1.55;
}

.blueprint-grid {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-color: var(--bg);
    background-image: url("../images/IMG_1041.JPG");
    background-size: 100% auto;
    background-repeat: repeat-y;
    background-position: top center;
    opacity: 0.72;
    filter: none;
    transform: none;
    transform-origin: center;
}


#app-root {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#app-root::before {
    content: ;
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 40;
    opacity: 0.46;
    background-image: radial-gradient(rgba(255,255,255,0.16) 0 1px, transparent 1.35px), radial-gradient(rgba(0,0,0,0.26) 0 1px, transparent 1.7px);
    background-position: 0 0, 1px 1px;
    background-size: 3px 3px, 4px 4px;
    mix-blend-mode: normal;
}

#app-root > * {
    position: relative;
    z-index: 3;
}

main#main-content {
    flex: 1;
    padding: 1rem 1.25rem 3.5rem;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
    border-top: none;
}

/* --- Tech tiles (green “mat” gap + line frame) --- */
.tech-tile-outer {
    background: var(--bg);
    padding: 14px;
    margin-bottom: 1rem;
}

.tech-tile {
    border: 1px solid var(--accent);
    padding: 1.25rem 1.35rem;
    background: #992208;
    position: relative;
}

.tech-tile::before,
.tech-tile::after {
    content: "";
    position: absolute;
    width: 7px;
    height: 7px;
    border-color: var(--accent);
    border-style: solid;
    pointer-events: none;
    opacity: 0.85;
}

.tech-tile::before {
    top: -1px;
    left: -1px;
    border-width: 1px 0 0 1px;
}

.tech-tile::after {
    bottom: -1px;
    right: -1px;
    border-width: 0 1px 1px 0;
}

.content-container h1,
.sub-page-container h1 {
    font-family: "Lora", Georgia, serif;
    font-weight: 500;
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    margin: 0 0 1.25rem;
    position: relative;
    color: var(--text);
    padding-bottom: 8px;
    border-bottom: 1px solid var(--accent-muted);
}

/* On mobile, headings sit directly above the background image. */
@media (max-width: 767.98px) {
    .content-container h1,
    .sub-page-container h1 {
        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.75);
    }
}

.last-updated-label {
    display: block;
    font-size: 0.8rem;
    opacity: 0.65;
    margin-top: 0.5rem;
    font-family: "Satoshi", system-ui, sans-serif;
}

/* --- Header --- */
.site-header {
    position: relative;
    z-index: 500;
    background: var(--chrome-bg);
}

.header-bar {
    border-bottom: none;
    padding: 0.65rem 0;
    background: var(--chrome-bg);
}

.header-bar-inner {
    width: 100%;
    max-width: none;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0 1rem;
}

.mobile-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border: 1px solid var(--accent);
    color: var(--accent);
    text-decoration: none;
    font-family: "Lora", serif;
    font-weight: 600;
    font-size: 1.1rem;
}

.mobile-wordmark {
    margin: 0;
    flex: 1;
    text-align: center;
}

.mobile-wordmark a {
    font-family: "Lora", Georgia, serif;
    font-size: clamp(1.9rem, 9vw, 2.9rem);
    font-weight: 500;
    line-height: 1;
    color: var(--text);
    text-decoration: none;
}

.desktop-nav {
    display: none;
    align-items: center;
    gap: 1.5rem;
    flex: 1;
    justify-content: flex-end;
    margin-left: auto;
    padding-right: 0;
}

.desktop-nav a {
    color: var(--text);
    text-decoration: none;
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border-bottom: 1px solid transparent;
    padding-bottom: 2px;
    transition: border-color 0.2s, color 0.2s;
}

.desktop-nav a:hover {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.nav-cta {
    font-weight: 800 !important;
}

.menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    background: transparent;
    border: 1px solid var(--accent-muted);
    cursor: pointer;
    padding: 0 10px;
    margin: 0;
}

.menu-toggle span {
    display: block;
    height: 1px;
    background: var(--accent);
}

body.desktop-view .menu-toggle {
    display: none;
}

body.desktop-view .mobile-brand {
    display: none;
}

body.desktop-view .desktop-nav {
    display: flex;
}

.site-wordmark {
    margin: 0;
    padding: 1.25rem 1rem 0.5rem;
    text-align: center;
    background: var(--chrome-bg);
    display: none;
}

.site-wordmark a {
    font-family: "Lora", Georgia, serif;
    font-size: clamp(1.9rem, 9vw, 2.9rem);
    font-weight: 500;
    color: var(--text);
    text-decoration: none;
    letter-spacing: 0.02em;
    display: inline-block;
    transform: none;
}

.site-wordmark a:hover {
    color: var(--accent);
}

/* --- Nav overlay (mobile) --- */
.nav-popup {
    position: fixed;
    inset: 0;
    background: #121111 !important;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    padding: 4rem 1.5rem 2rem;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    border-left: 1px solid var(--accent-muted);
}

.nav-popup.active {
    transform: translateX(0);
}

.nav-popup::before {
    content: "";
    position: absolute;
    inset: 0;
    background: #121111;
    z-index: 0;
}

.nav-popup > * {
    position: relative;
    z-index: 1;
}

body.menu-open main#main-content,
body.menu-open #footer-placeholder,
body.menu-open .support-rail.external {
    visibility: hidden;
}

.menu-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--accent-muted);
    color: var(--text);
    font-size: 2rem;
    line-height: 0.9;
    cursor: pointer;
    padding: 0;
}

.nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.nav-links a {
    display: block;
    color: var(--text);
    text-decoration: none;
    font-size: 1.05rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--accent-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.9rem;
}

.nav-links a.nav-cta {
    font-weight: 800;
}

body.desktop-view .nav-popup {
    display: none;
}

body.desktop-view #menu-toggle {
    display: none;
}

/* --- Theme toggle --- */
.theme-toggle-pill {
    width: 52px;
    height: 28px;
    border-radius: 14px;
    border: 1px solid var(--accent-muted);
    background: transparent;
    cursor: pointer;
    position: relative;
    padding: 0;
}

.toggle-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.25s ease;
}

body.light-mode .toggle-thumb {
    transform: translateX(24px);
}

.toggle-thumb .icon {
    width: 12px;
    height: 12px;
    stroke: var(--bg);
    position: absolute;
}

.toggle-thumb .icon.sun {
    opacity: 1;
}

.toggle-thumb .icon.moon {
    opacity: 0;
}

body.light-mode .toggle-thumb .icon.sun {
    opacity: 0;
}

body.light-mode .toggle-thumb .icon.moon {
    opacity: 1;
}

.mobile-toggle .toggle-thumb .icon {
    stroke: var(--bg);
}

.theme-toggle-floating {
    display: none;
    position: fixed;
    bottom: max(1.25rem, env(safe-area-inset-bottom, 0px));
    right: max(1.25rem, env(safe-area-inset-right, 0px));
    z-index: 150;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

.nav-menu-theme-toggle {
    position: absolute;
    right: 1rem;
    bottom: 1rem;
}

/* --- Articles (Krucinál) --- */
.articles-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.article-preview .article-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.article-category {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--accent);
}

.article-preview h2 {
    font-family: "Lora", serif;
    font-size: 1.35rem;
    margin: 0.35rem 0 0.5rem;
    color: var(--text);
}

.article-preview p {
    margin: 0;
    opacity: 0.88;
    font-size: 0.95rem;
}

.article-date-preview {
    display: block;
    margin-top: 0.75rem;
    font-size: 0.8rem;
    opacity: 0.6;
}

.article-link:hover h2 {
    color: var(--accent);
}

.sub-page-container h2 {
    font-family: "Lora", serif;
    font-weight: 500;
    margin-top: 0.5rem;
}

.back-link {
    display: inline-block;
    margin-bottom: 1rem;
    color: var(--accent);
    text-decoration: none;
    font-size: 0.9rem;
}

.back-link:hover {
    text-decoration: underline;
}

/* --- Footer --- */
footer {
    text-align: center;
    padding: 2rem 1rem 2.5rem;
    font-size: 0.88rem;
    color: var(--text);
    background: var(--chrome-bg);
    position: relative;
    z-index: 2;
    border-top: none;
}

footer::before {
    content: "";
    display: block;
    width: calc(100% - 2.4rem);
    max-width: 980px;
    margin: 0 auto 1rem;
    height: 1px;
    background: var(--accent-muted);
}

.desktop-footer-content {
    display: none;
}

body.desktop-view .desktop-footer-content {
    display: block;
    min-height: 0;
}

.desktop-divider {
    width: min(420px, 80%);
    height: 1px;
    background: var(--accent);
    margin: 0 auto 1rem;
    opacity: 0.45;
}

.footer-copy {
    margin: 0;
    opacity: 0.85;
}

/* --- Homepage tiles --- */
.home-intro .tech-tile p:first-of-type {
    margin-top: 0;
}

.paywall-lede {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #111;
    font-size: 0.95rem;
}

.paywall-tile {
    background: #992208;
}

/* Main content tiles inside black frame */
main#main-content .tech-tile-outer {
    background: #43687a;
}

main#main-content .tech-tile {
    background: #43687a;
    color: var(--text);
    border: none;
}

main#main-content .tech-tile .paywall-lede {
    color: var(--text);
}

.paywall-qr-wrap {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(17, 17, 17, 0.45);
    text-align: center;
}

.paywall-qr {
    width: min(240px, 72vw);
    height: auto;
    display: block;
    margin: 0 auto;
    background: transparent;
    padding: 0;
}

.support-rail {
    display: none;
}

.support-rail.external {
    position: fixed;
    z-index: 120;
    min-width: 240px;
    overflow: auto;
}

.support-rail .tech-tile-outer {
    background: #992208;
    margin-bottom: 0;
}

.support-rail .tech-tile {
    min-height: 100%;
}

.support-rail.external .tech-tile-outer {
    height: 100%;
    display: flex;
}

.support-rail.external .tech-tile {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
}

.support-rail .support-title {
    margin: 0 0 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.82rem;
    color: var(--accent);
    font-weight: 700;
}

.support-rail .support-text {
    margin: 0 0 0.9rem;
    opacity: 0.9;
    font-size: 0.88rem;
    line-height: 1.45;
}

.support-rail .paywall-qr-wrap {
    margin-top: auto;
    border-top: 2px solid var(--text);
    padding-top: 1.15rem;
}

.support-rail .paywall-qr {
    filter: brightness(0) saturate(100%) invert(86%) sepia(15%) saturate(227%) hue-rotate(355deg) brightness(92%) contrast(88%);
}

/* Underline animation intentionally removed */

@media (min-width: 768px) {
    .blueprint-grid {
        background-image: linear-gradient(
                rgba(0, 0, 0, 0.36),
                rgba(0, 0, 0, 0.36)
            ),
            url("../images/IMG_1041.JPG");
        background-size: cover;
        background-repeat: no-repeat;
        background-position: center;
    }

    /* Desktop cutout effect: image shows inside content cutouts. */
    main#main-content .tech-tile-outer {
        background: transparent;
        padding: 0;
    }

    main#main-content .tech-tile {
        background-image: linear-gradient(
                rgba(0, 0, 0, 0.36),
                rgba(0, 0, 0, 0.36)
            ),
            url("../images/IMG_1041.JPG");
        background-size: cover;
        background-position: center;
        background-attachment: fixed;
        color: var(--text);
    }

    /* Same cream + dark blur shadow as mobile headings over the image. */
    main#main-content .tech-tile p,
    main#main-content .tech-tile li,
    main#main-content .tech-tile a,
    main#main-content .tech-tile .paywall-lede,
    main#main-content .tech-tile h2,
    main#main-content .tech-tile h3 {
        color: var(--text);
        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.75);
    }

    #app-root {
        width: min(1180px, calc(100vw - 5rem));
        margin-left: 2.5rem;
        margin-right: auto;
        margin-top: 1.25rem;
        margin-bottom: 1.25rem;
        border: 1px solid var(--accent);
        background: var(--chrome-bg);
    }

    main#main-content {
        padding: 6rem 2.5rem 3.5rem;
        max-width: none;
        margin: 0;
    }

    .support-rail.external {
        display: block;
    }

    .theme-toggle-floating {
        display: block;
    }

    .nav-menu-theme-toggle {
        display: none;
    }

    .header-bar {
        padding: 1.8rem 1.25rem 0.2rem;
        border-bottom: none;
    }

    .header-bar-inner {
        padding: 0;
        gap: 0.75rem;
    }

    .desktop-nav {
        margin-left: auto;
        gap: 1rem;
        align-items: flex-start;
    }

    .mobile-wordmark {
        display: none;
    }

    .desktop-nav a {
        font-size: 0.62rem;
        letter-spacing: 0.14em;
        opacity: 0.92;
    }

    .site-wordmark {
        padding: 0.35rem 1rem 1.2rem;
        text-align: left;
        border-bottom: none;
        display: block;
    }

    .site-wordmark a {
        display: block;
        line-height: 0.9;
        font-size: clamp(3rem, 7.5vw, 6rem);
        letter-spacing: 0.01em;
        transform: translateX(3.2rem);
    }

    /* Subtle divider in the body area */
    .main-divider-disabled::before {
        content: "";
        display: block;
        width: 100%;
        height: 1px;
        background: var(--accent-muted);
        margin-bottom: 1.25rem;
    }
}
