/* The wall of public comments (templates/wall/show.html.twig).
   Neo-brutalism in the colours of the main site: thick outlines and hard shadows on a plain blog skeleton.
   Nothing here is shared with the styles of the main site. */

:root {
    /* the colours of the four paths on the home page (Взор, Слово, Оракул, Кривите пътеки)
       on the site's parchment, with the light-and-shade of its wax seals */
    --ink: #2b2118;
    --ground: #f3e9d2;
    --paper: #f8f1e0;
    --teal: #2f6f73;
    --rust: #8a3b12;
    --violet: #4b3a7a;
    --olive: #5b6b2a;
    --teal-tint: color-mix(in srgb, var(--teal) 20%, var(--paper));
    --rust-tint: color-mix(in srgb, var(--rust) 20%, var(--paper));
    --tint: color-mix(in srgb, var(--violet) 12%, var(--paper));
    --mark: #ecd9a8;
    /* light from the top left, shade in the bottom right — laid over a flat colour */
    --shade:
        radial-gradient(ellipse at 18% -30%, rgb(255 255 255 / .42), transparent 60%),
        radial-gradient(ellipse at 90% 140%, rgb(0 0 0 / .38), transparent 62%);
    --line: 3px solid var(--ink);
    --radius: 8px;
    --shadow: 7px 7px 0 var(--ink);
    --shadow-small: 4px 4px 0 var(--ink);
    --serif: Georgia, "Times New Roman", serif;
}

html {
    font-size: 100%;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--ground);
    color: var(--ink);
    font-family: "Avenir Next", Avenir, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 17px;
    font-weight: 500;
    line-height: 1.6;
}

a {
    color: var(--ink);
    font-weight: 700;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

a:hover {
    background: var(--mark);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--ink);
    outline-offset: 3px;
}

.site {
    max-width: 1040px;
    margin: 0 auto;
    padding: 0 24px 80px;
}

/* the name of the site: white letters, dark outline, an orange shadow behind */

.site-header {
    position: relative;
    padding: 44px 0 36px;
}

.site-title {
    margin: 0;
    font-family: var(--serif);
    font-size: clamp(40px, 9vw, 76px);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.05;
}

.site-title a {
    color: var(--paper);
    text-decoration: none;
    -webkit-text-stroke: 8px var(--ink);
    paint-order: stroke fill;
    text-shadow: 6px 6px 0 var(--rust);
}

.site-title a:hover {
    background: none;
    text-shadow: 6px 6px 0 var(--violet);
}

/* four-pointed stars, as on an old poster */

.site-header::before,
.site-header::after,
.widget-area::after {
    content: "";
    position: absolute;
    width: 44px;
    height: 44px;
    background: var(--shade), var(--violet);
    clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%);
}

.site-header::before {
    top: 26px;
    right: 22%;
}

.site-header::after {
    right: 4%;
    bottom: 26px;
    width: 30px;
    height: 30px;
    background: var(--shade), var(--olive);
}

.site-content {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.content-area {
    flex: 1 1 0;
    min-width: 0;
}

.widget-area {
    position: relative;
    flex: 0 0 260px;
    font-size: 15px;
}

.widget-area::after {
    right: 12px;
    bottom: -64px;
    background: var(--shade), var(--teal);
}

/* the post: a window with a title bar */

.post,
.comment-respond,
.widget {
    border: var(--line);
    border-radius: var(--radius);
    background: var(--paper);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.entry-header {
    position: relative;
    padding: 18px 24px 16px 64px;
    border-bottom: var(--line);
    background: var(--shade), var(--violet);
    color: var(--paper);
}

.entry-header a {
    color: var(--paper);
}

.entry-header::before {
    content: "";
    position: absolute;
    top: 24px;
    left: 22px;
    width: 24px;
    height: 24px;
    border: var(--line);
    border-radius: 5px;
    background: var(--shade), var(--rust);
}

.entry-title {
    margin: 0;
    font-family: var(--serif);
    font-size: clamp(26px, 5vw, 36px);
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.entry-meta {
    margin: 4px 0 0;
    font-size: 13px;
    font-weight: 600;
}

.entry-meta a {
    font-weight: 700;
}

.entry-meta a:hover {
    background: var(--paper);
    color: var(--ink);
}

.entry-content {
    padding: 26px 24px 8px;
}

.entry-content p {
    margin: 0 0 1.3em;
}

code,
pre {
    font-family: "Courier New", Courier, monospace;
    font-size: 15px;
    font-weight: 700;
}

code {
    padding: 1px 6px;
    border: 2px solid var(--ink);
    border-radius: 5px;
    background: var(--teal-tint);
    white-space: nowrap;
}

pre {
    margin: 0 0 1.5em;
    padding: 18px 20px;
    border: var(--line);
    border-radius: var(--radius);
    background: var(--rust-tint);
    box-shadow: var(--shadow-small);
    line-height: 1.5;
    overflow-x: auto;
}

pre code {
    padding: 0;
    border: 0;
    background: none;
    white-space: pre;
}

/* comments */

.comments-area {
    margin-top: 48px;
}

.comments-title {
    display: inline-block;
    margin: 0 0 26px;
    padding: 8px 18px;
    border: var(--line);
    border-radius: var(--radius);
    background: var(--paper);
    box-shadow: var(--shadow-small);
    font-size: 18px;
    font-weight: 900;
    letter-spacing: 0.02em;
    line-height: 1.3;
    text-transform: uppercase;
}

.comment-navigation {
    display: flex;
    justify-content: space-between;
    margin: 0 0 26px;
}

.comment-navigation .nav-next {
    margin-left: auto;
}

.comment-navigation a,
.comment-reply-link,
.comment-reply-title small a {
    display: inline-block;
    padding: 4px 14px;
    border: var(--line);
    border-radius: var(--radius);
    background: var(--paper);
    box-shadow: var(--shadow-small);
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
}

.comment-navigation a:hover,
.comment-reply-link:hover,
.comment-reply-title small a:hover {
    background: var(--mark);
}

.comment-navigation a:active,
.comment-reply-link:active,
.comment-reply-title small a:active {
    box-shadow: none;
    transform: translate(4px, 4px);
}

.comment-list,
.comment-list .children {
    margin: 0;
    padding: 0;
    list-style: none;
}

.comment-list .children {
    margin-left: 44px;
}

.comment-body {
    margin: 0 0 24px;
    padding: 16px 18px 18px;
    border: var(--line);
    border-radius: var(--radius);
    background: var(--paper);
    box-shadow: var(--shadow-small);
}

.children .comment-body {
    background: var(--tint);
}

.comment-body:target {
    background: var(--mark);
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 16px;
}

.comment-author .fn {
    font-weight: 900;
}

.comment-author .avatar {
    flex: none;
    margin-right: 6px;
    border: var(--line);
    border-radius: 6px;
}

.avatar rect {
    fill: var(--teal);
}

.avatar path {
    fill: var(--paper);
}

.comment-list > .comment:nth-child(4n + 2) > .comment-body .avatar rect {
    fill: var(--olive);
}

.comment-list > .comment:nth-child(4n + 3) > .comment-body .avatar rect {
    fill: var(--rust);
}

.comment-list > .comment:nth-child(4n + 4) > .comment-body .avatar rect {
    fill: var(--violet);
}

.comment-metadata {
    margin: 2px 0 10px 60px;
    font-size: 13px;
    font-weight: 600;
}

.comment-metadata a {
    font-weight: 600;
    text-decoration: none;
}

.comment-metadata a:hover {
    text-decoration: underline;
}

.comment-metadata .via {
    display: inline-block;
    margin-left: 8px;
    padding: 0 8px;
    border: 2px solid var(--ink);
    border-radius: 999px;
    background: var(--shade), var(--olive);
    color: var(--paper);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.comment-content {
    margin-left: 60px;
    overflow-wrap: anywhere;
}

.comment-content p {
    margin: 0 0 10px;
}

.comment-content .comment-os {
    font-family: "Courier New", Courier, monospace;
    font-size: 14px;
    font-weight: 700;
}

.reply {
    margin: 14px 0 0 60px;
}

.moderation {
    margin: 14px 0 0 60px;
}

.comment-respond > .moderation {
    margin: 0;
    padding: 0 24px 22px;
}

.moderation button {
    margin: 0 10px 6px 0;
    padding: 3px 12px;
    border: 2px dashed var(--ink);
    border-radius: var(--radius);
    background: var(--paper);
    color: var(--ink);
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
}

.moderation button:hover {
    border-style: solid;
    background: var(--mark);
}

/* the form: another window */

.comment-respond {
    margin-top: 44px;
}

.comment-reply-title {
    margin: 0;
    padding: 14px 24px;
    border-bottom: var(--line);
    background: var(--shade), var(--rust);
    color: var(--paper);
    font-family: var(--serif);
    font-size: 24px;
    font-weight: 700;
    line-height: 1.3;
}

.comment-reply-title small {
    margin-left: 10px;
}

.comment-form {
    padding: 22px 24px 26px;
}

.comment-notes {
    margin: 0 0 18px;
    font-size: 14px;
    font-weight: 600;
}

.required {
    color: #a3271b;
    font-weight: 900;
}

.comment-form p {
    margin: 0 0 18px;
}

.comment-form .form-submit {
    margin: 26px 0 0;
}

.comment-form label {
    display: block;
    margin-bottom: 6px;
    font-size: 15px;
    font-weight: 800;
}

.comment-form textarea,
.comment-form input[type="text"] {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    padding: 10px 12px;
    border: var(--line);
    border-radius: var(--radius);
    background: var(--paper);
    color: var(--ink);
    font: inherit;
}

.comment-form input[type="text"] {
    max-width: 380px;
}

.comment-form textarea:focus,
.comment-form input[type="text"]:focus {
    outline: none;
    background: #fffaf0;
    box-shadow: var(--shadow-small);
}

/* not meant for people */
.comment-form .comment-form-contact {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.comment-form .submit {
    padding: 11px 24px;
    border: var(--line);
    border-radius: var(--radius);
    background: var(--shade), var(--violet);
    box-shadow: 5px 5px 0 var(--ink);
    color: var(--paper);
    font: inherit;
    font-size: 17px;
    font-weight: 900;
    cursor: pointer;
    transition: transform .12s ease-out, box-shadow .12s ease-out;
}

/* the button sinks: half way when pointed at, all the way down when pressed */
.comment-form .submit:hover {
    box-shadow: 2px 2px 0 var(--ink);
    transform: translate(3px, 3px);
}

.comment-form .submit:active {
    box-shadow: inset 3px 3px 0 rgb(0 0 0 / .45);
    transform: translate(5px, 5px);
}

.no-comments {
    margin: 0;
    padding: 22px 24px;
    font-weight: 800;
}

/* the side column: small windows, each with its own colour */

.widget {
    margin: 0 0 30px;
    box-shadow: var(--shadow-small);
}

.widget-title {
    margin: 0;
    padding: 9px 16px;
    border-bottom: var(--line);
    background: var(--shade), var(--teal);
    color: var(--paper);
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.widget:nth-child(2) .widget-title {
    background: var(--shade), var(--rust);
}

.widget:nth-child(3) .widget-title {
    background: var(--shade), var(--violet);
}

.widget:nth-child(4) .widget-title {
    background: var(--shade), var(--olive);
}

.widget ul {
    margin: 0;
    padding: 6px 16px 10px;
    list-style: none;
}

.widget li {
    padding: 7px 0;
    border-top: 2px dotted var(--ink);
    overflow-wrap: anywhere;
}

.widget li:first-child {
    border-top: 0;
}

@media (max-width: 820px) {
    :root {
        --shadow: 5px 5px 0 var(--ink);
    }

    body {
        font-size: 16px;
    }

    .site {
        padding: 0 16px 64px;
    }

    .site-header {
        padding: 28px 0 26px;
    }

    .site-title a {
        -webkit-text-stroke-width: 6px;
        text-shadow: 4px 4px 0 var(--rust);
    }

    .site-header::before {
        top: 12px;
        right: 8%;
        width: 32px;
        height: 32px;
    }

    .site-header::after {
        display: none;
    }

    .site-content {
        display: block;
    }

    .widget-area {
        margin-top: 48px;
    }

    .entry-header {
        padding: 14px 16px 12px 52px;
    }

    .entry-header::before {
        top: 19px;
        left: 14px;
        width: 20px;
        height: 20px;
    }

    .entry-content {
        padding: 20px 16px 4px;
    }

    .comment-list .children {
        margin-left: 18px;
    }

    .comment-metadata,
    .comment-content,
    .reply,
    .moderation {
        margin-left: 0;
    }

    .comment-reply-title {
        padding: 12px 16px;
        font-size: 21px;
    }

    .comment-form {
        padding: 18px 16px 22px;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
    }
}
