/*
 * Yuk Central — theme stylesheet.
 * Layered on top of the plugin's design system (assets/css/public.css).
 */

/* Reset / base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
    margin: 0;
    background: var(--yc-bg);
    color: var(--yc-ink);
    font-family: var(--yc-font-body);
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button { font-family: inherit; }

::selection { background: var(--yc-red); color: #fff; }

.yc-visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.yc-skip-link {
    position: absolute; left: -9999px; top: 0;
    padding: 0.6rem 1rem;
    background: var(--yc-ink); color: var(--yc-bg);
    z-index: 9999;
}
.yc-skip-link:focus { left: 1rem; top: 1rem; }

/* Site header */
.yc-site-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(250, 250, 247, 0.92);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--yc-line);
}
.yc-site-header__inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: var(--yc-sp-3) var(--yc-sp-5);
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: var(--yc-sp-5);
}

/* Logo */
.yc-logo {
    display: inline-flex; align-items: center; gap: 0.6rem;
    text-decoration: none; color: var(--yc-ink);
    line-height: 1;
}
.yc-logo-mark {
    display: inline-flex;
    width: 32px; height: 40px;
    color: var(--yc-red);
}
.yc-logo-text {
    display: inline-flex;
    align-items: baseline;
    gap: 0.3rem;
    font: 700 1.25rem/1 var(--yc-font-display);
    letter-spacing: -0.01em;
}
.yc-logo-text__yuk { color: var(--yc-red); letter-spacing: 0.02em; }
.yc-logo-text__central { color: var(--yc-ink); font-weight: 500; }
.yc-logo--footer .yc-logo-mark { color: var(--yc-red); }

/* Custom uploaded logo. Sized by HEIGHT (the natural way to fit a header)
   with a max-WIDTH safety cap so a very wide wordmark can't blow out the
   layout on small screens. The aspect ratio of the source image is preserved. */
.yc-logo-custom {
    display: block;
    height: 44px;          /* desktop header height */
    width: auto;
    max-width: 320px;      /* don't let huge wordmarks dominate the bar */
    object-fit: contain;
}
.yc-logo-custom--footer {
    height: 36px;
    max-width: 240px;
}
@media (max-width: 880px) {
    .yc-logo-custom { height: 38px; max-width: 220px; }
}

/* Nav */
.yc-nav { display: flex; align-items: center; justify-content: center; }
.yc-nav-list {
    list-style: none; padding: 0; margin: 0;
    display: flex; gap: 0.4rem;
}
.yc-nav-list li { display: inline-flex; }
.yc-nav-list a {
    padding: 0.5rem 0.95rem;
    font: 600 0.92rem/1 var(--yc-font-body);
    color: var(--yc-ink-2);
    text-decoration: none;
    border-radius: var(--yc-radius-sm);
    transition: background var(--yc-fast), color var(--yc-fast);
}
.yc-nav-list a:hover { background: var(--yc-bg-subtle); color: var(--yc-ink); }
.yc-nav-list .current-menu-item a, .yc-nav-list .current_page_item a { color: var(--yc-red); }

.yc-header-actions { display: inline-flex; gap: var(--yc-sp-2); align-items: center; }
.yc-header-actions .yc-button { padding: 0.55rem 1rem; font-size: 0.88rem; }

.yc-nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none; border: none;
    padding: 0.5rem;
    cursor: pointer;
}
.yc-nav-toggle span {
    display: block; width: 22px; height: 2px;
    background: var(--yc-ink);
    border-radius: 1px;
    transition: transform var(--yc-fast), opacity var(--yc-fast);
}
.yc-nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.yc-nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.yc-nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 880px) {
    .yc-site-header__inner { grid-template-columns: auto 1fr; }
    .yc-nav {
        display: flex;
        justify-content: flex-end;
        position: static;
    }
    .yc-nav-toggle { display: flex; }
    .yc-nav-list {
        display: none;
        position: absolute;
        left: 0; right: 0; top: 100%;
        flex-direction: column;
        background: var(--yc-surface);
        border-bottom: 1px solid var(--yc-line);
        padding: var(--yc-sp-3);
        gap: 0;
        z-index: 10;
    }
    .yc-nav.is-open .yc-nav-list { display: flex; }
    .yc-nav-list a { padding: 0.8rem 1rem; }
    .yc-header-actions { display: none; }
}

/* Site main */
.yc-site-main { min-height: 60vh; }

/* Hero */
/* Hero — layout styles live in plugin's public.css for the leaderboard variant.
   Theme keeps only typography + decoration. */
.yc-hero__inner {
    text-align: left;
}
.yc-hero__eyebrow {
    display: inline-block;
    padding: 0.4rem 0.85rem;
    background: var(--yc-surface);
    border: 1px solid var(--yc-line-strong);
    border-radius: 999px;
    font: 600 0.78rem/1 var(--yc-font-mono);
    letter-spacing: 0.06em; text-transform: uppercase;
    color: var(--yc-ink-2);
    margin-bottom: var(--yc-sp-5);
}
.yc-hero__title {
    margin: 0 0 var(--yc-sp-4);
    font: 700 clamp(2.5rem, 7vw, 5.5rem)/0.98 var(--yc-font-display);
    letter-spacing: -0.035em;
    color: var(--yc-ink);
}
.yc-hero__title-accent {
    background: linear-gradient(120deg, var(--yc-red) 0%, var(--yc-red-deep) 60%, var(--yc-teal-deep) 110%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}
.yc-hero__sub {
    margin: 0 0 var(--yc-sp-6);
    max-width: 56ch;
    font-size: clamp(1.05rem, 1.4vw, 1.2rem);
    color: var(--yc-ink-2);
    line-height: 1.55;
}
.yc-hero__actions {
    display: inline-flex; gap: var(--yc-sp-3); flex-wrap: wrap;
}
.yc-hero__actions .yc-button { padding: 0.85rem 1.5rem; }

.yc-hero__decoration {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}
.yc-hero__decoration svg { width: 100%; height: 100%; }

/* Home sections */
.yc-home-section {
    padding: clamp(3rem, 6vw, 5rem) 0;
}
.yc-home-section--alt {
    background: var(--yc-surface-2);
    border-block: 1px solid var(--yc-line);
}
.yc-home-section__header {
    display: flex; justify-content: space-between; align-items: end;
    margin-bottom: var(--yc-sp-6);
    gap: var(--yc-sp-4);
    flex-wrap: wrap;
}
.yc-home-section__eyebrow {
    display: inline-block;
    font: 700 0.75rem/1 var(--yc-font-mono);
    letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--yc-red);
    margin-bottom: var(--yc-sp-2);
}
.yc-home-section__title {
    margin: 0;
    font: 700 clamp(1.75rem, 3.2vw, 2.5rem)/1.05 var(--yc-font-display);
    letter-spacing: -0.02em;
    color: var(--yc-ink);
}
.yc-home-section__sub {
    margin: var(--yc-sp-2) 0 0;
    color: var(--yc-ink-3);
    max-width: 56ch;
}

.yc-link-arrow {
    color: var(--yc-ink-2);
    text-decoration: none;
    font: 600 0.95rem/1 var(--yc-font-body);
    transition: color var(--yc-fast), transform var(--yc-fast);
    display: inline-flex; align-items: center; gap: 0.3rem;
}
.yc-link-arrow:hover { color: var(--yc-red); }

.yc-toplist-wrap {
    background: var(--yc-surface);
    border: 1px solid var(--yc-line);
    border-radius: var(--yc-radius-lg);
    padding: var(--yc-sp-4) var(--yc-sp-6);
    box-shadow: var(--yc-shadow-sm);
}

/* CTA card */
.yc-cta-card {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: var(--yc-sp-6);
    align-items: center;
    background: var(--yc-ink);
    color: var(--yc-bg);
    padding: clamp(2rem, 4vw, 3.5rem);
    border-radius: var(--yc-radius-xl);
    position: relative;
    overflow: hidden;
}
.yc-cta-card::before {
    content: ""; position: absolute;
    width: 380px; height: 380px;
    right: -80px; top: -120px;
    background: radial-gradient(circle, rgba(255,68,56,0.35), transparent 70%);
    pointer-events: none;
}
.yc-cta-card__title { margin: 0 0 var(--yc-sp-2); font: 700 clamp(1.5rem, 3vw, 2.2rem)/1.1 var(--yc-font-display); letter-spacing: -0.02em; }
.yc-cta-card__sub { margin: 0; color: rgba(255,255,255,0.78); max-width: 50ch; line-height: 1.55; }
.yc-cta-card__actions { position: relative; z-index: 2; display: inline-flex; gap: var(--yc-sp-2); flex-wrap: wrap; }
.yc-cta-card__actions .yc-button { background: var(--yc-bg); color: var(--yc-ink); }
.yc-cta-card__actions .yc-button:hover { background: #fff; }
.yc-cta-card__actions .yc-button--ghost { background: transparent; color: var(--yc-bg); border-color: rgba(255,255,255,0.4); }
.yc-cta-card__actions .yc-button--ghost:hover { background: rgba(255,255,255,0.1); border-color: var(--yc-bg); }

@media (max-width: 720px) {
    .yc-cta-card { grid-template-columns: 1fr; }
}

/* Footer */
.yc-site-footer {
    background: var(--yc-ink);
    color: var(--yc-bg);
    padding: clamp(3rem, 6vw, 5rem) var(--yc-sp-5) var(--yc-sp-5);
    margin-top: var(--yc-sp-10);
}
.yc-site-footer__inner { max-width: 1280px; margin: 0 auto; }

.yc-footer-cta {
    text-align: center;
    max-width: 580px;
    margin: 0 auto var(--yc-sp-10);
}
.yc-footer-cta__title {
    margin: 0 0 var(--yc-sp-3);
    font: 700 clamp(1.5rem, 3vw, 2.4rem)/1.1 var(--yc-font-display);
    letter-spacing: -0.02em;
    color: var(--yc-bg);
}
.yc-footer-cta__sub {
    margin: 0 0 var(--yc-sp-5);
    color: rgba(255,255,255,0.7);
    line-height: 1.55;
}

.yc-newsletter {
    display: flex; gap: var(--yc-sp-2);
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    padding: 0.4rem;
    border-radius: 999px;
    transition: border-color var(--yc-fast);
}
.yc-newsletter:focus-within { border-color: var(--yc-red); }
.yc-newsletter input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 0.6rem 1rem;
    color: var(--yc-bg);
    font: 500 0.95rem/1 var(--yc-font-body);
}
.yc-newsletter input::placeholder { color: rgba(255,255,255,0.45); }
.yc-newsletter input:focus { outline: none; }
.yc-newsletter .yc-button { background: var(--yc-red); }
.yc-newsletter .yc-button:hover { background: var(--yc-red-deep); }
.yc-newsletter__hint { margin: var(--yc-sp-3) 0 0; color: rgba(255,255,255,0.5); font-size: 0.82rem; }

.yc-footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--yc-sp-6);
    padding: var(--yc-sp-8) 0 var(--yc-sp-6);
    border-block: 1px solid rgba(255,255,255,0.1);
}
@media (max-width: 720px) {
    .yc-footer-grid { grid-template-columns: 1fr 1fr; }
}
.yc-footer-col h4 {
    margin: 0 0 var(--yc-sp-3);
    font: 700 0.78rem/1 var(--yc-font-mono);
    letter-spacing: 0.08em; text-transform: uppercase;
    color: rgba(255,255,255,0.55);
}
.yc-footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.yc-footer-col a {
    color: var(--yc-bg);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color var(--yc-fast);
}
.yc-footer-col a:hover { color: var(--yc-red); }

.yc-footer-tag { margin: var(--yc-sp-3) 0 0; color: rgba(255,255,255,0.65); max-width: 30ch; }

.yc-footer-bottom {
    display: flex; justify-content: space-between; gap: var(--yc-sp-3);
    padding-top: var(--yc-sp-5);
    color: rgba(255,255,255,0.5);
    font-size: 0.85rem;
    flex-wrap: wrap;
}
.yc-footer-bottom p { margin: 0; }

/* Generic page */
.yc-page { padding: var(--yc-sp-8) var(--yc-sp-5); }
.yc-page__header { margin-bottom: var(--yc-sp-6); }
.yc-page__title { margin: 0; font: 700 clamp(2rem, 4vw, 3rem)/1.05 var(--yc-font-display); letter-spacing: -0.025em; }
.yc-page__meta { color: var(--yc-ink-3); margin-top: var(--yc-sp-2); }
.yc-page__content { font-size: 1.05rem; line-height: 1.7; color: var(--yc-ink-2); max-width: 70ch; }
.yc-page__content h2 { margin-top: 2rem; font: 700 1.6rem/1.2 var(--yc-font-display); color: var(--yc-ink); letter-spacing: -0.01em; }
.yc-page__content a { color: var(--yc-red); text-underline-offset: 3px; }

/* 404 */
.yc-404 { padding: var(--yc-sp-10) var(--yc-sp-5); display: flex; align-items: center; min-height: 60vh; }
.yc-404__inner { text-align: center; max-width: 600px; margin: 0 auto; }
.yc-404__code {
    display: block;
    font: 700 clamp(5rem, 14vw, 9rem)/1 var(--yc-font-display);
    color: var(--yc-red);
    letter-spacing: -0.04em;
    line-height: 0.9;
    margin-bottom: var(--yc-sp-4);
}
.yc-404__title { margin: 0 0 var(--yc-sp-3); font: 700 clamp(1.6rem, 3vw, 2.2rem)/1.1 var(--yc-font-display); letter-spacing: -0.02em; }
.yc-404__sub { margin: 0 0 var(--yc-sp-5); color: var(--yc-ink-3); font-size: 1.05rem; }
.yc-404__actions { display: inline-flex; gap: var(--yc-sp-2); flex-wrap: wrap; justify-content: center; }

/* Search */
.yc-search-results { display: flex; flex-direction: column; gap: var(--yc-sp-4); }
.yc-search-item { padding: var(--yc-sp-4); background: var(--yc-surface); border: 1px solid var(--yc-line); border-radius: var(--yc-radius); }
.yc-search-item h3 { margin: 0 0 var(--yc-sp-2); font: 600 1.1rem/1.2 var(--yc-font-display); }
.yc-search-item h3 a { color: var(--yc-ink); text-decoration: none; }
.yc-search-item h3 a:hover { color: var(--yc-red); }
.yc-search-item p { margin: 0; color: var(--yc-ink-3); font-size: 0.95rem; }
