/* Buttons, section headers, hex shapes, cards, forms, pagination. */

/* Hexagon clip used all over */
.hex-clip, .tag-hex, .m-hex, .live-hex, .feature-icon {
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 16px 32px;
  border-radius: var(--radius);
  font-size: 0.95rem; font-weight: 600; line-height: 1;
  text-decoration: none; cursor: pointer; border: 0;
  transition: transform var(--dur) ease, box-shadow var(--dur) ease, background var(--dur) ease, color var(--dur) ease, border-color var(--dur) ease;
  position: relative; overflow: hidden; white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; transition: transform var(--dur); flex: none; }
/* White on brand orange measures 2.9:1 (below AA); kept by design decision 2026-10-01. A deeper orange (#BA4F17) would pass at 5.0:1 if that changes. */
.btn-primary { background: var(--orange); color: #fff; }
.btn-primary::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent);
  transform: translateX(-100%); transition: transform 0.5s ease;
}
.btn-primary:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 8px 30px rgba(232, 122, 62, 0.35); }
.btn-primary:hover::before { transform: translateX(0); }
.btn-primary:hover svg { transform: translateX(3px); }
.btn-secondary { background: transparent; color: var(--navy); border: 1.5px solid rgba(27, 58, 92, 0.18); padding-block: 14.5px; }
.btn-secondary:hover { border-color: var(--teal-text); color: var(--teal-text); background: rgba(91, 164, 201, 0.06); }
.section--dark .btn-secondary { color: var(--text-light); border-color: rgba(247, 248, 250, 0.25); }
.section--dark .btn-secondary:hover { color: var(--teal-light); border-color: var(--teal-light); }
.btn-nav { background: var(--navy); color: var(--text-light); padding: 10px 24px; border-radius: var(--radius-sm); font-size: 0.85rem; }
.btn-nav:hover { background: var(--orange); color: #fff; transform: translateY(-1px); box-shadow: 0 4px 20px rgba(232, 122, 62, 0.3); }

/* Section header */
.section-header { max-width: 700px; margin-bottom: 72px; }
.section-header--center { margin-inline: auto; text-align: center; }
.section-header--center .section-tag { justify-content: center; }
.section-tag {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--navy); margin-bottom: 16px;
}
.tag-hex { width: 14px; height: 14px; background: var(--orange); flex: none; }
.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 3.2rem);
  font-weight: 700; letter-spacing: -0.03em; line-height: 1.1;
  margin-bottom: 16px; color: var(--navy-deep);
}
.section-title--sm { font-size: clamp(1.6rem, 2.5vw, 2.2rem); }
.section-sub { font-size: 1.05rem; color: var(--muted); line-height: 1.7; }
.section--dark .section-tag { color: var(--orange-glow); } /* 6.1:1 on navy-deep */
.section--dark .tag-hex { background: var(--orange-glow); }
.section--dark .section-title { color: var(--text-light); }
.section--dark .section-sub { color: rgba(247, 248, 250, 0.72); }
.section--page-header .section-header { margin-bottom: 0; max-width: 820px; }

/* Scroll reveal (JS adds .visible; no JS = visible) */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out); }
.reveal.visible, .no-js .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* Feature cards (features, child pages) */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.section--features.cols-2 .features-grid { grid-template-columns: repeat(2, 1fr); }
.section--features.cols-4 .features-grid { grid-template-columns: repeat(4, 1fr); }
/* 4 columns with exactly 5 cards: lay out 3 + 2, centred, at the normal 4-column card width */
@media (min-width: 1025px) {
  .section--features.cols-4 .features-grid:has(> :nth-child(5):last-child) {
    display: flex; flex-wrap: wrap; justify-content: center;
    max-width: calc((100% - 72px) * 3 / 4 + 48px); margin-inline: auto;
  }
  .section--features.cols-4 .features-grid:has(> :nth-child(5):last-child) > .feature-card { flex: 0 0 calc((100% - 48px) / 3); }
  .section--features.cols-4 .features-grid:has(> :nth-child(5):last-child) > .feature-card:nth-child(4)::before { background: var(--teal); }
}
.feature-card {
  display: block; background: #fff; border-radius: var(--radius-xl); padding: 36px;
  border: 1px solid rgba(15, 33, 55, 0.05);
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out), border-color 0.4s;
  position: relative; overflow: hidden; text-decoration: none; color: inherit;
}
.feature-card::before {
  content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 3px;
  transform: scaleX(0); transform-origin: left; transition: transform 0.4s ease;
  background: var(--orange);
}
.feature-card:nth-child(4n+2)::before { background: var(--teal); }
.feature-card:nth-child(4n+3)::before { background: var(--green); }
.feature-card:nth-child(4n+4)::before { background: var(--navy); }
.feature-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-card); border-color: rgba(27, 58, 92, 0.1); color: inherit; }
.feature-card:hover::before { transform: scaleX(1); }
.feature-icon {
  width: 52px; height: 52px; display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px; font-size: 1.2rem; transition: transform var(--dur), background var(--dur);
  background: var(--orange-10);
}
.feature-icon img { width: 26px; height: 26px; object-fit: contain; }
.feature-card:nth-child(4n+2) .feature-icon { background: var(--teal-12); }
.feature-card:nth-child(4n+3) .feature-icon { background: var(--green-12); }
.feature-card:nth-child(4n+4) .feature-icon { background: var(--navy-08); }
.feature-card:hover .feature-icon { transform: scale(1.08); color: #fff; background: var(--orange); }
.feature-card:nth-child(4n+2):hover .feature-icon { background: var(--teal); }
.feature-card:nth-child(4n+3):hover .feature-icon { background: var(--green); }
.feature-card:nth-child(4n+4):hover .feature-icon { background: var(--navy); }
.feature-name { font-size: 1.1rem; font-weight: 700; margin-bottom: 10px; color: var(--navy-deep); letter-spacing: -0.01em; }
.feature-desc { font-size: 0.88rem; color: var(--muted); line-height: 1.65; }
.feature-card__thumb { margin: -36px -36px 24px; aspect-ratio: 16 / 10; overflow: hidden; }
.feature-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.feature-card__more { display: inline-flex; align-items: center; gap: 6px; margin-top: 18px; font-size: 0.85rem; font-weight: 600; color: var(--orange-text); }
.feature-card__more svg { width: 14px; height: 14px; }

/* Check list (media-text bullets) */
.check-list { margin-top: 1.5rem; display: grid; gap: 0.75rem; }
.check-list li { position: relative; padding-left: 2rem; font-size: 0.98rem; }
.check-list li::before {
  content: ''; position: absolute; left: 0; top: 0.2em; width: 1.1em; height: 1.1em;
  background: var(--green); clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}
.check-list li::after {
  content: ''; position: absolute; left: 0.32em; top: 0.42em; width: 0.45em; height: 0.25em;
  border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg);
}

/* Post cards */
.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.post-card {
  background: #fff; border-radius: var(--radius-xl); overflow: hidden; display: flex; flex-direction: column;
  border: 1px solid rgba(15, 33, 55, 0.05); transition: transform 0.4s var(--ease-out), box-shadow 0.4s var(--ease-out);
}
.post-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-card); }
.post-card__media { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: linear-gradient(135deg, #EEF2F7, var(--bg)); }
.post-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease-out); }
.post-card:hover .post-card__media img { transform: scale(1.04); }
.post-card__placeholder { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; opacity: 0.35; }
.post-card__body { padding: 24px 28px 28px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.post-card__kicker { display: flex; align-items: center; gap: 12px; font-size: 0.78rem; color: var(--muted); }
.post-cat { font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; font-size: 0.72rem; color: var(--orange-text); text-decoration: none; }
.post-cat:hover { color: var(--navy); }
.post-card__title { font-size: 1.15rem; line-height: 1.3; }
.post-card__title a { color: var(--navy-deep); text-decoration: none; }
.post-card__title a:hover { color: var(--orange-text); }
.post-card__excerpt { font-size: 0.9rem; color: var(--muted); line-height: 1.6; }

/* Pagination */
.pagination { margin-top: 64px; }
.pagination ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.pagination a, .pagination span {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: var(--radius);
  font-size: 0.9rem; font-weight: 600; text-decoration: none; color: var(--navy); background: #fff; border: 1px solid var(--border);
}
.pagination a:hover { border-color: var(--teal-text); color: var(--teal-text); }
.pagination .current { background: var(--navy); color: #fff; border-color: var(--navy); }
.pagination .dots { border: 0; background: none; }

/* Search form */
.search-form { display: flex; gap: 12px; max-width: 520px; }
.search-form label { flex: 1; }
.search-form__input {
  width: 100%; min-height: 50px; padding: 0 18px; border-radius: var(--radius); font: inherit;
  border: 1.5px solid rgba(27, 58, 92, 0.18); background: #fff; color: var(--text);
}
.search-form__input:focus { outline: 0; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(91, 164, 201, 0.2); }

/* Logos */
.logos__heading { text-align: center; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 40px; }
.logos__grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 40px 64px; align-items: center; }
.logos__grid img { max-height: 48px; width: auto; filter: grayscale(1); opacity: 0.6; transition: filter var(--dur), opacity var(--dur); }
.logos__grid li:hover img { filter: none; opacity: 1; }

@media (max-width: 1024px) {
  .features-grid, .section--features.cols-4 .features-grid { grid-template-columns: repeat(2, 1fr); }
  .post-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .features-grid, .section--features.cols-2 .features-grid, .section--features.cols-4 .features-grid, .post-grid { grid-template-columns: 1fr; }
  .section-header { margin-bottom: 48px; }
  .btn { padding: 14px 24px; }
}
