/* Editorial system for Blog, Articles and About. Loaded after the shared base. */

.page-editorial {
  background:
    radial-gradient(circle at 8% 18%, rgba(244, 201, 93, 0.12), transparent 24rem),
    var(--color-canvas);
}

.page-editorial h1,
.page-editorial h2,
.page-editorial .post-card h3,
.page-editorial .page-hero-summary strong,
.page-editorial .article-byline strong {
  font-family: "Newsreader", Georgia, serif;
}

.page-editorial .site-header {
  border-bottom-color: rgba(59, 42, 34, 0.1);
}

.editorial-page-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: clamp(64px, 8vw, 112px) 0;
  background:
    radial-gradient(circle at 78% 24%, rgba(221, 232, 213, 0.9), transparent 25rem),
    linear-gradient(135deg, #fffaf2 0%, #f6e6cf 58%, #edf3e9 100%);
}

.editorial-page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    repeating-linear-gradient(135deg, rgba(59, 42, 34, 0.025) 0 1px, transparent 1px 22px),
    linear-gradient(90deg, transparent 0 64%, rgba(255, 255, 255, 0.32) 64% 64.1%, transparent 64.1%);
  pointer-events: none;
}

.editorial-page-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.4fr);
  gap: clamp(44px, 7vw, 92px);
  align-items: end;
}

.editorial-page-hero-copy {
  max-width: 760px;
}

.editorial-page-hero .eyebrow {
  margin-bottom: 18px;
}

.editorial-page-hero h1 {
  max-width: 740px;
  font-size: clamp(3.4rem, 7vw, 6.4rem);
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: -0.045em;
}

.editorial-page-hero-copy > p:last-child {
  max-width: 650px;
  margin: 26px 0 0;
  color: var(--color-text-muted);
  font-size: clamp(1.06rem, 1.6vw, 1.22rem);
  line-height: 1.7;
}

.page-hero-summary {
  position: relative;
  padding: 26px;
  border: 1px solid rgba(59, 42, 34, 0.14);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.68);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(12px);
}

.page-hero-summary::before {
  content: "";
  position: absolute;
  top: 26px;
  right: 26px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-sage-strong);
  box-shadow: 0 0 0 7px rgba(63, 104, 71, 0.1);
}

.page-hero-summary strong {
  display: block;
  color: var(--color-brand);
  font-size: 3.5rem;
  font-weight: 600;
  line-height: 1;
}

.page-hero-summary > span {
  display: block;
  margin-top: 8px;
  color: var(--color-text-muted);
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.page-hero-summary ul {
  display: grid;
  gap: 10px;
  margin: 22px 0 0;
  padding: 18px 0 0;
  border-top: 1px solid var(--color-border);
  list-style: none;
}

.page-hero-summary li {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--color-text-muted);
}

.page-hero-summary li::before {
  content: "";
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-accent);
}

/* Blog */

.blog-page .section-light {
  background: transparent;
}

.blog-page .section-heading {
  max-width: 760px;
}

.blog-page .section-heading h2,
.about-page .section-heading h2,
.article-page .section-heading h2 {
  font-size: clamp(2.5rem, 5vw, 4.35rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.035em;
}

.filter-label-row {
  display: flex;
  gap: 20px;
  align-items: end;
  justify-content: space-between;
  margin: 38px 0 14px;
}

.filter-label-row p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.blog-page .filter-bar {
  width: fit-content;
  max-width: 100%;
  margin: 0 0 42px;
  padding: 7px;
  border: 1px solid rgba(59, 42, 34, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow-soft);
}

.blog-page .filter-button {
  min-height: 44px;
  gap: 8px;
  padding-inline: 16px;
}

.filter-count {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(59, 42, 34, 0.08);
  font-size: 0.75rem;
  line-height: 1;
}

.filter-button.is-active .filter-count {
  background: rgba(255, 255, 255, 0.2);
}

.mobile-scroll-hint {
  display: none;
}

.blog-page .blog-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.page-editorial .post-card {
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 38px rgba(59, 42, 34, 0.09);
}

.page-editorial .post-card-body {
  padding: 22px;
}

.page-editorial .post-card h3 {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.025em;
}

.page-editorial .post-card p {
  line-height: 1.65;
}

.page-editorial .post-meta {
  padding-top: 16px;
  border-top: 1px solid var(--color-border);
}

/* About */

.about-page .about-layout {
  gap: clamp(48px, 8vw, 104px);
}

.about-page .rich-text {
  font-size: 1.1rem;
  line-height: 1.8;
}

.about-page .rich-text p:first-child {
  color: var(--color-brand);
  font-family: "Newsreader", Georgia, serif;
  font-size: clamp(1.8rem, 3vw, 2.65rem);
  line-height: 1.25;
  letter-spacing: -0.025em;
}

.about-page .image-panel {
  width: 100%;
  max-height: 720px;
  aspect-ratio: 3 / 4;
  align-self: center;
  border-radius: 46% 46% 24px 24px;
}

.about-page .image-panel img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  object-position: 32% 50%;
}

.about-page .section-green {
  background:
    radial-gradient(circle at 86% 10%, rgba(244, 201, 93, 0.2), transparent 22rem),
    linear-gradient(180deg, #edf4e9, #dcebd6);
}

.about-page .value-card {
  min-height: 250px;
  padding: 28px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.72);
}

.about-page .value-card h3 {
  font-family: "Newsreader", Georgia, serif;
  font-size: 1.65rem;
  font-weight: 600;
}

.editorial-principle {
  margin-top: 32px;
  padding: 28px;
  border: 1px solid rgba(59, 42, 34, 0.12);
  border-radius: var(--radius-lg);
  background: var(--color-brand);
  color: #fffaf2;
}

.editorial-principle p {
  margin: 0;
  color: rgba(255, 250, 242, 0.78);
}

.editorial-principle strong {
  display: block;
  margin-bottom: 8px;
  color: #fffaf2;
  font-family: "Newsreader", Georgia, serif;
  font-size: 1.5rem;
}

/* Articles */

.article-page .article-shell {
  position: relative;
  overflow: clip;
  padding-top: 0;
  background:
    radial-gradient(circle at 84% 8%, rgba(221, 232, 213, 0.72), transparent 27rem),
    linear-gradient(180deg, #fffaf2 0 33rem, transparent 33rem);
}

.article-page .article-header {
  position: relative;
  max-width: 980px;
  padding-top: clamp(54px, 7vw, 88px);
  padding-bottom: 52px;
}

.article-page .crumb {
  min-height: 44px;
  align-items: center;
  margin-bottom: 32px;
}

.article-page .article-header h1 {
  max-width: 920px;
  margin-top: 18px;
  font-size: clamp(3.2rem, 7vw, 6.2rem);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.045em;
}

.article-page .article-summary {
  max-width: 760px;
  margin-top: 24px;
  color: var(--color-text-muted);
  font-size: clamp(1.08rem, 2vw, 1.28rem);
  line-height: 1.7;
}

.article-page .article-meta {
  gap: 12px 24px;
  margin-top: 26px;
  color: var(--color-text-muted);
}

.article-page .article-meta > * + * {
  position: relative;
  padding-left: 22px;
}

.article-page .article-meta > * + *::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-accent);
  transform: translateY(-50%);
}

.article-byline {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 18px;
  align-items: center;
  max-width: 720px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(59, 42, 34, 0.14);
}

.article-byline img {
  width: 48px;
  height: 48px;
  border: 1px solid var(--color-border);
  border-radius: 50%;
  background: #fff;
  object-fit: contain;
}

.article-byline-copy {
  display: grid;
  flex: 1;
  min-width: 180px;
}

.article-byline strong {
  color: var(--color-brand);
  font-size: 1.15rem;
  font-weight: 600;
}

.article-byline span {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.editorial-badge {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border: 1px solid rgba(63, 104, 71, 0.22);
  border-radius: 999px;
  background: rgba(221, 232, 213, 0.72);
  color: var(--color-sage-strong) !important;
  font-size: 0.78rem !important;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.article-page .article-main-image {
  width: 100%;
  max-height: 720px;
  border-radius: 30px;
  object-fit: cover;
  box-shadow: 0 28px 70px rgba(59, 42, 34, 0.16);
}

.article-page .article-content {
  padding-top: 58px;
}

.article-page .article-content > p:first-child {
  color: var(--color-brand);
  font-family: "Newsreader", Georgia, serif;
  font-size: 1.45rem;
  line-height: 1.55;
}

.article-page .article-toc {
  border-radius: 20px;
  background: linear-gradient(145deg, #fffefb, #f7ebd9);
}

.article-page .quick-tip {
  border-radius: 24px;
}

.editorial-note {
  margin: 44px 0 28px;
  padding: 28px;
  border: 1px solid rgba(63, 104, 71, 0.24);
  border-radius: 22px;
  background: linear-gradient(145deg, #f5f9f2, #e6f0e1);
}

.article-content .editorial-note h2 {
  margin: 0 0 12px;
  padding: 0;
  font-size: 1.65rem;
}

.article-content .editorial-note h2::before {
  display: none;
}

.article-content .editorial-note p:last-child {
  margin-bottom: 0;
}

.article-page .related-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.article-page .section-light {
  background: linear-gradient(180deg, rgba(255, 253, 248, 0.2), rgba(245, 231, 210, 0.5));
}

@media (max-width: 920px) {
  .editorial-page-hero-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .page-hero-summary {
    max-width: 520px;
  }

  .blog-page .blog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .about-page .image-panel {
    max-width: 720px;
    max-height: none;
    aspect-ratio: 4 / 3;
    margin-inline: auto;
  }
}

@media (max-width: 780px) {
  .editorial-page-hero {
    padding: 56px 0 64px;
  }

  .editorial-page-hero h1,
  .article-page .article-header h1 {
    font-size: clamp(3rem, 13vw, 4.8rem);
  }

  .filter-label-row {
    margin-top: 28px;
  }

  .blog-page .filter-bar {
    width: calc(100vw - 24px);
    margin-left: calc((100vw - min(100vw - 24px, 1120px)) / -2);
    padding: 7px 12px;
    border-inline: 0;
    border-radius: 0;
    box-shadow: none;
    scrollbar-width: thin;
  }

  .mobile-scroll-hint {
    display: block;
    margin: -28px 0 34px;
    color: var(--color-text-muted);
    font-size: 0.82rem;
  }

  .article-page .article-header {
    padding-bottom: 40px;
  }

  .article-page .article-main-image {
    border-radius: 20px;
  }
}

@media (max-width: 620px) {
  .editorial-page-hero h1,
  .article-page .article-header h1 {
    line-height: 1;
  }

  .page-hero-summary {
    padding: 22px;
  }

  .blog-page .blog-grid,
  .article-page .related-grid {
    grid-template-columns: 1fr;
  }

  .filter-label-row p:last-child {
    display: none;
  }

  .article-page .article-meta > * + * {
    padding-left: 0;
  }

  .article-page .article-meta > * + *::before {
    display: none;
  }

  .article-byline {
    align-items: flex-start;
  }

  .editorial-badge {
    margin-left: 66px;
  }

  .article-page .article-content {
    padding-top: 42px;
  }

  .article-page .article-content > p:first-child {
    font-size: 1.28rem;
  }

  .editorial-note {
    padding: 22px;
  }
}

@media (max-width: 420px) {
  .editorial-page-hero h1 {
    font-size: 2.75rem;
  }

  .article-page .article-header h1 {
    font-size: 2.65rem;
  }

  .page-hero-summary strong {
    font-size: 3rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .page-editorial .post-card,
  .page-editorial .post-card img {
    transition: none !important;
  }
}

/* Blog catalog refresh — 13/07/2026 */
.blog-catalog {
  padding-top: 64px;
}

.blog-page .section-heading {
  max-width: 780px;
  margin-bottom: 0;
}

.blog-page .section-heading h2 {
  font-size: clamp(2.35rem, 4vw, 3.7rem);
  line-height: 1.02;
}

.blog-page .filter-label-row {
  margin-top: 34px;
}

.blog-page .filter-bar {
  width: 100%;
  max-width: none;
  gap: 8px;
  margin-bottom: 34px;
  padding: 10px;
  border-radius: 22px;
}

.blog-page .filter-button {
  flex: 0 0 auto;
  min-height: 42px;
  padding-inline: 14px;
  white-space: nowrap;
}

.blog-page .blog-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
  align-items: stretch;
}

.blog-page .post-card {
  height: 100%;
  overflow: hidden;
  border-radius: 20px;
}

.blog-page .post-image-link {
  flex: 0 0 auto;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--color-surface-warm);
}

.blog-page .post-card img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: cover;
  object-position:
    var(--media-x, 50%)
    var(--media-y, 50%);
}

.article-page .article-main-image {
  object-position:
    var(--media-x, 50%)
    var(--media-y, 50%);
}

.media-focus-upper {
  --media-y: 30%;
}

.blog-page .post-card img.media-contain,
.article-page .article-main-image.media-contain {
  object-fit: contain;
  background: #e4ad2f;
}

.blog-page .post-card-body {
  min-height: 264px;
  padding: 22px;
}

.blog-page .post-card h3 {
  font-size: clamp(1.25rem, 1.7vw, 1.5rem);
  line-height: 1.15;
}

.blog-page .post-card p {
  margin: 11px 0 20px;
}

.blog-page .post-meta {
  margin-top: auto;
}

@media (max-width: 980px) {
  .blog-page .blog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 780px) {
  .blog-catalog {
    padding-top: 52px;
  }

  .blog-page .filter-bar {
    width: 100%;
    margin-left: 0;
    padding: 9px;
    overflow-x: auto;
    flex-wrap: nowrap;
    border-inline: 1px solid rgba(59, 42, 34, 0.1);
    border-radius: 18px;
    box-shadow: var(--shadow-soft);
    overscroll-behavior-inline: contain;
    scroll-snap-type: inline proximity;
  }

  .blog-page .filter-button {
    scroll-snap-align: start;
  }

  .blog-page .mobile-scroll-hint {
    margin: -22px 0 30px;
  }
}

@media (max-width: 640px) {
  .blog-page .blog-grid {
    grid-template-columns: 1fr;
  }

  .blog-page .post-card-body {
    min-height: 0;
    padding: 20px;
  }
}

/* Discovery and reading polish — 20/07/2026 */

.blog-page .blog-tools {
  display: grid;
  gap: 12px;
  margin: 34px 0;
  padding: 14px;
  border: 1px solid rgba(59, 42, 34, 0.1);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-soft);
}

.blog-page .blog-search {
  display: grid;
  gap: 7px;
  margin: 0;
}

.blog-page .blog-search label {
  color: var(--color-brand);
  font-size: 0.88rem;
  font-weight: 800;
}

.blog-page .blog-search-control {
  display: flex;
  min-width: 0;
  min-height: 54px;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  background: var(--color-surface);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.blog-page .blog-search-control:focus-within {
  border-color: var(--color-sage-strong);
  outline: 3px solid var(--color-sage-strong);
  outline-offset: 2px;
}

.blog-page .blog-search-icon {
  display: inline-grid;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin-left: 16px;
  place-items: center;
  color: var(--color-text-muted);
}

.blog-page .blog-search-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.blog-page .blog-search input {
  flex: 1;
  min-width: 0;
  padding: 12px 4px;
  border: 0;
  background: transparent;
  color: var(--color-text);
}

.blog-page .blog-search input:focus-visible {
  outline: 0;
}

.blog-page .blog-search input::placeholder {
  color: var(--color-text-muted);
  opacity: 0.78;
}

.blog-page .blog-search input::-webkit-search-cancel-button {
  appearance: none;
}

.blog-page .blog-search-clear {
  flex: 0 0 auto;
  min-height: 42px;
  margin-right: 5px;
  padding: 8px 13px;
  border: 1px solid rgba(63, 104, 71, 0.22);
  border-radius: 12px;
  background: var(--color-sage);
  color: var(--color-sage-strong);
  font-weight: 800;
}

.blog-page .blog-search-clear:hover,
.blog-page .blog-search-clear:focus-visible {
  border-color: var(--color-sage-strong);
  background: #edf4e8;
}

.blog-page .blog-search > p {
  margin: 0 4px;
  color: var(--color-text-muted);
  font-size: 0.84rem;
}

.blog-page .blog-tools .filter-label-row {
  margin: 6px 4px 0;
}

.blog-page .blog-tools .filter-bar {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.blog-page .empty-state {
  display: grid;
  width: 100%;
  min-height: 132px;
  margin: 8px 0 0;
  padding: 28px;
  place-items: center;
  border: 1px dashed rgba(63, 104, 71, 0.42);
  border-radius: 20px;
  background: linear-gradient(145deg, #fffefb, #f1f6ed);
  box-shadow: none;
  color: var(--color-text-muted);
  font-weight: 700;
  text-align: center;
}

.blog-page .empty-state[hidden] {
  display: none;
}

.article-page .article-toc a {
  width: 100%;
  min-height: 44px;
  padding: 7px 10px;
  border-radius: 10px;
  transition: background-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.article-page .article-toc a[aria-current="location"] {
  background: rgba(221, 232, 213, 0.82);
  color: var(--color-brand);
  box-shadow: inset 3px 0 0 var(--color-sage-strong);
  text-decoration-thickness: 2px;
}

.article-page .article-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  max-width: 720px;
  margin: 28px 0 0;
  padding: 14px;
  border: 1px solid var(--color-border);
  border-radius: 18px;
  background: linear-gradient(145deg, #fffefb, #f7ebd9);
}

.article-page .article-actions-label {
  flex: 1 1 180px;
  color: var(--color-brand);
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.3;
}

.article-page .article-action {
  display: inline-flex;
  flex: 0 0 auto;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 9px 14px;
  border: 1px solid rgba(59, 42, 34, 0.2);
  border-radius: 999px;
  background: var(--color-surface);
  color: var(--color-accent-hover);
  font-weight: 800;
  line-height: 1.1;
  transition: border-color 180ms ease, background-color 180ms ease, color 180ms ease;
}

.article-page .article-action:hover,
.article-page .article-action:focus-visible {
  border-color: var(--color-accent);
  background: var(--color-surface-warm);
  color: var(--color-brand);
}

.article-page .article-actions-status {
  flex: 1 1 100%;
  min-height: 1.45em;
  margin: 0;
  color: var(--color-sage-strong);
  font-size: 0.86rem;
  font-weight: 700;
}

.article-page .article-actions-status:empty {
  min-height: 0;
}

@media (max-width: 780px) {
  .blog-page .blog-tools {
    margin: 28px 0 30px;
    padding: 10px;
    border-radius: 18px;
  }

  .blog-page .blog-tools .filter-bar {
    width: 100%;
    margin: 0;
    padding: 0 0 4px;
    overflow-x: auto;
    flex-wrap: nowrap;
    border: 0;
    box-shadow: none;
  }

  .blog-page .blog-tools .mobile-scroll-hint {
    margin: 0 4px;
  }

  .blog-page .blog-search input {
    font-size: 1rem;
  }
}

@media (max-width: 620px) {
  .blog-page .blog-search-control {
    min-height: 52px;
  }

  .blog-page .blog-search-icon {
    margin-left: 13px;
  }

  .blog-page .empty-state {
    min-height: 112px;
    padding: 22px 18px;
  }

  .article-page .article-actions {
    padding: 12px;
  }

  .article-page .article-actions-label,
  .article-page .article-actions-status {
    flex-basis: 100%;
  }

  .article-page .article-action {
    flex: 1 1 132px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .blog-page .blog-search-control,
  .blog-page .blog-search-clear,
  .article-page .article-toc a,
  .article-page .article-action {
    transition: none;
  }
}
