/*
Theme Name: Teknologika
Description: Teknologika brand 27.1 for the Ollie block theme.
Template: ollie
Version: 27.1.2
Requires at least: 6.6
Text Domain: teknologika-ollie
License: GNU General Public License v2 or later
*/

:root {
    --tk-blue: var(--wp--preset--color--primary, #3366ff);
    --tk-light-blue: var(--wp--preset--color--primary-accent, #6699cc);
    --tk-ink: var(--wp--preset--color--main, #0a0a0a);
    --tk-white: var(--wp--preset--color--base, #fff);
    --tk-gutter: clamp(20px, 5vw, 48px);
    --tk-wordmark: "Trebuchet MS", Tahoma, sans-serif;
    /* Ollie templates saved before 27.1 still refer to these presets. */
    --wp--preset--color--tertiary: var(--tk-white);
    --wp--preset--color--border-light: var(--wp--preset--color--main-accent, #999);
    --wp--preset--font-family--secondary: var(--wp--preset--font-family--primary);
}

.wp-site-blocks > :is(header, main, footer) {
    margin-block-start: 0;
}

.tk-header,
.tk-footer {
    background: var(--tk-blue);
    color: var(--tk-white);
    gap: 12px 20px;
    padding: 16px var(--tk-gutter);
}

.tk-header .tk-wordmark,
.tk-footer .tk-wordmark {
    color: inherit;
    font-family: var(--tk-wordmark);
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1;
    margin: 0;
}

.tk-header .tk-wordmark { font-size: 28px; }
.tk-footer .tk-wordmark { font-size: 16px; }
.tk-footer .tk-wordmark small { font-size: 12px; }

.tk-header a,
.tk-footer a {
    color: inherit;
    text-decoration: none;
}

.tk-nav .wp-block-navigation__container {
    gap: 4px 20px;
}

.tk-nav .wp-block-navigation-item__content {
    padding-block: 5px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1.15;
    text-transform: uppercase;
}

.tk-footer .tk-nav .wp-block-navigation-item__content {
    font-size: 11px;
    letter-spacing: 0.12em;
}

.tk-nav a:is([aria-current="page"], :hover),
.tk-nav .current-menu-item > a {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

.wp-site-blocks a:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 4px;
}

.wp-site-blocks main {
    background: var(--tk-white);
    color: var(--tk-ink);
}

.wp-block-post-content {
    font-size: 18px;
    line-height: 1.6;
}

.wp-block-post-content h2 {
    color: var(--tk-blue);
    font-size: 28px;
    line-height: 1.2;
    text-wrap: balance;
}

.wp-block-post-content a:not(.wp-block-button__link),
.wp-block-post-title a {
    color: var(--tk-ink);
    text-decoration: underline;
    text-decoration-color: var(--tk-blue);
    text-decoration-thickness: 3px;
    text-underline-offset: 0.18em;
}

.wp-block-post-content > .wp-block-paragraph:first-child {
    max-width: 36ch;
    font-size: 20px;
    line-height: 1.35;
}

/* WordPress centers constrained blocks independently. Align the title, date,
   and prose inside one column, including the narrower opening paragraph. */
.tk-article-reading .wp-site-blocks > main {
    width: calc(100% - 2 * var(--tk-gutter));
    max-width: 65ch;
    margin-inline: auto;
    font-size: 18px;
}

.tk-article-reading main > .has-global-padding {
    padding-inline: 0;
}

.tk-article-reading main > :has(> h1.wp-block-post-title) > *,
.tk-article-reading main > .wp-block-post-content > :not(.alignleft, .alignright, .aligncenter) {
    margin-inline: 0 !important;
}

.wp-block-post-content .wp-block-button__link {
    display: inline-block;
    padding: 4px 0;
    border: 0;
    border-radius: 0;
    background: none;
    color: var(--tk-ink);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1.15;
    text-transform: uppercase;
    text-decoration: underline;
    text-decoration-color: var(--tk-blue);
    text-decoration-thickness: 3px;
    text-underline-offset: 4px;
}

.wp-block-post-content .wp-block-button__link:hover {
    background: none;
    color: var(--tk-ink);
    text-decoration-thickness: 4px;
}

.tk-home {
    padding: clamp(40px, 7vw, 88px) var(--tk-gutter);
}

.is-style-references {
    margin-block-start: 3rem;
    font-size: 0.875rem;
    line-height: 1.65;
    overflow-wrap: anywhere;
}

.is-style-references :is(h2, h3, h4) { font-size: 1.25rem; }
.is-style-references :is(p, li, a) { font-size: inherit; }
.is-style-references > * + * { margin-block-start: 0.75rem; }
.wp-block-post-content hr.wp-block-separator { display: none; }

.tk-news-date {
    margin-block: 0 8px;
    color: var(--tk-ink);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.7;
    text-transform: uppercase;
}

.tk-news-date time {
    padding: 0.1em 0.4em;
    background: var(--tk-light-blue);
}

.wp-block-post-template > li:has(> .tk-news-date) {
    padding-block: 0;
    border: 0;
}

.wp-block-post-template > li:has(> .tk-news-date) > .wp-block-post-title {
    margin-block: 0 8px;
    font-size: 14px;
    font-weight: 300;
    line-height: 1.15;
}

.wp-block-post-template > li:has(> .tk-news-date) > .wp-block-post-excerpt {
    margin-block-start: 0;
}

@media (max-width: 639px) {
    .tk-header.is-layout-flex,
    .tk-footer.is-layout-flex {
        flex-direction: column;
        align-items: flex-start;
    }

    .tk-nav .wp-block-navigation__container {
        gap: 4px 16px;
    }

    .wp-block-table {
        max-width: 100%;
        overflow-x: auto;
    }
}
