/*
Theme Name: 2f1d
Theme URI: https://2f1d.com
Author: Sergey Glebov
Description: Paper and ink theme for Sergey Glebov's site — offers, articles, and products.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 8.1
Text Domain: 2f1d
*/

@font-face {
    font-family: Inter;
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("assets/fonts/inter-latin-400.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: Inter;
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("assets/fonts/inter-latin-600.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: Inter;
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("assets/fonts/inter-latin-ext-400.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: Inter;
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("assets/fonts/inter-latin-ext-600.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: Inter;
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("assets/fonts/inter-cyrillic-400.woff2") format("woff2");
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
    font-family: Inter;
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("assets/fonts/inter-cyrillic-600.woff2") format("woff2");
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

:root {
    --paper: #f4efe6;
    --ink: #161513;
    --rule: rgba(22, 21, 19, 0.18);
    --mute: rgba(22, 21, 19, 0.62);
    --space: clamp(1.25rem, 4vw, 3rem);
    --measure: 68rem;
    --prose: 40rem;
}

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

html {
    font-size: 112.5%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: Inter, "Segoe UI", sans-serif;
    font-weight: 400;
    line-height: 1.55;
    letter-spacing: -0.011em;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-underline-offset: 0.18em;
}

a:hover {
    text-decoration-thickness: 2px;
}

.skip-link {
    position: absolute;
    left: 0.75rem;
    top: -4rem;
    background: var(--ink);
    color: var(--paper);
    padding: 0.4rem 0.7rem;
    z-index: 20;
}

.skip-link:focus {
    top: 0.75rem;
}

.wrap {
    width: min(var(--measure), calc(100% - 2 * var(--space)));
    margin-inline: auto;
}

.header-inner,
.footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.75rem 1.5rem;
    padding: var(--space) 0;
}

.header-inner {
    align-items: center;
}

.site-header {
    border-bottom: 1px solid var(--rule);
}

.wordmark {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-weight: 600;
    font-size: 1.05rem;
    letter-spacing: -0.02em;
    text-decoration: none;
    margin-right: auto;
}

.wordmark__mark {
    width: auto;
    height: 2.75rem;
    object-fit: contain;
    flex: none;
    display: block;
}

.wordmark--foot {
    margin: 0 0 0.35rem;
    color: var(--ink);
}

.site-nav .menu,
.sub-menu,
.lang-switch {
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-nav .menu {
    display: flex;
    flex-wrap: wrap;
    gap: 0.15rem 1.25rem;
}

.site-nav a {
    text-decoration: none;
    font-size: 0.92rem;
}

.site-nav a:hover,
.site-nav .is-current > a {
    text-decoration: underline;
}

.has-sub {
    position: relative;
}

.sub-menu {
    display: none;
    position: absolute;
    top: calc(100% + 0.35rem);
    left: -0.7rem;
    min-width: 14rem;
    background: var(--paper);
    border: 1px solid var(--rule);
    padding: 0.45rem 0.7rem;
    z-index: 5;
}

.has-sub:hover > .sub-menu,
.has-sub:focus-within > .sub-menu {
    display: block;
}

.sub-menu a {
    display: block;
    padding: 0.25rem 0;
}

.sub-menu .sub-menu {
    top: -0.35rem;
    left: auto;
    right: calc(100% - 1px);
    z-index: 6;
    max-width: 18rem;
}

.lang-switch {
    display: flex;
    gap: 0.55rem;
    margin-left: 0.5rem;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    font-weight: 600;
}

.lang-switch a {
    text-decoration: none;
    color: var(--mute);
}

.lang-switch a:hover {
    color: var(--ink);
    text-decoration: underline;
}

.lang-switch__current {
    text-decoration: underline;
}

.hero {
    padding: calc(var(--space) * 1.6) 0 var(--space);
}

.hero-inner {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: var(--space);
    align-items: center;
}

.hero-copy {
    container-type: inline-size;
}

.hero h1 {
    font-size: clamp(1.45rem, 8.5cqi, 3.2rem);
    text-wrap: balance;
}

.pitch {
    padding: 0 0 calc(var(--space) * 1.5);
}

.pitch-inner {
    max-width: var(--prose);
}

.pitch-inner .prose p {
    color: var(--mute);
}

.find-me {
    margin: 1.4rem 0 0;
}

.find-me__label {
    font-weight: 600;
    margin-right: 0.45rem;
}

.home-list {
    padding: calc(var(--space) * 1.2) 0 calc(var(--space) * 1.6);
    border-top: 1px solid var(--rule);
}

.home-list__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem 1.25rem;
    margin-bottom: 0.4rem;
}

.home-list__head h2 {
    margin: 0;
}

.cta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.8rem 1.4rem;
    margin-top: 1.6rem;
}

.btn {
    display: inline-block;
    text-decoration: none;
    border: 1px solid var(--ink);
    background: var(--ink);
    color: var(--paper);
    padding: 0.45rem 0.95rem;
    font-size: 0.95rem;
}

.btn:hover {
    background: transparent;
    color: var(--ink);
    text-decoration: none;
}

.text-link {
    font-size: 0.95rem;
}

.hero-fig img {
    width: 100%;
    max-width: 28rem;
    margin-inline: auto;
    mix-blend-mode: multiply;
}

.hero-fig--photo img {
    mix-blend-mode: normal;
}

.eyebrow {
    text-transform: lowercase;
    letter-spacing: 0.16em;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--mute);
    margin: 0 0 0.8rem;
}

.eyebrow a {
    text-decoration: none;
}

.eyebrow a:hover {
    text-decoration: underline;
}

h1,
h2,
h3 {
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.12;
    margin: 0 0 0.7em;
}

h1 {
    font-size: clamp(2.1rem, 6vw, 3.6rem);
}

h2 {
    font-size: clamp(1.4rem, 3vw, 1.9rem);
}

.lead {
    font-size: 1.15rem;
    max-width: 36rem;
    color: var(--mute);
}

.page-block {
    padding: calc(var(--space) * 1.4) 0 calc(var(--space) * 2);
}

.prose {
    max-width: var(--prose);
}

.prose > *:first-child {
    margin-top: 0;
}

.article-feed {
    list-style: none;
    margin: 1.8rem 0 0;
    padding: 0;
}

.article-feed__item {
    border-top: 1px solid var(--rule);
    padding: 1.15rem 0 1.3rem;
}

.article-feed__item h2 {
    font-size: 1.35rem;
    margin: 0 0 0.45rem;
}

.article-feed__item h2 a {
    text-decoration: none;
}

.article-feed__item h2 a:hover {
    text-decoration: underline;
}

.article-feed__item p {
    margin: 0;
}

.article-feed__more {
    margin-top: 0.65rem;
}

.card-list {
    list-style: none;
    padding: 0;
    margin: 2rem 0 0;
    display: grid;
    gap: 1rem;
    max-width: none;
}

.home-list .card-list {
    margin-top: 0;
}

.card {
    display: block;
    text-decoration: none;
    border-top: 1px solid var(--rule);
    padding: 1.1rem 0 0.4rem;
}

.card h2,
.card h3 {
    font-size: 1.35rem;
    margin-bottom: 0.35rem;
}

.card p {
    margin: 0;
    color: var(--mute);
}

.card__meta,
.card__tags {
    font-size: 0.82rem;
}

.card__meta {
    margin-bottom: 0.35rem;
}

.card__tags {
    margin-top: 0.35rem;
}

.source-note {
    color: var(--mute);
    font-size: 0.92rem;
}

.tag-row {
    margin-top: 1.6rem;
    font-size: 0.92rem;
}

.tag-row__label {
    font-weight: 600;
    margin-right: 0.45rem;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1rem;
    list-style: none;
    margin: 0.4rem 0 0;
    padding: 0;
}

.tag-list a {
    text-decoration: none;
    border-bottom: 1px solid var(--rule);
}

.card:hover h2,
.card:hover h3 {
    text-decoration: underline;
}

.contact-form {
    margin-top: 1.8rem;
    max-width: 28rem;
}

.contact-form label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    font: inherit;
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--ink);
    padding: 0.35rem 0;
    margin-bottom: 1.1rem;
    border-radius: 0;
}

.contact-form textarea {
    resize: vertical;
    min-height: 8rem;
}

.contact-form button {
    font: inherit;
    cursor: pointer;
    border: 1px solid var(--ink);
    background: var(--ink);
    color: var(--paper);
    padding: 0.45rem 0.95rem;
}

.contact-form button:hover {
    background: transparent;
    color: var(--ink);
}

.form-notice {
    padding: 0.6rem 0;
}

.form-notice--ok {
    color: var(--ink);
}

.form-notice--err {
    color: #7a1f11;
}

.hp {
    position: absolute;
    left: -9999px;
}

.site-footer {
    border-top: 1px solid var(--rule);
    color: var(--mute);
    font-size: 0.9rem;
}

.footer-inner {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    align-items: start;
    gap: 1.5rem 2.5rem;
}

.footer-col p {
    margin: 0 0 0.35rem;
}

.footer-heading {
    font-weight: 600;
    color: var(--ink);
}

.footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-links li + li {
    margin-top: 0.3rem;
}

.footer-reg {
    margin: 0;
}

.footer-reg div {
    display: flex;
    gap: 0.55rem;
    margin-bottom: 0.25rem;
}

.footer-reg dt {
    font-weight: 600;
    color: var(--ink);
}

.footer-reg dd {
    margin: 0;
}

.copy {
    margin-top: 0.8rem;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

@media (max-width: 800px) {
    .hero-inner {
        grid-template-columns: 1fr;
    }

    .hero-fig {
        order: -1;
        max-width: 16rem;
    }

    .sub-menu,
    .sub-menu .sub-menu {
        position: static;
        border: 0;
        padding: 0.15rem 0 0.15rem 0.8rem;
        min-width: 0;
        left: auto;
        right: auto;
        top: auto;
    }

    .has-sub:hover > .sub-menu {
        display: none;
    }

    .has-sub:focus-within > .sub-menu {
        display: block;
    }

    .footer-inner {
        grid-template-columns: 1fr;
    }
}
