/* ==========================================================================
   Jigsy blog – shared stylesheet
   Used by /blog/index.htm and all individual post pages.

   Post-specific accent colour is switched via a body class:
     body.page-index     – purple (index / listing page)
     body.post-intro     – purple
     body.post-algorand  – teal
     body.post-update    – orange
   ========================================================================== */

/* --------------------------------------------------------------------------
   Reset + colour tokens
   -------------------------------------------------------------------------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    /* default accent = Jigsy purple */
    --accent: #a78bfa;
    --accent-light: #c4b5fd;
    --accent-bg-soft: rgba(167,139,250,0.20);
    --accent-bg-softer: rgba(167,139,250,0.10);
    --accent-border: rgba(167,139,250,0.25);
    --accent-text: #fff;                 /* foreground on the accent button */
}

body.post-algorand {
    --accent: #2dd4bf;
    --accent-light: #5eead4;
    --accent-bg-soft: rgba(0,178,160,0.20);
    --accent-bg-softer: rgba(0,178,160,0.08);
    --accent-border: rgba(0,178,160,0.30);
    --accent-text: #081169;
}

body.post-update {
    --accent: #fb923c;
    --accent-light: #fdba74;
    --accent-bg-soft: rgba(251,146,60,0.20);
    --accent-bg-softer: rgba(251,146,60,0.08);
    --accent-border: rgba(251,146,60,0.22);
    --accent-text: #fff;
}

/* --------------------------------------------------------------------------
   Base
   -------------------------------------------------------------------------- */
body {
    font-family: "Momo Trust Display", -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica', sans-serif;
    background: linear-gradient(135deg, #081169 0%, #29042e 100%);
    min-height: 100vh;
    color: #fff;
}

/* --------------------------------------------------------------------------
   NAV
   -------------------------------------------------------------------------- */
nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 40px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.nav-logo {
    display: inline-block;
    line-height: 0;
    text-decoration: none;
}
.nav-logo img {
    height: 42px;
    width: auto;
    display: block;
}

.nav-links { display: flex; gap: 28px; }
.nav-links a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
}
.nav-links a:hover,
.nav-links a.active { color: #fff; }

.nav-back {
    display: flex;
    align-items: center;
    gap: 7px;
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s;
}
.nav-back:hover { color: #fff; }
.nav-back svg { width: 14px; height: 14px; }

/* --------------------------------------------------------------------------
   INDEX PAGE – hero + post cards
   -------------------------------------------------------------------------- */
.hero {
    text-align: center;
    padding: 70px 24px 50px;
}
.hero-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 16px;
}
.hero h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 14px;
}
.hero p {
    color: rgba(255,255,255,0.65);
    font-size: 1.05rem;
    max-width: 520px;
    margin: 0 auto;
    line-height: 1.6;
}

.posts-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 24px 80px;
}

.post-card {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 28px;
    display: flex;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}
.post-card:hover {
    background: rgba(255,255,255,0.10);
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}

.post-image {
    width: 220px;
    min-height: 160px;
    flex-shrink: 0;
    background: rgba(255,255,255,0.05);
    border-right: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 8px;
    color: rgba(255,255,255,0.3);
    font-size: 0.75rem;
    text-align: center;
    padding: 16px;
    overflow: hidden;
}
/* When a real <img> is dropped into the image panel, let it fill edge-to-edge */
.post-image:has(> img) {
    padding: 0;
    gap: 0;
}
.post-image > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Focal point of the crop. Default = centre.
       Override per card with inline  style="--focus: 75% 50%"
       on the <img>  (left 0% → right 100%, top 0% → bottom 100%). */
    object-position: var(--focus, 50% 50%);
    display: block;
}
.post-image svg {
    width: 36px;
    height: 36px;
    opacity: 0.3;
}

/* Optional accent tints for the image panel when a card has no image */
.post-card.accent-algorand .post-image { background: rgba(0,178,160,0.12); border-right-color: rgba(0,178,160,0.2); }
.post-card.accent-intro    .post-image { background: rgba(167,139,250,0.12); border-right-color: rgba(167,139,250,0.2); }
.post-card.accent-update   .post-image { background: rgba(251,146,60,0.10); border-right-color: rgba(251,146,60,0.2); }

.post-body {
    padding: 28px 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.post-card .post-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}
.post-card .post-date {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.4);
}
.post-body h2 {
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 10px;
}
.post-body p {
    color: rgba(255,255,255,0.6);
    font-size: 0.92rem;
    line-height: 1.65;
    margin-bottom: 18px;
}
.read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #a78bfa;
}
.read-more svg { width: 14px; height: 14px; }

/* Post tag pill – colour variants for the index cards */
.post-tag {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 20px;
    background: rgba(167,139,250,0.2);
    color: #a78bfa;
}
.post-tag.green,
.post-tag.award  { background: rgba(0,178,160,0.2);  color: #2dd4bf; }
.post-tag.orange { background: rgba(251,146,60,0.2); color: #fb923c; }

/* --------------------------------------------------------------------------
   INDIVIDUAL POST – hero
   -------------------------------------------------------------------------- */
.post-hero {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 24px 40px;
    text-align: center;
}
.post-hero .post-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-bottom: 22px;
}
/* .post-tag inside an individual post adopts the current accent */
.post-hero .post-tag {
    font-size: 0.72rem;
    padding: 4px 12px;
    background: var(--accent-bg-soft);
    color: var(--accent);
}
.post-date,
.post-author {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.45);
}

.post-hero h1 {
    font-size: clamp(1.8rem, 5vw, 3rem);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 20px;
}
.post-hero .standfirst {
    font-size: 1.12rem;
    color: rgba(255,255,255,0.65);
    line-height: 1.65;
    max-width: 640px;
    margin: 0 auto;
}

/* --------------------------------------------------------------------------
   HERO / INLINE IMAGES
   -------------------------------------------------------------------------- */
.hero-image {
    max-width: 900px;
    margin: 36px auto 0;
    padding: 0 24px;
}
.hero-image img,
.inline-image img {
    max-width: 100%;
}
.inline-image { margin: 2em 0; }

.imgroundcorners { border-radius: 20px; }

/* --------------------------------------------------------------------------
   ARTICLE BODY
   -------------------------------------------------------------------------- */
article {
    max-width: 720px;
    margin: 0 auto;
    padding: 52px 24px 80px;
}
article p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: rgba(255,255,255,0.8);
    margin-bottom: 1.5em;
}
article p strong { color: #fff; font-weight: 600; }
article p em     { color: rgba(255,255,255,0.9); }

article h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin: 2.4em 0 0.7em;
    padding-top: 0.4em;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* Links in article body adopt the post accent */
article a {
    color: var(--accent);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: color 0.15s;
}
article a:hover { color: var(--accent-light); }

.opening-quote {
    font-size: 1.5rem;
    line-height: 1.6;
    color: rgba(255,255,255,0.9);
    border-left: 3px solid var(--accent);
    padding: 4px 0 4px 22px;
    margin: 0 0 1.8em;
}

/* --------------------------------------------------------------------------
   Callouts + stats
   -------------------------------------------------------------------------- */
.callout-box {
    background: var(--accent-bg-softer);
    border: 1px solid var(--accent-border);
    border-radius: 12px;
    padding: 24px 28px;
    margin: 2em 0;
}
.callout-box p {
    margin-bottom: 0;
    color: rgba(255,255,255,0.75);
    font-size: 0.98rem;
}
.callout-box strong { color: var(--accent-light); }

/* Force a purple callout regardless of post accent
   (used by the Algorand post for the roadmap note) */
.callout-box.accent-purple {
    background: rgba(167,139,250,0.08);
    border-color: rgba(167,139,250,0.20);
}
.callout-box.accent-purple strong { color: #c4b5fd; }

.stat-row {
    display: flex;
    gap: 16px;
    margin: 2em 0;
    flex-wrap: wrap;
}
.stat-box {
    flex: 1;
    min-width: 140px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}
.stat-box .stat-num {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent);
    display: block;
    margin-bottom: 4px;
}
.stat-box .stat-label {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.45);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

hr.divider {
    border: none;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin: 2.5em 0;
}

/* --------------------------------------------------------------------------
   Algorand-specific – award banner
   -------------------------------------------------------------------------- */
.award-banner {
    background: linear-gradient(135deg, rgba(0,178,160,0.15), rgba(0,178,160,0.05));
    border: 1px solid rgba(0,178,160,0.3);
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    margin: 2.2em 0;
}
.award-banner .trophy {
    font-size: 3rem;
    margin-bottom: 12px;
    display: block;
}
.award-banner h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #2dd4bf;
    margin-bottom: 8px;
}
.award-banner p {
    color: rgba(255,255,255,0.65);
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   April update – shapes grid, data callout, feedback CTA
   -------------------------------------------------------------------------- */
.shapes-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin: 2em 0;
}
.shape-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 18px 20px;
}
.shape-card .shape-name {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
}
.shape-card .shape-desc {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.5);
    line-height: 1.5;
}
.shape-card .shape-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 2px;
    margin-right: 6px;
    vertical-align: middle;
}

.data-callout {
    background: rgba(251,146,60,0.08);
    border: 1px solid rgba(251,146,60,0.22);
    border-radius: 12px;
    padding: 26px 28px;
    margin: 2em 0;
}
.data-callout p {
    margin-bottom: 0;
    color: rgba(255,255,255,0.78);
    font-size: 0.98rem;
}
.data-callout strong { color: #fb923c; }

.feedback-cta {
    background: linear-gradient(135deg, rgba(167,139,250,0.12), rgba(251,146,60,0.08));
    border: 1px solid rgba(167,139,250,0.25);
    border-radius: 16px;
    padding: 36px;
    text-align: center;
    margin-top: 3em;
}
.feedback-cta .stars {
    font-size: 2rem;
    letter-spacing: 4px;
    margin-bottom: 16px;
    display: block;
}
.feedback-cta h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 12px;
}
.feedback-cta p {
    font-size: 0.97rem;
    color: rgba(255,255,255,0.65);
    max-width: 500px;
    margin: 0 auto 24px;
}

/* --------------------------------------------------------------------------
   Generic CTA block + buttons
   -------------------------------------------------------------------------- */
.cta-block {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 16px;
    padding: 36px;
    text-align: center;
    margin-top: 3em;
}
.cta-block h3 { font-size: 1.3rem; margin-bottom: 10px; }
.cta-block p {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.6);
    margin-bottom: 22px;
}

.btn {
    display: inline-block;
    padding: 13px 30px;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.15s, box-shadow 0.15s;
    margin: 5px 8px;
}
.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.btn-primary {
    background: var(--accent);
    color: var(--accent-text);
}
.btn-secondary {
    background: rgba(255,255,255,0.1);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
}

/* --------------------------------------------------------------------------
   FOOTER
   -------------------------------------------------------------------------- */
footer {
    text-align: center;
    padding: 32px 24px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.35);
    font-size: 0.82rem;
}
footer a {
    color: rgba(255,255,255,0.5);
    text-decoration: none;
}
footer a:hover { color: #fff; }

/* --------------------------------------------------------------------------
   RESPONSIVE
   -------------------------------------------------------------------------- */
@media (max-width: 640px) {
    nav { padding: 18px 20px; }
    .nav-links { display: none; }
    .nav-logo img { height: 36px; }

    .post-card { flex-direction: column; }
    .post-image {
        width: 100%;
        min-height: 120px;
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.08);
    }
    .post-body { padding: 20px; }

    .shapes-grid { grid-template-columns: 1fr; }
}
