/* The Freelancer Stack — editorial / magazine layer (warm cream UI) */

html {
  scroll-behavior: smooth;
}

/* Headlines feel editorial site-wide inside page content */
main h1,
main h2,
main h3 {
  font-family: "Playfair Display", Georgia, serif;
  color: #1a1a1a;
  font-weight: 600;
}

main p,
main li {
  color: inherit;
}

main a {
  text-underline-offset: 3px;
}

/* Hero: soft lift + CSS-only grain */
.hero-editorial-grain {
  position: relative;
  background-color: #faf7f2;
  background-image: radial-gradient(
      ellipse 130% 90% at 50% -30%,
      rgba(196, 98, 45, 0.09),
      transparent 58%
    ),
    linear-gradient(180deg, #fffdfb 0%, #faf7f2 55%, #f7f1ea 100%);
}

.hero-editorial-grain::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.42;
  pointer-events: none;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.78' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.65'/%3E%3C/svg%3E");
}

.hero-editorial-grain > .relative {
  position: relative;
  z-index: 1;
}

.hero-title {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 700;
  font-size: clamp(2.75rem, 4.6vw, 3.75rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: #1a1a1a;
}

/* Tool reviews: pros / cons markers */
section[aria-labelledby="pros-heading"] ul,
section[aria-labelledby="cons-heading"] ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

section[aria-labelledby="pros-heading"] ul li,
section[aria-labelledby="cons-heading"] ul li {
  position: relative;
  padding-left: 2rem;
}

section[aria-labelledby="pros-heading"] ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.42em;
  width: 1.125rem;
  height: 1.125rem;
  border-radius: 9999px;
  background-color: #e8f3ea;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%232F7D32' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M3.5 8.5 6.5 11.5 13 4.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 12px 12px;
}

section[aria-labelledby="cons-heading"] ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.42em;
  width: 1.125rem;
  height: 1.125rem;
  border-radius: 9999px;
  background-color: #fce8e8;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23C62828' stroke-width='2' stroke-linecap='round' d='M5 5l6 6M11 5 5 11'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 12px 12px;
}

/* Blog index: ruled editorial list (no cards, no shadows) */
.blog-index-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.blog-index-list > li:not(:first-child) {
  border-top: 1px solid #e8e0d5;
  margin-top: 60px;
  padding-top: 60px;
}

/* Categories index: sidebar rule, newspaper columns */
.categories-grid {
  list-style: none;
}

[data-page="categories"] main .categories-card-heading {
  margin: 0;
  padding: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.25;
  color: #1a1a1a;
}

[data-page="categories"] main .categories-card-heading-link {
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  color: inherit;
  text-decoration: none;
}

[data-page="categories"] main .categories-card-heading-link:hover {
  color: #c4622d;
}

.blog-index-article-slot {
  position: relative;
  padding-left: 6.75rem;
}

@media (min-width: 640px) {
  .blog-index-article-slot {
    padding-left: 8.25rem;
  }
}

.blog-index-issue-num {
  position: absolute;
  left: 0;
  top: -0.12em;
  z-index: 0;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 80px;
  font-weight: 600;
  line-height: 0.85;
  letter-spacing: -0.04em;
  color: #e8e0d5;
  user-select: none;
  pointer-events: none;
}

.blog-index-article-slot > .blog-index-article-inner {
  position: relative;
  z-index: 1;
  margin-left: -1.125rem;
}

@media (min-width: 640px) {
  .blog-index-article-slot > .blog-index-article-inner {
    margin-left: -1.5rem;
  }
}

.blog-index-title a {
  text-decoration: none;
}

.blog-index-title a:hover {
  text-decoration: underline;
  text-decoration-color: rgba(196, 98, 45, 0.55);
}

.blog-index-title {
  font-size: 32px;
  line-height: 1.15;
}

/* Professional blog index: 1px hairline grids (gap technique) */
[data-page="blog"] .blog-hairline-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background-color: #e8e0d5;
  border: 1px solid #e8e0d5;
}

@media (min-width: 768px) {
  [data-page="blog"] .blog-hairline-grid.blog-hairline-grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

[data-page="blog"] .blog-hairline-cell {
  background-color: #ffffff;
}

[data-page="blog"] .blog-filter-btn {
  border-radius: 0;
}

[data-page="blog"] .blog-filter-hidden,
[data-page="blog"] .blog-paginated-hidden {
  display: none !important;
}

[data-page="blog"] .blog-load-more[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Blog matrix: flex wrap so incomplete last rows have no phantom columns;
   hairline borders are applied via JS to visible cells only (see site.js). */
[data-page="blog"] .blog-matrix-shell {
  width: 100%;
  box-sizing: border-box;
}

[data-page="blog"] .blog-matrix-grid {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 767.98px) {
  [data-page="blog"] .blog-matrix-grid .blog-matrix-cell {
    flex: 0 0 100%;
    max-width: 100%;
    min-width: 0;
  }
}

@media (min-width: 768px) {
  [data-page="blog"] .blog-matrix-grid .blog-matrix-cell {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
    min-width: 0;
  }
}

[data-page="blog"] .blog-matrix-hair-bl {
  border-left: 1px solid #e8e0d5;
}

[data-page="blog"] .blog-matrix-hair-bt {
  border-top: 1px solid #e8e0d5;
}

[data-page="blog"] .blog-matrix-hair-br {
  border-right: 1px solid #e8e0d5;
}

[data-page="blog"] .blog-matrix-hair-bb {
  border-bottom: 1px solid #e8e0d5;
}

/* Homepage — opinion-led hero headline (longer line fits) */
.home-hero-hook {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 700;
  font-size: clamp(2.15rem, 4.5vw, 3.5rem);
  line-height: 1.14;
  letter-spacing: -0.02em;
  color: #1a1a1a;
}

/* Homepage — ruled newspaper grid (internal dividers only; outer frame from parent) */
.home-newspaper-tools {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  background-color: #ffffff;
}

.home-newspaper-tools > li {
  padding: 1.35rem 1.5rem;
  border-bottom: 1px solid #e8e0d5;
}

.home-newspaper-tools > li:last-child {
  border-bottom: none;
}

@media (min-width: 768px) {
  .home-newspaper-tools {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .home-newspaper-tools > li {
    border-right: 1px solid #e8e0d5;
    border-bottom: 1px solid #e8e0d5;
  }

  .home-newspaper-tools > li:nth-child(3n) {
    border-right: none;
  }

  .home-newspaper-tools > li:nth-last-child(-n + 2) {
    border-bottom: none;
  }
}
