/* ==========================================================================
   Site (2026 simplification)
   Calm, grid-first layout after Armin Hofmann's Graphic Design Manual:
   dot and line as the basic marks, black against yellow, heavy against thin,
   and a 12-column grid with labels on the left and content set to the right.
   Everything is scoped under .s-page so the legacy pages keep their styles.
   ========================================================================== */

.s-page {
    --ink: #111111;
    --paper: #f6f5f1;
    --yellow: #f5c400;
    --muted: #63635e;
    --line: rgba(17, 17, 17, 0.14);
    --gutter: clamp(16px, 4vw, 48px);
    --gap: 24px;
    --space: clamp(56px, 8vw, 120px);

    background: var(--paper);
    color: var(--ink);
    font-family: 'Inter Tight', 'Helvetica Neue', Arial, sans-serif;
    font-size: 17px;
    font-weight: 400;
    line-height: 1.55;
    overflow-x: clip;
}

body:has(.s-page) {
    background: #f6f5f1;
}

.s-page h1,
.s-page h2,
.s-page h3,
.s-page p,
.s-page ul,
.s-page dl,
.s-page dd {
    margin: 0;
    padding: 0;
    color: inherit;
}

.s-page ul {
    list-style: none;
}

.s-page a,
.s-page a:link,
.s-page a:visited,
.s-page a:active {
    color: inherit;
    text-decoration: none;
}

.s-page a:hover {
    color: inherit;
    text-decoration: none;
}

.s-page strong {
    font-weight: 600;
}

.s-page ::selection {
    background: var(--yellow);
    color: var(--ink);
}

/* ---------- Grid ---------- */

.s-wrap {
    max-width: 1360px;
    margin: 0 auto;
    padding: 0 var(--gutter);
}

.s-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--gap);
}

.s-col-main {
    grid-column: 4 / -1;
    min-width: 0;
}

/* Section label: a dot and a word, set in the left three columns. */
.s-label {
    grid-column: 1 / span 3;
    display: flex;
    align-items: baseline;
    gap: 10px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.s-label::before {
    content: '';
    flex: none;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--ink);
    transform: translateY(-1px);
}

span.s-label::before {
    content: none;
}

.s-label a:hover {
    text-decoration: underline;
}

.s-label--light::before {
    background: var(--yellow);
}

/* ---------- Type ---------- */

.s-h1 {
    font-size: clamp(48px, 9.4vw, 148px);
    font-weight: 600;
    line-height: 0.94;
    letter-spacing: -0.045em;
}

.s-h1--page {
    font-size: clamp(40px, 6.4vw, 96px);
    line-height: 0.98;
}

.s-h2 {
    font-size: clamp(34px, 4.6vw, 64px);
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.035em;
}

.s-h3 {
    font-size: clamp(22px, 2vw, 28px);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.s-page .s-lead {
    margin-top: 28px;
    max-width: 44ch;
    font-size: clamp(18px, 1.6vw, 22px);
    line-height: 1.45;
    color: var(--muted);
}

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

.s-textlink {
    display: inline-block;
    margin-top: 28px;
    font-weight: 600;
    border-bottom: 1px solid currentColor;
}

/* ---------- Nav ---------- */

.s-nav__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 76px;
}

.s-nav__logo img {
    display: block;
    height: 50px;
    width: auto;
    filter: invert(1);
}

.s-nav__links {
    display: flex;
    gap: 32px;
    font-size: 15px;
    font-weight: 500;
}

.s-nav__links a:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* ---------- Hero ---------- */

.s-hero {
    padding-top: clamp(72px, 12vw, 168px);
}

.s-hero__foot {
    margin-top: clamp(36px, 5vw, 64px);
}

.s-hero__lead {
    grid-column: 7 / -1;
    font-size: clamp(18px, 1.6vw, 22px);
    line-height: 1.45;
    max-width: 36em;
}

/* Heavy bar against a hairline, a yellow circle on the golden section. */
.s-rule {
    position: relative;
    height: 1px;
    margin-top: clamp(64px, 9vw, 120px);
}

/* The hairline, drawn as its own layer so it can grow without stretching the dot. */
.s-rule::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--ink);
    transform-origin: left center;
    animation: s-draw 1.1s cubic-bezier(0.65, 0, 0.35, 1) 0.55s both;
}

.s-rule__heavy {
    position: absolute;
    left: 0;
    top: 0;
    width: 25%;
    height: 12px;
    background: var(--ink);
    transform-origin: left center;
    animation: s-draw 0.7s cubic-bezier(0.65, 0, 0.35, 1) 0.45s both;
}

.s-rule__dot {
    position: absolute;
    left: 61.8%;
    top: -14px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--yellow);
    animation: s-pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 1.35s both;
}

/* ---------- Hero build ---------- */

.s-h1__line {
    display: block;
    overflow: hidden;
    /* Room for descenders (g, y) inside the mask. */
    padding-bottom: 0.24em;
    margin-bottom: -0.24em;
}

.s-h1__line > span {
    display: block;
    animation: s-rise 1.1s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.s-h1__line + .s-h1__line > span {
    animation-delay: 0.12s;
}

@keyframes s-rise {
    from {
        transform: translateY(105%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes s-draw {
    from {
        transform: scaleX(0);
    }
    to {
        transform: scaleX(1);
    }
}

@keyframes s-pop {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

/* The section under the hero holds back until the yellow dot has landed
   (1.35s delay + 0.6s pop), so on phones the hero builds on its own first. */
.s-section--after-hero {
    animation: s-fade-up 0.8s ease-out 1.95s both;
}

@keyframes s-fade-up {
    from {
        opacity: 0;
        transform: translateY(24px);
        filter: blur(8px);
    }
    to {
        opacity: 1;
        transform: none;
        filter: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .s-h1__line > span,
    .s-rule::before,
    .s-rule__heavy,
    .s-rule__dot,
    .s-section--after-hero {
        animation: none;
    }
}

/* ---------- Sections ---------- */

.s-section {
    padding-top: var(--space);
}

.s-section .s-label,
.s-pagehead .s-label {
    padding-top: 6px;
}

/* Ruled list: services and work. */
.s-list {
    grid-column: 4 / -1;
    border-top: 1px solid var(--ink);
}

.s-list li {
    border-bottom: 1px solid var(--line);
}

.s-list__row {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) minmax(0, 1.5fr) 24px;
    column-gap: var(--gap);
    align-items: baseline;
    padding: 26px 0;
}

.s-list--compact .s-list__row {
    grid-template-columns: minmax(0, 1fr) auto 24px;
    padding: 18px 0;
}

.s-list__num {
    font-size: 14px;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.s-list__title {
    font-size: clamp(20px, 1.9vw, 26px);
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.s-list--compact .s-list__title {
    font-size: 19px;
}

.s-list__desc,
.s-list__meta {
    color: var(--muted);
    font-size: 16px;
}

.s-list__arrow {
    justify-self: end;
    transition: transform 0.2s ease;
}

.s-list__row:hover .s-list__arrow {
    transform: translateX(4px);
}

.s-list__row:hover .s-list__title {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 5px;
}

/* Products */
.s-products {
    grid-column: 4 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--gap);
}

.s-product__link {
    display: block;
    height: 100%;
    padding-top: 28px;
    border-top: 1px solid var(--ink);
}

.s-product__mark {
    display: block;
    width: 56px;
    height: 56px;
    margin-bottom: 28px;
}

.s-product__mark--toast {
    background: var(--ink);
}

.s-product .s-h3 small {
    margin-left: 10px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0;
    color: var(--muted);
}

.s-product p {
    margin-top: 12px;
    max-width: 38ch;
    color: var(--muted);
}

a.s-product__link:hover .s-h3 {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 5px;
}

/* Studio: one big number against a short paragraph. */
.s-stat {
    grid-column: 4 / span 4;
    display: flex;
    flex-direction: column;
}

.s-stat__num {
    font-size: clamp(88px, 11vw, 168px);
    font-weight: 600;
    line-height: 0.85;
    letter-spacing: -0.06em;
}

.s-stat__cap {
    margin-top: 18px;
    max-width: 18ch;
    font-size: 15px;
    color: var(--muted);
}

.s-studio {
    grid-column: 8 / -1;
    font-size: clamp(18px, 1.5vw, 21px);
    line-height: 1.5;
}

.s-studio p + p {
    margin-top: 20px;
    font-size: 16px;
}

/* ---------- Detail pages ---------- */

.s-pagehead {
    padding-top: clamp(64px, 10vw, 140px);
}

.s-checks {
    border-top: 1px solid var(--ink);
}

.s-checks li {
    display: flex;
    gap: 16px;
    align-items: baseline;
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
}

/* Square against the round section dots. */
.s-checks li::before {
    content: '';
    flex: none;
    width: 7px;
    height: 7px;
    background: var(--ink);
    transform: translateY(-2px);
}

.s-prose p {
    max-width: 62ch;
    margin-top: 16px;
    color: var(--muted);
}

.s-prose p:first-child {
    margin-top: 0;
    color: var(--ink);
    font-size: 19px;
}

.s-prose .s-h3 + p {
    font-size: 17px;
    color: var(--muted);
}

.s-stack {
    font-size: 19px;
    font-weight: 500;
}

.s-faq {
    border-top: 1px solid var(--ink);
}

.s-faq details {
    border-bottom: 1px solid var(--line);
}

.s-faq summary {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding: 20px 0;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
}

.s-faq summary::-webkit-details-marker {
    display: none;
}

.s-faq summary::after {
    content: '+';
    font-weight: 400;
    transition: transform 0.2s ease;
}

.s-faq details[open] summary::after {
    transform: rotate(45deg);
}

.s-faq details p {
    max-width: 64ch;
    padding-bottom: 24px;
    color: var(--muted);
    white-space: pre-line;
}

.s-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: var(--gap);
    border-top: 1px solid var(--ink);
}

.s-meta > div {
    padding: 16px 0;
    border-bottom: 1px solid var(--line);
}

.s-meta dt {
    font-size: 13px;
    color: var(--muted);
}

.s-meta dd a {
    border-bottom: 1px solid currentColor;
}

.s-work-hero {
    margin-top: clamp(48px, 6vw, 80px);
}

.s-work-hero img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: #e8e6df;
}

/* Work index */
.s-workgrid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 56px var(--gap);
}

.s-workcard {
    display: flex;
    flex-direction: column;
}

.s-workcard__img {
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #e8e6df;
}

.s-workcard__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.s-workcard:hover .s-workcard__img img {
    transform: scale(1.03);
}

.s-workcard__name {
    margin-top: 16px;
    font-size: 19px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.s-workcard__cat {
    font-size: 14px;
    color: var(--muted);
}

/* ---------- Contact + footer (black) ---------- */

.s-contact {
    margin-top: var(--space);
    padding: var(--space) 0;
    background: var(--ink);
    color: var(--paper);
}

.s-contact__main {
    grid-column: 4 / span 6;
}

.s-page .s-contact__sub {
    margin-top: 24px;
    max-width: 40ch;
    font-size: 18px;
    color: rgba(246, 245, 241, 0.65);
}

.s-contact__ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 40px;
}

.s-contact__aside {
    grid-column: 10 / -1;
    align-self: end;
}

/* The one playful note: the burnt-toast logo, tilted off the grid. */
.s-contact__toast {
    display: block;
    width: 160px;
    height: auto;
    margin-bottom: 28px;
    transform: rotate(-6deg);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.s-contact__toast:hover {
    transform: rotate(5deg) translateY(-4px);
}

.s-contact__details {
    font-size: 16px;
}

.s-contact__details > div {
    padding: 14px 0;
    border-top: 1px solid rgba(246, 245, 241, 0.18);
}

.s-contact__details dt {
    font-size: 13px;
    color: rgba(246, 245, 241, 0.5);
}

.s-contact__details dd a {
    display: block;
}

.s-contact__details a:hover {
    text-decoration: underline;
}

.s-btn {
    display: inline-flex;
    align-items: center;
    padding: 15px 24px;
    border: 1px solid transparent;
    border-radius: 0;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.s-btn--yellow {
    background: var(--yellow);
    color: var(--ink);
}

.s-btn--yellow:hover {
    background: var(--paper);
}

.s-page a.s-btn--ghost {
    border-color: rgba(246, 245, 241, 0.4);
    color: var(--paper);
}

.s-page a.s-btn--ghost:hover {
    border-color: var(--paper);
    color: var(--paper);
}

.s-footer {
    background: var(--ink);
    color: rgba(246, 245, 241, 0.5);
    font-size: 13px;
}

.s-footer__inner {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 24px;
    position: relative;
    padding-top: 24px;
    padding-bottom: 32px;
}

.s-footer__inner::before {
    content: '';
    position: absolute;
    top: 0;
    left: var(--gutter);
    right: var(--gutter);
    height: 1px;
    background: rgba(246, 245, 241, 0.18);
}

/* ---------- Narrow screens ---------- */

@media (max-width: 900px) {
    .s-hero__lead {
        grid-column: 4 / -1;
    }

    .s-workgrid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .s-stat {
        grid-column: 4 / -1;
    }

    .s-studio {
        grid-column: 4 / -1;
        margin-top: 40px;
    }

    .s-contact__main {
        grid-column: 4 / -1;
    }

    .s-contact__aside {
        grid-column: 4 / -1;
        margin-top: 56px;
    }
}

@media (max-width: 680px) {
    .s-page {
        font-size: 16px;
    }

    .s-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .s-grid > * {
        grid-column: 1 / -1 !important;
    }

    /* The caption sits beside the number, bottom-aligned with it. */
    .s-stat {
        flex-direction: row;
        align-items: flex-end;
        gap: 18px;
    }

    .s-stat__cap {
        margin-top: 0;
    }

    .s-page .s-label {
        margin-bottom: 24px;
    }

    span.s-label {
        display: none;
    }

    .s-nav__inner {
        height: 64px;
    }

    .s-nav__logo img {
        height: 40px;
    }

    .s-nav__links {
        gap: 18px;
        font-size: 14px;
    }

    .s-page .s-hero__lead p {
        font-size: 22px;
    }

    .s-list__row {
        grid-template-columns: 32px minmax(0, 1fr) 20px;
        row-gap: 6px;
        padding: 20px 0;
    }

    .s-list__desc {
        grid-column: 2 / 3;
        grid-row: 2;
        font-size: 15px;
    }

    .s-list--compact .s-list__row {
        grid-template-columns: minmax(0, 1fr) 20px;
    }

    .s-list--compact .s-list__meta {
        grid-column: 1;
        grid-row: 2;
        font-size: 14px;
    }

    .s-list--compact .s-list__arrow {
        grid-column: 2;
        grid-row: 1;
    }

    .s-products,
    .s-meta,
    .s-workgrid {
        grid-template-columns: minmax(0, 1fr);
    }

    .s-products {
        gap: 48px;
    }

    .s-rule__heavy {
        height: 8px;
    }

    .s-rule__dot {
        width: 20px;
        height: 20px;
        top: -10px;
    }
}
