/* ═══════════════════════════════════════════════════════════════
   Lotly Blog — page styles.
   Uses the site's Outfit font + Lotly orange (#fea327) tokens, with
   the layout structure from the Claude Design reference (hero + side
   stack, search/category chips, sticky TOC on articles, etc.).
   ═══════════════════════════════════════════════════════════════ */

:root {
    --blog-bg:       #FFFFFF;
    --blog-bg-soft:  #FFFAF1;
    --blog-bg-warm:  #FFF1DC;
    --blog-ink:      #1C1C1C;
    --blog-ink-soft: #4A5168;
    --blog-ink-mute: #7A8398;
    --blog-line:     #ECE3D2;
    --blog-line-soft:#F4ECDC;
    --blog-orange:        #fea327;
    --blog-orange-deep:   #e8901a;
    --blog-orange-soft:   #FFE5C7;
    --blog-card:     #FFFFFF;
    --blog-shadow-sm: 0 1px 2px rgba(28,28,28,0.05), 0 4px 14px rgba(28,28,28,0.06);
    --blog-shadow-md: 0 2px 6px rgba(28,28,28,0.07), 0 14px 36px rgba(28,28,28,0.10);
    --blog-radius:    14px;
    --blog-radius-lg: 22px;
}

.blog-page {
    background:
        radial-gradient(ellipse 1200px 480px at 50% -120px, #FFE0B8 0%, rgba(255,224,184,0) 65%),
        radial-gradient(ellipse 800px 420px at 88% 100px, #FFEED1 0%, rgba(255,238,209,0) 70%),
        var(--blog-bg);
    min-height: 100vh;
    color: var(--blog-ink);
    padding-bottom: 0;
}

/* ─── Hero ─── */
.blog-hero {
    max-width: 1280px;
    margin: 0 auto;
    padding: 64px 24px 28px;
    text-align: center;
}
.blog-hero .eyebrow {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: var(--blog-orange-deep);
    margin-bottom: 12px;
}
.blog-hero h1 {
    font-family: "Outfit", sans-serif;
    font-weight: 700;
    font-size: clamp(36px, 5vw, 56px);
    line-height: 1.06;
    margin: 0 0 16px;
    color: var(--blog-ink);
    letter-spacing: -0.02em;
}
.blog-hero h1 em {
    color: var(--blog-orange-deep);
    font-style: normal;
}
.blog-hero p {
    max-width: 660px;
    margin: 0 auto;
    font-size: 18px;
    color: var(--blog-ink-soft);
    line-height: 1.55;
}

/* ─── Toolbar (search + chips) ─── */
.blog-toolbar {
    max-width: 1280px;
    margin: 32px auto 0;
    padding: 0 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.blog-search {
    display: flex;
    align-items: center;
    gap: 10px;
    background: white;
    border: 1px solid var(--blog-line);
    border-radius: 999px;
    padding: 12px 18px;
    box-shadow: var(--blog-shadow-sm);
}
.blog-search:focus-within { border-color: var(--blog-orange); }
.blog-search svg { flex-shrink: 0; color: var(--blog-ink-mute); }
.blog-search input {
    flex: 1;
    border: none;
    background: transparent;
    font: inherit;
    color: var(--blog-ink);
    outline: none;
}
.blog-search input::placeholder { color: var(--blog-ink-mute); }

.blog-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}
.blog-chip {
    padding: 8px 14px;
    border-radius: 999px;
    background: white;
    border: 1px solid var(--blog-line);
    font-size: 13px;
    font-weight: 500;
    color: var(--blog-ink-soft);
    transition: all 0.15s;
    text-decoration: none;
    white-space: nowrap;
}
.blog-chip:hover { border-color: var(--blog-orange); color: var(--blog-ink); }
.blog-chip.is-active {
    background: var(--blog-ink);
    color: white;
    border-color: var(--blog-ink);
}

/* ─── Main grid (content + sidebar) ─── */
.blog-main {
    max-width: 1280px;
    margin: 0 auto;
    padding: 40px 24px 80px;
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
    align-items: start;
}
.blog-content { min-width: 0; }
.blog-sidebar { position: sticky; top: 92px; }

/* ─── Hero featured row (layout-2 style) ─── */
.blog-hero-row {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 22px;
    margin-bottom: 36px;
}
.hero-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ─── Featured / hero card ─── */
.blog-feature {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    background: white;
    border: 1px solid var(--blog-line-soft);
    border-radius: var(--blog-radius-lg);
    overflow: hidden;
    box-shadow: var(--blog-shadow-md);
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    color: inherit;
}
.blog-feature:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(28,28,28,0.08), 0 24px 48px rgba(28,28,28,0.12);
    color: inherit;
}
.blog-feature-art {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 320px;
    background-image:
        linear-gradient(135deg, transparent 49%, rgba(255,255,255,0.3) 49%, rgba(255,255,255,0.3) 51%, transparent 51%),
        linear-gradient(45deg, transparent 49%, rgba(255,255,255,0.2) 49%, rgba(255,255,255,0.2) 51%, transparent 51%);
    background-size: 40px 40px;
}
.blog-feature-flag {
    position: absolute;
    top: 18px;
    left: 18px;
    background: var(--blog-ink);
    color: white;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.blog-feature-body {
    padding: 36px 36px 32px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.blog-feature-body h2 {
    font-family: "Outfit", sans-serif;
    font-weight: 700;
    font-size: 30px;
    line-height: 1.18;
    margin: 4px 0 0;
    color: var(--blog-ink);
    letter-spacing: -0.01em;
}
.blog-feature-body p {
    color: var(--blog-ink-soft);
    font-size: 16px;
    margin: 0;
    line-height: 1.6;
}
.blog-meta {
    display: flex;
    gap: 8px;
    align-items: center;
    font-size: 13px;
    color: var(--blog-ink-mute);
}
.blog-meta .dot { opacity: 0.5; }
.blog-feature .learn-more {
    margin-top: 4px;
    color: var(--blog-orange-deep);
    font-weight: 600;
    font-size: 14px;
}

/* ─── Cards section ─── */
.blog-section {
    margin-top: 0;
}
.blog-section + .blog-section { margin-top: 40px; }
.blog-section-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 20px;
}
.blog-section-head h2 {
    font-family: "Outfit", sans-serif;
    font-weight: 700;
    font-size: 26px;
    margin: 0;
    color: var(--blog-ink);
    letter-spacing: -0.01em;
}
.blog-section-head .sub { font-size: 14px; color: var(--blog-ink-mute); }

.blog-grid {
    display: grid;
    gap: 22px;
    grid-template-columns: repeat(3, 1fr);
}

/* ─── Standard cards ─── */
.blog-card {
    background: white;
    border: 1px solid var(--blog-line-soft);
    border-radius: var(--blog-radius);
    overflow: hidden;
    box-shadow: var(--blog-shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    color: inherit;
}
.blog-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--blog-shadow-md);
    color: inherit;
}
.blog-card-v {
    display: flex;
    flex-direction: column;
}
.blog-card-v .blog-card-art {
    height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(255,255,255,0.4) 0%, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(255,255,255,0.25) 0%, transparent 40%);
}
.blog-card-v .blog-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}
.blog-card-v .blog-card-body h3 {
    font-family: "Outfit", sans-serif;
    font-weight: 600;
    font-size: 19px;
    line-height: 1.3;
    margin: 4px 0 0;
    color: var(--blog-ink);
}
.blog-card-v .blog-card-body p {
    color: var(--blog-ink-soft);
    font-size: 14px;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}
.blog-card-v .blog-card-body .blog-meta { margin-top: auto; padding-top: 8px; }

.blog-card-h {
    display: grid;
    grid-template-columns: 140px 1fr;
    min-height: 152px;
}
.blog-card-h .blog-card-art {
    display: flex;
    align-items: center;
    justify-content: center;
    background-image:
        radial-gradient(circle at 30% 30%, rgba(255,255,255,0.4) 0%, transparent 50%);
}
.blog-card-h .blog-card-body {
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.blog-card-h .blog-card-body h3 {
    font-family: "Outfit", sans-serif;
    font-weight: 600;
    font-size: 17px;
    line-height: 1.3;
    margin: 4px 0 0;
    color: var(--blog-ink);
}
.blog-card-h .blog-card-body p {
    color: var(--blog-ink-soft);
    font-size: 13.5px;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ─── Category pill ─── */
.blog-cat-pill {
    display: inline-block;
    align-self: flex-start;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border: 1px solid;
    text-decoration: none;
}

/* ─── Sidebar ─── */
.blog-sidebar-card {
    background: white;
    border: 1px solid var(--blog-line-soft);
    border-radius: var(--blog-radius);
    padding: 22px;
    box-shadow: var(--blog-shadow-sm);
    margin-bottom: 18px;
}
.blog-sidebar-card h3 {
    font-family: "Outfit", sans-serif;
    font-weight: 700;
    font-size: 20px;
    margin: 0 0 4px;
    color: var(--blog-ink);
}
.blog-sidebar-card .sub {
    font-size: 13px;
    color: var(--blog-ink-mute);
    margin: 0 0 14px;
}
.blog-sidebar-newsletter {
    background: linear-gradient(160deg, #FFE5C7 0%, #FCD7A6 100%);
    border: none;
}
.blog-sidebar-newsletter .sub { color: rgba(28,28,28,0.7); }
.blog-sidebar-newsletter form { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.blog-sidebar-newsletter input {
    padding: 11px 14px;
    border-radius: 10px;
    border: 1px solid rgba(28,28,28,0.1);
    background: white;
    font: inherit;
}
.blog-sidebar-newsletter button {
    padding: 11px 14px;
    border-radius: 10px;
    background: var(--blog-ink);
    color: white;
    border: none;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
}
.blog-sidebar-newsletter button:hover { background: #000; }

.blog-popular-item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 12px 0;
    border-top: 1px solid var(--blog-line-soft);
    text-decoration: none;
    color: inherit;
}
.blog-popular-item:first-of-type { border-top: none; padding-top: 4px; }
.blog-popular-item:hover h4 { color: var(--blog-orange-deep); }
.blog-popular-item h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--blog-ink);
    margin: 0 0 4px;
    line-height: 1.35;
    transition: color 0.15s;
}
.blog-popular-num {
    font-family: "Outfit", sans-serif;
    font-weight: 700;
    font-size: 22px;
    color: var(--blog-orange);
    line-height: 1;
    min-width: 26px;
}
.blog-popular-meta {
    font-size: 12px;
    color: var(--blog-ink-mute);
}

.blog-sidebar-card a.blog-cta {
    display: inline-block;
    width: 100%;
    text-align: center;
    background: var(--blog-orange);
    color: white !important;
    padding: 12px 16px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    margin-top: 4px;
    transition: background 0.15s;
}
.blog-sidebar-card a.blog-cta:hover { background: var(--blog-orange-deep); }

/* ─── Empty state ─── */
.blog-empty {
    text-align: center;
    padding: 80px 20px;
    color: var(--blog-ink-mute);
}
.blog-empty h3 { color: var(--blog-ink); margin: 0 0 8px; font-size: 22px; }

/* ═══ ARTICLE PAGE ═══ */
.blog-article-page {
    max-width: 1240px;
    margin: 0 auto;
    padding: 32px 24px 80px;
}
.blog-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--blog-ink-soft);
    margin-bottom: 14px;
    text-decoration: none;
}
.blog-back:hover { color: var(--blog-orange-deep); }
.blog-breadcrumbs {
    font-size: 13px;
    color: var(--blog-ink-mute);
    margin-bottom: 24px;
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.blog-breadcrumbs a { color: var(--blog-ink-soft); text-decoration: none; }
.blog-breadcrumbs a:hover { color: var(--blog-orange-deep); }
.blog-breadcrumbs .sep { opacity: 0.5; }
.blog-breadcrumbs .current { color: var(--blog-ink); font-weight: 500; }

.blog-article-layout {
    display: grid;
    grid-template-columns: 240px 1fr 280px;
    gap: 40px;
    align-items: start;
}
.blog-toc {
    position: sticky;
    top: 92px;
}
.blog-toc h4 {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--blog-ink-mute);
    margin: 0 0 14px;
}
.blog-toc a {
    display: block;
    padding: 8px 12px;
    margin-left: -12px;
    font-size: 14px;
    color: var(--blog-ink-soft);
    border-left: 2px solid transparent;
    border-radius: 0 6px 6px 0;
    transition: all 0.15s;
    line-height: 1.35;
    text-decoration: none;
}
.blog-toc a:hover {
    color: var(--blog-ink);
    background: rgba(28,28,28,0.04);
}
.blog-toc a.is-active {
    color: var(--blog-orange-deep);
    border-left-color: var(--blog-orange);
    background: rgba(254,163,39,0.08);
    font-weight: 500;
}

.blog-body { min-width: 0; }
.blog-article-header { margin-bottom: 30px; }
.blog-article-header .blog-cat-pill { margin-bottom: 16px; }
.blog-article-header h1 {
    font-family: "Outfit", sans-serif;
    font-weight: 700;
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.12;
    margin: 0 0 16px;
    color: var(--blog-ink);
    letter-spacing: -0.02em;
}
.blog-lede {
    font-size: 19px;
    color: var(--blog-ink-soft);
    line-height: 1.55;
    margin: 0 0 20px;
}
.blog-meta-row {
    display: flex;
    gap: 14px;
    align-items: center;
    font-size: 14px;
    color: var(--blog-ink-mute);
    padding-bottom: 24px;
    border-bottom: 1px solid var(--blog-line-soft);
}
.blog-cover {
    margin: 0 0 32px;
    border-radius: var(--blog-radius-lg);
    overflow: hidden;
    height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image:
        linear-gradient(135deg, transparent 49%, rgba(255,255,255,0.3) 49%, rgba(255,255,255,0.3) 51%, transparent 51%),
        linear-gradient(45deg, transparent 49%, rgba(255,255,255,0.2) 49%, rgba(255,255,255,0.2) 51%, transparent 51%);
    background-size: 40px 40px;
    border: 1px solid var(--blog-line-soft);
}

.blog-prose h2 {
    font-family: "Outfit", sans-serif;
    font-weight: 700;
    font-size: 28px;
    line-height: 1.2;
    margin: 40px 0 14px;
    color: var(--blog-ink);
    letter-spacing: -0.01em;
    scroll-margin-top: 100px;
}
.blog-prose p {
    font-size: 17px;
    line-height: 1.7;
    color: var(--blog-ink);
    margin: 0 0 18px;
}
.blog-prose ul.pretty {
    list-style: none;
    padding: 0;
    margin: 18px 0 22px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.blog-prose ul.pretty li {
    padding: 16px 18px;
    background: white;
    border: 1px solid var(--blog-line-soft);
    border-radius: var(--blog-radius);
    border-left: 3px solid var(--blog-orange);
}
.blog-prose ul.pretty .h {
    font-weight: 600;
    color: var(--blog-ink);
    margin-bottom: 4px;
    font-size: 16px;
}
.blog-prose ul.pretty .b {
    font-size: 15px;
    color: var(--blog-ink-soft);
    line-height: 1.55;
}

/* Mid-article CTA */
.blog-cta-banner {
    margin: 36px 0;
    padding: 32px;
    border-radius: var(--blog-radius-lg);
    background: linear-gradient(135deg, #182241 0%, #2A3A5E 100%);
    color: white;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 24px;
    align-items: center;
    box-shadow: var(--blog-shadow-md);
    position: relative;
    overflow: hidden;
}
.blog-cta-banner::after {
    content: '';
    position: absolute;
    right: -40px;
    top: -40px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(254,163,39,0.25) 0%, transparent 70%);
}
.blog-cta-banner h3 {
    font-family: "Outfit", sans-serif;
    font-weight: 700;
    font-size: 24px;
    margin: 0 0 6px;
    line-height: 1.2;
}
.blog-cta-banner p {
    margin: 0;
    color: #C9D1E2;
    font-size: 15px;
    max-width: 520px;
}
.blog-cta-banner .btn {
    background: var(--blog-orange);
    color: white;
    padding: 12px 22px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    z-index: 1;
    box-shadow: 0 2px 6px rgba(254,163,39,0.4);
    transition: background 0.15s;
}
.blog-cta-banner .btn:hover { background: var(--blog-orange-deep); color: white; }

/* End-of-article CTA */
.blog-end-cta {
    margin: 60px auto 0;
    max-width: 720px;
    text-align: center;
    padding: 40px 24px;
    border-top: 1px solid var(--blog-line-soft);
}
.blog-end-cta h3 {
    font-family: "Outfit", sans-serif;
    font-weight: 700;
    font-size: 28px;
    margin: 0 0 8px;
    color: var(--blog-ink);
}
.blog-end-cta p { color: var(--blog-ink-soft); margin: 0 0 20px; }
.blog-end-cta .btn {
    display: inline-block;
    background: var(--blog-orange);
    color: white;
    padding: 14px 28px;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: background 0.15s;
}
.blog-end-cta .btn:hover { background: var(--blog-orange-deep); color: white; }

/* Article right sidebar */
.blog-article-aside { position: sticky; top: 92px; }
.blog-author-card,
.blog-related-card {
    background: white;
    border: 1px solid var(--blog-line-soft);
    border-radius: var(--blog-radius);
    padding: 20px;
    box-shadow: var(--blog-shadow-sm);
    margin-bottom: 16px;
}
.blog-author-card h4 {
    font-size: 15px;
    margin: 0 0 4px;
    color: var(--blog-ink);
    font-weight: 600;
}
.blog-author-card .role {
    font-size: 13px;
    color: var(--blog-ink-mute);
    margin: 0 0 8px;
}
.blog-author-card .bio {
    font-size: 13px;
    color: var(--blog-ink-soft);
    line-height: 1.45;
    margin: 0;
}
.blog-author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FFE5C7, #fea327);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    font-size: 18px;
    margin-bottom: 12px;
}
.blog-related-card h4 {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--blog-ink-mute);
    margin: 0 0 12px;
}
.blog-related-card a {
    display: block;
    padding: 8px 0;
    font-size: 14px;
    line-height: 1.4;
    border-top: 1px solid var(--blog-line-soft);
    color: var(--blog-ink);
    text-decoration: none;
}
.blog-related-card a:first-of-type { border-top: none; padding-top: 0; }
.blog-related-card a:hover { color: var(--blog-orange-deep); }

/* ═══ RESPONSIVE ═══ */
@media (max-width: 1100px) {
    .blog-main { grid-template-columns: 1fr; }
    .blog-sidebar { position: static; }
    .blog-article-layout { grid-template-columns: 1fr; }
    .blog-toc, .blog-article-aside { position: static; }
    .blog-toc { display: none; }
    .blog-hero-row { grid-template-columns: 1fr; }
    .blog-grid { grid-template-columns: repeat(2, 1fr); }
    .blog-feature { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
    .blog-hero { padding: 40px 20px 16px; }
    .blog-grid { grid-template-columns: 1fr; }
    .blog-article-page { padding: 20px 16px 60px; }
    .blog-cta-banner { grid-template-columns: 1fr; }
    .blog-feature-body { padding: 26px 22px; }
    .blog-feature-body h2 { font-size: 24px; }
}
