/*
Theme Name: eDrumz
Theme URI: https://edrumz.com
Author: eDrumz
Description: Purpose-built theme for edrumz.com — built around the Virtual Drum Kit, the Notation Editor, and the Drum Pattern Library. Blog/page templates are kept intentionally simple since the site's identity is the interactive tools, not the blog.
Version: 1.6.0
Requires PHP: 7.4
Text Domain: edrumz
*/

/* ── Design system ─────────────────────────────────────────────────────── */
:root {
    --edz-accent:       #e63946;
    --edz-accent-dark:  #c1121f;
    --edz-accent-soft:  #fdecee;

    --edz-bg:           #ffffff;
    --edz-bg-alt:       #fafbfc;
    --edz-border:       #e4e7ec;
    --edz-border-mid:   #d0d5dd;

    --edz-text:         #1d2939;
    --edz-text-muted:   #475467;
    --edz-text-faint:   #667085;

    --edz-font:         'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    --edz-max-width:    1200px;
    --edz-radius:       10px;
    --edz-header-h:     72px;
}

/* ── Reset ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--edz-font);
    color: var(--edz-text);
    background: var(--edz-bg);
    line-height: 1.6;
    font-size: 16px;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--edz-accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4, h5, h6 {
    font-weight: 800;
    color: var(--edz-text);
    line-height: 1.25;
    margin: 0 0 0.5em;
}
p { margin: 0 0 1em; }
button { font-family: inherit; }
ul, ol { padding-left: 1.4em; }

/* ── Layout primitives ─────────────────────────────────────────────────── */
.edz-container {
    max-width: var(--edz-max-width);
    margin: 0 auto;
    padding: 0 24px;
}
.edz-main {
    min-height: 50vh;
}

/* ── Site header ───────────────────────────────────────────────────────── */
.edz-header {
    border-bottom: 1px solid var(--edz-border);
    background: var(--edz-bg);
    position: sticky;
    top: 0;
    z-index: 500;
}
.edz-header-inner {
    max-width: var(--edz-max-width);
    margin: 0 auto;
    padding: 0 24px;
    height: var(--edz-header-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}
.edz-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--edz-text);
    text-decoration: none;
    letter-spacing: -0.01em;
}
.edz-logo:hover { text-decoration: none; }
.edz-logo img { max-height: 36px; width: auto; display: block; }
.edz-logo-accent { color: var(--edz-accent); }

.edz-nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--edz-text);
}
.edz-nav-toggle svg { width: 24px; height: 24px; }

.edz-nav ul {
    display: flex;
    align-items: center;
    gap: 28px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.edz-nav a {
    color: var(--edz-text);
    font-weight: 600;
    font-size: 0.94rem;
}
.edz-nav a:hover { color: var(--edz-accent); text-decoration: none; }
.edz-nav .current-menu-item > a { color: var(--edz-accent); }

@media (max-width: 720px) {
    .edz-nav-toggle { display: block; }
    .edz-nav {
        display: none;
        position: absolute;
        top: var(--edz-header-h);
        left: 0; right: 0;
        background: var(--edz-bg);
        border-bottom: 1px solid var(--edz-border);
        box-shadow: 0 8px 20px rgba(16,24,40,0.06);
    }
    .edz-nav.is-open { display: block; }
    .edz-nav ul {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 8px 0;
    }
    .edz-nav li { border-top: 1px solid var(--edz-border); }
    .edz-nav li:first-child { border-top: none; }
    .edz-nav a { display: block; padding: 14px 24px; }
}

/* ── Site footer ───────────────────────────────────────────────────────── */
.edz-footer {
    border-top: 1px solid var(--edz-border);
    background: var(--edz-bg-alt);
    margin-top: 60px;
}
.edz-footer-inner {
    max-width: var(--edz-max-width);
    margin: 0 auto;
    padding: 28px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.86rem;
    color: var(--edz-text-faint);
}
.edz-footer a { color: var(--edz-text-faint); }
.edz-footer a:hover { color: var(--edz-accent); }

/* ── Shared components (buttons) used across custom templates ───────────── */
.edz-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background 0.14s, transform 0.08s;
}
.edz-btn:hover { text-decoration: none; }
.edz-btn-primary { background: var(--edz-accent); color: #fff; }
.edz-btn-primary:hover { background: var(--edz-accent-dark); }
.edz-btn-secondary { background: var(--edz-bg-alt); color: var(--edz-text); border: 1px solid var(--edz-border-mid); }
.edz-btn-secondary:hover { border-color: var(--edz-accent); color: var(--edz-accent); }

/* ── Basic content typography (blog posts / simple pages) ───────────────── */
.edz-content {
    max-width: 760px;
    margin: 40px auto;
    padding: 0 24px;
}
.edz-content h1 { font-size: 2rem; }
.edz-content .edz-entry-meta {
    color: var(--edz-text-faint);
    font-size: 0.86rem;
    margin-bottom: 24px;
}
.edz-content img { border-radius: var(--edz-radius); }

/* ── Pattern Library archive (archive-drum_pattern.php) ──────────────────── */
.edz-archive {
    margin: 40px auto 60px;
}
.edz-archive-title {
    font-size: 2rem;
    margin-bottom: 24px;
}

/* ── Single Drum Pattern page (single-drum_pattern.php) ──────────────────── */
.edz-pattern-single {
    margin: 40px auto 60px;
    max-width: 900px;
}
.edz-pattern-title {
    font-size: 2rem;
    margin-bottom: 16px;
}

/* ── Homepage hero ────────────────────────────────────────────────────── */
.edz-hero {
    background: var(--edz-bg-alt);
    border-bottom: 1px solid var(--edz-border);
    padding: 64px 0;
    text-align: center;
}
.edz-hero h1 {
    font-size: 2.4rem;
    max-width: 780px;
    margin: 0 auto 16px;
    letter-spacing: -0.01em;
}
.edz-hero-sub {
    font-size: 1.1rem;
    color: var(--edz-text-muted);
    max-width: 600px;
    margin: 0 auto;
}
@media (max-width: 600px) {
    .edz-hero { padding: 44px 0; }
    .edz-hero h1 { font-size: 1.7rem; }
    .edz-hero-sub { font-size: 1rem; }
}

/* ── Homepage feature panels ──────────────────────────────────────────── */
.edz-panels {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 48px 0;
}
@media (max-width: 900px) {
    .edz-panels { grid-template-columns: 1fr; }
}
/* Only one panel currently active (others temporarily hidden — see
   front-page.php) — center it at a readable width instead of stretching
   it across a now-empty 3-column grid. */
.edz-panels--single {
    grid-template-columns: 1fr;
    max-width: 380px;
    margin-left: auto;
    margin-right: auto;
}
.edz-panel {
    display: block;
    padding: 32px 26px;
    border: 1px solid var(--edz-border);
    border-radius: var(--edz-radius);
    background: var(--edz-bg);
    text-decoration: none;
    color: inherit;
    transition: transform 0.14s, box-shadow 0.14s, border-color 0.14s;
}
.edz-panel:hover {
    text-decoration: none;
    transform: translateY(-3px);
    box-shadow: 0 10px 26px rgba(16,24,40,0.08);
    border-color: var(--edz-border-mid);
}
.edz-panel-icon { font-size: 2.2rem; display: block; margin-bottom: 14px; }
.edz-panel h2 { font-size: 1.25rem; margin-bottom: 8px; }
.edz-panel p { color: var(--edz-text-muted); font-size: 0.94rem; margin-bottom: 14px; }
.edz-panel-link { font-weight: 700; color: var(--edz-accent); font-size: 0.9rem; }

/* ── Homepage "Latest Patterns" strip ─────────────────────────────────── */
.edz-latest { margin: 60px 0; }
.edz-latest-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}
.edz-latest-header h2 { font-size: 1.5rem; margin: 0; }
.edz-latest-viewall { font-weight: 700; font-size: 0.9rem; }

/* ── Tool pages (Virtual Drum Kit / Notation Editor) ──────────────────── */
.edz-tool-page { margin: 40px auto 70px; }
.edz-tool-hero {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 32px;
}
.edz-tool-hero h1 { font-size: 2rem; margin-bottom: 10px; }
.edz-tool-tagline { color: var(--edz-text-muted); font-size: 1.05rem; }
.edz-tool-embed { margin-bottom: 40px; }
.edz-tool-info {
    max-width: 680px;
    margin: 0 auto 32px;
}
.edz-tool-info h2 { font-size: 1.3rem; margin-bottom: 10px; }
.edz-tool-info p { color: var(--edz-text-muted); }
.edz-tool-cta {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ── Accessibility: skip link ─────────────────────────────────────────── */
.edz-skip-link {
    position: absolute;
    top: -100px;
    left: 12px;
    background: var(--edz-text);
    color: #fff;
    padding: 10px 18px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.88rem;
    z-index: 9999;
    transition: top 0.12s;
}
.edz-skip-link:focus {
    top: 12px;
    text-decoration: none;
}

/* ── Blog post / page entry ───────────────────────────────────────────── */
.edz-entry-thumb { margin-bottom: 24px; }
.edz-entry-thumb img { border-radius: var(--edz-radius); width: 100%; }
.edz-entry-content { font-size: 1.02rem; }
.edz-entry-content h2 { font-size: 1.4rem; margin-top: 1.4em; }
.edz-entry-content h3 { font-size: 1.15rem; margin-top: 1.2em; }
.edz-pagelinks { margin-top: 24px; font-weight: 600; }
.edz-pagelinks a { margin: 0 4px; }

/* ── Search results ────────────────────────────────────────────────────── */
.edz-search-results h1 span { color: var(--edz-accent); }
.edz-search-item { margin-bottom: 28px; padding-bottom: 28px; border-bottom: 1px solid var(--edz-border); }
.edz-search-item:last-of-type { border-bottom: none; }
.edz-search-item h2 { font-size: 1.2rem; margin-bottom: 4px; }
.edz-search-item h2 a { color: var(--edz-text); }
.edz-search-item h2 a:hover { color: var(--edz-accent); }

/* Default WP search form markup (search-form / search-field / search-submit
   classes) — styled directly rather than overriding with a custom
   searchform.php, since the default markup is predictable enough. */
.search-form {
    display: flex;
    gap: 8px;
    max-width: 420px;
}
.search-form .search-field {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--edz-border-mid);
    border-radius: 7px;
    font-family: var(--edz-font);
    font-size: 0.95rem;
}
.search-form .search-field:focus {
    outline: none;
    border-color: var(--edz-accent);
    box-shadow: 0 0 0 2px var(--edz-accent-soft);
}
.search-form .search-submit {
    padding: 10px 20px;
    border: none;
    border-radius: 7px;
    background: var(--edz-accent);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}
.search-form .search-submit:hover { background: var(--edz-accent-dark); }

/* ── 404 page ──────────────────────────────────────────────────────────── */
.edz-404 { max-width: 640px; margin: 60px auto; text-align: center; }
.edz-404-cta { margin: 28px 0; }
.edz-404-search { display: flex; justify-content: center; }

/* ── Comments (light-touch styling for WP's default comment markup, in
   case comments ever get enabled — no custom comments.php, since the blog
   is a small part of this site) ── */
.edz-comments { margin-top: 40px; padding-top: 32px; border-top: 1px solid var(--edz-border); }
.comment-list { list-style: none; padding: 0; }
.comment-list .comment-body { margin-bottom: 24px; padding-bottom: 24px; border-bottom: 1px solid var(--edz-border); }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--edz-border-mid);
    border-radius: 7px;
    font-family: var(--edz-font);
    margin-bottom: 12px;
}
.comment-form .form-submit input {
    padding: 10px 22px;
    border: none;
    border-radius: 7px;
    background: var(--edz-accent);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
}

/* ── Homepage "From the Blog" section ─────────────────────────────────── */
.edz-blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}
.edz-blog-card {
    display: block;
    border: 1px solid var(--edz-border);
    border-radius: var(--edz-radius);
    overflow: hidden;
    background: var(--edz-bg);
    text-decoration: none;
    color: inherit;
    transition: transform 0.14s, box-shadow 0.14s;
}
.edz-blog-card:hover {
    text-decoration: none;
    transform: translateY(-3px);
    box-shadow: 0 10px 26px rgba(16,24,40,0.08);
}
.edz-blog-card-thumb {
    aspect-ratio: 16 / 9;
    background: var(--edz-bg-alt);
    overflow: hidden;
}
.edz-blog-card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.edz-blog-card-body { padding: 16px 18px 20px; }
.edz-blog-card-title {
    display: block;
    font-weight: 700;
    font-size: 1.02rem;
    color: var(--edz-text);
    margin-bottom: 4px;
}
.edz-blog-card-date {
    display: block;
    font-size: 0.78rem;
    color: var(--edz-text-faint);
    margin-bottom: 10px;
}
.edz-blog-card-excerpt {
    font-size: 0.9rem;
    color: var(--edz-text-muted);
    margin: 0;
}
