/* im not fully sure if im allowed to use whitney (gg sans is already a no no)*/
@font-face {
    font-family: "Inter";
    src: url("fonts/inter-regular.woff2") format("woff2");
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: "Inter";
    src: url("fonts/inter-semibold.woff2") format("woff2");
    font-weight: 600;
    font-display: swap;
}

/* colors */
:root {
    color-scheme: dark;
    --bg:          #202023;  /* main chat area */
    --surface:     #2b2d31;  /* sidebar */
    --surface-alt: #1e1f22;  /* server rail / tooltip */
    --text:        #dbdee1;  /* body text */
    --text-strong: #f2f3f5;  /* headers */
    --text-muted:  #949ba4;  /* captions, secondary */
    --border:      #3f4147;
    --blurple:     #5865f2;
    --radius:      16px;     /* Discord's rounded-square radius */
}

* { box-sizing: border-box; }

body {
    max-width: 46rem;
    margin: 3rem auto;
    padding: 0 1.25rem 5rem;
    font-family: "Inter", system-ui, sans-serif;
    line-height: 1.5;
    background-color: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
}

h1 {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--text-strong);
    margin: 0 0 2.5rem;
}

h2 {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin: 2.5rem 0 0.9rem;
}

/* icon grid */
.grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 1.5rem 1rem;
}

.tile {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.55rem;
    text-decoration: none;
    color: inherit;
}

.icon {
    display: block;
    width: 80px;
    height: 80px;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--surface-alt);
    transition: box-shadow .15s ease, transform .15s ease;
}

.icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.caption {
    font-size: 0.8rem;
    line-height: 1.3;
    text-align: center;
    color: var(--text-muted);
    transition: color .15s ease;
}

.tile:hover .icon,
.tile:focus-visible .icon {
    box-shadow: 0 0 0 3px var(--blurple);
    transform: translateY(-2px);
}

.tile:hover .caption,
.tile:focus-visible .caption { color: var(--text-strong); }

.tile:focus-visible { outline: none; }

/* hover bubble */
.bubble {
    position: absolute;
    left: calc(50% + 52px);
    top: 26px;
    z-index: 10;
    width: max-content;
    max-width: 15rem;
    padding: 0.6rem 0.8rem;
    border-radius: 8px;
    background: var(--surface-alt);
    border: 1px solid var(--border);
    box-shadow: 0 8px 16px rgba(0,0,0,0.24);
    opacity: 0;
    visibility: hidden;
    transform: translateX(-4px);
    transition: opacity .12s ease, transform .12s ease, visibility .12s;
    pointer-events: none;
    text-align: left;
}

/* little arrow pointing back at the icon */
.bubble::before {
    content: "";
    position: absolute;
    left: -5px;
    top: 14px;
    width: 9px;
    height: 9px;
    background: var(--surface-alt);
    border-left: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    transform: rotate(45deg);
}

.tile:hover .bubble,
.tile:focus-visible .bubble {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.bubble-title {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-strong);
}

.bubble-desc {
    display: block;
    margin-top: 0.15rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* hide bubble overlays on small screen cuz its awkward */
@media (max-width: 34rem) {
    .bubble { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
}
