/* ============================================================
   Front Page — built on the theme design system (style.css tokens)
   Uses: --gradient-main, --primary, --radius-*, --shadow-*, etc.
   ============================================================ */

.homepage {
    background: var(--bg-body);
}

/* Shared section rhythm */
.hp-section {
    padding: 80px 0;
}

.hp-section-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 40px;
    gap: 20px;
}

.hp-section-head.hp-center {
    justify-content: center;
    text-align: center;
    flex-direction: column;
    align-items: center;
}

.hp-section-title {
    font-size: 2rem;
    margin: 0;
    color: var(--text-main);
}

.hp-section-sub {
    margin: 8px 0 0;
    color: var(--text-muted);
    font-size: 1rem;
}

.hp-view-all {
    color: var(--text-muted);
    font-weight: 500;
    white-space: nowrap;
    transition: var(--transition);
}

.hp-view-all:hover {
    color: var(--primary);
}

.hp-center {
    text-align: center;
}

/* ---------- Shared buttons ---------- */
.hp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 30px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.hp-btn-primary {
    background: var(--gradient-main);
    color: #fff;
    box-shadow: 0 6px 20px var(--primary-glow);
}

.hp-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px var(--primary-glow);
    color: #fff;
}

.hp-btn-ghost {
    background: var(--bg-card);
    color: var(--text-main);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: var(--shadow-sm);
}

.hp-btn-ghost:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

.hp-btn-light {
    background: #fff;
    color: var(--text-main);
}

.hp-btn-light:hover {
    transform: translateY(-2px);
    opacity: 0.92;
}

.hp-btn-outline-light {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.hp-btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

.hp-link-arrow {
    color: var(--primary);
    font-weight: 600;
    transition: var(--transition);
}

.hp-link-arrow:hover {
    opacity: 0.75;
}

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

.hp-hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 20%, var(--primary-glow), transparent 45%),
        radial-gradient(circle at 80% 30%, rgba(0, 0, 0, 0.04), transparent 45%);
    z-index: 0;
}

.hp-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 820px;
}

.hp-eyebrow {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--primary);
    background: var(--primary-glow);
    padding: 6px 16px;
    border-radius: 30px;
    margin-bottom: 24px;
}

.hp-hero-title {
    font-size: clamp(2.25rem, 5vw, 3.5rem);
    line-height: 1.1;
    margin: 0 0 20px;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

.hp-hero-desc {
    font-size: 1.2rem;
    line-height: 1.7;
    color: var(--text-muted);
    max-width: 640px;
    margin: 0 auto 32px;
}

.hp-hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 0;
}

.hp-tech {
    padding-top: 32px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.hp-tech-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 22px;
}

.hp-tech-groups {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 680px;
    margin: 0 auto;
}

.hp-tech-group {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 16px;
    align-items: center;
}

.hp-tech-group-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    text-align: right;
}

.hp-tech-items {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.hp-tech-chip {
    padding: 4px 12px;
    background: var(--bg-card);
    border: 1px solid rgba(0, 0, 0, 0.09);
    border-radius: 4px;
    font-size: 0.82rem;
    color: var(--text-main);
    transition: var(--transition);
}

.hp-tech-chip:hover {
    border-color: var(--text-main);
    background: var(--text-main);
    color: #fff;
}

/* ============================================================
   STATS
   ============================================================ */
.hp-stats {
    padding: 40px 0;
}

.hp-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    background: var(--bg-card);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: var(--radius-md);
    padding: 36px 24px;
    box-shadow: var(--shadow-card);
}

.hp-stat {
    text-align: center;
}

.hp-stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 8px;
}

.hp-stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ============================================================
   FEATURED PROJECTS
   ============================================================ */
.hp-projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.hp-project-image {
    position: relative;
}

.hp-project-metric {
    position: absolute;
    left: 14px;
    bottom: 14px;
    background: rgba(17, 24, 39, 0.85);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 30px;
    backdrop-filter: blur(4px);
}

.hp-project-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.hp-project-year {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.hp-platform-tag {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.05);
    padding: 3px 8px;
    border-radius: 4px;
    white-space: nowrap;
}

/* Ownership badges */
.hp-ownership-tag {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 3px 8px;
    border-radius: 4px;
    white-space: nowrap;
}
.hp-ownership-personal    { background: #eff6ff; color: #2563eb; }
.hp-ownership-client,
.hp-ownership-freelance   { background: #f0fdf4; color: #16a34a; }
.hp-ownership-open_source { background: #fdf4ff; color: #7c3aed; }
.hp-ownership-company     { background: #f9fafb; color: #6b7280; }

.hp-project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 14px;
}

.hp-project-tech span {
    padding: 4px 10px;
    background: var(--bg-body);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 20px;
    font-size: 0.78rem;
    color: var(--text-muted);
}

.hp-project-tech .hp-tech-more {
    color: var(--primary);
    font-weight: 600;
}

.hp-project-card {
    background: var(--bg-card);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: var(--transition);
}

.hp-project-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(0, 0, 0, 0.12);
}

.hp-project-image {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.hp-project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.hp-project-card:hover .hp-project-image img {
    transform: scale(1.05);
}

.hp-project-body {
    padding: 24px;
}

.hp-project-tag .type-icon {
    width: 13px;
    height: 13px;
}

.hp-project-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--primary);
    background: var(--primary-glow);
    padding: 3px 8px;
    border-radius: 20px;
    white-space: nowrap;
}

.hp-project-body h3 {
    font-size: 1.25rem;
    margin: 0 0 8px;
}

.hp-project-body h3 a {
    color: var(--text-main);
    text-decoration: none;
}

.hp-project-body h3 a:hover {
    color: var(--primary);
}

.hp-project-body p {
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0;
}

.hp-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-muted);
    padding: 40px;
    border: 2px dashed rgba(0, 0, 0, 0.1);
    border-radius: var(--radius-md);
}

/* ============================================================
   PLUGIN TEASER (compact "coming soon" strip)
   ============================================================ */
.hp-plugin-teaser-wrap {
    padding-top: 0;
}

.hp-plugin-teaser {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    background: var(--gradient-main);
    border-radius: var(--radius-lg);
    padding: 36px 44px;
    color: #fff;
    box-shadow: 0 16px 40px var(--primary-glow);
}

.hp-teaser-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(255, 255, 255, 0.18);
    padding: 6px 14px;
    border-radius: 30px;
    margin-bottom: 14px;
}

.hp-teaser-text h2 {
    font-size: 1.6rem;
    margin: 0 0 8px;
    color: #fff;
}

.hp-teaser-text p {
    margin: 0;
    opacity: 0.92;
    max-width: 640px;
}

.hp-plugin-teaser .hp-btn-primary {
    background: #fff;
    color: var(--primary);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    white-space: nowrap;
}

.hp-plugin-teaser .hp-btn-primary:hover {
    color: var(--primary);
}

/* ============================================================
   SERVICES
   ============================================================ */
/* Compact 3-card summary (Build / Run / Advise) — full detail on /services */
.hp-service-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 36px;
}

.hp-summary-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: var(--bg-card);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: var(--radius-md);
    padding: 32px 28px;
    text-decoration: none;
    box-shadow: var(--shadow-card);
    transition: var(--transition);
}

.hp-summary-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(0, 0, 0, 0.12);
}

.hp-summary-name {
    font-size: 1.4rem;
    font-weight: 700;
}

.hp-summary-tagline {
    font-size: 0.95rem;
    color: var(--text-main);
    font-weight: 500;
}

.hp-summary-list {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-top: 4px;
}

.hp-service-card {
    background: var(--bg-card);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: var(--radius-md);
    padding: 32px 24px;
    text-align: center;
    box-shadow: var(--shadow-card);
    transition: var(--transition);
}

.hp-service-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(0, 0, 0, 0.12);
}

.hp-service-icon {
    font-size: 2.25rem;
    margin-bottom: 16px;
}

.hp-service-card h3 {
    font-size: 1.15rem;
    margin: 0 0 10px;
    color: var(--text-main);
}

.hp-service-card p {
    color: var(--text-muted);
    line-height: 1.6;
    font-size: 0.95rem;
    margin: 0;
}

.hp-services-cta {
    margin-top: 36px;
}

/* ============================================================
   ABOUT STRIP
   ============================================================ */
.hp-about-strip {
    background: var(--bg-card);
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.hp-about-strip-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 48px;
}

.hp-about-strip-text {
    max-width: 560px;
}

.hp-about-strip-text .hp-section-title {
    margin-bottom: 12px;
}

.hp-about-strip-text p {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.7;
    margin: 0 0 18px;
}

.hp-about-strip-links {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
    flex-wrap: wrap;
}

/* ============================================================
   STACK
   ============================================================ */
.hp-stack {
    background: var(--bg-body);
    padding: 64px 0;
}

.hp-stack .hp-section-head {
    margin-bottom: 28px;
}

.hp-stack .hp-section-title {
    font-size: 1.5rem;
    margin-bottom: 4px;
}

.hp-stack .hp-section-sub {
    font-size: 0.9rem;
}

/* ============================================================
   TESTIMONIALS
   ============================================================ */
.hp-testimonials {
    background: var(--bg-card);
}

.hp-testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.hp-testimonial {
    background: var(--bg-body);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: var(--radius-md);
    padding: 32px;
    margin: 0;
    position: relative;
}

.hp-testimonial::before {
    content: '\201C';
    position: absolute;
    top: 8px;
    left: 20px;
    font-size: 4rem;
    line-height: 1;
    color: var(--primary);
    opacity: 0.18;
    font-family: Georgia, serif;
}

.hp-testimonial blockquote {
    margin: 0 0 20px;
    padding: 0;
    border: none;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text-main);
    position: relative;
    z-index: 1;
}

.hp-testimonial figcaption {
    display: flex;
    flex-direction: column;
}

.hp-testimonial-author {
    font-weight: 600;
    color: var(--text-main);
}

.hp-testimonial-role {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ============================================================
   BLOG
   ============================================================ */
.hp-blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.hp-blog-card {
    background: var(--bg-card);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: var(--radius-md);
    padding: 28px;
    box-shadow: var(--shadow-card);
    transition: var(--transition);
}

.hp-blog-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.hp-blog-meta {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.hp-blog-card h3 {
    font-size: 1.15rem;
    margin: 0 0 10px;
}

.hp-blog-card h3 a {
    color: var(--text-main);
    text-decoration: none;
}

.hp-blog-card h3 a:hover {
    color: var(--primary);
}

.hp-blog-card p {
    color: var(--text-muted);
    line-height: 1.6;
    margin: 0 0 14px;
}

.hp-read-more {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
}

/* ============================================================
   NEWSLETTER
   ============================================================ */
.hp-newsletter-card {
    background: var(--bg-card);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: var(--radius-lg);
    padding: 56px 40px;
    text-align: center;
    box-shadow: var(--shadow-card);
    max-width: 720px;
    margin: 0 auto;
}

.hp-newsletter-card h2 {
    font-size: 1.9rem;
    margin: 0 0 12px;
}

.hp-newsletter-card > p {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin: 0 auto 28px;
    max-width: 520px;
}

.hp-newsletter-fallback {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.hp-newsletter-fallback input[type="email"] {
    flex: 1;
    min-width: 220px;
    max-width: 320px;
    padding: 14px 18px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: var(--radius-sm);
    font-family: var(--font-main);
    font-size: 1rem;
}

.hp-newsletter-fallback input[type="email"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.hp-newsletter-note {
    flex-basis: 100%;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 12px 0 0;
}

/* ============================================================
   FINAL CTA
   ============================================================ */
.hp-cta {
    padding: 90px 0;
    background: var(--text-main);
    color: #fff;
    text-align: center;
}

.hp-cta h2 {
    font-size: 2.5rem;
    margin: 0 0 14px;
    color: #fff;
}

.hp-cta p {
    font-size: 1.15rem;
    opacity: 0.85;
    margin: 0 auto 32px;
    max-width: 560px;
}

.hp-cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 992px) {
    .hp-projects-grid,
    .hp-testimonials-grid,
    .hp-blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hp-about-strip-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 28px;
    }
}

@media (max-width: 768px) {
    .hp-section {
        padding: 56px 0;
    }

    .hp-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 28px 16px;
    }

    /* Stack section — compact card grid on mobile */
    .hp-stack .hp-tech-groups {
        max-width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .hp-tech-group {
        display: flex;
        flex-direction: column;
        gap: 6px;
        background: var(--bg-card);
        border: 1px solid rgba(0,0,0,0.06);
        border-radius: 10px;
        padding: 12px;
    }

    .hp-tech-group-label {
        text-align: left;
        font-size: 0.65rem;
        font-weight: 700;
        color: var(--text-muted);
        letter-spacing: 0.06em;
        text-transform: uppercase;
        margin-bottom: 2px;
    }

    .hp-tech-items {
        gap: 4px;
    }

    .hp-tech-chip {
        font-size: 0.75rem;
        padding: 3px 8px;
        background: var(--bg-body);
        border: none;
        border-radius: 4px;
    }

    .hp-projects-grid,
    .hp-testimonials-grid,
    .hp-blog-grid {
        grid-template-columns: 1fr;
    }

    .hp-section-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .hp-about-strip-links {
        width: 100%;
    }

    .hp-about-strip-links .hp-btn {
        flex: 1;
        justify-content: center;
    }

    .hp-hero-buttons,
    .hp-cta-buttons {
        flex-direction: column;
    }

    .hp-hero-buttons .hp-btn,
    .hp-cta-buttons .hp-btn {
        width: 100%;
    }

    .hp-stack .hp-section-title {
        font-size: 1.25rem;
    }

    .hp-stack .hp-section-sub {
        font-size: 0.85rem;
    }

    .hp-stack { padding: 48px 0; }
}
