* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --space-1: 0.5rem;
    --space-2: 1rem;
    --space-3: 1.5rem;
    --space-4: 2rem;
    --space-5: 3rem;
}

body {
    font-family: monospace;
    background: #0c0c0c;
    color: #e6e6e6;
    min-height: 100vh;
}

body.home-page {
    min-height: 100vh;
    overflow-x: hidden;
    overscroll-behavior: none;
    --space-1: 0.5rem;
    --space-2: 0.9rem;
    --space-3: 1.3rem;
    --space-4: 2rem;
    --space-5: 3rem;
    --content-max-width: 100%;
}

.three-container {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.home-page .three-container {
    position: relative;
    inset: auto;
    width: clamp(240px, 55vmin, 420px);
    height: auto;
    aspect-ratio: 1 / 1;
    margin: var(--space-1) auto;
    z-index: 1;
}

.home-page .hero-actions {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: var(--space-2);
    width: 100%;
    margin: 0 auto;
}

.home-page .hero-button {
    flex: 1 1 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1rem;
    border: 2px solid #ffffff;
    color: #ffffff;
    text-decoration: none;
    font-size: 1.05rem;
    letter-spacing: 0.04em;
    background: transparent;
    transition: background 0.2s, color 0.2s, transform 0.2s;
}

.home-page .hero-button:hover,
.home-page .hero-button:focus-visible {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    transform: translateY(-2px);
}

.three-container canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.container {
    max-width: 960px;
    text-align: center;
    margin: 0 auto;
    padding: var(--space-5) var(--space-3) 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    position: relative;
    z-index: 1;
}

.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    max-width: var(--content-max-width, 640px);
    padding: 0;
}

.hero-card {
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-3);
}

.hero-above-fold {
    justify-content: flex-start;
}

h1 {
    font-size: 3rem;
    font-weight: normal;
    margin: 0;
    width: 100%;
}

#hero-title,
#about-title,
#join-title {
    color: #ffffff;
}

body.home-page p {
    font-size: 1rem;
}

.intro {
    max-width: 100%;
    margin: 0;
    color: #b8b8b8;
    width: 100%;
}

.webring-intro {
    margin-top: var(--space-1);
}

.webrings {
    display: grid;
    grid-template-columns: repeat(2, minmax(160px, 1fr));
    gap: var(--space-2);
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    margin-bottom: var(--space-3);
    justify-items: center;
    position: relative;
}

.webrings::before,
.webrings::after {
    content: "";
    position: absolute;
    background: #e6e6e6;
    pointer-events: none;
    z-index: 0;
}

.webrings::before {
    width: 2px;
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.webrings::after {
    height: 2px;
    left: 0;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}

@media (max-width: 520px) {
    .webrings {
        grid-template-columns: 1fr;
    }

    .webrings::before,
    .webrings::after {
        content: none;
    }
}

.section {
    width: 100%;
    max-width: var(--content-max-width, 640px);
    margin: 0 auto 0;
    text-align: center;
}

.section-below-fold {
    margin-top: calc(var(--space-5) + var(--space-4));
}

.about-page .section {
    margin-top: 1.5rem;
}

.section h2 {
    font-size: 1.6rem;
    margin-bottom: var(--space-2);
}

.section p {
    color: #b8b8b8;
    margin-bottom: var(--space-3);
    line-height: 1.6;
    text-align: left;
}

.section p:last-child {
    margin-bottom: 0;
}

.about-page {
    padding: 2rem 1.25rem 2.5rem;
}

.about-page .section h2 {
    margin-bottom: 0.5rem;
}

.about-page .section p {
    margin-bottom: 1rem;
}

.divider {
    width: 100%;
    max-width: var(--content-max-width, 640px);
    border: 0;
    border-top: 1px solid #ffffff;
    margin: 1rem auto;
    flex-shrink: 0;
}

.hero-card .divider {
    margin-top: 0;
    margin-bottom: 0;
    padding-bottom: 0;
}

.section .divider {
    margin: 1rem auto;
    max-width: none;
    width: 100%;
}

.about-page .divider {
    margin-top: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0;
}

.w-full {
    width: 100%;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.border-white {
    border-color: #ffffff;
}

.section hr.border-white {
    border-top-color: #ffffff;
    color: #ffffff;
}

@media (min-width: 640px) {
    .sm\:w-3\/5 {
        width: 60%;
    }

    body.home-page {
        --content-max-width: calc(60vw - 1.75rem);
    }
}

@media (min-width: 1024px) {
    .lg\:w-2\/5 {
        width: 40%;
    }

    body.home-page {
        --content-max-width: calc(40vw - 1.25rem);
    }
}

.content-form {
    display: grid;
    gap: var(--space-2);
}

.content-form label {
    display: block;
    font-size: 0.95rem;
    color: #e6e6e6;
    text-align: center;
}

.content-form input,
.content-form textarea {
    width: 100%;
    padding: 0.85rem var(--space-2);
    background: rgba(10, 10, 10, 0.6);
    border: 2px solid #2b2b2b;
    color: #e6e6e6;
    font-family: monospace;
    font-size: 1rem;
}

.content-form textarea {
    min-height: 160px;
    resize: vertical;
}

.content-form button {
    padding: 0.9rem var(--space-3);
    border: 2px solid #e6e6e6;
    background: transparent;
    color: #e6e6e6;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.content-form button:hover {
    background: #e6e6e6;
    color: #0c0c0c;
}

.webring-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2);
    width: 100%;
    min-height: 180px;
    padding: var(--space-3) var(--space-2);
    background: transparent;
    border: none;
    text-decoration: none;
    color: #ffffff;
    font-size: 1.05rem;
    text-align: center;
    transition: transform 0.2s, background 0.2s, color 0.2s, box-shadow 0.2s;
    position: relative;
    z-index: 1;
}

.webring-logo {
    width: clamp(110px, 30vw, 160px);
    height: clamp(110px, 30vw, 160px);
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 16px;
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    background: transparent;
}

.webring-logo img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.webring-logo canvas {
    width: 100%;
    height: 100%;
    display: block;
    pointer-events: none;
}

.webring-logo--model {
    overflow: hidden;
}

.webring-name {
    font-size: 1.05rem;
    letter-spacing: 0.02em;
    color: #ffffff;
}

.webring-card:hover,
.webring-card:focus-visible {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.webring-card:hover .webring-logo,
.webring-card:focus-visible .webring-logo {
    color: #f5f5f5;
    background: transparent;
}

.webring-card:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 4px;
}

.about-link,
.nav-link {
    display: inline-block;
    padding: 0.65rem var(--space-2);
    background: rgba(10, 10, 10, 0.45);
    border: 2px solid #e6e6e6;
    text-decoration: none;
    color: #e6e6e6;
    font-size: 0.95rem;
    text-align: center;
}

/* Layout guides: remove when done aligning elements. */

.about-link {
    margin: var(--space-3) auto 0;
}

.nav-link {
    margin: 0 auto var(--space-4);
}

.about-page .nav-link {
    margin: 0 auto 1.25rem;
}

a:hover,
.btn-hover:hover {
    background: #e6e6e6;
    color: #0c0c0c;
}

.btn-hover {
    transition: all 0.2s;
}

/* Scrollbar styles */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #1a1a1a;
}
::-webkit-scrollbar-thumb {
    background: #444444;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #666666;
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: #444444 #1a1a1a;
}
