/*
Theme Name: Mastermind Minimal
Theme URI: https://masterminds.ee/
Author: Mastermind.ee
Description: Minimal front-page hub for Groups, Podcast, and Articles.
Version: 1.0.0
Text Domain: mastermind-minimal
*/

:root {
    --mm-bg: #ffffff;
    --mm-surface: #f7f7f5;
    --mm-text: #121212;
    --mm-muted: #6a6a67;
    --mm-line: #e5e5e1;
    --mm-accent: #2f5cff;
    --mm-accent-hover: #173bca;
    --mm-radius: 10px;
    --mm-page-width: 1240px;
    --mm-card-height: 278px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--mm-bg);
    color: var(--mm-text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 3px solid rgba(47, 92, 255, .35);
    outline-offset: 3px;
}

.mm-container {
    width: min(calc(100% - 40px), var(--mm-page-width));
    margin: 0 auto;
}

.mm-site-header {
    border-bottom: 1px solid var(--mm-line);
    background: rgba(255, 255, 255, .93);
}
.mm-site-header__inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.mm-brand {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -0.05em;
    white-space: nowrap;
}
.mm-brand__dot { color: var(--mm-accent); }
.mm-nav {
    display: flex;
    align-items: center;
    gap: 24px;
}
.mm-nav ul {
    display: flex;
    align-items: center;
    gap: 24px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.mm-nav a {
    color: var(--mm-muted);
    font-size: 14px;
    font-weight: 650;
}
.mm-nav a:hover,
.mm-nav .current-menu-item > a { color: var(--mm-text); }

.mm-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 16px;
    border: 1px solid var(--mm-line);
    border-radius: 7px;
    background: transparent;
    color: var(--mm-text);
    font-size: 14px;
    font-weight: 750;
    line-height: 1;
    transition: background-color .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}
.mm-button:hover {
    background: var(--mm-surface);
    border-color: #c8c8c2;
    transform: translateY(-1px);
}
.mm-button--primary {
    border-color: var(--mm-accent);
    background: var(--mm-accent);
    color: #fff;
}
.mm-button--primary:hover {
    border-color: var(--mm-accent-hover);
    background: var(--mm-accent-hover);
}

.mm-main { min-height: 60vh; }
.mm-hero {
    padding: clamp(76px, 11vw, 148px) 0 clamp(52px, 8vw, 88px);
    border-bottom: 1px solid var(--mm-line);
}
.mm-hero__copy { max-width: 805px; }
.mm-eyebrow {
    margin: 0 0 16px;
    color: var(--mm-accent);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.mm-hero h1,
.mm-page-header h1,
.mm-single__title {
    margin: 0;
    font-size: clamp(42px, 6vw, 78px);
    font-weight: 800;
    letter-spacing: -.065em;
    line-height: .98;
}
.mm-hero__description {
    max-width: 640px;
    margin: 26px 0 0;
    color: var(--mm-muted);
    font-size: clamp(17px, 2vw, 21px);
    line-height: 1.55;
}
.mm-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 30px;
}

.mm-hub { padding: clamp(52px, 7vw, 92px) 0; }
.mm-stream + .mm-stream { margin-top: 56px; }
.mm-stream__heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--mm-line);
}
.mm-stream__title {
    margin: 0;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
}
.mm-stream__link {
    color: var(--mm-muted);
    font-size: 13px;
    font-weight: 700;
}
.mm-stream__link:hover { color: var(--mm-accent); }

.mm-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}
.mm-card {
    height: var(--mm-card-height);
    min-width: 0;
    display: grid;
    grid-template-rows: auto minmax(0, auto) minmax(0, 1fr) auto;
    gap: 12px;
    padding: 22px;
    overflow: hidden;
    border: 1px solid var(--mm-line);
    border-radius: var(--mm-radius);
    background: var(--mm-bg);
    transition: border-color .16s ease, transform .16s ease, box-shadow .16s ease;
}
.mm-card:hover {
    border-color: #bcbcb6;
    box-shadow: 0 12px 26px rgba(17, 17, 17, .045);
    transform: translateY(-2px);
}
.mm-card__badge {
    width: fit-content;
    max-width: 100%;
    overflow: hidden;
    padding: 4px 9px;
    border-radius: 99px;
    background: var(--mm-surface);
    color: var(--mm-muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .035em;
    line-height: 1.2;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
}
.mm-card__title {
    display: -webkit-box;
    min-height: 3.1em;
    margin: 0;
    overflow: hidden;
    font-size: 20px;
    font-weight: 760;
    letter-spacing: -.035em;
    line-height: 1.34;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}
.mm-card__title a:hover { color: var(--mm-accent); }
.mm-card__excerpt {
    display: -webkit-box;
    min-height: 3.15em;
    margin: 0;
    overflow: hidden;
    color: var(--mm-muted);
    font-size: 14px;
    line-height: 1.58;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}
.mm-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
    padding-top: 14px;
    border-top: 1px solid var(--mm-line);
    color: var(--mm-muted);
    font-size: 12px;
    font-weight: 700;
}
.mm-card__meta {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.mm-card__cta {
    flex: 0 0 auto;
    color: var(--mm-accent);
    white-space: nowrap;
}
.mm-card__cta:hover { color: var(--mm-accent-hover); }
.mm-card--empty { background: var(--mm-surface); }
.mm-card--empty:hover { border-color: var(--mm-line); box-shadow: none; transform: none; }

.mm-page-header {
    padding: clamp(70px, 10vw, 120px) 0 46px;
    border-bottom: 1px solid var(--mm-line);
}
.mm-page-header__description {
    max-width: 640px;
    margin: 20px 0 0;
    color: var(--mm-muted);
    font-size: 18px;
}
.mm-archive { padding: 44px 0 86px; }
.mm-pagination { margin-top: 34px; }
.mm-pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.mm-pagination a,
.mm-pagination span {
    display: inline-flex;
    min-width: 38px;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border: 1px solid var(--mm-line);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
}
.mm-pagination .current { border-color: var(--mm-accent); background: var(--mm-accent); color: #fff; }

.mm-single { padding: clamp(64px, 10vw, 116px) 0 90px; }
.mm-single__inner { width: min(100%, 800px); }
.mm-single__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0 30px;
    color: var(--mm-muted);
    font-size: 14px;
    font-weight: 700;
}
.mm-single__meta span + span::before { content: "·"; margin-right: 10px; }
.mm-single__content { font-size: 18px; line-height: 1.72; }
.mm-single__content > * + * { margin-top: 1.25em; }
.mm-single__content h2,
.mm-single__content h3 { line-height: 1.15; letter-spacing: -.035em; }
.mm-single__content a { color: var(--mm-accent); text-decoration: underline; text-underline-offset: 3px; }
.mm-single__back { margin-top: 46px; }

.mm-site-footer {
    padding: 26px 0;
    border-top: 1px solid var(--mm-line);
    color: var(--mm-muted);
    font-size: 13px;
}
.mm-site-footer__inner {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}
.mm-site-footer p { margin: 0; }

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

@media (max-width: 900px) {
    .mm-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
    :root { --mm-card-height: 262px; }
    .mm-container { width: min(calc(100% - 32px), var(--mm-page-width)); }
    .mm-site-header__inner { min-height: 62px; }
    .mm-nav ul { display: none; }
    .mm-card-grid { grid-template-columns: 1fr; }
    .mm-site-footer__inner { flex-direction: column; }
}
