/* brand/home.css — Homepage [tmg_home] layout + early home sections (Wave 3 split; cascade slice 355-868) */
/* -------------------------------------------------------------------------- */
/* Homepage shortcode [tmg_home] — Captain-approved mockup layout             */
/* -------------------------------------------------------------------------- */
.tmg-home {
    --tmg-home-max: 1240px;
    --tmg-home-radius: 16px;
    --tmg-home-border: #243038;
    --tmg-home-line: #1e2a30;
    box-sizing: border-box;
    color: var(--tmg-mist);
    font-family: Inter, ui-sans-serif, system-ui, sans-serif;
    line-height: 1.5;
    margin: 0 auto;
    max-width: var(--tmg-home-max);
    padding: 0 24px 40px;
}

html[data-theme="light"] .tmg-home,
body.tmg-theme-light .tmg-home {
    --tmg-home-border: #c5d0d4;
    --tmg-home-line: #d5dee2;
}

.tmg-home *,
.tmg-home *::before,
.tmg-home *::after {
    box-sizing: border-box;
}

.tmg-home a {
    color: var(--tmg-teal);
    text-decoration: none;
}

.tmg-home-badge {
    background: rgba(46, 196, 182, .15);
    border: 1px solid rgba(46, 196, 182, .35);
    border-radius: 6px;
    color: var(--tmg-teal);
    display: inline-block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    margin-bottom: 10px;
    padding: 4px 8px;
    text-transform: uppercase;
}

.tmg-home-btn {
    align-items: center;
    border: 0;
    border-radius: 10px;
    cursor: pointer;
    display: inline-flex;
    font-size: 13px;
    font-weight: 700;
    justify-content: center;
    padding: 10px 16px;
    transition: transform .2s, box-shadow .2s, background .2s, border-color .2s, color .2s;
}

.tmg-home-btn:hover {
    transform: translateY(-1px);
}

.tmg-home-btn-primary {
    background: var(--tmg-teal);
    box-shadow: 0 8px 24px rgba(46, 196, 182, .25);
    color: #062 !important;
}

.tmg-home-btn-primary:hover,
.tmg-home-btn-primary:focus-visible {
    background: var(--tmg-teal-deep);
    box-shadow: 0 0 24px rgba(46, 196, 182, .45);
    color: #fff !important;
}

.tmg-home-btn-ghost {
    background: transparent;
    border: 1px solid #2a3a40;
    color: var(--tmg-mist) !important;
}

.tmg-home-btn-ghost:hover,
.tmg-home-btn-ghost:focus-visible {
    border-color: var(--tmg-teal);
    color: var(--tmg-teal) !important;
}

/* Hero */
.tmg-home-hero {
    padding: 40px 0 28px;
}

.tmg-home-hero-grid {
    align-items: stretch;
    display: grid;
    gap: 24px;
    grid-template-columns: 1.1fr .9fr;
}

.tmg-home-hero-copy h1 {
    font-size: clamp(32px, 4vw, 48px);
    letter-spacing: -.02em;
    line-height: 1.05;
    margin: 0 0 12px;
}

.tmg-home-hero-copy p {
    color: var(--tmg-muted);
    margin: 0 0 22px;
    max-width: 42ch;
}

.tmg-home-hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* Spark graphic slot — 720×640 hero; ~120px clear bottom for Login/Sign up. */
.tmg-hero-spark-slot {
    display: block;
    margin: 12px 0 8px;
    max-width: 100%;
    overflow: hidden;
    width: 100%;
}

.tmg-hero-spark-img {
    display: block;
    height: auto;
    max-height: 420px;
    object-fit: cover;
    width: 100%;
}

.tmg-home-hero-auth {
    margin-top: 4px;
}

/* Hot Off The Press featured card (upper right). */
.tmg-hot-press-card {
    isolation: isolate;
}

.tmg-hot-press-thumb {
    background-color: var(--tmg-ink, #0a0c0e);
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
}

.tmg-hot-press-mark {
    left: 10px;
    padding: 4px;
    pointer-events: none;
    position: absolute;
    top: 10px;
    z-index: 2;
}

.tmg-hot-press-mark-img {
    display: block;
    height: auto;
    max-height: 110px;
    max-width: min(48%, 220px);
    object-fit: contain;
    width: auto;
}

.tmg-hot-press-mark-fallback {
    background: rgba(46, 196, 182, .18);
    border: 1px solid rgba(46, 196, 182, .45);
    border-radius: 6px;
    color: var(--tmg-teal);
    display: inline-block;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .1em;
    padding: 5px 9px;
    text-transform: uppercase;
}

.tmg-hot-press-title,
.tmg-home-hero-card h2 {
    color: #E8EEF0 !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .55);
}

.tmg-home-hero-card .tmg-home-meta {
    color: rgba(232, 238, 240, .82) !important;
}

.tmg-home-hero-card .tmg-home-badge {
    color: var(--tmg-teal);
}

.tmg-hot-press-empty {
    cursor: default;
    pointer-events: none;
}

.tmg-home-hero-card {
    background: var(--tmg-panel);
    border: 1px solid var(--tmg-home-border);
    border-radius: var(--tmg-home-radius);
    box-shadow: 0 18px 50px rgba(0, 0, 0, .35);
    color: inherit !important;
    display: block;
    min-height: 280px;
    overflow: hidden;
    position: relative;
    transition: transform .25s, box-shadow .25s, border-color .25s;
}

.tmg-home-hero-card:hover,
.tmg-home-hero-card:focus-visible {
    border-color: rgba(46, 196, 182, .5);
    box-shadow: 0 22px 60px rgba(0, 0, 0, .45), 0 0 40px rgba(46, 196, 182, .15);
    color: inherit !important;
    transform: translateY(-4px);
}

.tmg-home-hero-art {
    background-color: var(--tmg-ink, #0a0c0e);
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.tmg-home-hero-card:hover .tmg-home-hero-art {
    transform: scale(1.06);
}

.tmg-home-hero-card-body {
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: flex-end;
    padding: 22px;
    position: relative;
    z-index: 1;
}

.tmg-home-hero-card h2 {
    font-size: 22px;
    margin: 0 0 6px;
}

.tmg-home-meta {
    color: var(--tmg-muted);
    font-size: 13px;
}

/* Sections */
.tmg-home-section {
    padding: 28px 0 8px;
}

.tmg-home-section-head {
    align-items: end;
    display: flex;
    justify-content: space-between;
    margin-bottom: 16px;
}

.tmg-home-section-head h3 {
    font-size: 20px;
    letter-spacing: -.01em;
    margin: 0;
}

.tmg-home-section-head a {
    font-size: 13px;
    font-weight: 600;
}

/* Competition strip (Ladder + Submit; Preview Cup lives in hero + #preview) */
.tmg-home-comp {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(2, 1fr);
}

.tmg-home-comp-card {
    background: var(--tmg-panel);
    border: 1px solid var(--tmg-home-border);
    border-radius: var(--tmg-home-radius);
    color: inherit !important;
    display: block;
    padding: 18px;
    transition: transform .22s, border-color .22s, box-shadow .22s;
}

.tmg-home-comp-card:hover,
.tmg-home-comp-card:focus-visible {
    border-color: rgba(46, 196, 182, .45);
    box-shadow: 0 0 28px rgba(46, 196, 182, .12);
    color: inherit !important;
    transform: translateY(-3px);
}

.tmg-home-comp-card h4 {
    font-size: 15px;
    margin: 0 0 8px;
}

.tmg-home-comp-card ul {
    color: var(--tmg-muted);
    font-size: 13px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.tmg-home-comp-card li {
    border-bottom: 1px solid var(--tmg-home-line);
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
}

.tmg-home-comp-card li:last-child {
    border: 0;
}

.tmg-home-elo {
    color: var(--tmg-teal);
    font-weight: 700;
}

/* News & Reviews grid — 2×2 so 4 home cards fill evenly (S4); /news/ uses other classes */
.tmg-home-news {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: auto auto;
}

.tmg-home-news.tmg-card-grid--2x3 {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, auto);
}

.tmg-home-article {
    background: var(--tmg-panel);
    border: 1px solid var(--tmg-home-border);
    border-radius: var(--tmg-home-radius);
    color: inherit !important;
    cursor: pointer;
    display: block;
    isolation: isolate;
    min-height: 180px;
    overflow: hidden;
    position: relative;
    transition: border-color .3s, box-shadow .3s;
}

.tmg-home-article-featured {
    grid-row: span 2;
    min-height: 380px;
}

.tmg-home-article-wide {
    grid-column: 2 / span 2;
}

.tmg-home-article-thumb {
    background-position: center;
    background-size: cover;
    inset: 0;
    position: absolute;
    transition: transform .45s ease, filter .3s;
}

.tmg-home-article-a .tmg-home-article-placeholder,
.tmg-home-article-a .tmg-home-article-thumb.tmg-home-article-placeholder {
    background-image:
        linear-gradient(135deg, #234, #0b1214 60%),
        radial-gradient(circle at 70% 30%, rgba(46, 196, 182, .5), transparent 45%);
}

.tmg-home-article-b .tmg-home-article-placeholder {
    background-image:
        linear-gradient(135deg, #2a2030, #0b1214 65%),
        radial-gradient(circle at 40% 40%, rgba(232, 93, 76, .35), transparent 40%);
}

.tmg-home-article-c .tmg-home-article-placeholder {
    background-image:
        linear-gradient(135deg, #203040, #0b1214 60%),
        radial-gradient(circle at 60% 60%, rgba(46, 196, 182, .3), transparent 45%);
}

.tmg-home-article-d .tmg-home-article-placeholder {
    background-image:
        linear-gradient(135deg, #1a2830, #0b1214 70%),
        radial-gradient(circle at 20% 80%, rgba(26, 155, 142, .4), transparent 40%);
}

.tmg-home-article-shade {
    background: linear-gradient(180deg, transparent 30%, rgba(11, 18, 20, .92));
    inset: 0;
    position: absolute;
    transition: opacity .3s;
}

.tmg-home-article-overlay {
    background: rgba(46, 196, 182, 0);
    inset: 0;
    pointer-events: none;
    position: absolute;
    transition: background .3s;
}

.tmg-home-article-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: flex-end;
    padding: 18px;
    position: relative;
    z-index: 2;
}

.tmg-home-article-tag {
    color: var(--tmg-teal);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .06em;
    margin-bottom: 6px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .45);
}

/* Overlay sits on dark shade — keep high-contrast light type in both themes. */
.tmg-home-article-content {
    color: #E8EEF0;
}

.tmg-home-article h4 {
    color: #E8EEF0 !important;
    font-size: 16px;
    margin: 0 0 6px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .55);
    transition: color .2s;
}

.tmg-home-article-featured h4 {
    font-size: 26px;
    line-height: 1.15;
}

.tmg-home-article-by {
    color: rgba(232, 238, 240, .82) !important;
    font-size: 12px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .4);
}

html[data-theme="light"] .tmg-home-article-shade,
body.tmg-theme-light .tmg-home-article-shade {
    background: linear-gradient(180deg, transparent 22%, rgba(11, 18, 20, .88));
}

.tmg-home-article:hover,
.tmg-home-article:focus-visible {
    border-color: rgba(46, 196, 182, .55);
    box-shadow: 0 16px 40px rgba(0, 0, 0, .4), 0 0 32px rgba(46, 196, 182, .18);
    color: inherit !important;
}

.tmg-home-article:hover .tmg-home-article-thumb,
.tmg-home-article:focus-visible .tmg-home-article-thumb {
    filter: brightness(1.08);
    transform: scale(1.08);
}

.tmg-home-article:hover .tmg-home-article-overlay,
.tmg-home-article:focus-visible .tmg-home-article-overlay {
    background: rgba(46, 196, 182, .12);
}

.tmg-home-article:hover h4,
.tmg-home-article:focus-visible h4 {
    color: var(--tmg-teal);
}

.tmg-home-article:hover .tmg-home-article-shade,
.tmg-home-article:focus-visible .tmg-home-article-shade {
    opacity: .85;
}

.tmg-home-preview .tmg-tournament {
    margin-top: .5rem;
}

/* W4d — #preview tournament header uses cup surface tokens (light + dark). */
.tmg-home-preview .tmg-tournament {
    border-color: var(--tmg-cup-border, var(--tmg-border));
}

.tmg-home-preview .tmg-tournament-header {
    border-bottom-color: var(--tmg-cup-line, var(--tmg-border));
}

.tmg-home-preview .tmg-tournament-title,
.tmg-home-preview .tmg-tournament-header h2,
.tmg-home-preview .tmg-tournament-header h3 {
    color: var(--tmg-cup-fg, var(--tmg-mist));
}

.tmg-home-preview .tmg-tournament-meta,
.tmg-home-preview .tmg-tournament-notes {
    color: var(--tmg-cup-muted, var(--tmg-muted));
}

.tmg-home-preview .tmg-home-badge,
.tmg-home-preview .tmg-tournament-header .tmg-badge {
    color: var(--tmg-cup-badge, var(--tmg-teal));
}

html[data-theme="light"] .tmg-home-preview .tmg-tournament,
body.tmg-theme-light .tmg-home-preview .tmg-tournament {
    background: var(--tmg-panel);
    border-color: var(--tmg-cup-border);
    color: var(--tmg-cup-fg);
}

html[data-theme="light"] .tmg-home-preview .tmg-tournament-title,
body.tmg-theme-light .tmg-home-preview .tmg-tournament-title,
html[data-theme="light"] .tmg-home-preview .tmg-tournament-header h2,
body.tmg-theme-light .tmg-home-preview .tmg-tournament-header h2 {
    color: var(--tmg-cup-fg) !important;
}

html[data-theme="light"] .tmg-home-preview .tmg-tournament-meta,
body.tmg-theme-light .tmg-home-preview .tmg-tournament-meta {
    color: var(--tmg-cup-muted) !important;
}

@media (max-width: 900px) {
    .tmg-home-hero-grid,
    .tmg-home-comp,
    .tmg-home-news {
        grid-template-columns: 1fr;
    }

    .tmg-home-article-featured {
        grid-row: auto;
        min-height: 260px;
    }

    .tmg-home-article-wide {
        grid-column: auto;
    }
}

