/* CDDC public site — paper, ink, one green. No glow, no gradient text. */

@font-face {
    font-family: "CDDC Sans";
    src: url("/static/fonts/IBMPlexSans-Regular.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "CDDC Sans";
    src: url("/static/fonts/IBMPlexSans-Medium.ttf") format("truetype");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "CDDC Sans";
    src: url("/static/fonts/IBMPlexSans-SemiBold.ttf") format("truetype");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "CDDC Serif";
    src: url("/static/fonts/SourceSerif4-Regular.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "CDDC Serif";
    src: url("/static/fonts/SourceSerif4-Semibold.ttf") format("truetype");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

:root {
    --paper: #f4efe6;
    --paper-2: #ebe4d6;
    --ink: #1b1914;
    --ink-2: #3f3a32;
    --muted: #6d675c;
    --rule: #d2c9b6;
    --pine: #1f4336;
    --pine-ink: #f3efe6;
    --rust: #9a3d1c;
    --white: #fffdf8;
    --focus: #1f4336;
    --sans: "CDDC Sans", "Segoe UI", system-ui, sans-serif;
    --serif: "CDDC Serif", Georgia, "Times New Roman", serif;
    --measure: 72rem;
}

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

html {
    scroll-behavior: smooth;
    font-size: 17px;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    word-spacing: 0.08em;
}

body {
    font-family: var(--sans);
    background: var(--paper);
    color: var(--ink);
    line-height: 1.55;
    min-height: 100vh;
    word-spacing: 0.08em;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }

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

.skip {
    position: absolute;
    left: 1rem;
    top: -4rem;
    background: var(--ink);
    color: var(--paper);
    padding: 0.5rem 0.8rem;
    z-index: 80;
}
.skip:focus { top: 1rem; }

/* ── Header ── */

.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: color-mix(in srgb, var(--paper) 92%, transparent);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--rule);
}

.header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    min-height: 4.25rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    min-width: 0;
}

.brand img {
    width: 36px;
    height: 36px;
    border-radius: 4px;
}

.brand-name {
    font-family: var(--serif);
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.15;
}

.brand-sub {
    display: block;
    font-family: var(--sans);
    font-size: 0.68rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    margin-top: 0.1rem;
}

.nav {
    display: flex;
    align-items: center;
    gap: 1.4rem;
}

.nav a {
    text-decoration: none;
    font-size: 0.92rem;
    color: var(--ink-2);
}

.nav a:hover,
.nav a[aria-current="page"] {
    color: var(--ink);
    text-decoration: underline;
    text-underline-offset: 0.25em;
}

.nav-cta {
    display: inline-flex;
    align-items: center;
    background: var(--pine) !important;
    color: var(--pine-ink) !important;
    text-decoration: none !important;
    padding: 0.45rem 0.85rem;
    font-size: 0.88rem;
}

.menu-btn {
    display: none;
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid var(--rule);
    background: var(--white);
}

.menu-btn span {
    display: block;
    width: 1rem;
    height: 1px;
    margin: 0.22rem auto;
    background: var(--ink);
}

@media (max-width: 860px) {
    .menu-btn { display: block; }
    .nav {
        display: none;
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0.5rem 1.25rem 1rem;
        background: var(--paper);
        border-bottom: 1px solid var(--rule);
    }
    .nav.open { display: flex; }
    .nav a { padding: 0.7rem 0; border-bottom: 1px solid var(--rule); }
    .nav-cta { margin-top: 0.6rem; justify-content: center; }
}

/* ── Type ── */

.kicker {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--pine);
}

h1, h2, .display {
    font-family: var(--serif);
    font-weight: 600;
    letter-spacing: -0.01em;
    word-spacing: 0.06em;
    line-height: 1.12;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
h3 {
    font-family: var(--serif);
    font-size: 1.35rem;
    font-weight: 600;
    line-height: 1.25;
}

.lede {
    font-family: var(--serif);
    font-size: clamp(1.2rem, 2vw, 1.45rem);
    line-height: 1.45;
    color: var(--ink-2);
    max-width: 38rem;
}

.quiet { color: var(--muted); }

/* ── Hero ── */

.hero {
    padding: 4.5rem 0 3.5rem;
    border-bottom: 1px solid var(--rule);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr;
    gap: 3rem;
    align-items: end;
}

.hero h1 { margin: 0.7rem 0 1.2rem; max-width: 22ch; }
.hero .lede { margin-bottom: 1.8rem; }

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 2.7rem;
    padding: 0.5rem 1rem;
    text-decoration: none;
    font-size: 0.95rem;
}

.btn-fill {
    background: var(--pine);
    color: var(--pine-ink);
}

.btn-line {
    border: 1px solid var(--ink);
    background: transparent;
}

.btn:hover { opacity: 0.9; }

.hero-aside {
    border-left: 1px solid var(--rule);
    padding-left: 1.6rem;
    font-size: 0.95rem;
}

.hero-aside dt {
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    margin-top: 1rem;
}
.hero-aside dt:first-child { margin-top: 0; }
.hero-aside dd { margin-top: 0.2rem; }

@media (max-width: 800px) {
    .hero { padding: 2.8rem 0 2.4rem; }
    .hero-grid { grid-template-columns: 1fr; gap: 2rem; }
    .hero-aside { border-left: 0; border-top: 1px solid var(--rule); padding: 1.4rem 0 0; }
}

/* ── Sections ── */

.section { padding: 4.2rem 0; }
.section + .section { border-top: 1px solid var(--rule); }

.section-head {
    display: grid;
    grid-template-columns: 10rem 1fr;
    gap: 2rem;
    margin-bottom: 2.4rem;
    align-items: baseline;
}

.section-head p { max-width: 36rem; color: var(--ink-2); }

@media (max-width: 700px) {
    .section-head { grid-template-columns: 1fr; gap: 0.5rem; }
}

/* ── Services ── */

.services {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.service {
    padding: 0;
    border: 0;
}

.service h3 { margin: 0.35rem 0 0.6rem; }
.service p { color: var(--ink-2); font-size: 0.98rem; }
.service ul {
    margin: 1rem 0 0;
    padding-left: 1.1rem;
    color: var(--ink-2);
    font-size: 0.92rem;
}
.service li + li { margin-top: 0.25rem; }

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

/* ── Project teaser ── */

.work-list {
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--rule);
}

.work-row {
    display: grid;
    grid-template-columns: 9rem 1fr auto;
    gap: 1.2rem;
    align-items: baseline;
    padding: 1.15rem 0;
    border-bottom: 1px solid var(--rule);
    text-decoration: none;
}

.work-row:hover .work-name { text-decoration: underline; text-underline-offset: 0.18em; }
.work-kind {
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}
.work-name {
    font-family: var(--serif);
    font-size: 1.35rem;
}
.work-blurb { color: var(--ink-2); margin-top: 0.2rem; font-size: 0.95rem; max-width: 40rem; }
.work-go { font-size: 0.88rem; color: var(--pine); white-space: nowrap; }

@media (max-width: 720px) {
    .work-row { grid-template-columns: 1fr; gap: 0.25rem; }
    .work-go { margin-top: 0.3rem; }
}

.more-row { margin-top: 1.6rem; }

/* ── Projects page ── */

.page-hero {
    padding: 3.4rem 0 2.2rem;
    border-bottom: 1px solid var(--rule);
}

.page-hero h1 { max-width: 22ch; margin: 0.5rem 0 1rem; }

.project-feature {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    padding: 3.2rem 0;
    border-bottom: 1px solid var(--rule);
}

.project-feature .meta {
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
}

.project-feature h2 { margin: 0.45rem 0 0.9rem; }
.project-feature p { color: var(--ink-2); max-width: 36rem; }
.project-feature .links { margin-top: 1.3rem; display: flex; gap: 0.7rem; flex-wrap: wrap; }

.num {
    font-variant-numeric: tabular-nums;
    color: var(--muted);
    font-size: 0.85rem;
}

.catalog {
    padding: 1rem 0 4rem;
}

.catalog-row {
    display: grid;
    grid-template-columns: 3rem 14rem 1fr auto;
    gap: 1.2rem;
    align-items: start;
    padding: 1.35rem 0;
    border-bottom: 1px solid var(--rule);
}

.catalog-row h3 {
    font-size: 1.2rem;
    margin-bottom: 0.15rem;
}

.catalog-row p { color: var(--ink-2); max-width: 38rem; }

.catalog-row a.go {
    color: var(--pine);
    text-decoration: none;
    font-size: 0.92rem;
    white-space: nowrap;
    border-bottom: 1px solid transparent;
}

.catalog-row a.go:hover { border-bottom-color: var(--pine); }

@media (max-width: 800px) {
    .project-feature { grid-template-columns: 1fr; gap: 1.2rem; padding: 2.2rem 0; }
    .catalog-row { grid-template-columns: 2rem 1fr; }
    .catalog-row a.go { grid-column: 2; }
}

/* ── Contact ── */

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 3rem;
}

.contact-grid p { color: var(--ink-2); margin: 0.8rem 0 1.2rem; max-width: 32rem; }

.vcard {
    font-size: 0.95rem;
    line-height: 1.7;
}
.vcard a { color: var(--pine); }

.team {
    margin: 1.6rem 0 0;
    padding-top: 1.2rem;
    border-top: 1px solid var(--rule);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
    gap: 1rem 1.5rem;
    font-size: 0.92rem;
    line-height: 1.5;
}
.team dt { font-weight: 600; }
.team dd { margin: 0; color: var(--ink-2); }
.team dd a { color: var(--pine); word-break: break-all; }
@media (max-width: 480px) { .team { grid-template-columns: 1fr; } }

form.letter label {
    display: block;
    font-size: 0.8rem;
    margin-bottom: 0.3rem;
    color: var(--ink-2);
}

form.letter .field { margin-bottom: 0.9rem; }
form.letter .two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
}

form.letter input,
form.letter select,
form.letter textarea {
    width: 100%;
    background: var(--white);
    border: 1px solid var(--rule);
    padding: 0.55rem 0.7rem;
    border-radius: 0;
}

form.letter input:focus,
form.letter select:focus,
form.letter textarea:focus {
    outline: 2px solid var(--pine);
    outline-offset: 1px;
}

form.letter textarea { min-height: 7rem; resize: vertical; }

#formMessage { margin-top: 0.8rem; font-size: 0.92rem; }

@media (max-width: 800px) {
    .contact-grid { grid-template-columns: 1fr; gap: 2rem; }
    form.letter .two { grid-template-columns: 1fr; }
}

/* ── Footer ── */

.site-footer {
    background: var(--ink);
    color: #d8d2c6;
    padding: 2.6rem 0 2rem;
    margin-top: 2rem;
}

.site-footer a { color: #efe8da; }
.site-footer .brand-name { color: #f4efe6; }
.site-footer .brand-sub { color: #9a9284; }

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 2rem;
}

.footer-grid h4 {
    font-family: var(--sans);
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #9a9284;
    margin-bottom: 0.7rem;
}

.footer-grid p,
.footer-grid a {
    font-size: 0.92rem;
    text-decoration: none;
}

.footer-grid nav { display: flex; flex-direction: column; gap: 0.4rem; }

.legal {
    margin-top: 2rem;
    padding-top: 1.2rem;
    border-top: 1px solid #3a362e;
    font-size: 0.78rem;
    color: #8c8578;
    line-height: 1.55;
}

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

/* ── Cookie ── */

.cookie {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    left: auto;
    z-index: 50;
    width: min(22rem, calc(100% - 2rem));
    background: var(--white);
    border: 1px solid var(--ink);
    padding: 0.85rem 1rem;
    display: none;
}

.cookie.open { display: block; }
.cookie p { font-size: 0.88rem; color: var(--ink-2); margin-bottom: 0.7rem; }
.cookie .row { display: flex; gap: 0.5rem; }
.cookie .btn { min-width: 4.5rem; }
