@font-face {
    font-family: 'Bedstead';
    src: url('/bedstead-extracondensed.otf') format('opentype');
}

@font-face {
    font-family: 'Bedstead Semicondensed';
    src: url('/bedstead-semicondensed.otf') format('opentype');
}

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

body {
    font-family: 'Bedstead Semicondensed', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #FF4545;
    padding: 20px;
    min-height: 100vh;
    color: #1a3a52;
}

.page {
    background: linear-gradient(180deg, #2E9DFF 0%, #8BC9FF 100%);
    border-radius: 44px;
    box-shadow: 0 3px 50px 3px #FFF inset;
    min-height: calc(100vh - 40px);
    padding: 32px;
    display: flex;
    flex-direction: column;
}

/* Header */

.header {
    display: flex;
    justify-content: center;
    margin-bottom: 48px;
}

.header a {
    display: block;
}

.header img {
    height: 56px;
    width: auto;
}

/* Content area */

.content {
    max-width: 640px;
    width: 100%;
    margin: 0 auto;
    flex: 1;
}

.page-title {
    font-family: 'Bedstead', sans-serif;
    font-size: 3rem;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 32px;
    text-align: center;
}

/* Article list */

.article-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.article-item {
    background: rgba(255, 255, 255, 0.25);
    border-radius: 20px;
    padding: 24px 28px;
    transition: background 0.2s ease;
}

.article-item:hover {
    background: rgba(255, 255, 255, 0.4);
}

.article-item {
    display: block;
    color: #fff;
    text-decoration: none;
}

.article-item-title {
    font-size: 1.4rem;
    font-family: 'Bedstead Semicondensed', sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.article-item time {
    display: block;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    margin-top: 4px;
    text-transform: uppercase;
}

/* Single article */

.article-body {
    background: rgba(255, 255, 255, 0.25);
    border-radius: 20px;
    padding: 40px 36px;
}

.article-body p,
.article-body ul,
.article-body ol,
.article-body blockquote {
    font-size: 1.2rem;
    line-height: 1.6;
    color: #1a3a52;
    margin-bottom: 16px;
}

.article-body h2 {
    font-family: 'Bedstead', sans-serif;
    font-size: 1.8rem;
    color: #1a3a52;
    text-transform: uppercase;
    margin: 32px 0 16px;
}

.article-body h3 {
    font-family: 'Bedstead', sans-serif;
    font-size: 1.4rem;
    color: #1a3a52;
    text-transform: uppercase;
    margin: 24px 0 12px;
}

.article-body a {
    color: #0085FF;
    text-decoration: underline;
}

.article-body a:hover {
    color: #ABFF00;
}

::selection {
    background: #FF4545;
    color: #fff;
}

.article-body img {
    max-width: 100%;
    border-radius: 12px;
    margin: 16px 0;
}

.screen-gallery {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 24px 0;
}

.screen-gallery img {
    width: 0;
    flex: 1;
    max-width: 200px;
    border-radius: 20px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
    margin: 0;
}

@media (max-width: 768px) {
    .screen-gallery {
        gap: 8px;
    }

    .screen-gallery img {
        max-width: 150px;
        border-radius: 14px;
    }
}

.article-body code {
    background: rgba(0, 0, 0, 0.15);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.95em;
}

.article-body pre {
    background: rgba(0, 0, 0, 0.15);
    padding: 16px 20px;
    border-radius: 12px;
    overflow-x: auto;
    margin-bottom: 16px;
}

.article-body pre code {
    background: none;
    padding: 0;
}

.article-meta {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    margin-bottom: 24px;
    text-transform: uppercase;
    text-align: center;
}

/* Back link */

.back-link {
    display: inline-block;
    margin-bottom: 24px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 1rem;
    text-transform: uppercase;
    transition: color 0.2s;
}

.back-link:hover {
    color: #fff;
}

/* Footer */

.site-footer {
    text-align: center;
    padding: 48px 0 16px;
    max-width: 640px;
    margin: 0 auto;
}

.footer-label {
    color: #668CAE;
    font-family: 'Bedstead Semicondensed', sans-serif;
    font-size: 20px;
    font-style: normal;
    font-weight: 500;
    line-height: 100%;
    letter-spacing: -0.6px;
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 12px;
    max-width: 100%;
    box-sizing: border-box;
}

.footer-email-form {
    margin-bottom: 20px;
}

.footer-form-group {
    display: flex;
    width: 623px;
    max-width: 100%;
    padding: 6px;
    align-items: flex-start;
    gap: 6px;
    border-radius: 48px;
    background: #FF4545;
    margin: 0 auto;
    margin-bottom: 24px;
}

.footer-email-input {
    display: flex;
    height: 74px;
    padding: 24px 24px 24px 20px;
    align-items: center;
    flex: 1 0 0;
    border-radius: 40px;
    background: #D7E0EA;
    box-shadow: 0 2px 2px 0 rgba(22, 22, 22, 0.20) inset;
    border: none;
    font-family: 'Bedstead Semicondensed', sans-serif;
    font-size: 20px;
    color: #333;
    outline: none;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.footer-email-input::placeholder {
    color: #ABBED3;
    font-family: 'Bedstead Semicondensed', sans-serif;
    font-size: 20px;
}

.footer-email-input:hover::placeholder {
    color: #93A5B8;
}

.footer-email-input:focus {
    outline: none;
}

.footer-email-input:focus::placeholder {
    color: #93A5B8;
}

.footer-join-btn {
    display: flex;
    max-height: 74px;
    padding: 28px 32px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-radius: 40px;
    background: #0085FF;
    color: white;
    border: none;
    font-family: 'Bedstead Semicondensed', sans-serif;
    font-size: 20px;
    font-weight: normal;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.3s ease, color 0.3s ease;
    box-sizing: border-box;
}

.footer-join-btn:hover {
    background: #ABFF00;
    color: #000;
}

.footer-join-btn:active {
    background: #ABFF00;
    color: #000;
}

.footer-join-btn.done {
    background: #EBFF00;
    color: #000;
}

.footer-join-btn.done:hover {
    background: #EBFF00;
    color: #000;
}

.footer-join-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.footer-links a {
    color: #668CAE;
    text-decoration: underline;
    font-family: 'Bedstead Semicondensed', sans-serif;
    font-size: 1rem;
    font-weight: normal;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #668CAE;
    text-decoration: underline;
}

/* Responsive */

@media (max-width: 768px) {
    body {
        padding: 8px;
    }

    .page {
        border-radius: 20px;
        padding: 20px 16px;
        min-height: calc(100vh - 16px);
    }

    .header {
        margin-bottom: 32px;
    }

    .header img {
        height: 48px;
    }

    .page-title {
        font-size: 2.2rem;
        margin-bottom: 24px;
    }

    .article-item {
        padding: 18px 20px;
        border-radius: 16px;
    }

    .article-item a {
        font-size: 1.2rem;
    }

    .article-body {
        padding: 24px 20px;
        border-radius: 16px;
    }

    .footer-form-group {
        width: 100%;
        margin: 0;
        box-sizing: border-box;
    }

    .footer-email-form {
        width: 100%;
    }

    .footer-email-input {
        height: 74px;
    }

    .footer-join-btn {
        height: 74px;
        max-height: 74px;
        font-size: 15px;
    }

    .footer-links {
        margin-top: 20px;
        gap: 20px;
        font-size: 0.9rem;
    }
}
