/* Articles: the list (pages/blog.html → /blog/) and an article (layouts/post.html → /blog/<slug>/). 18.11.2026.
   Site rules: paper background, Gloria headings at 400, 16px radius. Yellow is an accent only (buttons, pills and text on dark),
   never a large flat field. Card and hero colours come from the site: dark with noise, white, lime, and the two gradients
   of the "עוד" cards (orange-yellow, lime-olive). Each article picks one with front matter `color`. */

/* ---------- Colour fields ---------- */
.af--dark { background-color: var(--dark); background-image: url("/assets/img/textures/noise-dark.png"); background-size: 400px; color: var(--light-text); }
.af--white { background: var(--white); color: var(--ink); }
.af--lime { background: var(--lime); color: var(--ink); }
.af--sun { background: linear-gradient(180deg, #f7ff68 0%, #ffb600 55%, #ff7e06 100%); color: var(--ink); }
.af--olive { background: linear-gradient(225deg, #f7ff68 0%, #d9df6d 40%, #76793b 100%); color: var(--ink); }
.af .pill { font-family: var(--font-text); font-size: 15px; min-block-size: 30px; padding-inline: 14px; border-color: currentColor; }
.af--dark .pill { color: var(--yellow); border-color: var(--yellow); }

/* ---------- Author ---------- */
.by { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 15px; }
.by img { inline-size: 40px; block-size: 40px; border-radius: 50%; object-fit: cover; flex: none; }
.by a { color: inherit; font-weight: 700; text-decoration: none; }
.by a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Cards (list and "more articles") ---------- */
.a-wall { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; max-inline-size: 1400px; margin-inline: auto; padding-inline: var(--inset); list-style: none; }
.a-card { position: relative; display: flex; flex-direction: column; gap: 14px; min-block-size: 300px; padding: 26px 26px 22px; border-radius: var(--radius); transition: transform .3s; }
.a-card:hover { transform: translateY(-4px); }
.a-card .pill { align-self: flex-start; }
.a-card__title { font-family: var(--font-display); font-weight: 400; font-size: clamp(24px, 2vw, 32px); line-height: 1.05; text-wrap: balance; }
.a-card__title a { color: inherit; text-decoration: none; }
.a-card__title a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); } /* whole card clickable */
.a-card__title a:focus-visible { outline: none; }
.a-card:has(.a-card__title a:focus-visible) { outline: 3px solid var(--orange); outline-offset: 3px; }
.a-card__text { font-size: 16px; line-height: 1.5; opacity: .88; max-inline-size: 30em; }
.a-card__foot { margin-block-start: auto; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-block-start: 10px; }
.a-card__foot .by { font-size: 14px; gap: 8px; }
.a-card__foot .by img { inline-size: 32px; block-size: 32px; }
.a-card__go { font-family: var(--font-display); font-size: 18px; white-space: nowrap; }
.a-card--feat { grid-column: span 2; min-block-size: 420px; padding: 34px clamp(24px, 3vw, 44px) 28px; }
.a-card--feat .a-card__title { font-size: clamp(34px, 3.3vw, 54px); line-height: 1; max-inline-size: 12em; }
.a-card--feat .a-card__text { font-size: 18px; }
/* Featured card picture: under the text; beside it only on wide screens */
.a-card__pic { display: none; }
.a-card--feat .a-card__pic { display: block; inline-size: min(100%, 520px); margin-block: 6px 4px; border-radius: 12px; box-shadow: 0 14px 34px rgba(0, 0, 0, .25); transform: rotate(-1.5deg); }
@media (min-width: 1300px) {
  .a-card--feat:has(.a-card__pic) { padding-inline-end: calc(min(42%, 440px) + 60px); }
  .a-card--feat .a-card__pic { position: absolute; inset-inline-end: 30px; inset-block-start: 50%; translate: 0 -50%; inline-size: min(42%, 440px); margin: 0; transform: rotate(-3deg); }
}
@media (max-width: 640px) { .a-card--feat .a-card__pic { display: none; } }
.a-card.is-hidden { display: none; }
@media (max-width: 1000px) { .a-wall { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .a-wall { grid-template-columns: 1fr; } .a-card--feat { grid-column: auto; min-block-size: 320px; } }
@media (prefers-reduced-motion: reduce) { .a-card { transition: none; } .a-card:hover { transform: none; } }

/* ---------- The list page ---------- */
.blog-head { display: grid; justify-items: center; gap: 18px; padding: clamp(36px, 6vw, 80px) var(--gutter) 28px; text-align: center; }
.blog-head__title { font-family: var(--font-display); font-weight: 400; font-size: clamp(64px, 9vw, 128px); line-height: .85; }
.blog-head__text { max-inline-size: 34em; font-size: var(--fs-lead); line-height: 1.45; color: var(--ink-2); }
.blog-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-block-start: 6px; }
.blog-tabs .pill { background: none; color: var(--ink); cursor: pointer; font-family: var(--font-display); font-size: 18px; min-block-size: 36px; }
.blog-tabs .pill[aria-pressed="true"], .blog-tabs .pill:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }

/* ---------- An article ---------- */
.post { padding-block-end: 0; }
.post-hero { display: grid; justify-items: center; gap: 22px; margin: 8px var(--inset) 0; padding: clamp(44px, 7vw, 110px) var(--gutter) clamp(40px, 5vw, 72px); border-radius: var(--radius); text-align: center; }
.post-hero__title { font-family: var(--font-display); font-weight: 400; font-size: clamp(40px, 5.4vw, 80px); line-height: 1; max-inline-size: 14em; text-wrap: balance; }
.post-hero__lead { max-inline-size: 34em; font-size: clamp(18px, 1.5vw, 21px); line-height: 1.5; text-wrap: pretty; }
.post-hero .by { justify-content: center; }

.post-cover { margin: 18px auto 0; max-inline-size: 1180px; padding-inline: var(--inset); }
.post-cover img { inline-size: 100%; aspect-ratio: 16 / 8; object-fit: cover; object-position: center 35%; border-radius: var(--radius); }

.post-body { max-inline-size: 720px; margin: clamp(36px, 4vw, 60px) auto 0; padding-inline: var(--gutter); box-sizing: content-box; font-size: clamp(17px, 1.3vw, 19px); line-height: 1.75; color: var(--ink-2); }
.post-body > * + * { margin-block-start: 1.1em; }
.post-body h2 { font-family: var(--font-display); font-weight: 400; font-size: clamp(30px, 2.8vw, 42px); line-height: 1.08; color: var(--ink); margin-block-start: 2.1em; text-wrap: balance; }
.post-body h2:first-child { margin-block-start: 0; }
.post-body h3 { font-family: var(--font-text); font-weight: 700; font-size: 21px; letter-spacing: 0; line-height: 1.3; color: var(--ink); margin-block-start: 1.8em; }
.post-body h2 + *, .post-body h3 + * { margin-block-start: .6em; }
.post-body ul, .post-body ol { padding-inline-start: 1.3em; display: grid; gap: .45em; }
.post-body li::marker { color: var(--orange); font-weight: 700; }
.post-body strong { color: var(--ink); }
.post-body a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--orange); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.post-body a:hover { background: var(--yellow); }
.post-body blockquote { margin-inline: 0; padding: 18px 24px; border-inline-start: 4px solid var(--orange); background: var(--white); border-radius: 0 var(--radius-s) var(--radius-s) 0; font-size: 1.05em; }
.post-body img { inline-size: 100%; border-radius: var(--radius); margin-block: .6em; background: var(--white); }
.post-body p:has(> img) { margin-inline: calc(var(--gutter) * -0.5); }
.post-body hr { border: 0; block-size: 1px; background: rgba(0, 0, 0, .15); margin-block: 2.5em; }

.post-author { max-inline-size: 720px; margin: clamp(36px, 4vw, 56px) auto 0; padding-inline: var(--gutter); box-sizing: content-box; }
.post-author__box { display: flex; align-items: center; gap: 18px; padding: 20px 22px; background: var(--white); border-radius: var(--radius); }
.post-author__box img { inline-size: 72px; block-size: 72px; border-radius: 50%; object-fit: cover; flex: none; }
.post-author__name { font-family: var(--font-display); font-size: 22px; line-height: 1.1; }
.post-author__text { font-size: 16px; line-height: 1.5; color: var(--ink-2); margin-block-start: 4px; }
.post-author__text a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--orange); text-underline-offset: 4px; }

.post-faq { max-inline-size: 860px; margin: var(--space-l) auto 0; padding: 48px clamp(16px, 4vw, 48px) 52px; background: var(--white); border-radius: var(--radius); margin-inline: max(var(--inset), calc((100% - 860px) / 2)); }
.post-faq__title { font-family: var(--font-display); font-weight: 400; font-size: clamp(30px, 2.6vw, 38px); text-align: center; margin-block-end: 28px; line-height: 1.1; }

.post-cta { max-inline-size: 1180px; margin: var(--space-l) auto 0; padding-inline: var(--inset); }
.post-cta__title { font-family: var(--font-display); font-weight: 400; font-size: clamp(34px, 3.4vw, 50px); text-align: center; margin-block-end: 26px; }
.post-cta__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 18px; }
.post-cta__card { display: grid; align-content: start; justify-items: start; gap: 14px; padding: 38px clamp(22px, 3vw, 40px) 40px; border-radius: var(--radius); }
.post-cta__card h3 { font-family: var(--font-display); font-weight: 400; font-size: clamp(28px, 2.4vw, 36px); line-height: 1.05; }
.post-cta__card p { font-size: 18px; line-height: 1.5; max-inline-size: 30em; }
.post-cta__card .btn { margin-block-start: 10px; }
.post-cta__eyebrow { font-size: 15px !important; opacity: .8; }
.post-cta__card .btn--yellow { border-color: var(--yellow); }

.post-more { margin-block-start: var(--space-l); }
.post-more__title { font-family: var(--font-display); font-weight: 400; font-size: clamp(30px, 2.6vw, 40px); text-align: center; margin-block-end: 22px; }
.post-more .a-card { min-block-size: 260px; }
.post-more .a-card:nth-child(n+4) { display: none; }

@media (max-width: 860px) {
  .post-cover img { aspect-ratio: 4 / 3; }
  .post-body p:has(> img) { margin-inline: 0; }
  .post-cta__card .btn { inline-size: 100%; }
  .post-author__box { align-items: flex-start; }
  .post-author__box img { inline-size: 56px; block-size: 56px; }
}
