/* Wylses site styles. Plain CSS, no framework. */

:root {
    --bg: #f7f4ef;        /* warm paper */
    --sand: #ebe3d6;      /* intro band */
    --text: #2b2722;      /* warm near-black */
    --muted: #6b6359;     /* stone */
    --rule: #d9d0c3;
    --accent: #8a4f33;    /* clay */
    --moss: #5d6b4e;
    --dark: #2b2722;
    --dark-text: #f3eee6;
    --dark-muted: #b3a999;
    --dark-accent: #e0b48f;
    --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
    --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color-scheme: light;
}

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

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

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-size: 1.0625rem;
    line-height: 1.65;
}

::selection {
    background: var(--accent);
    color: var(--bg);
}

/* Shared page width and side gutters */
.wrap {
    max-width: 70rem;
    margin: 0 auto;
    padding-left: clamp(1.25rem, 5vw, 3rem);
    padding-right: clamp(1.25rem, 5vw, 3rem);
}

a {
    color: var(--accent);
    text-underline-offset: 0.18em;
    text-decoration-thickness: 1px;
}

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

a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 2px;
}

h1,
h2,
h3 {
    font-family: var(--serif);
    font-weight: 600;
}

p {
    margin: 0 0 1rem;
}

/* Intro band */

.hero {
    background: var(--sand) url("/img/contours.svg") no-repeat;
    background-position: right -18rem center;
    background-size: 78rem auto;
    border-bottom: 1px solid var(--rule);
    overflow: hidden;
}

/* Short pages (404): stretch the intro band so the footer sits at the bottom */
.short-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.short-page .hero {
    flex: 1;
    background-size: cover;
    background-position: left 30% center;
}

/* On narrow screens the lines sit behind the headline, so fade them */
@media (max-width: 40rem) {
    .hero {
        background-image: linear-gradient(rgba(235, 227, 214, 0.7), rgba(235, 227, 214, 0.7)), url("/img/contours.svg");
    }
}

.topbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem 2rem;
    padding-top: 1.75rem;
}

.logo img {
    display: block;
    width: 8.5rem;
    height: auto;
}

.topbar nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.75rem;
    font-size: 1.0625rem;
}

.topbar nav a {
    color: var(--text);
    font-weight: 600;
    text-decoration: none;
}

.topbar nav a:hover {
    color: var(--accent);
    text-decoration: underline;
}

h1 {
    max-width: 17ch;
    margin: clamp(3.5rem, 10vw, 7rem) 0 0;
    font-size: clamp(2.5rem, 6.5vw, 4.75rem);
    font-weight: 500;
    line-height: 1.05;
    letter-spacing: -0.02em;
}

h1 em {
    color: var(--accent);
}

.lede {
    margin: 1.75rem 0 0;
    padding-bottom: clamp(3.5rem, 8vw, 6rem);
    color: var(--muted);
    font-size: 1.1875rem;
}

/* Sections: label column on the left, content on the right */

.block {
    display: grid;
    gap: 1.25rem;
    padding-top: clamp(3rem, 7vw, 5rem);
    padding-bottom: clamp(3rem, 7vw, 5rem);
    scroll-margin-top: 0;
}

.block + .block {
    border-top: 1px solid var(--rule);
}

@media (min-width: 56rem) {
    .block {
        grid-template-columns: 13rem 1fr;
        gap: 3rem;
    }

    .label {
        position: sticky;
        top: 2rem;
        align-self: start;
    }
}

.label {
    margin: 0;
    padding-top: 0.35rem;
    color: var(--accent);
    font-family: var(--sans);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.content {
    max-width: 46rem;
}

.content > :last-child {
    margin-bottom: 0;
}

/* Services: numbered rows */

.services {
    max-width: 46rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.services li {
    display: grid;
    grid-template-columns: 3.5rem 1fr;
    gap: 1rem;
    padding: 1.75rem 0;
    border-top: 1px solid var(--rule);
    scroll-margin-top: 1rem;
}

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

.services li:last-child {
    padding-bottom: 0;
}

.num {
    color: var(--accent);
    font-family: var(--serif);
    font-size: 2rem;
    font-style: italic;
    line-height: 1;
}

.services h3 {
    margin: 0 0 0.5rem;
    font-size: 1.5rem;
    line-height: 1.2;
}

.services p {
    margin: 0;
    color: var(--muted);
}

/* Work */

.work-intro {
    color: var(--muted);
}

.feature {
    margin: 2rem 0 2.5rem;
    padding-left: 1.5rem;
    border-left: 3px solid var(--accent);
}

.feature h3,
.pair h3 {
    margin: 0 0 0.5rem;
    color: var(--moss);
    font-family: var(--sans);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.feature p {
    margin: 0;
    font-family: var(--serif);
    font-size: clamp(1.3125rem, 2.6vw, 1.625rem);
    line-height: 1.45;
}

.pair {
    display: grid;
    gap: 1.5rem 2.5rem;
}

@media (min-width: 40rem) {
    .pair {
        grid-template-columns: 1fr 1fr;
    }
}

.pair > div {
    padding-top: 1rem;
    border-top: 2px solid var(--moss);
}

.pair p {
    margin: 0;
}

/* Larger serif sentences (About, Contact) */

.statement {
    font-family: var(--serif);
    font-size: clamp(1.375rem, 3vw, 1.875rem);
    line-height: 1.4;
}

/* Contact and footer, on the dark band */

.closing {
    background: var(--dark);
    color: var(--dark-text);
}

.closing .label {
    color: var(--dark-accent);
}

.closing a {
    color: var(--dark-accent);
}

.closing a:focus-visible {
    outline-color: var(--dark-accent);
}

.site-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 2rem;
    padding-top: 2rem;
    padding-bottom: 2.5rem;
    border-top: 1px solid rgba(243, 238, 230, 0.15);
    color: var(--dark-muted);
    font-size: 0.8125rem;
    line-height: 1.6;
}

.closing > .site-footer:first-child {
    border-top: 0;
}

.site-footer img {
    width: 5rem;
    height: auto;
    filter: invert(1);
    opacity: 0.8;
}

.site-footer p {
    flex: 1 1 20rem;
    margin: 0;
}
