/*
Theme Name: Mastermind Minimal v1.2.0
Theme URI: https://mastermind.ee/
Author: Mastermind.ee
Description: WordPress version of the supplied Mastermind.ee layout.
Version: 1.2.0
Text Domain: mastermind-minimal-v1-2-0
*/

/* Original design system retained from the supplied HTML. */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --text-main: #1a1a1a;
    --text-muted: #666666;
    --accent: #2563eb;
    --accent-hover: #1d4ed8;
    --border-color: #e5e7eb;
    --max-width: 1200px;
    --radius: 12px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --hub-card-height: 272px;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    text-transform: none;
    text-decoration: none;
    color: inherit;
}

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

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.75rem;
    font-family: inherit;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: var(--radius);
    transition: var(--transition);
    cursor: pointer;
    border: 1px solid transparent;
}

.btn-primary {
    background-color: var(--accent);
    color: #ffffff;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    border-color: var(--border-color);
    color: var(--text-main);
}

.btn-secondary:hover {
    background-color: var(--bg-secondary);
    border-color: var(--text-main);
    transform: translateY(-2px);
}

/* Header */
.site-header {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.logo span { color: var(--accent); }

.site-nav ul {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    list-style: none;
}

.site-nav a {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
}

.site-nav a:hover,
.site-nav .current-menu-item > a { color: var(--text-main); }

/* Hero */
.hero {
    padding: 8rem 0 6rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -1.5px;
    margin-bottom: 1.5rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 2.5rem auto;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Newsletter */
.newsletter {
    padding: 2rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
}

.newsletter-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.newsletter-text h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.newsletter-text p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.newsletter-form {
    display: flex;
    gap: 0.75rem;
    flex-grow: 1;
    max-width: 500px;
}

.newsletter-form input {
    flex-grow: 1;
    padding: 0.875rem 1.2rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    font-family: inherit;
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition);
}

.newsletter-form input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Three equal streams — Groups / Podcast / Articles */
.hub { padding: 7rem 0; }

.section-title {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 3.5rem;
    text-align: center;
}

.hub-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.5rem;
}

.hub-column {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.column-header {
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.75rem;
}

/* The original card typography, plus locked dimensions and two-line clipping. */
.hub-card {
    height: var(--hub-card-height);
    min-width: 0;
    display: grid;
    grid-template-rows: auto minmax(0, auto) minmax(0, 1fr) auto;
    align-content: start;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    overflow: hidden;
    transition: var(--transition);
}

.hub-card:hover {
    border-color: var(--text-main);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
    transform: translateY(-2px);
}

.badge {
    display: inline-block;
    width: fit-content;
    max-width: 100%;
    overflow: hidden;
    padding: 0.25rem 0.75rem;
    background-color: var(--bg-secondary);
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1.6;
    margin-bottom: 1rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hub-card h4 {
    display: -webkit-box;
    overflow: hidden;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.hub-card h4 a:hover { color: var(--accent); }

.hub-card p {
    display: -webkit-box;
    overflow: hidden;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.25rem;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    align-self: end;
    min-width: 0;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.card-meta > span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-link {
    flex: 0 0 auto;
    color: var(--accent);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.hub-card--empty { background-color: var(--bg-secondary); }
.hub-card--empty:hover { border-color: var(--border-color); box-shadow: none; transform: none; }

/* Showcase */
.showcase {
    background-color: var(--bg-secondary);
    padding: 6rem 0;
}

.showcase-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 4rem;
}

.showcase-text h2 {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -1px;
    margin-bottom: 1.5rem;
}

.showcase-text p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.showcase-visual {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 2.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.04);
}

.mock-ui-line {
    height: 12px;
    background: var(--bg-secondary);
    border-radius: 4px;
    margin-bottom: 1rem;
}

.mock-ui-line.short { width: 40%; }
.mock-ui-line.mid { width: 75%; }

.mock-ui-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1.5rem;
}

.mock-ui-box {
    border: 1px dashed var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
}

/* Archive and single pages reuse the source type scale. */
.page-header { padding: 6rem 0 3.5rem; }
.page-header h1,
.single-entry h1 {
    max-width: 800px;
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -1.5px;
}
.page-header p { max-width: 600px; margin-top: 1rem; color: var(--text-muted); font-size: 1.1rem; }
.archive-list { padding: 0 0 6rem; }
.archive-list .hub-card { width: 100%; max-width: 100%; }
.single-entry { max-width: 800px; padding: 6rem 0; }
.single-entry__meta { color: var(--text-muted); margin: 1rem 0 2.5rem; }
.single-entry__content { font-size: 1.05rem; }
.single-entry__content > * + * { margin-top: 1.25rem; }

/* Footer */
.site-footer {
    padding: 4rem 0;
    border-top: 1px solid var(--border-color);
}

.footer-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

.social-links {
    display: flex;
    gap: 1.5rem;
    list-style: none;
}

.social-links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: var(--transition);
}

.social-links a:hover { color: var(--text-main); }
.copyright { color: var(--text-muted); font-size: 0.9rem; }

@media (max-width: 1024px) {
    .hub-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .showcase-wrapper {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    .hero h1,
    .page-header h1,
    .single-entry h1 { font-size: 2.5rem; }

    .hero-actions { flex-direction: column; }
    .newsletter-form { flex-direction: column; max-width: 100%; }
}
