/* ==========================================================================
   YELLOWPRINT THEME — Visual DNA derived from PestKit template
   Color strategy: High-contrast yellow (#FDF001) + near-black (#111)
   Typography: Rounded sans-serif headings, clean sans body
   Layout: Full-width sections, generous padding, dark header/footer
   Distinctive: pill badges, pill buttons with inset hover, two-tone
   decorative backgrounds, rotated shapes, dark overlays
   ========================================================================== */

:root {
  --c-primary: #FDF001;
  --c-primary-soft: #fef44d;
  --c-dark: #111111;
  --c-dark-90: rgba(17,17,17,.9);
  --c-dark-70: rgba(17,17,17,.7);
  --c-secondary: #555555;
  --c-light: #f7f7f5;
  --c-white: #ffffff;
  --c-border: #e0dfd8;
  --c-text: #333333;
  --c-muted: #777777;

  --ff-heading: "Trebuchet MS", "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Tahoma, sans-serif;
  --ff-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --container: 1180px;
  --gap: 2rem;
}

/* ---- RESET & BASE ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--ff-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--c-text);
  background: var(--c-white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color .3s; }

/* ---- LAYOUT ---- */
.wrap {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ---- UTILITY ---- */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); border: 0;
}

/* ---- PILL BADGE (section label) ---- */
.pill-label {
  display: inline-block;
  font-family: var(--ff-heading);
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  padding: .35em 1.1em;
  border: 2px solid var(--c-primary);
  border-radius: 50px;
  color: var(--c-dark);
  margin-bottom: .75rem;
}

/* ---- PILL BUTTON (inset box-shadow hover from source) ---- */
.btn-pill {
  display: inline-block;
  font-family: var(--ff-heading);
  font-size: .85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: .85em 2.2em;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  transition: box-shadow .45s ease, color .45s ease;
  background: var(--c-primary);
  color: var(--c-dark);
  box-shadow: inset 0 0 0 0 var(--c-dark);
}
.btn-pill:hover, .btn-pill:focus-visible {
  box-shadow: inset 260px 0 0 0 var(--c-dark);
  color: var(--c-primary);
}
.btn-pill--outline {
  background: transparent;
  border: 2px solid var(--c-primary);
  color: var(--c-primary);
  box-shadow: inset 0 0 0 0 var(--c-primary);
}
.btn-pill--outline:hover, .btn-pill--outline:focus-visible {
  box-shadow: inset 260px 0 0 0 var(--c-primary);
  color: var(--c-dark);
}
.btn-pill--dark {
  background: var(--c-dark);
  color: var(--c-primary);
  box-shadow: inset 0 0 0 0 var(--c-primary);
}
.btn-pill--dark:hover, .btn-pill--dark:focus-visible {
  box-shadow: inset 260px 0 0 0 var(--c-primary);
  color: var(--c-dark);
}

/* ---- HEADINGS ---- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--ff-heading);
  color: var(--c-dark);
  line-height: 1.2;
}
.section-title {
  font-size: clamp(1.75rem, 3.5vw, 2.6rem);
  font-weight: 800;
  margin-bottom: 1rem;
}

/* ================================================================
   HEADER / NAVIGATION
   Dark bg with yellow brand — mirrors source navbar
   ================================================================ */
.site-header {
  background: var(--c-dark);
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .9rem 0;
}
.site-brand {
  font-family: var(--ff-heading);
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--c-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: .35rem;
}
.site-brand img {
  height: 36px;
  width: auto;
}

/* Desktop nav */
.main-nav { display: flex; align-items: center; gap: 0; }
.main-nav a {
  display: block;
  padding: .75rem 1.1rem;
  color: var(--c-white);
  font-weight: 500;
  font-size: .95rem;
  transition: color .3s;
}
.main-nav a:hover, .main-nav a:focus-visible { color: var(--c-primary); }

/* Hamburger */
.nav-toggle {
  display: none;
  background: var(--c-primary);
  border: 2px solid var(--c-primary);
  border-radius: 6px;
  color: var(--c-dark);
  width: 44px; height: 44px;
  font-size: 1.25rem;
  cursor: pointer;
  align-items: center; justify-content: center;
}
.nav-toggle span { font-size: 1.4rem; line-height: 1; }

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .main-nav {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--c-dark);
    padding: .5rem 1.25rem 1.25rem;
    border-top: 2px solid var(--c-primary);
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: .7rem 0; border-bottom: 1px solid rgba(255,255,255,.08); }
}

/* ================================================================
   HERO — dark overlay on color block, left-aligned text
   Mirrors source carousel caption style
   ================================================================ */
.hero {
  position: relative;
  background: var(--c-dark);
  overflow: hidden;
  padding: 5.5rem 0 5rem;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--c-dark) 55%, var(--c-primary) 55%);
  opacity: .12;
}
.hero__inner {
  position: relative;
  z-index: 2;
  max-width: 720px;
}
.hero .pill-label { border-color: var(--c-primary); color: var(--c-primary); }
.hero__title {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  color: var(--c-white);
  margin-bottom: 1.25rem;
  line-height: 1.15;
}
.hero__subtitle {
  font-size: 1.1rem;
  color: rgba(255,255,255,.75);
  margin-bottom: 2rem;
  line-height: 1.7;
}
.hero__subtitle p { margin-bottom: .5rem; }

/* Decorative rotated shapes (from source rotate-left/right) */
.hero__decor {
  position: absolute;
  width: 180px; height: 70px;
  background: var(--c-primary);
  opacity: .08;
  border-radius: 8px;
  z-index: 1;
}
.hero__decor--1 { top: 12%; right: 5%; transform: rotate(-25deg); }
.hero__decor--2 { bottom: 8%; right: 18%; transform: rotate(15deg); width: 140px; height: 50px; }

/* ================================================================
   TOPICS — two-column asymmetric cards with decorative bg blocks
   Inspired by source's about/service sections
   ================================================================ */
.topics-section {
  padding: 5rem 0;
  background: var(--c-light);
}
.topics-header {
  text-align: center;
  margin-bottom: 3.5rem;
}
.topics-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 600px) {
  .topics-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 960px) {
  .topics-grid { grid-template-columns: 1fr 1fr 1fr; gap: 1.75rem; }
}

/* Topic card — two-tone inner bg (source project-item pattern) */
.topic-card {
  position: relative;
  background: var(--c-white);
  border-radius: 10px;
  overflow: hidden;
  transition: transform .35s ease, box-shadow .35s ease;
}
.topic-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(0,0,0,.1);
}
.topic-card__accent {
  height: 6px;
  background: linear-gradient(90deg, var(--c-primary) 60%, var(--c-dark) 60%);
}
.topic-card__body {
  padding: 2rem 1.75rem 1.75rem;
}
.topic-card__name {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: .65rem;
}
.topic-card__desc {
  font-size: .95rem;
  color: var(--c-secondary);
  line-height: 1.65;
}
.topic-card__desc p { margin-bottom: .4rem; }

/* ================================================================
   LATEST POSTS — editorial blog grid
   ================================================================ */
.posts-section {
  padding: 5rem 0;
  background: var(--c-white);
}
.posts-header {
  text-align: center;
  margin-bottom: 3.5rem;
}
.posts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
@media (min-width: 640px) {
  .posts-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1000px) {
  .posts-grid { grid-template-columns: 1fr 1fr 1fr; }
}

.post-card {
  border-radius: 10px;
  overflow: hidden;
  background: var(--c-white);
  border: 1px solid var(--c-border);
  transition: transform .35s ease, box-shadow .35s ease;
}
.post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 28px rgba(0,0,0,.08);
}
.post-card__image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/10;
  background: var(--c-light);
}
.post-card__image img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.post-card:hover .post-card__image img {
  transform: scale(1.04);
}
.post-card__body {
  padding: 1.5rem 1.5rem 1.25rem;
}
.post-card__date {
  font-size: .8rem;
  font-weight: 600;
  color: var(--c-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: .45rem;
}
.post-card__title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: .6rem;
  line-height: 1.35;
}
.post-card__title a { color: var(--c-dark); }
.post-card__title a:hover { color: var(--c-secondary); }
.post-card__excerpt {
  font-size: .9rem;
  color: var(--c-secondary);
  line-height: 1.6;
}
.post-card__excerpt p { margin-bottom: .3rem; }
/* Bottom bar accent — mirrors source blog-btn primary bar */
.post-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .75rem 1.5rem;
  background: var(--c-primary);
  border-radius: 0 0 10px 10px;
}
.post-card__footer a {
  font-family: var(--ff-heading);
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--c-dark);
}
.post-card__footer a:hover { text-decoration: underline; }

/* ================================================================
   FAQ — accordion with dark header blocks
   Inspired by source's dark bg sections
   ================================================================ */
.faq-section {
  padding: 5rem 0 5.5rem;
  background: var(--c-dark);
  color: var(--c-white);
}
.faq-header {
  text-align: center;
  margin-bottom: 3.5rem;
}
.faq-header .pill-label { border-color: var(--c-primary); color: var(--c-primary); }
.faq-header .section-title { color: var(--c-white); }

.faq-list {
  max-width: 800px;
  margin: 0 auto;
}
.faq-item {
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.faq-item:last-child { border-bottom: none; }
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: none;
  border: none;
  padding: 1.35rem 0;
  font-family: var(--ff-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--c-white);
  cursor: pointer;
  text-align: left;
  transition: color .3s;
}
.faq-question:hover { color: var(--c-primary); }
.faq-question::after {
  content: "+";
  flex-shrink: 0;
  font-size: 1.4rem;
  font-weight: 300;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--c-primary);
  border-radius: 50%;
  color: var(--c-primary);
  transition: transform .3s, background .3s;
}
.faq-item.active .faq-question::after {
  content: "−";
  background: var(--c-primary);
  color: var(--c-dark);
  transform: rotate(180deg);
}
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height .4s ease, padding .4s ease;
  padding: 0 0 0 0;
}
.faq-item.active .faq-answer {
  max-height: 500px;
  padding: 0 0 1.5rem 0;
}
.faq-answer-inner {
  color: rgba(255,255,255,.7);
  font-size: .95rem;
  line-height: 1.7;
}
.faq-answer-inner p { margin-bottom: .5rem; }

/* ================================================================
   FOOTER — dark bg with overlay (source pattern)
   ================================================================ */
.site-footer {
  background: var(--c-dark);
  color: rgba(255,255,255,.65);
  padding: 4rem 0 0;
  border-top: 4px solid var(--c-primary);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  padding-bottom: 3rem;
}
@media (min-width: 640px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
}
.footer-brand {
  font-family: var(--ff-heading);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--c-primary);
  margin-bottom: .75rem;
  display: flex;
  align-items: center;
  gap: .35rem;
}
.footer-brand img { height: 30px; width: auto; }
.footer-tagline {
  font-size: .9rem;
  line-height: 1.65;
  margin-bottom: 1rem;
  color: rgba(255,255,255,.55);
}

.footer-heading {
  font-size: .85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--c-primary);
  margin-bottom: 1.1rem;
}
.footer-links { list-style: none; }
.footer-links li { margin-bottom: .55rem; }
.footer-links a {
  font-size: .9rem;
  color: rgba(255,255,255,.6);
  transition: color .3s;
}
.footer-links a:hover { color: var(--c-primary); }
.footer-email a {
  color: var(--c-primary);
  font-weight: 600;
  word-break: break-all;
}
.footer-email a:hover { text-decoration: underline; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 1.25rem 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  font-size: .82rem;
  color: rgba(255,255,255,.4);
}

/* ================================================================
   PAGE TEMPLATE (about / static pages)
   ================================================================ */
.page-hero {
  background: var(--c-dark);
  padding: 4rem 0 3rem;
  position: relative;
  overflow: hidden;
}
.page-hero::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 5px;
  background: var(--c-primary);
}
.page-hero__title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 800;
  color: var(--c-white);
}
.page-content {
  padding: 3.5rem 0 5rem;
}
.page-content .content-body {
  max-width: 780px;
  margin: 0 auto;
}
.content-body h2 { font-size: 1.55rem; margin: 2rem 0 .75rem; }
.content-body h3 { font-size: 1.25rem; margin: 1.5rem 0 .6rem; }
.content-body p { margin-bottom: 1rem; }
.content-body ul, .content-body ol { margin-bottom: 1rem; padding-left: 1.5rem; }
.content-body li { margin-bottom: .35rem; }
.content-body img { border-radius: 8px; margin: 1.5rem 0; }
.content-body blockquote {
  border-left: 4px solid var(--c-primary);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: var(--c-light);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--c-secondary);
}

/* ================================================================
   BLOG INDEX
   ================================================================ */
.blog-hero {
  background: var(--c-dark);
  padding: 3.5rem 0 2.5rem;
  position: relative;
}
.blog-hero::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 5px;
  background: var(--c-primary);
}
.blog-hero__title {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 800;
  color: var(--c-white);
}
.blog-list-section {
  padding: 3.5rem 0 5rem;
}

/* Pagination — pill style from source */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  margin-top: 3rem;
  flex-wrap: wrap;
}
.pagination a, .pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px; height: 42px;
  padding: .25rem .75rem;
  border-radius: 50px;
  font-family: var(--ff-heading);
  font-size: .9rem;
  font-weight: 700;
  border: 2px solid var(--c-border);
  color: var(--c-dark);
  transition: all .3s;
}
.pagination a:hover {
  border-color: var(--c-primary);
  background: var(--c-primary);
  color: var(--c-dark);
}
.pagination .active {
  background: var(--c-dark);
  border-color: var(--c-dark);
  color: var(--c-primary);
}
.pagination .prev-next {
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .06em;
}

/* ================================================================
   POST PAGE
   ================================================================ */
.post-hero {
  background: var(--c-dark);
  padding: 4rem 0 3rem;
  position: relative;
  overflow: hidden;
}
.post-hero::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 5px;
  background: var(--c-primary);
}
.post-hero__title {
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  font-weight: 800;
  color: var(--c-white);
  margin-bottom: .6rem;
}
.post-hero__date {
  font-size: .85rem;
  font-weight: 600;
  color: var(--c-primary);
  text-transform: uppercase;
  letter-spacing: .08em;
}
.post-content-wrap {
  padding: 3rem 0 5rem;
}
.post-content-wrap .content-body {
  max-width: 780px;
  margin: 0 auto;
}
.post-cover {
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 2rem;
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
}
.post-cover img {
  width: 100%;
  display: block;
}
.post-excerpt {
  font-size: 1.1rem;
  color: var(--c-secondary);
  line-height: 1.7;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid var(--c-primary);
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
}
.post-excerpt p { margin-bottom: .5rem; }

/* ================================================================
   BACK TO TOP (source pattern)
   ================================================================ */
.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--c-primary);
  color: var(--c-dark);
  border: 2px solid var(--c-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s, visibility .3s, box-shadow .3s;
  z-index: 90;
  box-shadow: inset 0 0 0 0 var(--c-dark);
}
.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover {
  box-shadow: inset 60px 0 0 0 var(--c-dark);
  color: var(--c-primary);
}

/* ================================================================
   FOCUS & ACCESSIBILITY
   ================================================================ */
:focus-visible {
  outline: 3px solid var(--c-primary);
  outline-offset: 2px;
}
a:focus:not(:focus-visible) { outline: none; }

/* ================================================================
   ANIMATIONS
   ================================================================ */
@media (prefers-reduced-motion: no-preference) {
  .fade-up {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .6s ease, transform .6s ease;
  }
  .fade-up.visible {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (prefers-reduced-motion: reduce) {
  .fade-up { opacity: 1; transform: none; }
}
