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

:root {
    --color-bg: rgb(245, 240, 230);
    --color-surface: rgb(235, 228, 215);
    --color-text: rgb(42, 38, 32);
    --color-text-muted: rgb(100, 110, 88);
    --color-accent: rgb(30, 118, 55);
    --color-border: rgba(0, 0, 0, 0.08);
}

@media (prefers-color-scheme: dark) {
    :root {
        --color-bg: rgb(22, 20, 18);
        --color-surface: rgb(42, 38, 32);
        --color-text: rgb(238, 232, 220);
        --color-text-muted: rgb(132, 148, 120);
        --color-accent: rgb(30, 118, 55);
        --color-border: rgba(255, 255, 255, 0.10);
    }
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

main {
    max-width: 600px;
    margin: 0 auto;
    padding: 3rem 1.5rem 4rem;
}

a {
    color: var(--color-accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.back {
    display: inline-block;
    font-family: 'Silkscreen', monospace;
    font-size: 0.8125rem;
    color: var(--color-accent);
    text-decoration: none;
    margin-bottom: 2rem;
}

.back:hover {
    opacity: 0.85;
    text-decoration: none;
}

h1 {
    font-family: 'Silkscreen', monospace;
    font-weight: 400;
    font-size: 1.75rem;
    margin-bottom: 0.25rem;
}

h2 {
    font-family: 'Silkscreen', monospace;
    font-size: 0.875rem;
    font-weight: 400;
    margin-top: 2rem;
    margin-bottom: 0.5rem;
}

p, ul {
    font-size: 0.9375rem;
    color: var(--color-text-muted);
    margin-bottom: 1rem;
}

ul {
    padding-left: 1.25rem;
}

li {
    margin-bottom: 0.25rem;
}

.date, .tagline {
    color: var(--color-text-muted);
    font-size: 0.8125rem;
    margin-bottom: 2.5rem;
}

/* Index page */
.page-index {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    text-align: center;
}

.page-index h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.page-index .tagline {
    margin-bottom: 1.5rem;
}

.page-index .description {
    color: var(--color-text);
    font-size: 1.0625rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.page-index .body {
    max-width: 420px;
    margin: 0 auto 1.5rem;
}

.page-index .features {
    list-style: none;
    padding-left: 0;
    text-align: left;
    display: inline-block;
    margin: 0 0 2rem;
}

.page-index .features li::before {
    content: "·";
    color: var(--color-accent);
    font-weight: 600;
    margin-right: 0.5rem;
}

nav {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

nav a {
    font-family: 'Silkscreen', monospace;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: 0;
    background: var(--color-surface);
    transition: opacity 0.15s;
}

nav a:hover {
    opacity: 0.85;
    text-decoration: none;
}

nav a:active {
    opacity: 0.70;
}

/* Puzzle grid animation */
.puzzle-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 3px;
    width: 140px;
    height: 140px;
    margin: 0 auto 2rem;
    perspective: 600px;
}

.puzzle-cell {
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.35s ease-in-out;
}

.puzzle-cell.flipped {
    transform: rotate3d(1, -1, 0, 180deg);
}

.cell-face {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
}

.cell-front {
    background: var(--color-surface);
}

.cell-back {
    background: var(--color-bg);
    transform: rotate3d(1, -1, 0, 180deg);
}

.cell-back.cell-filled {
    background: var(--color-accent);
}

.cell-back.cell-empty {
    background: var(--color-bg);
}

/* Support page */
.contact-email {
    display: inline-block;
    font-family: 'Silkscreen', monospace;
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}
