/* Emoji Guardian website: flat colours, one accent, no effects */

@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("/assets/fonts/inter-latin-ext-opsz-normal.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("/assets/fonts/inter-latin-opsz-normal.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --bg: #18191c;
    --surface: #1f2024;
    --line: #2f3036;
    --text: #fff;
    --muted: #b3b5bd;
    --faint: #8b8d97;
    --accent: #ff3366; /* the red of the bot's logo: links, icons, lines */
    --accent-fill: #dc2653; /* filled buttons: a little deeper, so white text stays readable */
    --accent-fill-hover: #c41f48;
    --radius: 10px;
    --container: 1080px;
    --gutter: clamp(20px, 4vw, 40px);
    --nav-height: 64px;
    --mono: ui-monospace, "SF Mono", "Cascadia Code", "Roboto Mono", Menlo, Consolas, monospace;
    color-scheme: dark;
}

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

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

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 17px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img,
svg {
    display: block;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
    text-decoration: none;
}

h1,
h2,
h3,
p,
ul,
figure {
    margin: 0;
}

ul {
    padding: 0;
    list-style: none;
}

h1,
h2 {
    text-wrap: balance;
}

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

[hidden] {
    display: none !important;
}

section[id] {
    scroll-margin-top: var(--nav-height);
}

.container {
    width: min(100% - 2 * var(--gutter), var(--container));
    margin-inline: auto;
}

.skip-link {
    position: absolute;
    left: 16px;
    top: -80px;
    z-index: 100;
    padding: 10px 16px;
    border-radius: var(--radius);
    background: var(--accent-fill);
    color: #fff;
    font-weight: 600;
}

.skip-link:focus {
    top: 12px;
}

.icon {
    width: 1.2em;
    height: 1.2em;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

code {
    font-family: var(--mono);
    font-size: 0.9em;
}

.link {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.22em;
}

.link:hover {
    color: var(--text);
}

/* Buttons */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border: 1px solid var(--accent-fill);
    border-radius: var(--radius);
    background: var(--accent-fill);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    white-space: nowrap;
    transition: background-color 0.15s, border-color 0.15s;
}

.button:hover {
    border-color: var(--accent-fill-hover);
    background: var(--accent-fill-hover);
}

.button--plain {
    border-color: var(--line);
    background: none;
    color: var(--text);
}

.button--plain:hover {
    border-color: var(--faint);
    background: none;
}

.button--small {
    min-height: 38px;
    padding: 0 14px;
    font-size: 14.5px;
}

/* Navigation */

.nav {
    position: sticky;
    top: 0;
    z-index: 50;
    border-bottom: 1px solid var(--line);
    background: var(--bg);
}

.nav__inner {
    display: flex;
    align-items: center;
    gap: 24px;
    height: var(--nav-height);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 16.5px;
    font-weight: 650;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.brand img {
    width: 30px;
    height: 30px;
    border-radius: 8px;
}

.nav__links {
    display: flex;
    gap: 26px;
    margin-left: auto;
    color: var(--muted);
    font-size: 15px;
}

.nav__links a,
.footer li a {
    transition: color 0.15s;
}

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

.nav__actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav__menu {
    display: none;
    position: relative;
}

.nav__menu summary {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    cursor: pointer;
    list-style: none;
}

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

.nav__menu .icon {
    width: 19px;
    height: 19px;
}

.nav__panel {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    display: grid;
    min-width: 210px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
}

.nav__panel a {
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 16px;
}

.nav__panel a:hover {
    background: var(--line);
}

.nav__panel-add {
    display: none;
    color: var(--accent);
}

/* Hero */

.hero {
    padding: clamp(48px, 7vw, 96px) 0 clamp(56px, 7vw, 96px);
}

.hero__inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: clamp(40px, 6vw, 80px);
}

.hero h1 {
    font-size: clamp(2.2rem, 3.2vw + 1.1rem, 3.5rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.032em;
}

.hero__lead {
    max-width: 32em;
    margin-top: 20px;
    color: var(--muted);
    font-size: 1.08rem;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.hero__facts {
    margin-top: 26px;
    color: var(--faint);
    font-size: 14.5px;
}

.hero__facts strong {
    color: var(--text);
    font-weight: 500;
}

/* Command demo */

.demo {
    position: relative;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    overflow: hidden;
}

.demo input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.demo__tabs {
    display: flex;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--line);
}

.demo__tabs label {
    padding: 12px 16px 11px;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    color: var(--faint);
    font-size: 14.5px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.15s;
}

.demo__tabs label:hover {
    color: var(--text);
}

#demo-lock:checked ~ .demo__tabs [for="demo-lock"],
#demo-list:checked ~ .demo__tabs [for="demo-list"],
#demo-add:checked ~ .demo__tabs [for="demo-add"],
#demo-protect:checked ~ .demo__tabs [for="demo-protect"] {
    border-bottom-color: var(--accent);
    color: var(--text);
}

#demo-lock:focus-visible ~ .demo__tabs [for="demo-lock"],
#demo-list:focus-visible ~ .demo__tabs [for="demo-list"],
#demo-add:focus-visible ~ .demo__tabs [for="demo-add"],
#demo-protect:focus-visible ~ .demo__tabs [for="demo-protect"] {
    outline: 2px solid var(--text);
    outline-offset: -4px;
}

.demo__body {
    min-height: 276px;
    padding: 20px 20px 6px;
}

.demo__panel {
    display: none;
}

#demo-lock:checked ~ .demo__body [data-panel="lock"],
#demo-list:checked ~ .demo__body [data-panel="list"],
#demo-add:checked ~ .demo__body [data-panel="add"],
#demo-protect:checked ~ .demo__body [data-panel="protect"] {
    display: block;
}

.msg {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    column-gap: 12px;
    margin-bottom: 16px;
    font-size: 14.5px;
    line-height: 1.45;
}

.msg__used {
    grid-column: 2;
    margin-bottom: 4px;
    color: var(--faint);
    font-size: 12.5px;
}

.msg__used b {
    color: var(--muted);
    font-weight: 600;
}

.msg__cmd {
    color: var(--accent);
    font-family: var(--mono);
    font-size: 12px;
}

.msg__avatar {
    grid-column: 1;
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

.msg__body {
    grid-column: 2;
    min-width: 0;
}

.msg__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
}

.msg__name {
    font-weight: 600;
}

.msg__time {
    color: var(--faint);
    font-size: 11.5px;
}

.msg__text {
    color: #e3e4e8;
}

.emo {
    display: inline-block;
    font-size: 1.25em;
    line-height: 1;
    vertical-align: -0.14em;
}

.mention {
    padding: 0 4px;
    border-radius: 4px;
    background: #33343b;
    font-weight: 500;
}

.embed {
    margin-top: 6px;
    padding: 10px 14px 11px;
    border-left: 3px solid var(--accent);
    border-radius: 4px;
    background: var(--bg);
    font-size: 13.5px;
}

.embed__title {
    margin-bottom: 3px;
    font-weight: 600;
}

.embed__meta {
    margin-top: 5px;
    color: var(--faint);
    font-size: 12px;
}

.embed code {
    color: var(--muted);
    font-size: 0.86em;
}

/* Sections */

.section {
    padding: clamp(56px, 7vw, 92px) 0;
    border-top: 1px solid var(--line);
}

.section__head {
    max-width: 40rem;
    margin-bottom: clamp(28px, 4vw, 44px);
}

.section h2 {
    font-size: clamp(1.6rem, 1.4vw + 1.15rem, 2.1rem);
    font-weight: 650;
    line-height: 1.2;
    letter-spacing: -0.022em;
}

.section__lead {
    margin-top: 12px;
    color: var(--muted);
}

/* Features */

.features {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 44px clamp(28px, 4vw, 56px);
}

.feature .icon {
    width: 24px;
    height: 24px;
    color: var(--accent);
}

.feature h3 {
    margin-top: 14px;
    font-size: 1.08rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.feature p {
    margin-top: 6px;
    color: var(--muted);
    font-size: 15.5px;
    line-height: 1.55;
}

/* Commands */

.commands__top {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    justify-content: space-between;
    gap: 20px 40px;
    margin-bottom: clamp(24px, 3vw, 32px);
}

.commands__top .section__head {
    margin-bottom: 0;
}

.search {
    display: flex;
    align-items: center;
    gap: 10px;
    width: min(100%, 320px);
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--faint);
}

.search:focus-within {
    border-color: var(--faint);
}

.search .icon {
    width: 18px;
    height: 18px;
}

.search input {
    flex: 1;
    min-width: 0;
    height: 46px;
    border: 0;
    background: none;
    color: var(--text);
    font: inherit;
    font-size: 16px;
    outline: none;
}

.search input::placeholder {
    color: var(--faint);
}

.search__count {
    font-size: 13px;
    white-space: nowrap;
}

.command-list {
    max-height: 520px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-color: var(--line) transparent;
    scrollbar-width: thin;
}

.command-list h3 {
    position: sticky;
    top: 0;
    padding: 10px 20px;
    border-bottom: 1px solid var(--line);
    background: var(--surface);
    color: var(--faint);
    font-size: 13px;
    font-weight: 600;
}

.command {
    display: grid;
    grid-template-columns: minmax(0, 17rem) minmax(0, 1fr);
    align-items: baseline;
    gap: 2px 24px;
    padding: 10px 20px;
    border-bottom: 1px solid var(--line);
}

.command code {
    font-size: 13.5px;
    overflow-wrap: anywhere;
}

.command span {
    color: var(--muted);
    font-size: 15px;
    line-height: 1.45;
}

.command-list__empty {
    padding: 32px 20px;
    color: var(--muted);
    text-align: center;
}

.commands__more {
    margin-top: 18px;
    color: var(--muted);
    font-size: 15px;
}

/* Languages */

.languages {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
}

.languages li {
    padding: 6px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 15.5px;
}

.note {
    color: var(--muted);
    font-size: 15.5px;
}

/* Questions */

.faq {
    max-width: 760px;
    border-top: 1px solid var(--line);
}

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

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

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

.faq summary .icon {
    width: 18px;
    height: 18px;
    color: var(--faint);
    transition: transform 0.2s;
}

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

.faq p {
    max-width: 40rem;
    padding-bottom: 20px;
    color: var(--muted);
}

/* Closing */

.closing {
    text-align: center;
}

.closing .hero__actions {
    justify-content: center;
}

.closing .note {
    margin-top: 22px;
}

/* Footer */

.footer {
    padding: clamp(40px, 5vw, 64px) 0 32px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 15px;
}

.footer__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
    gap: 36px 32px;
}

.footer .brand {
    color: var(--text);
}

.footer__about {
    max-width: 20rem;
    margin-top: 14px;
}

.footer h2 {
    margin-bottom: 12px;
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
}

.footer li + li {
    margin-top: 8px;
}

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

.footer__about a {
    color: var(--text);
}

.footer__bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px 28px;
    margin-top: clamp(36px, 5vw, 56px);
    padding-top: 22px;
    border-top: 1px solid var(--line);
    color: var(--faint);
    font-size: 14px;
}

.footer__legal {
    display: flex;
    gap: 22px;
}

/* Error page */

.notice {
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 16px;
    min-height: calc(100svh - var(--nav-height));
    padding: 64px var(--gutter);
    text-align: center;
}

.notice h1 {
    font-size: clamp(2rem, 4vw, 2.8rem);
    letter-spacing: -0.03em;
    line-height: 1.15;
}

.notice p {
    color: var(--muted);
}

/* Smaller screens */

@media (max-width: 960px) {
    .hero__inner {
        grid-template-columns: minmax(0, 1fr);
    }

    .demo {
        max-width: 600px;
    }

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

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

    .footer__brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 760px) {
    .nav__links {
        display: none;
    }

    .nav__actions {
        margin-left: auto;
    }

    .nav__menu {
        display: block;
    }
}

@media (max-width: 600px) {
    body {
        font-size: 16px;
    }

    .hero__actions .button {
        flex: 1 1 100%;
    }

    /* the server count gets its own line */
    .hero__facts strong {
        display: block;
    }

    .hero__facts span {
        display: none;
    }

    .demo__body {
        min-height: 0;
        padding: 16px 14px 2px;
    }

    .features {
        grid-template-columns: minmax(0, 1fr);
        gap: 32px;
    }

    .search {
        width: 100%;
    }

    .command {
        grid-template-columns: minmax(0, 1fr);
        padding: 10px 16px;
    }

    .command-list h3 {
        padding: 10px 16px;
    }

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

@media (max-width: 480px) {
    .nav__actions .button {
        display: none;
    }

    .nav__panel-add {
        display: block;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    * {
        transition: none !important;
    }
}
