/* Blog — uses tokens from ../website.css */

.blog-page-main {
    padding-top: 100px;
    padding-bottom: var(--spacing-lg);
    min-height: 60vh;
}

.blog-hero {
    padding: var(--spacing-lg) 0;
    text-align: center;
    background: radial-gradient(circle at top, var(--color-accent-soft) 0%, transparent 70%);
}

.blog-hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: var(--spacing-sm);
    letter-spacing: -0.03em;
}

.blog-hero p {
    color: var(--muted);
    max-width: 640px;
    margin: 0 auto;
    font-size: 1.1rem;
    font-weight: 500;
}

.blog-breadcrumbs {
    font-size: 0.875rem;
    color: var(--muted);
    margin-bottom: var(--spacing-md);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.blog-breadcrumbs a {
    color: var(--brand-600);
    transition: color 0.2s ease;
}

.blog-breadcrumbs a:hover {
    color: var(--brand-700);
}

.blog-breadcrumbs span[aria-current="page"] {
    color: var(--text);
}

/* Listing grid */
.blog-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
}

.blog-card {
    display: flex;
    flex-direction: column;
    background: var(--color-surface-base);
    border-radius: var(--radius-clay);
    border: none;
    box-shadow: var(--clay-shadow-white);
    overflow: hidden;
    transition: var(--clay-transition);
}

.blog-card:hover {
    transform: scale(1.02);
    box-shadow: var(--clay-shadow-white-hover);
}

.blog-card-media {
    aspect-ratio: 16 / 9;
    background: var(--brand-50);
    overflow: hidden;
}

.blog-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.blog-card:hover .blog-card-media img {
    transform: scale(1.05);
}

.blog-card-body {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 1rem;
}

.blog-card-body h2 {
    font-size: 1.25rem;
    line-height: 1.3;
    color: var(--text);
}

.blog-card-body p {
    color: var(--muted);
    font-size: 0.95rem;
    flex: 1;
    line-height: 1.6;
}

.blog-read-more {
    font-weight: 700;
    color: var(--brand-600);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.blog-read-more:hover {
    color: var(--brand-700);
}

/* Article Page */
.blog-article-wrap {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0;
}

.blog-article-header {
    margin-bottom: 2.5rem;
    text-align: center;
}

.blog-article-header h1 {
    font-size: clamp(2rem, 6vw, 3rem);
    margin-bottom: 1rem;
    letter-spacing: -0.03em;
}

.blog-article-meta {
    font-size: 0.95rem;
    color: var(--muted);
    font-weight: 500;
}

.blog-article-hero {
    margin-bottom: 3rem;
    border-radius: var(--radius-clay);
    overflow: hidden;
    box-shadow: var(--clay-shadow-white);
    border: none;
}

.blog-article-hero img {
    width: 100%;
    height: auto;
    display: block;
}

.blog-article-body {
    font-size: 1.125rem;
    color: var(--text);
    line-height: 1.8;
}

.blog-article-body h2 {
    font-size: 1.75rem;
    margin: 3rem 0 1.5rem;
    color: var(--text);
    letter-spacing: -0.02em;
}

.blog-article-body h3 {
    font-size: 1.35rem;
    margin: 2.5rem 0 1rem;
    color: var(--text);
}

.blog-article-body p {
    margin-bottom: 1.5rem;
}

.blog-article-body ul,
.blog-article-body ol {
    margin: 0 0 2rem 1.5rem;
}

.blog-article-body li {
    margin-bottom: 0.75rem;
}

.blog-article-body a {
    color: var(--brand-600);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.blog-article-footer {
    margin-top: 5rem;
    padding-top: 3rem;
    border-top: 1px solid var(--border);
    text-align: center;
}

/* Blog index refresh — front-end only */
.blog-page-main {
    padding-top: 72px;
    padding-bottom: 0;
    min-height: 60vh;
}

.blog-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(4rem, 8vw, 7.5rem) 0 clamp(3.5rem, 7vw, 6rem);
    background:
        radial-gradient(circle at 84% 20%, rgba(255, 188, 82, 0.22), transparent 22rem),
        linear-gradient(135deg, #fff4e8 0%, #fffdf9 48%, #eefbf9 100%);
}

.blog-hero::before,
.blog-hero::after {
    position: absolute;
    content: "";
    border: 1px solid rgba(232, 90, 40, 0.12);
    border-radius: 999px;
    pointer-events: none;
}

.blog-hero::before {
    width: 34rem;
    height: 34rem;
    right: -13rem;
    top: -18rem;
}

.blog-hero::after {
    width: 22rem;
    height: 22rem;
    left: -14rem;
    bottom: -15rem;
}

.blog-hero-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.92fr);
    gap: clamp(2rem, 7vw, 7rem);
    align-items: center;
}

.blog-hero-copy {
    max-width: 680px;
}

.blog-eyebrow,
.blog-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--brand-700);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.blog-eyebrow {
    margin-bottom: 1.25rem;
}

.blog-eyebrow-dot,
.blog-live-dot {
    width: 0.55rem;
    height: 0.55rem;
    display: inline-block;
    border-radius: 50%;
    background: var(--brand-500);
    box-shadow: 0 0 0 5px rgba(255, 107, 53, 0.13);
}

.blog-hero h1 {
    max-width: 680px;
    margin-bottom: 1.35rem;
    font-size: clamp(2.7rem, 6.6vw, 5.7rem);
    line-height: 0.99;
    letter-spacing: -0.065em;
}

.blog-hero-copy > p {
    max-width: 610px;
    margin-bottom: 2rem;
    color: var(--muted);
    font-size: clamp(1rem, 1.7vw, 1.18rem);
    line-height: 1.75;
}

.blog-hero-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.85rem;
}

.blog-hero-actions .btn {
    min-height: 3rem;
}

.blog-hero-card {
    position: relative;
    min-height: 390px;
    padding: clamp(1.4rem, 3vw, 2rem);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 2rem;
    background: linear-gradient(155deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.37));
    box-shadow: 16px 20px 45px rgba(86, 56, 34, 0.1), inset -5px -6px 18px rgba(45, 30, 24, 0.04), inset 5px 6px 18px rgba(255, 255, 255, 0.9);
    transform: rotate(1.3deg);
}

.blog-hero-card::before {
    position: absolute;
    width: 12rem;
    height: 12rem;
    right: -4rem;
    top: -4rem;
    content: "";
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.45);
}

.blog-hero-card-top,
.blog-hero-stats {
    position: relative;
    z-index: 1;
}

.blog-hero-card-top {
    display: flex;
    justify-content: space-between;
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.blog-hero-card-mark {
    color: var(--brand-500);
    font-size: 1.5rem;
    line-height: 1;
}

.blog-hero-orbit {
    position: relative;
    width: min(70vw, 255px);
    aspect-ratio: 1;
    margin: 0 auto;
    display: grid;
    place-items: center;
    color: var(--brand-600);
}

.blog-hero-orbit svg {
    width: 100%;
    height: 100%;
    overflow: visible;
    stroke-width: 1.5;
    opacity: 0.75;
}

.blog-orbit-dot {
    position: absolute;
    z-index: 2;
    width: 1.15rem;
    height: 1.15rem;
    border: 4px solid #fff;
    border-radius: 50%;
    background: var(--brand-500);
    box-shadow: 0 5px 14px rgba(232, 90, 40, 0.24);
}

.blog-orbit-dot--one { top: 12%; right: 17%; }
.blog-orbit-dot--two { left: 8%; top: 46%; background: var(--accent-500); }
.blog-orbit-dot--three { right: 22%; bottom: 11%; background: var(--joy-purple); }

.blog-hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    padding-top: 1.1rem;
    border-top: 1px solid rgba(104, 72, 57, 0.14);
}

.blog-hero-stats div {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.blog-hero-stats strong {
    color: var(--text);
    font-family: var(--font-heading);
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    line-height: 1;
}

.blog-hero-stats span {
    color: var(--muted);
    font-size: 0.72rem;
    line-height: 1.3;
}

.blog-listing {
    padding: clamp(3.5rem, 8vw, 6.5rem) 0;
    background: var(--bg);
}

.blog-section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.blog-kicker {
    margin-bottom: 0.65rem;
    color: var(--brand-600);
}

.blog-section-heading h2 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.2rem);
    letter-spacing: -0.05em;
}

.blog-result-count {
    flex-shrink: 0;
    margin: 0 0 0.4rem;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 700;
}

.blog-toolbar {
    display: grid;
    grid-template-columns: minmax(220px, 0.8fr) minmax(0, 1.6fr) auto;
    gap: 0.75rem;
    align-items: center;
    padding: 0.7rem;
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 8px 24px rgba(64, 47, 38, 0.045);
}

.blog-search {
    min-width: 0;
    height: 3rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0 0.8rem;
    color: var(--muted);
    border: 1px solid var(--border);
    border-radius: 0.85rem;
    background: #fff;
}

.blog-search:focus-within {
    border-color: var(--brand-500);
    box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.12);
}

.blog-search input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font: inherit;
}

.blog-search button {
    width: 1.6rem;
    height: 1.6rem;
    flex: 0 0 auto;
    border-radius: 50%;
    color: var(--muted);
    background: var(--brand-50);
    font-size: 1.15rem;
    line-height: 1;
}

.blog-search button:hover { color: var(--brand-700); background: var(--brand-100); }

.blog-filters {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    overflow-x: auto;
    scrollbar-width: none;
}

.blog-filters::-webkit-scrollbar { display: none; }

.blog-filter {
    flex: 0 0 auto;
    min-height: 2.45rem;
    padding: 0.5rem 0.8rem;
    border: 1px solid transparent;
    border-radius: 999px;
    color: var(--muted);
    background: transparent;
    font-size: 0.78rem;
    font-weight: 800;
    white-space: nowrap;
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.blog-filter:hover,
.blog-filter:focus-visible {
    color: var(--brand-700);
    background: var(--brand-50);
}

.blog-filter.is-active {
    border-color: rgba(255, 107, 53, 0.16);
    color: var(--brand-700);
    background: #fff1e8;
}

.blog-sort {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
    white-space: nowrap;
}

.blog-sort select {
    min-height: 2.45rem;
    padding: 0 2rem 0 0.7rem;
    border: 1px solid var(--border);
    border-radius: 0.7rem;
    color: var(--text);
    background: #fff;
    font: inherit;
    cursor: pointer;
}

.blog-results-note {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin: 1.25rem 0 0.85rem;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 600;
}

.blog-results-note span:first-child {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--brand-700);
}

.blog-live-dot {
    width: 0.45rem;
    height: 0.45rem;
    box-shadow: none;
}

.blog-preview-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.1rem;
    margin-top: 0;
}

.blog-card {
    min-width: 0;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(107, 80, 63, 0.08);
    border-radius: 1.35rem;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 8px 24px rgba(64, 47, 38, 0.045);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-6px);
    border-color: rgba(255, 107, 53, 0.22);
    box-shadow: 0 18px 35px rgba(64, 47, 38, 0.1);
}

.blog-card:focus-within {
    border-color: var(--brand-500);
    box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.12);
}

.blog-card:first-child {
    grid-column: span 2;
}

.blog-card .blog-icon-card {
    min-height: 154px;
    display: grid;
    place-items: center;
    padding: 1.4rem;
    border-radius: 1.35rem 1.35rem 0 0;
}

.blog-card:first-child .blog-icon-card {
    min-height: 185px;
}

.blog-card .blog-icon-card svg {
    width: 78px;
    height: 78px;
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-icon-card svg { transform: scale(1.06) rotate(-2deg); }

.blog-body {
    min-width: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 1.25rem;
}

.blog-body h4 {
    margin: 0.55rem 0 0.55rem;
    font-size: 1.12rem;
    line-height: 1.28;
    overflow-wrap: anywhere;
}

.blog-card:first-child .blog-body h4 { font-size: clamp(1.3rem, 2vw, 1.65rem); }

.blog-body p {
    display: -webkit-box;
    flex: 1;
    margin-bottom: 1.15rem;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.6;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.blog-date {
    color: var(--brand-600);
    font-size: 0.7rem;
    letter-spacing: 0.08em;
}

.blog-topic {
    display: inline-flex;
    width: fit-content;
    margin-top: 0.55rem;
    padding: 0.22rem 0.55rem;
    border-radius: 999px;
    color: var(--muted);
    background: var(--surface-2);
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1.2;
}

.blog-body .btn {
    width: 100% !important;
    min-height: 2.65rem;
    margin-top: auto !important;
    border-color: var(--border);
    text-align: center;
}

.blog-body .btn:hover { border-color: var(--brand-500); background: var(--brand-50); }

.blog-card.is-hidden { display: none; }

.blog-empty-state {
    max-width: 480px;
    margin: 2rem auto 0;
    padding: 3rem 1.5rem;
    text-align: center;
    border: 1px dashed var(--border);
    border-radius: 1.35rem;
    background: rgba(255, 255, 255, 0.62);
}

.blog-empty-icon {
    width: 3.2rem;
    height: 3.2rem;
    margin: 0 auto 1rem;
    display: grid;
    place-items: center;
    border-radius: 1rem;
    color: var(--brand-600);
    background: var(--brand-50);
}

.blog-empty-state h3 { margin-bottom: 0.45rem; }
.blog-empty-state p { margin-bottom: 1.2rem; color: var(--muted); }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 1180px) {
    .blog-preview-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
    .blog-hero-grid { grid-template-columns: 1fr; gap: 2.5rem; }
    .blog-hero-copy { max-width: 760px; }
    .blog-hero-card { width: min(100%, 560px); min-height: 300px; margin: 0 auto; transform: rotate(0.8deg); }
    .blog-hero-orbit { width: 180px; }
    .blog-toolbar { grid-template-columns: 1fr; }
    .blog-sort { justify-content: space-between; }
}

@media (max-width: 700px) {
    .blog-page-main { padding-top: 64px; }
    .blog-hero { padding-top: 3.4rem; }
    .blog-hero h1 { font-size: clamp(2.65rem, 13vw, 4.5rem); }
    .blog-hero-actions { align-items: stretch; flex-direction: column; }
    .blog-hero-actions .btn { width: 100%; justify-content: center; }
    .blog-section-heading { align-items: flex-start; flex-direction: column; gap: 0.7rem; }
    .blog-section-heading h2 { font-size: 2.25rem; }
    .blog-preview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.85rem; }
    .blog-card:first-child { grid-column: span 2; }
    .blog-card .blog-icon-card,
    .blog-card:first-child .blog-icon-card { min-height: 120px; }
    .blog-card .blog-icon-card svg { width: 64px; height: 64px; }
    .blog-body { padding: 1rem; }
    .blog-body h4,
    .blog-card:first-child .blog-body h4 { font-size: 1rem; }
    .blog-body p { font-size: 0.82rem; -webkit-line-clamp: 4; }
    .blog-results-note { align-items: flex-start; flex-direction: column; gap: 0.3rem; }
}

@media (max-width: 480px) {
    .blog-hero-card { min-height: 270px; padding: 1.2rem; }
    .blog-hero-stats span { font-size: 0.65rem; }
    .blog-preview-grid { grid-template-columns: 1fr; }
    .blog-card:first-child { grid-column: auto; }
    .blog-card .blog-icon-card,
    .blog-card:first-child .blog-icon-card { min-height: 135px; }
    .blog-card:first-child .blog-body h4 { font-size: 1.15rem; }
}

@media (prefers-reduced-motion: reduce) {
    .blog-card,
    .blog-card .blog-icon-card svg { transition: none; }
    .blog-card:hover,
    .blog-card:hover .blog-icon-card svg { transform: none; }
}
