/* ============================================
   Hartford AI Works — Ghost Theme Stylesheet
   Colors: Navy #1B2A4A / Teal #0891B2
   Typography: Inter + Playfair Display
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --color-navy: #1B2A4A;
    --color-navy-light: #2A3F6A;
    --color-teal: #0891B2;
    --color-teal-light: #06B6D4;
    --color-teal-bg: #E0F7FA;
    --color-teal-subtle: #F0FDFA;
    --color-bg: #FFFFFF;
    --color-bg-alt: #F8FAFC;
    --color-text: #1E293B;
    --color-text-secondary: #64748B;
    --color-border: #E2E8F0;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-heading: 'Playfair Display', Georgia, serif;
    --max-width: 1140px;
    --content-width: 720px;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

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

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

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

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: all 0.25s ease;
    cursor: pointer;
    border: none;
    text-align: center;
}

.btn-primary {
    background: var(--color-teal);
    color: #fff;
}

.btn-primary:hover {
    background: var(--color-teal-light);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(8, 145, 178, 0.3);
}

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

.btn-secondary:hover {
    background: var(--color-teal);
    color: #fff;
}

/* --- Section Helpers --- */
.section-label {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-teal);
    margin-bottom: 12px;
}

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

.section-description {
    font-size: 1.1rem;
    color: var(--color-text-secondary);
    max-width: 620px;
    margin: 0 auto 48px;
    line-height: 1.7;
}

.section-divider {
    text-align: center;
    padding: 40px 0;
}

/* ============================================
   HEADER / NAVIGATION
   ============================================ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--color-navy);
    font-weight: 700;
    font-size: 1.15rem;
    letter-spacing: -0.01em;
}

.site-logo:hover {
    color: var(--color-navy);
}

.logo-icon {
    flex-shrink: 0;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

/* Ghost outputs {{navigation}} as <ul class="nav"><li><a>...</a></li></ul> */
.site-nav ul,
.site-nav .nav {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 32px;
}

.site-nav li {
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-nav a {
    color: var(--color-text-secondary);
    font-size: 0.92rem;
    font-weight: 500;
    transition: color 0.2s;
}

.site-nav a:hover {
    color: var(--color-navy);
}

.nav-cta {
    background: var(--color-teal) !important;
    color: #fff !important;
    padding: 10px 22px !important;
    border-radius: 6px;
    font-weight: 600 !important;
}

.nav-cta:hover {
    background: var(--color-teal-light) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(8, 145, 178, 0.3);
}

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

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-navy);
    border-radius: 2px;
    transition: 0.3s;
}

/* ============================================
   HERO
   ============================================ */
.hero {
    text-align: center;
    padding: 100px 24px 60px;
    position: relative;
    overflow: hidden;
}

.hero-inner {
    max-width: 720px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.15;
    color: var(--color-navy);
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.hero-description {
    font-size: 1.15rem;
    color: var(--color-text-secondary);
    max-width: 540px;
    margin: 0 auto 36px;
    line-height: 1.75;
}

.hero-location {
    display: block;
    margin-top: 20px;
    font-size: 0.88rem;
    color: var(--color-text-secondary);
}

.hero-decoration {
    position: absolute;
    top: 50%;
    right: 5%;
    transform: translateY(-50%);
    opacity: 0.5;
    z-index: 0;
}

/* ============================================
   WHAT WE DO / SERVICES
   ============================================ */
.what-we-do {
    padding: 80px 0;
    text-align: center;
}

.what-we-do h2 {
    font-family: var(--font-heading);
    font-size: 2.4rem;
    color: var(--color-navy);
    margin-bottom: 16px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-top: 48px;
}

.service-card {
    background: var(--color-bg-alt);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 36px 28px;
    text-align: left;
    transition: transform 0.25s, box-shadow 0.25s;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(27, 42, 74, 0.08);
}

.service-icon {
    margin-bottom: 20px;
}

.service-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--color-navy);
    margin-bottom: 10px;
}

.service-card p {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    line-height: 1.65;
}

/* ============================================
   BLOG SECTION / POST FEED
   ============================================ */
.blog-section {
    padding: 80px 0;
    text-align: center;
    background: var(--color-bg-alt);
}

.blog-section h2 {
    font-family: var(--font-heading);
    font-size: 2.4rem;
    color: var(--color-navy);
    margin-bottom: 16px;
}

.post-feed {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin-top: 12px;
    text-align: left;
}

.post-card {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.25s, box-shadow 0.25s;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(27, 42, 74, 0.08);
}

.post-card-link {
    display: block;
    color: inherit;
}

.post-card-link:hover {
    color: inherit;
}

.post-card-image {
    aspect-ratio: 16/10;
    overflow: hidden;
}

.post-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.post-card:hover .post-card-image img {
    transform: scale(1.03);
}

.post-card-content {
    padding: 24px;
}

.post-card-tag {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-teal);
    margin-bottom: 8px;
    display: inline-block;
}

.post-card-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--color-navy);
    margin-bottom: 8px;
    line-height: 1.35;
}

.post-card-excerpt {
    font-size: 0.92rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

.post-card-meta {
    display: flex;
    gap: 16px;
    font-size: 0.82rem;
    color: var(--color-text-secondary);
}

.pagination {
    margin-top: 48px;
    text-align: center;
}

/* ============================================
   SINGLE POST
   ============================================ */
.post-header {
    text-align: center;
    padding: 80px 24px 40px;
}

.post-header-inner {
    max-width: var(--content-width);
    margin: 0 auto;
}

.post-tag {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--color-teal);
    display: inline-block;
    margin-bottom: 16px;
}

.post-title {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--color-navy);
    line-height: 1.2;
    margin-bottom: 20px;
}

.post-excerpt {
    font-size: 1.2rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin-bottom: 24px;
}

.post-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    font-size: 0.9rem;
    color: var(--color-text-secondary);
}

.post-meta-author {
    display: flex;
    align-items: center;
    gap: 8px;
}

.author-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.post-feature-image {
    max-width: 1000px;
    margin: 0 auto 48px;
    padding: 0 24px;
}

.post-feature-image img {
    border-radius: 12px;
    width: 100%;
}

.post-feature-image figcaption {
    text-align: center;
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    margin-top: 12px;
}

/* --- Post Content (Ghost default classes) --- */
.post-content {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 0 24px 60px;
    font-size: 1.05rem;
    line-height: 1.8;
}

.post-content h2 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--color-navy);
    margin: 48px 0 16px;
}

.post-content h3 {
    font-size: 1.35rem;
    color: var(--color-navy);
    margin: 36px 0 12px;
    font-weight: 600;
}

.post-content p {
    margin-bottom: 24px;
}

.post-content blockquote {
    border-left: 3px solid var(--color-teal);
    padding: 4px 0 4px 24px;
    margin: 32px 0;
    font-style: italic;
    color: var(--color-text-secondary);
    font-size: 1.1rem;
}

.post-content ul, .post-content ol {
    margin: 0 0 24px 24px;
}

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

.post-content code {
    background: var(--color-bg-alt);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.92em;
}

.post-content pre {
    background: var(--color-navy);
    color: #e2e8f0;
    padding: 24px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 32px 0;
}

.post-content pre code {
    background: none;
    padding: 0;
    color: inherit;
}

.post-content img {
    border-radius: 8px;
    margin: 32px auto;
}

.post-content a {
    color: var(--color-teal);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* Ghost-specific content cards */
.post-content .kg-image-card,
.post-content .kg-gallery-card {
    margin: 32px auto;
}

.post-content .kg-width-wide {
    max-width: 1000px;
    margin-left: calc(50% - 500px);
    margin-right: calc(50% - 500px);
}

.post-content .kg-width-full {
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

.post-content .kg-bookmark-card {
    border: 1px solid var(--color-border);
    border-radius: 8px;
    overflow: hidden;
    margin: 32px 0;
}

.post-content .kg-bookmark-container {
    display: flex;
    color: inherit;
}

.post-content .kg-bookmark-content {
    padding: 20px;
    flex: 1;
}

.post-content .kg-bookmark-title {
    font-weight: 600;
    color: var(--color-navy);
}

.post-content .kg-bookmark-description {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    margin-top: 8px;
}

.post-content .kg-bookmark-thumbnail {
    width: 200px;
    flex-shrink: 0;
}

.post-content .kg-bookmark-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
}

/* Post Footer */
.post-footer {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 0 24px 60px;
    border-top: 1px solid var(--color-border);
    padding-top: 24px;
}

.post-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tag-link {
    background: var(--color-teal-subtle);
    color: var(--color-teal);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 500;
    transition: background 0.2s;
}

.tag-link:hover {
    background: var(--color-teal-bg);
    color: var(--color-teal);
}

/* Related Posts */
.related-posts {
    background: var(--color-bg-alt);
    padding: 60px 0;
}

.related-posts h3 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    color: var(--color-navy);
    text-align: center;
    margin-bottom: 32px;
}

/* ============================================
   PAGE TEMPLATE
   ============================================ */
.page-header {
    text-align: center;
    padding: 80px 24px 40px;
}

.page-header-inner {
    max-width: var(--content-width);
    margin: 0 auto;
}

.page-title {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--color-navy);
    line-height: 1.2;
    margin-bottom: 16px;
}

.page-excerpt {
    font-size: 1.15rem;
    color: var(--color-text-secondary);
    line-height: 1.7;
}

.page-feature-image {
    max-width: 1000px;
    margin: 0 auto 48px;
    padding: 0 24px;
}

.page-feature-image img {
    border-radius: 12px;
    width: 100%;
}

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

/* ============================================
   TAG & AUTHOR PAGES
   ============================================ */
.tag-header, .author-header {
    text-align: center;
    padding: 80px 24px 48px;
}

.tag-header h1, .author-header h1 {
    font-family: var(--font-heading);
    font-size: 2.4rem;
    color: var(--color-navy);
    margin-bottom: 12px;
}

.tag-description, .author-bio {
    font-size: 1.05rem;
    color: var(--color-text-secondary);
    max-width: 540px;
    margin: 0 auto;
}

.author-page-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 20px;
    border: 3px solid var(--color-border);
}

.tag-page .post-feed,
.author-page .post-feed {
    padding: 0 0 80px;
}

/* ============================================
   FOOTER
   ============================================ */
.footer-cta {
    text-align: center;
    padding: 100px 24px;
    background: var(--color-navy);
    color: #fff;
}

.footer-cta .section-label {
    color: var(--color-teal-light);
}

.footer-cta h2 {
    font-family: var(--font-heading);
    font-size: 2.4rem;
    margin-bottom: 16px;
    color: #fff;
}

.footer-cta p {
    color: #94A3B8;
    max-width: 500px;
    margin: 0 auto 32px;
    font-size: 1.05rem;
    line-height: 1.7;
}

.footer-bottom {
    background: #0F1A2E;
    padding: 48px 24px;
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.footer-logo {
    font-weight: 700;
    font-size: 1.1rem;
    color: #fff;
    display: block;
    margin-bottom: 8px;
}

.footer-brand p {
    color: #64748B;
    font-size: 0.9rem;
}

.footer-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-nav ul,
.footer-nav .nav {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-nav li {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-nav a {
    color: #94A3B8;
    font-size: 0.9rem;
}

.footer-nav a:hover {
    color: #fff;
}

.footer-meta {
    text-align: right;
}

.footer-meta p {
    color: #64748B;
    font-size: 0.85rem;
    line-height: 1.6;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
    .services-grid,
    .post-feed {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-title {
        font-size: 2.6rem;
    }

    .post-title, .page-title {
        font-size: 2.2rem;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 28px;
    }

    .footer-meta {
        text-align: center;
    }

    .hero-decoration {
        display: none;
    }
}

@media (max-width: 640px) {
    .site-nav {
        display: none;
    }

    .site-nav.is-open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background: #fff;
        border-bottom: 1px solid var(--color-border);
        padding: 24px;
        gap: 16px;
    }

    .site-nav.is-open ul,
    .site-nav.is-open .nav {
        flex-direction: column;
        gap: 16px;
        box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    }

    .nav-toggle {
        display: flex;
    }

    .services-grid,
    .post-feed {
        grid-template-columns: 1fr;
    }

    .hero {
        padding: 60px 20px 40px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .what-we-do h2,
    .blog-section h2,
    .footer-cta h2 {
        font-size: 1.8rem;
    }

    .post-title, .page-title {
        font-size: 1.8rem;
    }

    .btn {
        padding: 12px 24px;
        font-size: 0.9rem;
    }
}
