/*
Theme Name: Solmetra Theme
Theme URI: https://solmetra.com
Author: Jake Morrison
Author URI: https://solmetra.com
Description: A developer tools and resources theme for solmetra.com
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: solmetra
*/

/* ========================================
   Reset & Base
   ======================================== */

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: #334155;
    background-color: #fafafa;
}

h1, h2, h3, h4, h5, h6 {
    font-family: "Plus Jakarta Sans", "Inter", sans-serif;
    font-weight: 700;
    line-height: 1.3;
    color: #1e1e2e;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

a {
    color: #6366f1;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #f59e0b;
}

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

ul, ol {
    padding-left: 1.5rem;
}

/* ========================================
   Layout
   ======================================== */

.sm-container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
}

.sm-section {
    padding: 60px 0;
}

.sm-section-alt {
    padding: 60px 0;
    background-color: #f1f5f9;
}

/* ========================================
   Header (Sticky Dark)
   ======================================== */

.sm-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: #1e1e2e;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.sm-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
    height: 64px;
}

.sm-logo img {
    height: 36px;
    width: auto;
}

.sm-logo a {
    display: flex;
    align-items: center;
}

/* Navigation */

.sm-nav ul {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 4px;
}

.sm-nav a {
    display: block;
    padding: 8px 16px;
    color: #cbd5e1;
    font-size: 0.938rem;
    font-weight: 500;
    border-radius: 6px;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.sm-nav a:hover,
.sm-nav .current-menu-item > a {
    color: #f59e0b;
    background-color: rgba(255, 255, 255, 0.05);
}

/* Dropdown */

.sm-nav .sm-dropdown {
    position: relative;
}

.sm-nav .sm-dropdown > a::after {
    content: "";
    display: inline-block;
    width: 0;
    height: 0;
    margin-left: 6px;
    vertical-align: middle;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
}

.sm-nav .sm-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background-color: #1e1e2e;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 8px 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    flex-direction: column;
}

.sm-nav .sm-dropdown:hover .sm-dropdown-menu {
    display: flex;
}

.sm-nav .sm-dropdown-menu a {
    padding: 8px 20px;
    border-radius: 0;
    font-size: 0.875rem;
}

.sm-nav .sm-dropdown-menu a:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

/* Mobile Toggle */

.sm-nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    flex-direction: column;
    gap: 5px;
}

.sm-nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: #cbd5e1;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.sm-nav-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.sm-nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.sm-nav-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ========================================
   Hero Section
   ======================================== */

.sm-hero {
    background: linear-gradient(135deg, #1e1e2e 0%, #2d2d44 100%);
    padding: 80px 0;
    text-align: center;
    color: #fff;
}

.sm-hero h1 {
    color: #fff;
    font-size: 2.75rem;
    margin-bottom: 16px;
}

.sm-hero .sm-hero-accent {
    color: #f59e0b;
}

.sm-hero p {
    font-size: 1.125rem;
    color: #94a3b8;
    max-width: 640px;
    margin: 0 auto 32px;
}

.sm-hero-cta {
    display: inline-block;
    padding: 12px 32px;
    background-color: #f59e0b;
    color: #1e1e2e;
    font-weight: 600;
    border-radius: 6px;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.sm-hero-cta:hover {
    background-color: #d97706;
    color: #1e1e2e;
    transform: translateY(-1px);
}

/* ========================================
   Card Grid
   ======================================== */

.sm-card-grid {
    display: grid;
    gap: 24px;
}

.sm-card-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.sm-card-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.sm-card-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.sm-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sm-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.sm-card a {
    color: inherit;
    text-decoration: none;
}

.sm-card-image {
    width: 100%;
    aspect-ratio: 400 / 260;
    object-fit: cover;
}

.sm-card-body {
    padding: 20px;
}

.sm-card-body h3 {
    font-size: 1.125rem;
    margin-bottom: 8px;
}

.sm-card-body p {
    font-size: 0.938rem;
    color: #64748b;
    margin-bottom: 12px;
}

.sm-card-link {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #6366f1;
}

.sm-card-link:hover {
    color: #f59e0b;
}

.sm-card-link::after {
    content: " \2192";
}

/* ========================================
   Article Layout
   ======================================== */

.sm-article {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px 60px;
}

.sm-article-header {
    margin-bottom: 32px;
}

.sm-article-header h1 {
    margin-bottom: 16px;
}

.sm-article-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 24px;
}

.sm-article-meta .sm-author {
    font-weight: 600;
    color: #334155;
}

.sm-article-featured-image {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 32px;
}

.sm-article-content h2 {
    margin-top: 40px;
    margin-bottom: 16px;
}

.sm-article-content h3 {
    margin-top: 32px;
    margin-bottom: 12px;
}

.sm-article-content p {
    margin-bottom: 16px;
}

.sm-article-content ul,
.sm-article-content ol {
    margin-bottom: 16px;
}

.sm-article-content li {
    margin-bottom: 6px;
}

.sm-article-content a {
    color: #6366f1;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.sm-article-content a:hover {
    color: #f59e0b;
}

.sm-article-content img {
    border-radius: 6px;
    margin: 24px 0;
}

/* ========================================
   Code Blocks
   ======================================== */

code {
    font-family: "JetBrains Mono", "Fira Code", monospace;
    font-size: 0.875em;
    background-color: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    color: #334155;
}

pre {
    background-color: #1e1e2e;
    color: #a5f3fc;
    padding: 24px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 24px 0;
    line-height: 1.6;
}

pre code {
    background: none;
    padding: 0;
    border-radius: 0;
    color: #a5f3fc;
    font-size: 0.875rem;
}

/* ========================================
   Breadcrumbs
   ======================================== */

.sm-breadcrumbs {
    padding: 16px 0;
    font-size: 0.875rem;
    color: #64748b;
}

.sm-breadcrumbs a {
    color: #6366f1;
}

.sm-breadcrumbs a:hover {
    color: #f59e0b;
}

.sm-breadcrumbs .sm-breadcrumb-sep {
    margin: 0 8px;
    color: #cbd5e1;
}

/* ========================================
   FAQ Accordion
   ======================================== */

.sm-faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.sm-faq-item {
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    margin-bottom: 12px;
    background: #fff;
    overflow: hidden;
}

.sm-faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 16px 20px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: "Plus Jakarta Sans", "Inter", sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: #1e1e2e;
    text-align: left;
    transition: background-color 0.2s ease;
}

.sm-faq-question:hover {
    background-color: #f1f5f9;
}

.sm-faq-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    position: relative;
    margin-left: 16px;
}

.sm-faq-icon::before,
.sm-faq-icon::after {
    content: "";
    position: absolute;
    background-color: #64748b;
    transition: transform 0.3s ease;
}

.sm-faq-icon::before {
    width: 20px;
    height: 2px;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
}

.sm-faq-icon::after {
    width: 2px;
    height: 20px;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
}

.sm-faq-item.active .sm-faq-icon::after {
    transform: translateX(-50%) rotate(90deg);
}

.sm-faq-answer {
    display: none;
    padding: 0 20px 16px;
    color: #64748b;
    font-size: 0.938rem;
    line-height: 1.7;
}

.sm-faq-item.active .sm-faq-answer {
    display: block;
}

/* ========================================
   Feature Section
   ======================================== */

.sm-feature {
    display: flex;
    align-items: center;
    gap: 48px;
}

.sm-feature-text {
    flex: 1;
}

.sm-feature-text h2 {
    margin-bottom: 16px;
}

.sm-feature-text p {
    color: #64748b;
    margin-bottom: 16px;
}

.sm-feature-image {
    flex: 1;
}

.sm-feature-image img {
    border-radius: 12px;
}

/* ========================================
   News / Archive Listing
   ======================================== */

.sm-archive-header {
    padding: 40px 0 24px;
}

.sm-archive-header h1 {
    font-size: 2rem;
}

/* ========================================
   Page Layout
   ======================================== */

.sm-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px 60px;
}

.sm-page h1 {
    margin-bottom: 24px;
}

.sm-page-content p {
    margin-bottom: 16px;
}

.sm-page-content h2 {
    margin-top: 40px;
    margin-bottom: 16px;
}

.sm-page-content h3 {
    margin-top: 32px;
    margin-bottom: 12px;
}

.sm-page-content ul,
.sm-page-content ol {
    margin-bottom: 16px;
}

/* ========================================
   404 Page
   ======================================== */

.sm-404 {
    text-align: center;
    padding: 100px 20px;
}

.sm-404 h1 {
    font-size: 6rem;
    color: #f59e0b;
    margin-bottom: 8px;
}

.sm-404 h2 {
    margin-bottom: 16px;
}

.sm-404 p {
    color: #64748b;
    margin-bottom: 24px;
}

.sm-btn {
    display: inline-block;
    padding: 12px 28px;
    background-color: #6366f1;
    color: #fff;
    font-weight: 600;
    border-radius: 6px;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.sm-btn:hover {
    background-color: #4f46e5;
    color: #fff;
    transform: translateY(-1px);
}

/* ========================================
   Footer (Dark)
   ======================================== */

.sm-footer {
    background-color: #1e1e2e;
    color: #94a3b8;
    padding: 60px 0 0;
}

.sm-footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
}

.sm-footer-brand p {
    font-size: 0.938rem;
    margin-top: 16px;
    line-height: 1.6;
}

.sm-footer-brand img {
    height: 32px;
    width: auto;
}

.sm-footer h4 {
    color: #fff;
    font-size: 0.938rem;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sm-footer ul {
    list-style: none;
    padding: 0;
}

.sm-footer ul li {
    margin-bottom: 8px;
}

.sm-footer a {
    color: #94a3b8;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.sm-footer a:hover {
    color: #f59e0b;
}

.sm-footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 0;
    text-align: center;
    font-size: 0.813rem;
}

/* ========================================
   Responsive - 968px
   ======================================== */

@media (max-width: 968px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.625rem; }

    .sm-hero h1 { font-size: 2.25rem; }
    .sm-hero { padding: 60px 0; }

    .sm-card-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .sm-card-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .sm-footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .sm-feature {
        flex-direction: column;
        gap: 32px;
    }

    .sm-nav-toggle {
        display: flex;
    }

    .sm-nav {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background-color: #1e1e2e;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        padding: 16px;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    }

    .sm-nav.active {
        display: block;
    }

    .sm-nav ul {
        flex-direction: column;
        gap: 0;
    }

    .sm-nav .sm-dropdown-menu {
        position: static;
        display: none;
        box-shadow: none;
        border: none;
        padding-left: 16px;
        min-width: 0;
    }

    .sm-nav .sm-dropdown.active .sm-dropdown-menu {
        display: flex;
    }
}

/* ========================================
   Responsive - 680px
   ======================================== */

@media (max-width: 680px) {
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.375rem; }

    .sm-hero h1 { font-size: 1.875rem; }
    .sm-hero { padding: 48px 0; }

    .sm-section,
    .sm-section-alt {
        padding: 40px 0;
    }

    .sm-card-grid-4,
    .sm-card-grid-3,
    .sm-card-grid-2 {
        grid-template-columns: 1fr;
    }

    .sm-footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .sm-article,
    .sm-page {
        padding: 24px 16px 48px;
    }

    .sm-404 h1 {
        font-size: 4rem;
    }

    pre {
        padding: 16px;
        font-size: 0.813rem;
    }
}
