/* Brickify blog post layout. Loads after /assets/site.css and uses its tokens. */

.post-hero { background: var(--brand-tint); border-bottom: 2px solid var(--line); padding: 56px 0 44px; text-align: center; }
.post-hero .eyebrow { font-size: 12px; font-weight: 900; letter-spacing: 1px; text-transform: uppercase; color: var(--brand); }
.post-hero h1 { font-size: clamp(28px, 5vw, 44px); font-weight: 900; letter-spacing: -0.8px; line-height: 1.15; color: var(--brand-dark); max-width: 760px; margin: 10px auto 0; }
.post-hero .subheader { font-size: clamp(17px, 2.4vw, 20px); color: var(--muted); font-weight: 700; max-width: 640px; margin: 14px auto 0; line-height: 1.45; }
.post-hero .meta { font-size: 13px; font-weight: 800; color: var(--muted); margin-top: 16px; }

.post { max-width: 700px; margin: 0 auto; padding: 36px 20px 64px; }
.post .back { display: inline-block; margin-bottom: 24px; color: var(--muted); font-size: 14px; font-weight: 800; text-decoration: none; }
.post .back:hover { color: var(--brand); }

.post-figure { margin: 0 0 32px; }
.post-figure img { width: 100%; border-radius: var(--radius); border: 2px solid var(--line); }
.post-figure figcaption { font-size: 13px; color: var(--muted); margin-top: 8px; text-align: center; }

.post-video { margin: 32px 0; }
.post-video .frame { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; border: 2px solid var(--line); background: #000; }
.post-video .frame.portrait { aspect-ratio: 9 / 16; max-width: 360px; margin: 0 auto; }
.post-video iframe, .post-video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.post-video figcaption { font-size: 13px; color: var(--muted); margin-top: 8px; text-align: center; }

.post-body h2 { font-size: 23px; font-weight: 900; letter-spacing: -0.3px; color: var(--brand-dark); margin: 36px 0 10px; line-height: 1.25; }
.post-body h3 { font-size: 18px; font-weight: 900; color: var(--ink); margin: 26px 0 8px; }
.post-body p, .post-body li { font-size: 17px; line-height: 1.7; }
.post-body p { margin-bottom: 16px; }
.post-body ul, .post-body ol { padding-left: 24px; margin-bottom: 16px; }
.post-body li { margin-bottom: 8px; }
.post-body blockquote { border-left: 4px solid var(--brand); padding: 4px 0 4px 18px; margin: 24px 0; color: var(--muted); font-size: 19px; font-weight: 700; font-style: italic; }
.post-body img { border-radius: var(--radius); margin: 24px 0; }
.post-body .intro { font-size: 19px; color: var(--muted); font-weight: 600; }

.post-download { margin-top: 44px; background: var(--brand); color: #fff; border-radius: 24px; padding: 36px 24px; text-align: center; }
.post-download h2 { font-size: clamp(24px, 4vw, 32px); font-weight: 900; letter-spacing: -0.5px; line-height: 1.15; }
.post-download p { opacity: .9; margin: 8px 0 22px; font-size: 16px; }
.post-download .badges { justify-content: center; }
.post-download .badge-link.is-suggested { box-shadow: 0 0 0 4px rgba(255,255,255,.55); }

.post-next { margin-top: 40px; padding-top: 24px; border-top: 2px solid var(--line); }
.post-next h4 { font-size: 13px; font-weight: 900; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); margin-bottom: 10px; }
.post-next a { display: block; font-weight: 800; margin-bottom: 6px; text-decoration: none; }
.post-next a:hover { text-decoration: underline; }

/* Square or portrait main image: add class="square" to keep it from filling the screen. */
.post-figure.square img { max-width: 520px; margin: 0 auto; }
.post-figure.portrait img { max-width: 420px; margin: 0 auto; }
.post-figure.screenshot img { max-width: 260px; }

/* Side card with a small illustration, e.g. a "critical thinking check" before the download band. */
.post-aside { display: flex; gap: 22px; align-items: flex-start; margin-top: 40px; background: var(--surface); border: 2px solid var(--line); border-radius: 24px; padding: 24px; }
.post-aside img { width: 140px; flex-shrink: 0; border-radius: 50%; }
.post-aside h2 { font-size: 13px; font-weight: 900; text-transform: uppercase; letter-spacing: .8px; color: var(--brand); margin-bottom: 6px; }
.post-aside .question { font-size: 19px; font-weight: 900; color: var(--brand-dark); line-height: 1.35; margin-bottom: 10px; }
.post-aside p { font-size: 16px; line-height: 1.65; margin-bottom: 10px; }
.post-aside p:last-child { margin-bottom: 0; }
@media (max-width: 560px) {
  .post-aside { flex-direction: column; align-items: center; text-align: left; }
  .post-aside img { width: 120px; }
}

/* 3:4 video (e.g. a recorded presentation) */
.post-video .frame.tall { aspect-ratio: 3 / 4; max-width: 420px; margin: 0 auto; }

/* ---------- Step slider: one step per slide, picture + copy. Needs slider.js ---------- */
.step-slider { margin: 8px 0 36px; }
.slider-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; border-radius: 24px; }
.slider-track::-webkit-scrollbar { display: none; }
.slider-track:focus-visible { outline: 3px solid var(--brand); outline-offset: 4px; }
@media (prefers-reduced-motion: reduce) { .slider-track { scroll-behavior: auto; } }
.slide { flex: 0 0 100%; scroll-snap-align: start; display: grid; grid-template-columns: minmax(0, 46%) 1fr; gap: 24px; align-items: center; background: var(--surface); border: 2px solid var(--line); border-bottom-width: 5px; border-radius: 24px; padding: 20px; }
.slide img { width: 100%; border-radius: 16px; aspect-ratio: 4 / 5; object-fit: cover; }
.slide-n { font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .8px; color: var(--brand); }
.slide h3 { font-size: 22px; font-weight: 900; color: var(--brand-dark); line-height: 1.25; margin: 6px 0 10px; }
.slide p { font-size: 16px; line-height: 1.65; color: var(--ink); }
.slide p + p { margin-top: 10px; }
@media (max-width: 600px) {
  .slide { grid-template-columns: 1fr; gap: 14px; padding: 14px; align-items: start; }
  .slide img { max-width: 320px; margin: 0 auto; }
  .slide h3 { font-size: 20px; }
}
.slider-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; }
.slider-nav .arrow { width: 44px; height: 44px; flex-shrink: 0; border-radius: 50%; border: 2px solid var(--line); border-bottom-width: 4px; background: var(--surface); color: var(--brand); font: 900 20px/1 var(--font); cursor: pointer; }
.slider-nav .arrow:disabled { opacity: .4; cursor: default; }
.slider-dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.slider-dots button { width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface); color: var(--muted); font: 900 13px/1 var(--font); cursor: pointer; }
.slider-dots button[aria-current="true"] { background: var(--brand); border-color: var(--brand-dark); color: #fff; }
.slider-nav button:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }

/* Useful links list */
.useful-links { list-style: none; padding: 0 !important; }
.useful-links li { background: var(--surface); border: 2px solid var(--line); border-radius: 16px; padding: 14px 18px; margin-bottom: 10px; }
.useful-links a { font-weight: 900; }
.useful-links .who { font-size: 14px; font-weight: 800; color: var(--muted); }
@media (max-width: 420px) {
  .slider-nav { gap: 6px; }
  .slider-nav .arrow { width: 40px; height: 40px; }
  .slider-dots { gap: 4px; flex-wrap: nowrap; }
  .slider-dots button { width: 27px; height: 27px; font-size: 12px; }
}

/* List with an icon per item (e.g. readiness signs) */
.icon-list { list-style: none; padding: 0 !important; counter-reset: sign; }
.icon-list li { display: flex; gap: 16px; align-items: center; background: var(--surface); border: 2px solid var(--line); border-radius: 16px; padding: 12px 16px; margin-bottom: 10px; counter-increment: sign; }
.icon-list img { width: 64px; height: 64px; flex-shrink: 0; margin: 0 !important; border-radius: 12px; }
.icon-list li::before { content: counter(sign); font-weight: 900; color: var(--brand); font-size: 20px; min-width: 14px; }
.icon-list p { margin: 0 !important; }

/* Ranked options (e.g. ladder rungs); add class="is-brickify" to highlight one */
.rungs { list-style: none; padding: 0 !important; counter-reset: rung; }
.rungs li { counter-increment: rung; display: flex; gap: 14px; align-items: center; border: 2px solid var(--line); border-bottom-width: 4px; border-radius: 14px; padding: 12px 16px; margin-bottom: 10px; background: var(--surface); }
.rungs li::before { content: counter(rung); flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 14px; background: var(--brand-tint); color: var(--brand-dark); }
.rungs li.is-brickify { background: var(--brand); border-color: var(--brand-dark); color: #fff; font-weight: 700; }
.rungs li.is-brickify::before { background: #fff; }
@media (max-width: 480px) {
  .icon-list li { gap: 10px; padding: 10px 12px; }
  .icon-list img { width: 44px; height: 44px; }
  .icon-list li::before { font-size: 17px; min-width: 10px; }
}

/* ==========================================================================
   Colour pass: the Brickify homepage's brick, pink and teal diagonals.
   Body text on pink-deep and teal-deep is white (5:1); cream is kept for big headings.
   ========================================================================== */
:root {
  --bk-brick: #7F3F2D; --bk-brick-2: #B65A3D; --bk-cream: #F4E8D6; --bk-cream-2: #FFF8EE;
  --bk-pink: #E2558A; --bk-pink-deep: #C23C6F; --bk-pink-tint: #FBDDE8;
  --bk-teal: #3AAEAA; --bk-teal-deep: #1C7B77; --bk-teal-tint: #D7F0EE;
}

/* ---------- Diagonal hero, shared by the blog home and every post ---------- */
.post-hero, .blog-hero { position: relative; overflow: hidden; background: var(--bk-pink-deep); border-bottom: 0; color: #fff; }
.post-hero::before, .blog-hero::before { content: ""; position: absolute; inset: 0; background: var(--bk-brick); clip-path: polygon(0 calc(100% - 46px), 100% calc(100% - 110px), 100% 100%, 0 100%); }
.post-hero::after, .blog-hero::after { content: ""; position: absolute; inset: 0; background: var(--bk-teal); clip-path: polygon(84% 0, 100% 0, 100% 46%); }
.post-hero .wrap, .blog-hero .wrap { position: relative; z-index: 1; }
.post-hero { padding: 52px 0 128px; }
.post-hero .eyebrow { display: inline-block; padding: 5px 12px; border-radius: 999px; background: var(--bk-teal-deep); color: #fff; transform: rotate(-2deg); }
.post-hero h1 { color: var(--bk-cream); text-shadow: 0 2px 0 rgba(0,0,0,.12); }
.post-hero .subheader { color: #fff; font-size: clamp(19px, 2.4vw, 21px); }
.post-hero .meta { color: rgba(255,255,255,.88); }
@media (max-width: 600px) {
  .post-hero::after, .blog-hero::after { clip-path: polygon(88% 0, 100% 0, 100% 24%); }
  .post-hero { padding: 40px 0 112px; }
}

/* ---------- Inside a post: coloured section markers, quotes and cards ---------- */
.post-body h2 { position: relative; padding-left: 18px; }
.post-body h2::before { content: ""; position: absolute; left: 0; top: .15em; bottom: .15em; width: 6px; border-radius: 3px; background: var(--bk-teal-deep); }
.post-body h2:nth-of-type(3n+2)::before { background: var(--bk-pink-deep); }
.post-body h2:nth-of-type(3n)::before { background: var(--bk-brick-2); }
.post-body .intro { color: var(--ink); padding: 18px 22px; border-radius: 18px; background: var(--bk-teal-tint); }
.post-body blockquote { border-left: 0; border-radius: 0 18px 18px 0; background: var(--bk-pink-tint); box-shadow: inset 6px 0 0 var(--bk-pink-deep); padding: 16px 20px 16px 26px; color: var(--ink); }
.post-figure img { box-shadow: 0 18px 34px -22px rgba(0,0,0,.45); }

/* "Critical thinking" cards: teal, then pink, alternating down the post */
.post-aside { background: var(--bk-teal-deep); border: 0; color: #fff; box-shadow: 0 6px 0 rgba(0,0,0,.14); }
.post-aside:nth-of-type(even) { background: var(--bk-pink-deep); }
.post-aside img { border: 4px solid var(--bk-cream); }
.post-aside h2 { color: var(--bk-cream); }
.post-aside .question { color: #fff; }
.post-aside p, .post-aside a { color: #fff; }

/* Lists: teal and pink accents */
.icon-list li { border-left: 6px solid var(--bk-teal-deep); }
.icon-list li:nth-child(even) { border-left-color: var(--bk-pink-deep); }
.icon-list li::before { color: var(--bk-teal-deep); }
.icon-list li:nth-child(even)::before { color: var(--bk-pink-deep); }
.rungs li::before { background: var(--bk-teal-tint); color: var(--bk-teal-deep); }
.rungs li.is-brickify { background: var(--bk-brick); border-color: #5e2d20; }
.useful-links li { border-left: 6px solid var(--bk-pink-deep); }
.useful-links li:nth-child(even) { border-left-color: var(--bk-teal-deep); }

/* Step slider */
.slide { border-top: 6px solid var(--bk-teal-deep); }
.slide:nth-child(even) { border-top-color: var(--bk-pink-deep); }
.slide-n { color: var(--bk-teal-deep); }
.slider-nav .arrow { color: var(--bk-pink-deep); }
.slider-dots button[aria-current="true"] { background: var(--bk-pink-deep); border-color: #8e2550; }

/* Download band: the homepage's brick and teal diagonal */
.post-download { background: linear-gradient(115deg, var(--bk-brick) 0 56%, var(--bk-teal-deep) 56% 100%); box-shadow: 0 6px 0 rgba(0,0,0,.14); }
.post-download h2 { color: var(--bk-cream); }
.post-download p { color: #fff; opacity: 1; }

.post-next { border-top: 0; padding: 22px 24px; border-radius: 20px; background: var(--bk-cream); }
.post-next h4 { color: var(--bk-teal-deep); }
.post-next a { color: var(--bk-pink-deep); }

/* News round-up items (five-things post): numbered cards in alternating colours */
.post .item { position: relative; margin: 0 0 16px; padding: 20px 22px 18px; border-radius: 18px; background: var(--bk-cream-2); border-left: 6px solid var(--bk-teal-deep); box-shadow: 0 4px 0 rgba(0,0,0,.08); }
.post .item:nth-of-type(even) { border-left-color: var(--bk-pink-deep); }
.post .item h2 { margin-top: 0; padding-left: 0; }
.post .item h2::before { display: none; }
.post .item p { font-size: 16px; }
.post .item .source { font-size: 13px; color: var(--muted); margin-bottom: 0; }
.post .brickify-section { margin-top: 36px; padding: 26px 24px 18px; border-radius: 24px; background: var(--bk-teal-deep); color: #fff; }
.post .brickify-section h2 { color: var(--bk-cream); padding-left: 0; margin-top: 0; }
.post .brickify-section h2::before { display: none; }
.post .brickify-section p, .post .brickify-section li { color: #fff; }

/* ---------- Blog home ---------- */
.blog-hero { padding: 48px 0 176px; }
.blog-hero .back { color: rgba(255,255,255,.9); font-size: 14px; font-weight: 800; text-decoration: none; }
.blog-hero .back:hover { color: #fff; text-decoration: underline; }
.blog-hero h1 { margin-top: 14px; color: var(--bk-cream); font-size: clamp(40px, 7vw, 72px); font-weight: 900; letter-spacing: -.02em; line-height: 1.02; text-shadow: 0 2px 0 rgba(0,0,0,.12); }
.blog-hero p { max-width: 30em; margin-top: 12px; color: #fff; font-size: clamp(19px, 2.4vw, 22px); font-weight: 700; line-height: 1.4; }

.blog-home { padding-bottom: 72px; }
/* search + pillar filter (blog-filter.js shows it; hidden without JS) */
.blog-filter { position: relative; z-index: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; max-width: 980px; margin-top: 26px; }
.blog-filter[hidden] { display: none; }
.blog-filter input[type="search"] { flex: 1 1 240px; max-width: 320px; min-height: 44px; padding: 10px 16px; border: 0; border-radius: 999px; background: var(--bk-cream-2); color: var(--ink); font: inherit; font-size: 16px; font-weight: 700; box-shadow: 0 3px 0 rgba(0,0,0,.15); }
.blog-filter input[type="search"]::placeholder { color: var(--muted); }
.blog-filter input[type="search"]:focus-visible { outline: 3px solid var(--bk-cream); outline-offset: 2px; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-chips button { min-height: 44px; padding: 8px 16px; border: 2px solid rgba(255,255,255,.75); border-radius: 999px; background: transparent; color: #fff; font: inherit; font-size: 15px; font-weight: 800; cursor: pointer; }
.filter-chips button:hover { background: rgba(255,255,255,.14); }
.filter-chips button[aria-pressed="true"] { border-color: var(--bk-cream); background: var(--bk-cream); color: var(--bk-brick); }
.filter-chips button:focus-visible { outline: 3px solid var(--bk-cream); outline-offset: 2px; }
.filter-count { flex-basis: 100%; min-height: 1.4em; margin: 0 !important; color: #fff; font-size: 15px !important; font-weight: 800; }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.post-pillar { color: var(--tone-dark); font-size: 12px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; }
.post-empty { position: relative; z-index: 1; max-width: 980px; margin: 0 auto; padding: 32px; border-radius: 22px; background: var(--bk-cream-2); text-align: center; box-shadow: 0 6px 0 rgba(0,0,0,.13); }
.post-empty[hidden] { display: none; }
.post-empty p { color: var(--ink); font-size: 18px; font-weight: 800; }
.post-empty button { margin-top: 12px; min-height: 44px; padding: 8px 20px; border: 0; border-radius: 999px; background: var(--bk-pink-deep); color: #fff; font: inherit; font-weight: 800; cursor: pointer; }

.post-list { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; max-width: 980px; margin: -120px auto 0; }
.post-card {
  --tone: var(--bk-pink); --tone-dark: var(--bk-pink-deep);
  display: flex; flex-direction: column; overflow: hidden; border-radius: 22px; background: var(--bk-cream-2); color: var(--ink);
  text-decoration: none; box-shadow: 0 6px 0 rgba(0,0,0,.13), 0 22px 40px -28px rgba(0,0,0,.5); transition: transform .15s;
}
.post-card:nth-child(3n+2) { --tone: var(--bk-teal); --tone-dark: var(--bk-teal-deep); }
.post-card:nth-child(3n) { --tone: #D9733F; --tone-dark: var(--bk-brick); }
.post-card:hover { transform: translateY(-3px); }
.post-card:focus-visible { outline: 4px solid var(--tone-dark); outline-offset: 3px; }
.post-thumb { position: relative; display: block; aspect-ratio: 4 / 3; padding: 16px; overflow: hidden; background: linear-gradient(160deg, var(--tone) 0 58%, var(--tone-dark) 58% 100%); }
/* the picture is laid over a fixed-shape panel so tall images can't stretch the card */
.post-thumb img { position: absolute; inset: 16px; width: calc(100% - 32px); height: calc(100% - 32px); object-fit: contain; border-radius: 12px; }
.post-thumb-art { display: grid; place-items: center; }
.post-thumb-art span { font-size: clamp(110px, 16vw, 170px); font-weight: 900; line-height: 1; color: var(--bk-cream); text-shadow: 0 6px 0 rgba(0,0,0,.18); transform: rotate(-6deg); }
.post-text { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; flex: 1; padding: 20px 22px 22px; }
.post-date { display: inline-block; padding: 4px 10px; border-radius: 999px; background: var(--tone-dark); color: #fff; font-size: 12px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; }
.post-card h2 { font-size: 21px; font-weight: 900; line-height: 1.22; color: var(--bk-brick); letter-spacing: -.2px; }
.post-card p { color: var(--muted); font-size: 15px; line-height: 1.55; }
.post-arrow { margin-top: auto; padding-top: 4px; color: var(--tone-dark); font-size: 14px; font-weight: 900; }

/* newest post, and a last post left on its own: wide, picture beside the text */
.post-card:first-child, .post-card:nth-child(even):last-child { grid-column: 1 / -1; flex-direction: row; }
.post-card:first-child .post-thumb, .post-card:nth-child(even):last-child .post-thumb { flex: 0 0 42%; aspect-ratio: 1 / 1; }
.post-card:first-child .post-text, .post-card:nth-child(even):last-child .post-text { justify-content: center; padding: 32px; }
.post-card:first-child h2 { font-size: clamp(24px, 3vw, 32px); }
.post-card:first-child p { font-size: 17px; }

@media (max-width: 720px) {
  .blog-hero { padding: 36px 0 150px; }
  .post-list { grid-template-columns: 1fr; margin-top: -104px; gap: 18px; }
  .blog-filter input[type="search"] { max-width: none; }
  .post-card:first-child, .post-card:nth-child(even):last-child { flex-direction: column; }
  .post-card:first-child .post-thumb, .post-card:nth-child(even):last-child .post-thumb { flex: none; aspect-ratio: 4 / 3; }
  .post-card:first-child .post-text, .post-card:nth-child(even):last-child .post-text { padding: 20px 22px 22px; }
}
@media (prefers-reduced-motion: reduce) { .post-card { transition: none; } .post-card:hover { transform: none; } }

/* Comparison table in a post (brick phone vs Brickify). Stacks into cards on phones. */
.post-compare { width: 100%; margin: 8px 0 0; border-collapse: separate; border-spacing: 0; overflow: hidden; border: 2px solid var(--line); border-radius: 18px; background: var(--bk-cream-2); font-size: 15px; }
.post-compare th, .post-compare td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.post-compare tr:last-child th, .post-compare tr:last-child td { border-bottom: 0; }
.post-compare thead th { background: var(--bk-brick); color: #fff; font-size: 13px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; }
.post-compare tbody th { width: 30%; color: var(--bk-brick); font-weight: 800; }
.post-compare td { color: var(--muted); }
.post-compare td.us { color: var(--ink); font-weight: 700; }
.post-compare tr.other-wins th, .post-compare tr.other-wins td { background: var(--bk-teal-tint); }
.post-body .table-note { margin-top: 12px; color: var(--muted); font-size: 15px; }
@media (max-width: 600px) {
  .post-compare, .post-compare tbody, .post-compare tr, .post-compare th, .post-compare td { display: block; width: 100%; }
  .post-compare { border: 0; background: none; overflow: visible; }
  .post-compare thead { display: none; }
  .post-compare tr { margin-bottom: 12px; overflow: hidden; border: 2px solid var(--line); border-radius: 16px; background: var(--bk-cream-2); }
  .post-compare tbody th { width: 100%; background: var(--bk-cream); }
  .post-compare td { border-bottom: 1px solid var(--line); }
  .post-compare td::before { content: attr(data-label) ": "; color: var(--bk-brick); font-weight: 800; }
}
