/* DrawTheDraw website */
:root {
    --bg: #1e1e1e;
    --text: #e0e0e0;
    --muted: #b7bdc3;
    --soft: #8d949c;
    --blue: #2d6e9e;
    --blue-hover: #3580b8;
    --panel: #252627;
    --panel-strong: #2b2d2f;
    --gold: #d8a958;
    --gold-soft: rgba(216, 169, 88, 0.18);
    --line: rgba(255, 255, 255, 0.1);
    --font-ui: "Aptos", "Segoe UI", "Ubuntu", "Noto Sans", sans-serif;
    --content-width: 46rem;
}

* {
    box-sizing: border-box;
}

html {
    color-scheme: dark;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-ui);
    line-height: 1.6;
}

img,
video {
    display: block;
    max-width: 100%;
}

a {
    color: #8ab8d4;
    text-decoration: none;
}

a:hover {
    color: #a7d1ea;
}

h1,
h2,
h3 {
    line-height: 1.2;
    margin: 0 0 0.75rem;
}

h1 {
    font-size: 2.2rem;
}

h2 {
    font-size: 1.5rem;
    margin-top: 2.5rem;
}

h3 {
    font-size: 1.2rem;
}

p,
ul,
ol {
    margin: 0 0 1rem;
}

ul,
ol {
    padding-left: 1.15rem;
}

.content li + li,
.page li + li {
    margin-top: 0.35rem;
}

code {
    background: rgba(255, 255, 255, 0.08);
    padding: 0.15em 0.35em;
    border-radius: 3px;
    font-size: 0.9em;
}

/* Skip link */
.skip-link {
    position: absolute;
    left: 1rem;
    top: -3rem;
    background: var(--blue);
    color: #fff;
    padding: 0.75rem 1rem;
    border-radius: 999px;
}

.skip-link:focus {
    top: 1rem;
}

/* Header */
.site-header {
    border-bottom: 1px solid var(--line);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 1rem;
    min-height: 3.5rem;
}

.brand {
    color: var(--text);
    font-weight: 700;
    font-size: 1.1rem;
}

.site-nav__list {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.site-nav__list li {
    display: flex;
}

.site-nav__list a {
    display: inline-flex;
    align-items: center;
    min-height: 2.1rem;
    padding: 0.4rem 0.7rem;
    border-radius: 4px;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1;
}

.site-nav__list a:hover {
    color: #fff;
}

.nav-toggle {
    display: none;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: transparent;
    color: var(--text);
    padding: 0.5rem 0.75rem;
    font: inherit;
    font-size: 0.9rem;
}

/* Content */
.content {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 2.5rem 1rem 4rem;
}

.content > p,
.content > ul {
    color: var(--muted);
}

.content > p strong {
    color: #fff;
}

/* Hero */
.hero {
    padding: 0.25rem 0 0.5rem;
}

.eyebrow {
    margin-bottom: 0.85rem;
    color: var(--gold);
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero__lede {
    max-width: 38rem;
    font-size: 1.08rem;
}

.hero__meta {
    color: var(--soft);
    font-size: 0.95rem;
}

/* Video */
.video-wrap {
    margin: 1.5rem 0 2rem;
    border: 1px solid var(--line);
    border-radius: 6px;
    overflow: hidden;
}

.video-wrap video {
    width: 100%;
}

/* Screenshots */
.screenshots__hint {
    color: var(--soft);
    font-size: 0.92rem;
}

.screenshots {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    align-items: start;
    gap: 0.9rem;
    margin: 1.5rem 0;
}

.screenshot-card {
    display: block;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 0.6rem;
    background: var(--panel);
    color: inherit;
    cursor: zoom-in;
    overflow: hidden;
    text-align: left;
    text-decoration: none;
    transition:
        transform 140ms ease,
        border-color 140ms ease,
        box-shadow 140ms ease;
}

.screenshot-card:hover {
    transform: translateY(-2px);
    border-color: rgba(138, 184, 212, 0.42);
    box-shadow: 0 1rem 2.5rem rgba(0, 0, 0, 0.22);
    color: inherit;
}

.screenshot-card:focus-visible {
    outline: 2px solid rgba(138, 184, 212, 0.9);
    outline-offset: 2px;
}

.screenshot-card--wide {
    grid-column: span 2;
}

.screenshot-card img {
    width: 100%;
    height: auto;
    border: 1px solid var(--line);
    border-radius: 0;
    border-width: 0 0 1px;
    background: #141516;
}

.screenshot-card--wide img,
.screenshot-card--tall img,
.screenshot-card:not(.screenshot-card--wide):not(.screenshot-card--tall) img {
    object-fit: contain;
    object-position: center;
}

.screenshot-card--wide img {
    aspect-ratio: 16 / 9;
}

.screenshot-card--tall {
    grid-row: span 2;
}

.screenshot-card--tall img {
    aspect-ratio: 949 / 1040;
}

.screenshot-card:not(.screenshot-card--wide):not(.screenshot-card--tall) img {
    aspect-ratio: 16 / 9;
}

.screenshot-card__meta {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.7rem 0.9rem 0.8rem;
}

.screenshot-card__title {
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 600;
}

.screenshot-card__hint {
    color: var(--soft);
    font-size: 0.82rem;
    white-space: nowrap;
}

/* Lightbox */
.lightbox[hidden] {
    display: none;
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
}

.lightbox__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(7, 8, 9, 0.86);
    backdrop-filter: blur(4px);
}

.lightbox__dialog {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1.25rem;
}

.lightbox__body {
    width: min(100%, 78rem);
    max-height: calc(100vh - 2.5rem);
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 0.85rem;
    background: rgba(28, 29, 31, 0.96);
    box-shadow: 0 2rem 5rem rgba(0, 0, 0, 0.42);
}

.lightbox__image {
    width: 100%;
    max-height: calc(100vh - 8rem);
    border-radius: 0.5rem;
    object-fit: contain;
}

.lightbox__title {
    margin: 0.85rem 0 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.lightbox__close {
    position: absolute;
    top: 1.65rem;
    right: 1.65rem;
    z-index: 2;
    padding: 0.55rem 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(24, 25, 27, 0.92);
    color: var(--text);
    cursor: pointer;
    font: inherit;
}

/* Download boxes */
.download-boxes {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1rem 0;
}

.download-intro {
    max-width: 40rem;
}

.download-box {
    padding: 1.25rem;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--panel);
}

.download-box--demo {
    background:
        linear-gradient(180deg, rgba(45, 110, 158, 0.18), rgba(45, 110, 158, 0.04)),
        var(--panel-strong);
    border-color: rgba(138, 184, 212, 0.32);
}

.download-box--full {
    border-color: rgba(216, 169, 88, 0.28);
}

.download-box__eyebrow {
    margin-bottom: 0.5rem;
    color: var(--gold);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.download-box p {
    color: var(--muted);
    font-size: 0.95rem;
}

.download-box__note {
    margin-top: 0.9rem;
    padding-top: 0.9rem;
    border-top: 1px solid var(--line);
}

/* Buttons */
.button {
    display: inline-block;
    padding: 0.55rem 1.1rem;
    border-radius: 4px;
    background: var(--blue);
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
}

.button:hover {
    background: var(--blue-hover);
    color: #fff;
}

.button--large {
    padding: 0.8rem 1.35rem;
    font-size: 1rem;
}

.button--secondary {
    background: transparent;
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.button--secondary:hover {
    background: var(--gold-soft);
    border-color: rgba(216, 169, 88, 0.42);
    color: #fff;
}

/* Page layout (privacy, 404) */
.page {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 2.5rem 1rem 4rem;
}

.page h1 {
    margin-bottom: 1.5rem;
}

.page p,
.page li {
    color: var(--muted);
}

.page strong {
    color: #fff;
}

.page h2 {
    margin-top: 2rem;
}

/* Footer */
.site-footer {
    border-top: 1px solid var(--line);
    padding: 1.25rem 1rem;
}

.site-footer__inner {
    max-width: var(--content-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--soft);
    font-size: 0.85rem;
}

.site-footer__links {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.site-footer__inner a {
    color: var(--soft);
}

.site-footer__inner a:hover {
    color: var(--text);
}

.site-footer__social {
    padding: 0.3rem 0.65rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    color: var(--muted);
}

.site-footer__social:hover {
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
}

/* Responsive */
@media (max-width: 640px) {
    .nav-toggle {
        display: inline-flex;
        align-items: center;
    }

    .site-header__inner {
        position: relative;
    }

    .js .site-nav__list[hidden] {
        display: none;
    }

    .site-nav__list {
        position: absolute;
        right: 1rem;
        top: calc(100% + 0.5rem);
        flex-direction: column;
        align-items: stretch;
        padding: 0.5rem;
        border-radius: 6px;
        border: 1px solid var(--line);
        background: rgba(30, 30, 30, 0.98);
        list-style: none;
    }

    .screenshots {
        grid-template-columns: 1fr;
    }

    .download-boxes {
        grid-template-columns: 1fr;
    }

    .screenshot-card--wide {
        grid-column: auto;
    }

    .screenshot-card--tall {
        grid-row: auto;
    }

    .screenshot-card__meta {
        flex-direction: column;
        gap: 0.25rem;
    }

    .lightbox__dialog {
        padding: 0.75rem;
    }

    .lightbox__body {
        padding: 0.75rem;
    }

    .lightbox__close {
        top: 1rem;
        right: 1rem;
    }
}
