/*
Theme Name: World Builders
Description: An illustrated game art and indie development journal.
Version: 2.0.0
License: GPL-2.0-or-later
*/
@font-face {
    font-family: 'Bricolage Grotesque';
    src: url('bricolage-grotesque-latin.woff2') format('woff2');
    font-style: normal;
    font-weight: 400 800;
    font-display: swap;
}

:root {
    color-scheme: light;
    --night: #121322;
    --paper: #fbf9f5;
    --ink: #202136;
    --muted: #585770;
    --light: #f9f6ff;
    --soft: #e2dcf0;
    --peach: #ffc692;
    --violet: #6041ad;
    --display: 'Bricolage Grotesque', system-ui, sans-serif;
}

* { box-sizing: border-box }
html { scroll-behavior: smooth }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.6 system-ui, sans-serif }
a { color: inherit; text-underline-offset: .22em }
img { display: block; max-width: 100%; height: auto }
h1, h2, h3, .wordmark { font-family: var(--display) }
:focus-visible { outline: 3px solid #7a54ce; outline-offset: 4px }
.skip { position: fixed; top: .5rem; left: .5rem; transform: translateY(-150%); background: var(--peach); color: var(--night); padding: .55rem 1rem; z-index: 100000 }
.skip:focus { transform: none }
.wrap { width: min(1120px, calc(100% - 64px)); margin-inline: auto }
.mast { color: var(--light); background: var(--night); position: relative; z-index: 2 }
.mast-inner, .foot-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 74px }
.wordmark { display: inline-flex; align-items: center; gap: .62rem; text-decoration: none; font-size: 1.41rem; font-weight: 800; letter-spacing: -.04em }
.wordmark span { display: grid; place-items: center; width: 33px; height: 33px; color: var(--night); background: var(--peach); border-radius: 42% 42% 42% 14%; font-family: system-ui, sans-serif; font-size: 1.3rem }
.mast nav, .foot-inner > div { display: flex; align-items: center; gap: clamp(.8rem, 3.4vw, 2.4rem) }
.mast nav a, .foot a { display: inline-flex; align-items: center; min-height: 44px; color: var(--soft); font-weight: 650; font-size: .88rem; text-decoration: none }
.mast nav a:hover, .foot a:hover { color: var(--peach); text-decoration: underline }
.mast :focus-visible, .hero :focus-visible, .foot :focus-visible { outline-color: var(--peach) }

.hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: clamp(565px, 47.5vw, 745px);
    background: var(--night);
    color: var(--light);
    text-align: center;
}
.scene {
    position: absolute;
    z-index: -2;
    inset: auto 0 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center bottom;
    mask-image: linear-gradient(transparent, #000 18%);
    transform: translate(var(--drift-x, 0), var(--drift-y, 0)) scale(1.025);
    transition: transform .32s ease-out;
    pointer-events: none;
}
.hero::after {
    content: '';
    position: absolute;
    z-index: 1;
    inset: auto -1px -1px;
    height: clamp(19px, 4.7vw, 69px);
    background: var(--paper);
    clip-path: polygon(0 60%, 4% 51%, 8% 53%, 12% 72%, 17% 69%, 24% 31%, 31% 13%, 35% 20%, 42% 59%, 48% 66%, 57% 63%, 64% 47%, 70% 42%, 79% 61%, 86% 58%, 94% 26%, 100% 30%, 100% 100%, 0 100%);
    pointer-events: none;
}
.hero-words { position: relative; width: min(750px, calc(100% - 40px)); padding-top: clamp(29px, 4vw, 66px) }
.hero h1 { margin: 0; font-size: clamp(3.65rem, 6.9vw, 6.45rem); line-height: .91; font-weight: 800; letter-spacing: -.073em }
.hero h1 em { color: var(--peach); font-style: normal }
.hero-words p { max-width: 43ch; margin: 1.25rem auto 1.35rem; color: var(--soft); font-size: clamp(1rem, 1.65vw, 1.135rem); line-height: 1.53; text-wrap: pretty }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .67rem }
.button { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; min-height: 46px; padding: .5rem 1.07rem; border: 1px solid var(--peach); border-radius: 100px; background: var(--peach); color: var(--night); font-size: .91rem; font-weight: 760; text-decoration: none }
.button:hover { border-color: #ffe0c0; background: #ffe0c0 }
.button-outline { border-color: #c6badb80; background: #121322a6; color: var(--light) }
.button-outline:hover { border-color: #fff4eb; background: #2b2642 }
.button span { line-height: 1 }

.workshop { padding-block: clamp(2.65rem, 5.9vw, 5.75rem) clamp(3.25rem, 7vw, 6.4rem) }
.workshop h2, .focus h2 { margin: 0 0 clamp(1.35rem, 3.5vw, 2.45rem); font-size: clamp(2.45rem, 5.4vw, 4.3rem); line-height: .96; font-weight: 800; letter-spacing: -.072em; text-align: center }
.workshop h2 em { color: var(--violet); font-style: normal }
.stories { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(285px, 100%), 1fr)); gap: 1rem }
.story-link { display: flex; flex-direction: column; height: 100%; border: 1px solid #e2dceb; border-radius: 22px; overflow: hidden; background: #fff; text-decoration: none; box-shadow: 0 8px 24px #2718490b }
.story-link:hover { border-color: #a690cf }
.story-link:hover h3 { text-decoration: underline }
.story-art { aspect-ratio: 1.9; overflow: hidden; background: #eae4f6 }
.story-art img { width: 100%; height: 100%; object-fit: cover }
.story-copy { align-self: center; width: 100%; padding: clamp(1.15rem, 3vw, 2.35rem) }
.topic, .entry-tag { margin: 0; color: var(--violet); font-weight: 730; font-size: .83rem }
.story-copy h3 { margin: .45rem 0 .6rem; font-size: clamp(1.35rem, 2.8vw, 2.25rem); line-height: 1.08; letter-spacing: -.04em; text-wrap: balance }
.story-copy > p:last-child { margin: 0; color: var(--muted); line-height: 1.5 }

.focus { padding: clamp(3.3rem, 6vw, 5.7rem) 0; background: #eae4f7 }
.focus h2 { font-size: clamp(2.15rem, 4.2vw, 3.8rem) }
.topic-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem }
.topic-grid > div { padding: clamp(1.1rem, 2.6vw, 1.8rem); background: #f8f5fd; border: 1px solid #dcd0ef; border-radius: 16px }
.topic-grid h3 { margin: .7rem 0 .3rem; font-size: 1.28rem; line-height: 1.1; letter-spacing: -.025em }
.topic-grid p { margin: 0; color: var(--muted); line-height: 1.48 }
.topic-icon { display: block; width: 31px; height: 31px; background: var(--violet) }
.topic-land { clip-path: polygon(0% 75%, 22% 41%, 41% 60%, 67% 19%, 100% 75%, 100% 95%, 0% 95%) }
.topic-tools { clip-path: polygon(50% 0%, 93% 24%, 93% 76%, 50% 100%, 7% 76%, 7% 24%, 50% 0%, 50% 17%, 22% 33%, 22% 67%, 50% 84%, 78% 67%, 78% 33%, 50% 17%) }
.topic-ui { background: linear-gradient(var(--violet), var(--violet)) center / 41% 41% no-repeat; border: 4px solid var(--violet); border-radius: 7px }
.foot { background: var(--night); color: var(--soft) }
.foot p { margin: 0; font-size: .88rem }

.reading { padding: clamp(2.7rem, 5.5vw, 5rem) 0; max-width: 880px; min-height: 65vh }
.entry-header h1, .reading > h1 { font-size: clamp(2.6rem, 6vw, 4.8rem); letter-spacing: -.072em; line-height: .99; margin: .5rem 0 .85rem }
.dek { font-size: 1.14rem; max-width: 58ch; color: var(--muted) }
.entry-header time { color: var(--muted); font-size: .86rem }
.entry-image { margin: 1.5rem 0 1.6rem; border: 1px solid #e2dceb; border-radius: 14px; overflow: hidden }
.entry-image img { width: 100% }
.entry { max-width: 760px; font-size: 1.08rem; line-height: 1.71 }
.entry h2 { margin: 1.8rem 0 .57rem; font-size: clamp(1.55rem, 4vw, 2.15rem); line-height: 1.13; letter-spacing: -.05em }
.entry a { color: var(--violet); overflow-wrap: anywhere }

@media (min-width: 680px) {
    .workshop .story:only-child .story-link { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr) }
    .workshop .story:only-child .story-art { height: 100% }
}
@media (max-width: 760px) {
    .wrap { width: calc(100% - 42px) }
    .hero { min-height: 530px }
    .hero-words { padding-top: 34px }
    .hero h1 { font-size: clamp(3.35rem, 10vw, 4.7rem) }
    .scene { height: 69%; object-position: 28% bottom; mask-image: linear-gradient(transparent, #000 24%) }
    .topic-grid { grid-template-columns: 1fr }
}
@media (max-width: 440px) {
    .wrap { width: calc(100% - 32px) }
    .mast-inner { min-height: 66px; gap: .6rem }
    .wordmark { font-size: 1.27rem; gap: .44rem }
    .wordmark span { width: 27px; height: 27px; font-size: 1rem }
    .mast nav { gap: .7rem }
    .mast nav a { font-size: .81rem }
    .hero { min-height: 544px }
    .hero-words { padding-top: 27px }
    .hero h1 { font-size: clamp(3.15rem, 13.4vw, 3.65rem) }
    .hero-words p { margin: 1.02rem auto 1.12rem }
    .hero-actions { gap: .48rem }
    .button { padding-inline: .86rem; font-size: .85rem }
    .scene { height: 63%; object-position: 18% bottom }
    .foot-inner { flex-wrap: wrap; gap: .45rem 1.1rem; padding-block: .85rem }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto }
    .scene { transform: none; transition: none }
}
