@import 'tailwindcss';

@font-face {
    font-family: 'Instrument Sans';
    src: url('../fonts/instrument-sans-latin-400-normal.woff2') format('woff2');
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: 'Instrument Sans';
    src: url('../fonts/instrument-sans-latin-600-normal.woff2') format('woff2');
    font-weight: 600;
    font-display: swap;
}

@font-face {
    font-family: 'Instrument Serif';
    src: url('../fonts/instrument-serif-latin-400-normal.woff2') format('woff2');
    font-display: swap;
}

@font-face {
    font-family: 'Instrument Serif';
    src: url('../fonts/instrument-serif-latin-400-italic.woff2') format('woff2');
    font-style: italic;
    font-display: swap;
}

:root {
    --paper: #faf9f4;
    --ink: #20271f;
    --olive: #354737;
    --leaf: #536a52;
    --muted: #61675c;
    --line: #ddded4;
    --serif: 'Instrument Serif', Georgia, serif;
    --sans: 'Instrument Sans', system-ui, sans-serif;
}

html {
    scroll-behavior: smooth;
}
body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font: 16px/1.5 var(--sans);
}
h1,
h2,
h3 {
    margin: 0;
    font-family: var(--serif);
    font-weight: 400;
    line-height: 1.02;
}
a,
button {
    -webkit-tap-highlight-color: transparent;
}
button {
    cursor: pointer;
}
button:disabled {
    cursor: wait;
    opacity: 0.65;
}
:focus-visible {
    outline: 2px solid var(--leaf);
    outline-offset: 4px;
}
.wrap {
    width: min(1220px, calc(100% - 112px));
    margin-inline: auto;
}
.muted {
    color: var(--muted);
}
.skip-link {
    position: absolute;
    z-index: 5;
    top: -100px;
    left: 12px;
    background: white;
    padding: 10px;
}
.skip-link:focus {
    top: 10px;
}

.site-header {
    border-bottom: 1px solid var(--line);
}
.header-inner {
    min-height: 78px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 25px;
}
.wordmark {
    display: inline-flex;
    align-items: center;
    justify-self: start;
    gap: 0;
    font: 35px/1 var(--serif);
    letter-spacing: -0.04em;
}
.wordmark-dot {
    color: var(--leaf);
}
.brand-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1px;
    margin-right: 9px;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--olive);
}
.brand-icon i {
    width: 7px;
    height: 10px;
    border: 1px solid #f8f5ec;
    border-radius: 2px 1px 1px 2px;
    transform: skewY(12deg);
}
.brand-icon i + i {
    transform: skewY(-12deg);
    border-radius: 1px 2px 2px 1px;
}
.header-inner nav a,
.account-nav {
    font-size: 14px;
    font-weight: 600;
}
.header-inner nav a {
    display: inline-block;
    padding: 28px 3px 25px;
}
.header-inner nav .active {
    border-bottom: 2px solid var(--leaf);
}
.account-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 25px;
    white-space: nowrap;
}
.solid,
.outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 44px;
    border-radius: 6px;
    padding: 10px 16px;
    border: 1px solid transparent;
    font-size: 14px;
    font-weight: 600;
}
.solid {
    background: var(--olive);
    color: white;
}
.solid:hover {
    background: #28392b;
}
.outline {
    border-color: #bac2b5;
    color: var(--olive);
}
.outline:hover {
    background: #ebeee5;
}
.nav-button {
    min-height: 38px;
    padding: 7px 13px;
}

.hero {
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    align-items: center;
    gap: clamp(28px, 5vw, 78px);
    padding: 51px 0 52px;
}
.hero-copy {
    padding-bottom: 4px;
}
.kicker {
    color: var(--leaf);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    line-height: 1.4;
}
.hero-kicker {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 20px;
}
.hero-kicker span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #71896b;
}
.hero h1 {
    font-size: clamp(61px, 6.7vw, 99px);
    line-height: 0.91;
    letter-spacing: -0.037em;
}
.hero h1 em {
    color: var(--leaf);
    font-weight: 400;
}
.hero-description {
    max-width: 345px;
    margin: 24px 0 27px;
    color: var(--muted);
    font-size: 16px;
    line-height: 1.6;
}
.feature {
    display: block;
    position: relative;
    isolation: isolate;
    height: clamp(355px, 33vw, 464px);
    overflow: hidden;
    border-radius: 9px;
    background: #445244;
    color: white;
}
.feature img {
    position: absolute;
    z-index: -2;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 50%;
    transform: scale(1.005);
    transition: transform 350ms ease;
}
.feature:hover img {
    transform: scale(1.035);
}
.feature::after {
    position: absolute;
    z-index: -1;
    inset: 0;
    content: '';
    background: linear-gradient(180deg, transparent 30%, #19211b26 50%, #131a14dc 100%);
}
.feature-copy {
    position: absolute;
    inset: auto 26px 24px;
}
.feature-copy .kicker {
    color: #f1f1e8;
    margin-bottom: 4px;
}
.feature-copy div {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 12px;
}
.feature h2 {
    font-size: clamp(29px, 3vw, 47px);
}
.feature-arrow {
    display: grid;
    flex: none;
    width: 41px;
    height: 41px;
    border: 1px solid #ffffff89;
    border-radius: 50%;
    place-items: center;
    font-size: 19px;
}

.stories {
    padding: 32px 0 76px;
    border-top: 1px solid var(--line);
    scroll-margin-top: 12px;
}
.section-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 25px;
}
.section-head h2 {
    margin-top: 4px;
    font-size: clamp(45px, 5vw, 65px);
    letter-spacing: -0.018em;
}
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    padding-bottom: 4px;
}
.filters button {
    min-height: 34px;
    padding: 6px 12px;
    border: 1px solid var(--line);
    border-radius: 99px;
    color: var(--muted);
    font-size: 13px;
}
.filters button[aria-pressed='true'] {
    border-color: var(--olive);
    background: var(--olive);
    color: white;
}
.filters button[aria-pressed='false']:hover {
    border-color: var(--leaf);
    color: var(--olive);
}
.post-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 40px 25px;
}
.card-link {
    display: block;
}
.card-cover {
    width: 100%;
    aspect-ratio: 1.68;
    object-fit: cover;
    border-radius: 7px;
    background: #e6eae0;
}
.text-cover {
    display: grid;
    place-items: center;
    color: var(--leaf);
    font: 72px/1 var(--serif);
}
.card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin: 15px 0 7px;
}
.card-meta time {
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap;
}
.post-card h3 {
    font-size: clamp(29px, 3vw, 41px);
    overflow-wrap: anywhere;
}
.post-card p {
    margin: 8px 0 14px;
    color: var(--muted);
    font-size: 14px;
    overflow-wrap: anywhere;
}
.card-read {
    color: var(--olive);
    font-size: 13px;
    font-weight: 600;
}
.card-link:hover .card-read {
    text-decoration: underline;
}

.site-footer {
    border-top: 1px solid var(--line);
}
.footer-inner {
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.footer-inner > a:last-child,
.back-link {
    color: var(--leaf);
    font-size: 14px;
    font-weight: 600;
}
.footer-inner .wordmark {
    font-size: 29px;
}
.reading-width {
    max-width: 710px;
    margin-inline: auto;
}
.reading-page {
    padding-block: 44px 85px;
}
.back-link {
    display: inline-block;
    margin-bottom: 30px;
}
.back-link:hover,
.account-switch a:hover,
.row-actions a:hover {
    text-decoration: underline;
}
.reading-page h1,
.studio-heading h1,
.editor-page h1 {
    margin: 8px 0 12px;
    font-size: clamp(57px, 8vw, 93px);
    overflow-wrap: anywhere;
}
.article-excerpt {
    color: var(--muted);
    font-size: clamp(18px, 2vw, 24px);
    overflow-wrap: anywhere;
}
.byline {
    display: flex;
    flex-wrap: wrap;
    gap: 9px 21px;
    margin-block: 19px 29px;
    color: var(--leaf);
    font-size: 14px;
}
.article-cover {
    width: 100%;
    max-width: 975px;
    max-height: 440px;
    margin: 0 auto 34px;
    border-radius: 8px;
    object-fit: cover;
}
.article-body {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font-size: 18px;
    line-height: 1.85;
}

.account-page {
    padding-block: 60px 90px;
}
.form-panel {
    width: min(100%, 495px);
    margin: auto;
    padding: clamp(24px, 4vw, 42px);
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fffef9;
}
.form-panel h1 {
    margin: 7px 0 12px;
    font-size: clamp(48px, 7vw, 65px);
}
.form-panel > .solid {
    margin-top: 20px;
}
.form-fields {
    display: grid;
    gap: 18px;
    margin-top: 24px;
}
.form-fields label {
    display: grid;
    gap: 7px;
    font-size: 14px;
    font-weight: 600;
}
.form-fields input,
.form-fields textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #b9c0b4;
    border-radius: 5px;
    background: #fffefa;
    color: var(--ink);
    font: 16px/1.45 var(--sans);
}
.form-fields textarea {
    resize: vertical;
}
.form-fields .check-label {
    display: flex;
    align-items: center;
    gap: 9px;
}
.form-fields .check-label input {
    width: 17px;
    height: 17px;
    accent-color: var(--olive);
}
.field-error {
    color: #9e342d;
    font-weight: 400;
}
.account-switch {
    margin-top: 24px;
    font-size: 14px;
    color: var(--muted);
}
.account-switch a,
.row-actions a:not(.solid) {
    color: var(--olive);
    font-weight: 600;
}
.studio-page {
    min-height: 65vh;
    padding-block: 55px 90px;
}
.studio-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 15px;
    margin-bottom: 26px;
}
.studio-heading .solid {
    margin-bottom: 10px;
    white-space: nowrap;
}
.notice,
.empty {
    padding: 15px 18px;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--olive);
}
.notice {
    margin-bottom: 14px;
    background: #edf1e8;
}
.empty a {
    text-decoration: underline;
}
.studio-list {
    border-top: 1px solid var(--line);
}
.studio-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px 25px;
    padding: 19px 0;
    border-bottom: 1px solid var(--line);
}
.studio-row h2 {
    margin: 4px 0 6px;
    font-size: 35px;
    overflow-wrap: anywhere;
}
.row-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 13px;
    font-size: 14px;
}
.delete-button {
    padding: 8px;
    color: #9e342d;
}
.delete-button:hover {
    text-decoration: underline;
}
.editor-page {
    max-width: 760px;
    padding-block: 47px 80px;
}

@media (max-width: 1000px) {
    .wrap {
        width: calc(100% - 64px);
    }
    .hero {
        gap: 25px;
    }
    .hero h1 {
        font-size: clamp(54px, 7.5vw, 78px);
    }
}

@media (max-width: 760px) {
    .wrap {
        width: calc(100% - 38px);
    }
    .header-inner {
        min-height: 66px;
        grid-template-columns: 1fr auto;
        gap: 12px;
    }
    .header-inner nav {
        display: none;
    }
    .account-nav {
        gap: 11px;
        font-size: 13px;
    }
    .nav-button {
        font-size: 12px;
        padding-inline: 9px;
        gap: 5px;
    }
    .wordmark {
        font-size: 30px;
    }
    .brand-icon {
        width: 24px;
        height: 24px;
        margin-right: 5px;
    }
    .hero {
        grid-template-columns: 1fr;
        padding-block: 36px 32px;
        gap: 28px;
    }
    .hero h1 {
        font-size: clamp(62px, 12vw, 90px);
    }
    .hero-kicker {
        margin-bottom: 16px;
    }
    .hero-description {
        margin-block: 18px 20px;
    }
    .feature {
        height: clamp(260px, 65vw, 415px);
    }
    .feature-copy {
        inset: auto 17px 17px;
    }
    .section-head {
        align-items: start;
        flex-direction: column;
        gap: 12px;
    }
    .post-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 29px 16px;
    }
}

@media (max-width: 465px) {
    .post-grid {
        grid-template-columns: 1fr;
    }
    .studio-row {
        align-items: start;
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .feature img {
        transition: none;
    }
}

.arrow {
    --arrow-angle: 0deg;
    position: relative;
    display: inline-block;
    flex: none;
    width: 13px;
    height: 13px;
    vertical-align: -2px;
    transform: rotate(var(--arrow-angle));
}

.arrow::before,
.arrow::after {
    position: absolute;
    content: '';
}
.arrow::before {
    top: 6px;
    left: 1px;
    width: 10px;
    border-top: 1px solid currentColor;
}
.arrow::after {
    top: 3px;
    right: 2px;
    width: 7px;
    height: 7px;
    transform: rotate(45deg);
    border-top: 1px solid currentColor;
    border-right: 1px solid currentColor;
}
.arrow-up-right {
    --arrow-angle: -45deg;
}
.arrow-down-right {
    --arrow-angle: 45deg;
}
.arrow-left {
    --arrow-angle: 180deg;
    margin-right: 4px;
}
