/* S2G Studios
   A puzzle studio's site: the wordmark is built from tiles on a grid, and that
   grid is the one bold element. Everything else stays quiet. */

@font-face {
    font-family: 'Bricolage';
    src: url('bricolage.woff2') format('woff2');
    font-weight: 200 800;
    font-stretch: 75% 100%;
    font-display: swap;
}

:root {
    --chalk: #F3F4F7;
    --graphite: #23252F;
    --slate: #6B7086;
    --line: #DCDFE8;
    --cobalt: #2F4BFF;
    --marigold: #FFB627;
    --mint: #2EC4A0;
    --tile-off: #E5E8F0;
    color-scheme: light;
}

* { box-sizing: border-box; }

html { background: var(--chalk); }

body {
    margin: 0;
    min-height: 100vh;
    color: var(--graphite);
    font-family: 'Bricolage', system-ui, -apple-system, 'Segoe UI', sans-serif;
    font-size: 18px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--cobalt);
    text-decoration-thickness: 1.5px;
    text-underline-offset: 3px;
}
a:hover { text-decoration-thickness: 2.5px; }
:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 3px; border-radius: 6px; }

.page {
    max-width: 760px;
    margin: 0 auto;
    padding: 28px 24px 64px;
}

/* ---------------------------------------------------------------- header */

.top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.studio-name {
    font-weight: 750;
    font-size: 18px;
    color: var(--graphite);
    text-decoration: none;
}
.top nav { display: flex; gap: 22px; font-size: 16px; }
.top nav a { color: var(--slate); text-decoration: none; }
.top nav a:hover { color: var(--graphite); }

/* ---------------------------------------------------------------- tile wordmark */

.tiles {
    --cols: 18;
    display: grid;
    grid-template-columns: repeat(var(--cols), 1fr);
    gap: clamp(3px, 0.8vw, 6px);
    margin: 56px 0 40px;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}
.tiles i {
    aspect-ratio: 1;
    border-radius: 22%;
    background: var(--tile-off);
    cursor: pointer;
    transition: background-color 0.18s, transform 0.18s;
}
.tiles i:hover { transform: translateY(-2px); }
.tiles i.c1 { background: var(--cobalt); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.18); }
.tiles i.c2 { background: var(--marigold); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.14); }
.tiles i.c3 { background: var(--mint); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.14); }

/* The letters settle in once, column by column */
.tiles.is-arriving i.letter { animation: settle 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both; animation-delay: calc(var(--x) * 35ms); }
@keyframes settle { from { transform: translateY(-14px) scale(0.6); opacity: 0; } }

/* ---------------------------------------------------------------- text */

h1 {
    margin: 0;
    font-size: clamp(40px, 7vw, 64px);
    font-weight: 800;
    font-stretch: 78%;
    letter-spacing: -0.03em;
    line-height: 1;
    text-wrap: balance;
}
.lead {
    margin: 18px 0 0;
    max-width: 34em;
    font-size: 20px;
    color: #464A5C;
    text-wrap: pretty;
}

h2 {
    margin: 72px 0 18px;
    font-size: 30px;
    font-weight: 800;
    font-stretch: 85%;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

p { margin: 0 0 14px; }

/* ---------------------------------------------------------------- games */

.game {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 22px;
    align-items: start;
    padding: 24px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}
.game img {
    width: 96px;
    height: 96px;
    border-radius: 22px;
}
.game h3 {
    margin: 2px 0 4px;
    font-size: 24px;
    font-weight: 750;
    line-height: 1.2;
}
.game .status { margin: 0 0 8px; font-size: 15px; color: var(--slate); }
.game p { color: #464A5C; }
.game .links { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 4px; font-weight: 600; }

.next-up { margin-top: 16px; color: var(--slate); font-size: 16px; }

/* ---------------------------------------------------------------- how we work */

.promises { margin: 0; padding: 0; list-style: none; }
.promises li {
    position: relative;
    padding: 0 0 14px 30px;
    color: #464A5C;
}
.promises li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.42em;
    width: 14px;
    height: 14px;
    border-radius: 4px;
    background: var(--cobalt);
}
.promises b { color: var(--graphite); font-weight: 700; }

/* ---------------------------------------------------------------- contact + footer */

.contact a { font-size: 22px; font-weight: 700; }

footer {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    margin-top: 80px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
    font-size: 15px;
    color: var(--slate);
}
footer a { color: var(--slate); }

/* ---------------------------------------------------------------- 404 */

.lost { text-align: left; }
.lost .tiles { --cols: 16; }

/* ---------------------------------------------------------------- small screens */

@media (max-width: 520px) {
    body { font-size: 17px; }
    .page { padding-top: 20px; }
    .tiles { margin: 40px 0 30px; }
    .lead { font-size: 18px; }
    h2 { margin-top: 56px; font-size: 26px; }
    .game { grid-template-columns: 72px 1fr; gap: 16px; }
    .game img { width: 72px; height: 72px; border-radius: 17px; }
    .top nav { gap: 16px; }
}

@media (prefers-reduced-motion: reduce) {
    .tiles.is-arriving i.letter { animation: none; }
    .tiles i { transition: none; }
}
