/*
Theme Name: TMR System
Theme URI: https://tmrsystem.com
Author: TMR System
Author URI: https://tmrsystem.com
Description: Custom WordPress theme for TMR System — Infrastructure & Intelligence for Scaling Organizations. Built on the TMR System brand guidelines with Midnight/Signal Teal palette and Space Grotesk/Inter typography.
Version: 1.7.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tmr-system
Tags: custom-menu, custom-logo, featured-images, blog
*/

/* ============================================
   CSS VARIABLES — TMR System Brand
   ============================================ */
:root {
    /* Primary */
    --tmr-midnight: #1B2A4A;
    --tmr-teal: #0A8F8F;            /* Decorative only: logo bar, borders, accent bgs */
    --tmr-teal-action: #087A7A;     /* WCAG AA: links, buttons, text labels, CTAs */
    --tmr-teal-hover: #066060;

    /* Secondary */
    --tmr-ink: #2D2D2D;
    --tmr-slate: #5A6675;
    --tmr-teal-mist: #E6F4F4;

    /* Neutrals */
    --tmr-paper: #FAFAF8;
    --tmr-ash: #E2E2DE;
    --tmr-white: #FFFFFF;

    /* Typography */
    --font-display: 'Space Grotesk', 'Inter', -apple-system, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Layout */
    --max-width-blog: 720px;
    --max-width-page: 960px;
    --max-width-hero: 1200px;
    --section-spacing: 48px;
    --paragraph-spacing: 20px;
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    font-size: 1.0625rem;
    font-weight: 400;
    line-height: 1.75;
    color: var(--tmr-ink);
    background-color: var(--tmr-paper);
}

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

a {
    color: var(--tmr-teal-action);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--tmr-teal-hover);
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    color: var(--tmr-midnight);
    line-height: 1.2;
    margin-bottom: 0.5em;
}

h1 {
    font-size: clamp(1.8rem, 4vw, 2.4rem);
    font-weight: 700;
}

h2 {
    font-size: 1.35rem;
    font-weight: 700;
}

h3 {
    font-size: 1.15rem;
    font-weight: 500;
}

h4 {
    font-size: 1rem;
    font-weight: 600;
    font-family: var(--font-body);
}

p {
    margin-bottom: var(--paragraph-spacing);
}

strong, b {
    font-weight: 600;
    color: var(--tmr-midnight);
}

small, .text-small {
    font-size: 0.85rem;
    color: var(--tmr-slate);
}

.text-slate {
    color: var(--tmr-slate);
}

/* ============================================
   LAYOUT
   ============================================ */
.site-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-content {
    flex: 1;
}

.container {
    max-width: var(--max-width-page);
    margin: 0 auto;
    padding: 0 24px;
}

.container--narrow {
    max-width: var(--max-width-blog);
}

.container--wide {
    max-width: var(--max-width-hero);
}

.section {
    padding: var(--section-spacing) 0;
}

.section--teal-mist {
    background-color: var(--tmr-teal-mist);
}

.section--midnight {
    background-color: var(--tmr-midnight);
    color: var(--tmr-white);
}

.section--midnight h2,
.section--midnight h3 {
    color: var(--tmr-white);
}

.section--midnight .text-slate {
    color: #a0aab4;
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
    background-color: var(--tmr-white);
    border-bottom: 1px solid var(--tmr-ash);
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header .container {
    max-width: var(--max-width-hero);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    padding-bottom: 16px;
}

.site-logo img {
    height: 40px;
    width: auto;
}

.site-logo-text {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.35rem;
    color: var(--tmr-midnight);
    text-decoration: none;
    letter-spacing: -0.02em;
}

.site-logo-text span {
    color: var(--tmr-teal-action);
}

/* Navigation */
.main-nav ul {
    list-style: none;
    display: flex;
    gap: 32px;
    align-items: center;
}

.main-nav a {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--tmr-slate);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    transition: color 0.2s ease;
}

.main-nav a:hover,
.main-nav .current-menu-item a,
.main-nav .current_page_item a {
    color: var(--tmr-midnight);
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--tmr-midnight);
    margin: 5px 0;
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--tmr-white);
        border-bottom: 1px solid var(--tmr-ash);
        padding: 24px;
    }

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

    .main-nav ul {
        flex-direction: column;
        gap: 16px;
    }
}

/* ============================================
   HERO
   ============================================ */
.hero {
    background-color: var(--tmr-midnight);
    color: var(--tmr-white);
    padding: 80px 0;
}

.hero .container {
    max-width: var(--max-width-hero);
}

.hero h1 {
    color: var(--tmr-white);
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 16px;
}

.hero .tagline {
    font-size: 1.15rem;
    color: #a0aab4;
    max-width: 600px;
    margin-bottom: 32px;
    line-height: 1.6;
}

.hero .teal-bar {
    width: 60px;
    height: 4px;
    background-color: var(--tmr-teal-action);
    margin-bottom: 24px;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 14px 28px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn--primary {
    background-color: var(--tmr-teal-action);
    color: var(--tmr-white);
}

.btn--primary:hover {
    background-color: var(--tmr-teal-hover);
    color: var(--tmr-white);
}

.btn--secondary {
    background-color: transparent;
    color: var(--tmr-midnight);
    border: 2px solid var(--tmr-midnight);
}

.btn--secondary:hover {
    background-color: var(--tmr-midnight);
    color: var(--tmr-white);
}

.btn--white {
    background-color: var(--tmr-white);
    color: var(--tmr-midnight);
}

.btn--white:hover {
    background-color: var(--tmr-teal-mist);
    color: var(--tmr-midnight);
}

/* ============================================
   CARDS
   ============================================ */
.card {
    background-color: var(--tmr-white);
    border: 1px solid var(--tmr-ash);
    border-radius: 4px;
    padding: 32px;
    transition: box-shadow 0.2s ease;
}

.card:hover {
    box-shadow: 0 4px 16px rgba(27, 42, 74, 0.08);
}

.card__label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--tmr-teal-action);
    margin-bottom: 8px;
}

.card__title {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--tmr-midnight);
    margin-bottom: 12px;
}

.card__text {
    color: var(--tmr-ink);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* Card grid */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

/* ============================================
   SERVICES SECTION
   ============================================ */
.service-card {
    background-color: var(--tmr-white);
    border: 1px solid var(--tmr-ash);
    border-radius: 4px;
    padding: 32px;
    border-top: 3px solid var(--tmr-teal);
}

.service-card__problem {
    font-style: italic;
    color: var(--tmr-slate);
    font-size: 0.95rem;
    margin-bottom: 12px;
}

.service-card__title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--tmr-midnight);
    margin-bottom: 8px;
}

.service-card__lead {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--tmr-teal-action);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ============================================
   FOUNDERS / TEAM SECTION
   ============================================ */
.founder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.founder-card {
    text-align: center;
}

.founder-card__photo {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 20px;
    border: 3px solid var(--tmr-ash);
}

.founder-card__name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--tmr-midnight);
    margin-bottom: 4px;
}

.founder-card__title {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--tmr-teal-action);
    margin-bottom: 12px;
}

.founder-card__bio {
    font-size: 0.95rem;
    color: var(--tmr-ink);
    text-align: left;
    line-height: 1.7;
}

/* ============================================
   PROOF POINTS / STATS
   ============================================ */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 32px;
    padding: 40px 0;
}

.stat {
    text-align: center;
}

.stat__number {
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--tmr-teal-action);
    line-height: 1;
    margin-bottom: 8px;
}

.stat__label {
    font-size: 0.85rem;
    color: var(--tmr-slate);
    font-weight: 500;
}

/* ============================================
   BLOCKQUOTES / CALLOUTS
   ============================================ */
blockquote,
.wp-block-quote {
    background-color: var(--tmr-teal-mist);
    border-left: 3px solid var(--tmr-teal);
    padding: 20px 24px;
    margin: 24px 0;
    font-style: italic;
    color: var(--tmr-ink);
}

blockquote p:last-child,
.wp-block-quote p:last-child {
    margin-bottom: 0;
}

blockquote cite,
.wp-block-quote cite {
    display: block;
    margin-top: 12px;
    font-size: 0.85rem;
    font-style: normal;
    font-weight: 600;
    color: var(--tmr-midnight);
}

.callout {
    background-color: var(--tmr-teal-mist);
    border-left: 3px solid var(--tmr-teal);
    padding: 20px 24px;
    margin: 24px 0;
    border-radius: 0 4px 4px 0;
}

/* ============================================
   BLOG / POSTS
   ============================================ */
.post-list {
    display: grid;
    gap: 32px;
}

.post-preview {
    background: var(--tmr-white);
    border: 1px solid var(--tmr-ash);
    border-radius: 4px;
    padding: 32px;
    transition: box-shadow 0.2s ease;
}

.post-preview:hover {
    box-shadow: 0 4px 16px rgba(27, 42, 74, 0.08);
}

.post-preview__meta {
    font-size: 0.8rem;
    color: var(--tmr-slate);
    margin-bottom: 8px;
    font-weight: 500;
}

.post-preview__title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--tmr-midnight);
    margin-bottom: 12px;
}

.post-preview__title a {
    color: var(--tmr-midnight);
    text-decoration: none;
}

.post-preview__title a:hover {
    color: var(--tmr-teal-action);
}

.post-preview__excerpt {
    color: var(--tmr-ink);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 16px;
}

.post-preview__read-more {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--tmr-teal-action);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Single post */
.single-post__header {
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--tmr-ash);
}

.single-post__meta {
    font-size: 0.85rem;
    color: var(--tmr-slate);
    margin-bottom: 8px;
}

.single-post__title {
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    margin-bottom: 16px;
}

.single-post__author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.single-post__author img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.single-post__author-name {
    font-weight: 600;
    color: var(--tmr-midnight);
    font-size: 0.9rem;
}

.single-post__author-title {
    font-size: 0.8rem;
    color: var(--tmr-slate);
}

/* Post content */
.post-content h2 {
    margin-top: 40px;
    margin-bottom: 16px;
}

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

.post-content ul,
.post-content ol {
    margin-bottom: var(--paragraph-spacing);
    padding-left: 24px;
}

.post-content li {
    margin-bottom: 8px;
}

.post-content img {
    margin: 24px 0;
    border-radius: 4px;
}

/* Featured image */
.post-featured-image {
    margin-bottom: 32px;
    border-radius: 4px;
    overflow: hidden;
}

.post-featured-image img {
    width: 100%;
    height: auto;
}

/* Post navigation */
.post-navigation {
    display: flex;
    justify-content: space-between;
    padding-top: 32px;
    margin-top: 48px;
    border-top: 1px solid var(--tmr-ash);
}

.post-navigation a {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--tmr-teal-action);
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding-top: 40px;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.pagination a {
    color: var(--tmr-midnight);
    border: 1px solid var(--tmr-ash);
}

.pagination a:hover {
    background-color: var(--tmr-teal-mist);
    border-color: var(--tmr-teal);
}

.pagination .current {
    background-color: var(--tmr-teal-action);
    color: var(--tmr-white);
    border: 1px solid var(--tmr-teal-action);
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    background-color: var(--tmr-midnight);
    color: #a0aab4;
    padding: 48px 0 24px;
}

.site-footer .container {
    max-width: var(--max-width-hero);
}

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

.footer-brand__name {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--tmr-white);
    margin-bottom: 8px;
}

.footer-brand__tagline {
    font-size: 0.9rem;
    color: #a0aab4;
    margin-bottom: 16px;
}

.footer-col__title {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--tmr-white);
    margin-bottom: 16px;
}

.footer-col ul {
    list-style: none;
}

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

.footer-col a {
    color: #a0aab4;
    font-size: 0.9rem;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-col a:hover {
    color: var(--tmr-teal-action);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
}

/* ============================================
   CTA SECTION
   ============================================ */
.cta-section {
    background-color: var(--tmr-midnight);
    color: var(--tmr-white);
    padding: 64px 0;
    text-align: center;
}

.cta-section h2 {
    color: var(--tmr-white);
    margin-bottom: 12px;
}

.cta-section p {
    color: #a0aab4;
    margin-bottom: 24px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* ============================================
   FORMS
   ============================================ */
input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
    font-family: var(--font-body);
    font-size: 0.95rem;
    padding: 12px 16px;
    border: 1px solid var(--tmr-ash);
    border-radius: 4px;
    background-color: var(--tmr-white);
    color: var(--tmr-ink);
    width: 100%;
    transition: border-color 0.2s ease;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--tmr-teal-action);
    box-shadow: 0 0 0 3px rgba(10, 143, 143, 0.1);
}

label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--tmr-midnight);
    margin-bottom: 6px;
}

/* ============================================
   WORDPRESS SPECIFIC
   ============================================ */
.alignleft {
    float: left;
    margin-right: 24px;
    margin-bottom: 12px;
}

.alignright {
    float: right;
    margin-left: 24px;
    margin-bottom: 12px;
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.wp-caption {
    max-width: 100%;
}

.wp-caption-text {
    font-size: 0.8rem;
    color: var(--tmr-slate);
    margin-top: 8px;
    text-align: center;
}

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

/* WordPress block editor compatibility */
.wp-block-separator {
    border: none;
    border-top: 1px solid var(--tmr-ash);
    margin: 32px 0;
}

.wp-block-image {
    margin: 24px 0;
}

.wp-block-button__link {
    background-color: var(--tmr-teal-action);
    color: var(--tmr-white);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 14px 28px;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.wp-block-button__link:hover {
    background-color: var(--tmr-teal-hover);
    color: var(--tmr-white);
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
