/* ==========================================================================
   RCThemePark — Ghost theme
   Dark theme recreating the original rcthemepark.com design
   ========================================================================== */

/* ---- Fonts (self-hosted Quicksand) ---- */
@font-face {
    font-family: "Quicksand";
    font-style: normal;
    font-weight: 400;
    font-display: swap;
    src: url("../fonts/quicksand-latin-400-normal.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Quicksand";
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url("../fonts/quicksand-latin-500-normal.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Quicksand";
    font-style: normal;
    font-weight: 600;
    font-display: swap;
    src: url("../fonts/quicksand-latin-600-normal.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Quicksand";
    font-style: normal;
    font-weight: 700;
    font-display: swap;
    src: url("../fonts/quicksand-latin-700-normal.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---- Tokens ---- */
:root {
    --bg: #1a1a1a;
    --bg-alt: #232323;
    --bg-card: #262626;
    --text: #eef0f2;
    --text-muted: #b9bec4;
    --accent: #d63bab;
    --accent-hover: #e455bd;
    --font-base: "Quicksand", "Segoe UI", system-ui, -apple-system, sans-serif;
    --font: var(--gh-font-body, var(--font-base));
    --font-heading: var(--gh-font-heading, var(--font-base));
    --radius: 6px;
    --inner-width: 1180px;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-weight: 500;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

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

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

h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 700; line-height: 1.25; margin: 0 0 0.6em; }

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

.inner {
    max-width: var(--inner-width);
    margin: 0 auto;
    padding: 0 24px;
}

.section-title {
    font-size: clamp(1.7rem, 3.4vw, 2.3rem);
    text-align: center;
    margin-bottom: 2.5rem;
}

.section-eyebrow {
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    margin: 0 0 0.4rem;
}

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.65em 1.4em;
    border: 0;
    border-radius: var(--radius);
    background: #3a3a3a;
    color: #fff;
    font-family: var(--font);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease;
}
.btn:hover { background: #4a4a4a; color: #fff; transform: translateY(-1px); }

.btn-accent { background: var(--accent); }
.btn-accent:hover { background: var(--accent-hover); }

.btn svg { width: 1.2em; height: 1.2em; }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
    position: relative;
    min-height: 82vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: radial-gradient(ellipse at 50% 30%, #2b2340 0%, #14121c 55%, #0d0c12 100%);
    background-size: cover;
    background-position: center;
}

.hero-video {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

/* Cover the hero at any viewport ratio: at least full width, and at least
   16:9 relative to the hero height, whichever is larger */
.hero-video iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: max(100%, 177.78vh);
    height: max(100%, 56.25vw);
    border: 0;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.hero-video iframe.is-playing { opacity: 1; }

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 10, 14, 0.45);
}

.hero-fade {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 120px;
    background: linear-gradient(to bottom, transparent, var(--bg));
}

.hero-content {
    position: relative;
    z-index: 1;
    padding: 6rem 24px;
}

.hero-title {
    font-size: clamp(2.6rem, 8vw, 5rem);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin: 0;
    text-shadow: 0 3px 24px rgba(0, 0, 0, 0.6);
}

.hero-tagline {
    font-size: clamp(1.05rem, 2.4vw, 1.4rem);
    font-weight: 600;
    margin: 0.3rem 0 2.2rem;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}

.hero-status {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    margin-bottom: 1.6rem;
}

.hero-status-label {
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-weight: 700;
    font-size: 0.95rem;
}

.hero-status-value {
    font-size: 0.95rem;
    color: var(--text-muted);
}

.hero-server {
    background: none;
    border: 0;
    padding: 0.4em 0.8em;
    border-radius: var(--radius);
    color: var(--text);
    font-family: var(--font);
    font-size: 1.15rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}
.hero-server:hover { background: rgba(255, 255, 255, 0.08); }

.hero-server-copied {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent-hover);
    min-height: 1.1em;
}

/* ==========================================================================
   Video carousel
   ========================================================================== */
.video-carousel {
    position: relative;
    background: var(--bg);
    padding: 4px 0;
}

.carousel-track {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}
.carousel-track::-webkit-scrollbar { display: none; }

.video-slide {
    position: relative;
    flex: 0 0 33.333%;
    min-width: 320px;
    aspect-ratio: 16 / 9;
    margin: 0;
    scroll-snap-align: start;
    overflow: hidden;
    background: #000;
}

.video-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease, opacity 0.35s ease;
    opacity: 0.9;
}
.video-slide:hover img { transform: scale(1.04); opacity: 1; }

.video-slide iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.video-play {
    position: absolute;
    inset: 0;
    background: transparent;
    border: 0;
    cursor: pointer;
}
.video-play::before {
    content: "";
    position: absolute;
    top: 50%; left: 50%;
    width: 74px; height: 74px;
    transform: translate(-50%, -50%);
    border: 3px solid rgba(255, 255, 255, 0.85);
    border-radius: 50%;
    transition: transform 0.2s ease, background 0.2s ease;
}
.video-play::after {
    content: "";
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-38%, -50%);
    border-style: solid;
    border-width: 13px 0 13px 22px;
    border-color: transparent transparent transparent rgba(255, 255, 255, 0.9);
}
.video-play:hover::before {
    background: rgba(214, 59, 171, 0.35);
    transform: translate(-50%, -50%) scale(1.07);
}

.video-slide figcaption {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 1.6rem 1.2rem 0.9rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75), transparent);
    text-transform: uppercase;
    letter-spacing: 0.35em;
    font-weight: 600;
    font-size: 1.05rem;
    text-align: center;
    pointer-events: none;
}

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 44px; height: 44px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background 0.2s ease;
}
.carousel-arrow:hover { background: var(--accent); }
.carousel-prev { left: 12px; }
.carousel-next { right: 12px; }

/* ==========================================================================
   About ("What is RCThemePark?")
   ========================================================================== */
.about {
    background: linear-gradient(rgba(16, 18, 24, 0.82), rgba(16, 18, 24, 0.82)), var(--bg-alt);
    background-size: cover;
    background-position: center;
    padding: 6.5rem 0;
}

.about-inner {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 4rem;
    align-items: center;
}

.about-title { font-size: clamp(1.6rem, 3vw, 2.1rem); margin: 0; }

.about-text p { margin: 0 0 1.1em; }
.about-text p:last-child { margin-bottom: 0; }

/* ==========================================================================
   Features ("The Most Magical Experience")
   ========================================================================== */
.features {
    background: var(--bg);
    padding: 5.5rem 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.6rem;
}

.feature h3 { font-size: 1.35rem; margin: 1.2rem 0 0.7rem; }
.feature p { color: var(--text-muted); font-size: 0.97rem; margin: 0 0 1em; }

.feature-image {
    aspect-ratio: 16 / 10;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-card);
}
.feature-image img { width: 100%; height: 100%; object-fit: cover; display: block; }

.feature-image-placeholder {
    background:
        linear-gradient(135deg, rgba(214, 59, 171, 0.18), rgba(43, 35, 64, 0.5)),
        var(--bg-card);
}

/* ==========================================================================
   What's News
   ========================================================================== */
.whats-new {
    background: var(--bg-alt);
    padding: 5.5rem 0;
}

.whats-new-inner {
    display: flex;
    justify-content: flex-end;
}

.whats-new-content {
    max-width: 560px;
}

.whats-new-content h2 { font-size: clamp(1.5rem, 2.8vw, 1.9rem); }
.whats-new-content p { color: var(--text-muted); }

/* ==========================================================================
   Latest news / post cards
   ========================================================================== */
.latest-news { background: var(--bg); padding: 5.5rem 0 6.5rem; }
.archive { padding: 6rem 0; }

.post-feed {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.4rem;
}

.post-card { display: flex; flex-direction: column; }

.post-card-image-link { display: block; border-radius: var(--radius); overflow: hidden; }

.post-card-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}
.post-card:hover .post-card-image { transform: scale(1.04); }

.post-card-image-empty {
    background:
        linear-gradient(135deg, rgba(214, 59, 171, 0.18), rgba(43, 35, 64, 0.5)),
        var(--bg-card);
}

.post-card-title { font-size: 1.25rem; margin: 1.1rem 0 0.25rem; }
.post-card-title a { color: var(--text); }
.post-card-title a:hover { color: var(--accent-hover); }

.post-card-meta {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    margin: 0 0 0.7rem;
}

.post-card-excerpt {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin: 0 0 0.9rem;
}

.post-card-more {
    margin-top: auto;
    font-weight: 600;
    font-size: 0.9rem;
}

.load-more-wrap { text-align: center; margin-top: 3.2rem; }

.archive-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.4rem;
    margin-top: 3.2rem;
}
.archive-page-count { color: var(--text-muted); font-size: 0.9rem; }

/* ==========================================================================
   Post / page
   ========================================================================== */
.post-header {
    position: relative;
    padding: 7rem 0 4rem;
    background: var(--bg-alt);
    background-size: cover;
    background-position: center;
    text-align: center;
}

.post-header-overlay { position: absolute; inset: 0; background: transparent; }
.post-header.has-image .post-header-overlay { background: rgba(12, 12, 16, 0.68); }

.post-header-inner { position: relative; z-index: 1; }

.post-tag {
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 0.8rem;
    font-weight: 700;
}

.post-title { font-size: clamp(1.9rem, 4.5vw, 3rem); margin: 0.4rem 0; }

.post-meta { color: var(--text-muted); font-size: 0.9rem; margin: 0; }

.post-content-wrap { padding: 3.5rem 24px 2rem; }

.gh-content {
    max-width: 720px;
    margin: 0 auto;
    font-size: 1.05rem;
}

.gh-content > * + * { margin-top: 1.4em; }
.gh-content h2 { font-size: 1.6rem; margin-top: 2em; }
.gh-content h3 { font-size: 1.3rem; margin-top: 1.8em; }
.gh-content img { border-radius: var(--radius); }
.gh-content blockquote {
    margin: 1.4em 0;
    padding: 0.2em 0 0.2em 1.2em;
    border-left: 3px solid var(--accent);
    color: var(--text-muted);
    font-style: italic;
}
.gh-content pre {
    background: #111;
    padding: 1em 1.2em;
    border-radius: var(--radius);
    overflow-x: auto;
    font-size: 0.9em;
}
.gh-content hr { border: 0; border-top: 1px solid #333; }
.gh-content figcaption {
    text-align: center;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-top: 0.5em;
}

/* Ghost editor card widths */
.kg-width-wide {
    position: relative;
    width: min(1100px, 90vw);
    left: 50%;
    transform: translateX(-50%);
}
.kg-width-full {
    position: relative;
    width: 100vw;
    left: 50%;
    transform: translateX(-50%);
}

.kg-gallery-container { display: flex; flex-direction: column; gap: 6px; }
.kg-gallery-row { display: flex; gap: 6px; }
.kg-gallery-image img { width: 100%; height: 100%; object-fit: cover; }

.kg-bookmark-card a {
    display: flex;
    border: 1px solid #333;
    border-radius: var(--radius);
    overflow: hidden;
    color: var(--text);
}
.kg-bookmark-content { padding: 1em; }
.kg-bookmark-title { font-weight: 700; }
.kg-bookmark-description { color: var(--text-muted); font-size: 0.9rem; }
.kg-bookmark-thumbnail img { height: 100%; object-fit: cover; }

.kg-embed-card iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--radius); }

.post-footer { padding: 1rem 24px 5rem; text-align: center; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
    background: var(--bg);
    border-top: 1px solid #2b2b2b;
    padding: 3.5rem 0 2.5rem;
}

.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
    text-align: center;
}

.footer-logo img { max-height: 84px; width: auto; }
.footer-logo-text { font-size: 1.3rem; font-weight: 700; color: var(--text); }

.footer-copyright { color: var(--text-muted); font-size: 0.9rem; margin: 0; }

.footer-socials { display: flex; gap: 1.1rem; }
.footer-socials a { color: var(--text); }
.footer-socials a:hover { color: var(--accent); }
.footer-socials svg { width: 20px; height: 20px; display: block; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 980px) {
    .features-grid, .post-feed { grid-template-columns: repeat(2, 1fr); }
    .video-slide { flex-basis: 50%; }
    .about-inner { grid-template-columns: 1fr; gap: 1.8rem; }
    .whats-new-inner { justify-content: center; }
}

@media (max-width: 640px) {
    .features-grid, .post-feed { grid-template-columns: 1fr; }
    .video-slide { flex-basis: 88%; min-width: 260px; }
    .hero { min-height: 70vh; }
    .about, .features, .whats-new, .latest-news { padding: 3.5rem 0; }
}

/* ---- Reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}
