/* Matiku & Associates — Custom styles (Tailwind handles layout) */
:root {
  --emerald-700: #17624A;
  --gold-500: #C5A247;
  --porcelain-050: #FAFAF9;
  --porcelain-100: #F5F5F4;
  --ink-900: #0F172A;
}

/* Base (sub-pages without Tailwind body classes) */
body {
  margin: 0;
  font-family: Manrope, system-ui, sans-serif;
  color: #0F172A;
  background: #FAFAF9;
  line-height: 1.6;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
}
.skip-link:focus {
  left: 1rem;
  top: 1rem;
  background: #fff;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  z-index: 9999;
  box-shadow: 0 10px 20px rgb(15 23 42 / 0.15);
}

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

/* Scroll reveal — default hidden states */
[data-reveal="fade-up"] {
  opacity: 0;
  transform: translateY(1.5rem);
  transition: opacity 700ms ease-out, transform 700ms ease-out;
}
[data-reveal="fade"] {
  opacity: 0;
  transition: opacity 700ms ease-out;
}
[data-reveal="scale"] {
  opacity: 0;
  transform: scale(0.98);
  transition: opacity 700ms ease-out, transform 700ms ease-out;
}

[data-reveal].revealed,
[data-reveal="fade-up"].revealed,
[data-reveal="fade"].revealed,
[data-reveal="scale"].revealed {
  opacity: 1;
  transform: translateY(0) scale(1);
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal],
  [data-reveal].revealed {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Hero slider */
.hero__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 600ms ease-out;
}
.hero__slide.is-active {
  opacity: 1;
}

.hero__dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background: #e7e5e4;
  border: 0;
  padding: 0;
  cursor: pointer;
  transition: background 0.2s ease;
}
.hero__dot[aria-selected="true"] {
  background: var(--emerald-700);
}

/* Star CTA button — subtle gold accent on hover */
.btn-star-cta {
  position: relative;
  overflow: hidden;
}
.btn-star-cta::before {
  content: "✦";
  position: absolute;
  top: 50%;
  left: 20%;
  font-size: 0.5em;
  color: rgba(197, 162, 71, 0.4);
  transform: translateY(-50%);
  transition: transform 0.3s ease, left 0.3s ease;
  pointer-events: none;
}
.btn-star-cta::after {
  content: "✦";
  position: absolute;
  top: 50%;
  right: 20%;
  font-size: 0.5em;
  color: rgba(197, 162, 71, 0.4);
  transform: translateY(-50%);
  transition: transform 0.3s ease, right 0.3s ease;
  pointer-events: none;
}
.btn-star-cta:hover::before,
.btn-star-cta:focus::before {
  left: 15%;
  transform: translateY(-50%) scale(1.2);
  color: rgba(197, 162, 71, 0.7);
}
.btn-star-cta:hover::after,
.btn-star-cta:focus::after {
  right: 15%;
  transform: translateY(-50%) scale(1.2);
  color: rgba(197, 162, 71, 0.7);
}
.btn-star-cta:hover,
.btn-star-cta:focus {
  box-shadow: 0 8px 24px -4px rgb(23 98 74 / 0.25);
}

/* Mobile nav */
@media (max-width: 767px) {
  .nav {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: fixed;
    top: 4.5rem;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid #e7e5e4;
    transform: translateY(-120%);
    transition: transform 0.3s ease;
    padding: 1rem;
    z-index: 999;
    box-shadow: 0 10px 25px rgb(0 0 0 / 0.08);
  }
  .nav.is-open {
    transform: translateY(0);
  }
  .nav__list {
    flex-direction: column;
    margin-bottom: 0.5rem;
  }
  .nav__cta {
    flex-direction: column;
  }
}

@media (min-width: 768px) {
  .nav {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
    position: static;
    transform: none;
    padding: 0;
    box-shadow: none;
    background: transparent;
    border: none;
  }
}

/* Nav link active indicator */
.nav__link.is-active::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -2px;
  height: 3px;
  background: var(--emerald-700);
  transform-origin: center;
}
@media (prefers-reduced-motion: no-preference) {
  .nav__link.is-active::before {
    animation: growTick 0.3s ease-out forwards;
  }
}
@keyframes growTick {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

/* Nav toggle hamburger → X */
.nav__toggle.is-open .nav__bar:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}
.nav__toggle.is-open .nav__bar:nth-child(2) {
  opacity: 0;
}
.nav__toggle.is-open .nav__bar:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* FAQ accordion — chevron */
.faq__q::after {
  content: "▸";
  font-size: 1.1rem;
  color: var(--emerald-700);
  flex-shrink: 0;
  margin-left: 0.5rem;
  transition: transform 0.3s ease;
}
.faq__q[aria-expanded="true"]::after {
  transform: rotate(90deg);
}

/* FAQ answer */
.faq__a[hidden] {
  display: none;
}
.faq__a:not([hidden]) {
  margin-top: 0.5rem;
  animation: faqReveal 0.3s ease-out;
}
@keyframes faqReveal {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Honeypot (form spam trap) */
.hp {
  position: absolute;
  left: -9999px;
}

/* Contact list SVG icons */
#contact [aria-hidden="true"] svg {
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .btn-star-cta::before,
  .btn-star-cta::after,
  .nav__bar,
  .nav__toggle.is-open .nav__bar,
  .faq__q::after,
  .why-card,
  .practice-card {
    transition: none;
  }
  .why-card:hover,
  .practice-card:hover {
    transform: none;
  }
  .nav__link.is-active::before {
    animation: none;
  }
  html {
    scroll-behavior: auto;
  }
}

/* ── Sub-pages (news, gallery, etc.) — layout fallbacks ───────────────── */
.container {
  width: min(100% - 2rem, 72rem);
  margin-inline: auto;
}
.page-hero {
  padding: 3rem 0;
  background: #fff;
  border-bottom: 1px solid #e7e5e4;
}
.page-hero__lead {
  color: #334155;
  margin-top: 0.5rem;
  max-width: 50ch;
}
.section-title {
  font-family: "Source Serif 4", serif;
  font-size: clamp(1.5rem, 1.3rem + 1.2vw, 2.25rem);
  color: #0F172A;
  margin: 0 0 1rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
}
.btn--ghost {
  color: var(--emerald-700);
  border-color: var(--emerald-700);
}
.btn--ghost:hover { background: rgba(23, 98, 74, 0.08); }
.btn--primary {
  background: var(--emerald-700);
  color: #fff;
  border-color: var(--emerald-700);
}
.btn--primary:hover { background: #134e3a; color: #fff; }
.btn--outline {
  background: transparent;
  color: var(--emerald-700);
  border-color: var(--emerald-700);
}
.btn--outline:hover { background: rgba(23, 98, 74, 0.08); }
.btn--sm { padding: 0.35rem 0.6rem; font-size: 0.875rem; }
.btn.is-active { background: var(--emerald-700); color: #fff; border-color: var(--emerald-700); }
.news-filters { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.news-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) { .news-grid { grid-template-columns: repeat(3, 1fr); } }
.news-card {
  background: #fff;
  border: 1px solid #e7e5e4;
  border-radius: 1rem;
  overflow: hidden;
}
.news-card__img-wrap { position: relative; aspect-ratio: 16/9; max-height: 200px; overflow: hidden; }
.news-card__img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.news-card__body { padding: 1.5rem; }
.news-card__cat { font-size: 0.875rem; color: var(--emerald-700); font-weight: 600; }
.news-card__title { font-size: 1.25rem; margin: 0 0 0.5rem; text-align: left; }
.news-card__excerpt { color: #334155; font-size: 0.875rem; margin: 0 0 1rem; line-height: 1.6; text-align: justify; }
.news-card__read-more { display: inline-block; margin-bottom: 0.75rem; }
.news-card__date { font-size: 0.875rem; color: #334155; }
@media (max-width: 767px) {
  .news-card__body { padding: 1rem; }
  .news-card__excerpt { max-width: 65ch; }
  .news-card__img-wrap { max-height: 180px; }
}
.gallery-section { padding: 3rem 0; }
.gallery-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.gallery-card {
  background: #fff;
  border: 1px solid #e7e5e4;
  border-radius: 1rem;
  overflow: hidden;
}
.gallery-card__img-wrap {
  position: relative;
  overflow: hidden;
  background: #f5f5f4;
  aspect-ratio: 4/3;
}
.gallery-card__img-wrap a {
  display: block;
  height: 100%;
}
.gallery-card__img-wrap img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}
.gallery-card__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.6), transparent 50%);
  display: flex; align-items: flex-end; padding: 1rem;
  opacity: 0; transition: opacity 0.2s;
}
.gallery-card:hover .gallery-card__overlay { opacity: 1; }
.gallery-card__caption { color: #fff; font-size: 0.875rem; }
.gallery-card__cat { padding: 0.5rem 1rem; font-size: 0.875rem; color: #334155; margin: 0; }
.pagination-wrap { margin-top: 2rem; }
.pagination__list { display: flex; gap: 0.5rem; list-style: none; padding: 0; margin: 0; }
.pagination__link {
  display: inline-block;
  padding: 0.5rem 0.75rem;
  border: 1px solid #e7e5e4;
  border-radius: 0.5rem;
  color: #0F172A;
  text-decoration: none;
}
.pagination__link:hover { border-color: var(--emerald-700); color: var(--emerald-700); }
.pagination__link--active { background: var(--emerald-700); border-color: var(--emerald-700); color: #fff; }
.text-muted { color: #334155; }
.lightbox-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.9);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999; padding: 2rem;
}
.lightbox-content { max-width: 90vw; max-height: 90vh; }
.lightbox-content img { max-width: 100%; max-height: 90vh; object-fit: contain; }
.lightbox-close {
  position: absolute; top: 1rem; right: 1rem;
  background: transparent; border: 0; color: #fff;
  font-size: 2rem; cursor: pointer; padding: 0.5rem;
}
.article-detail { padding: 3rem 0; }
.article-detail__inner { max-width: 52rem; margin-inline: auto; padding-inline: 1rem; }
.article-detail__header { margin-bottom: 2rem; }
.article-detail__cat { display: inline-block; font-size: 0.875rem; color: var(--emerald-700); font-weight: 600; margin-bottom: 0.5rem; }
.article-detail__title { font-size: clamp(1.875rem, 1.6rem + 1.8vw, 2.25rem); margin: 0 0 0.5rem; font-family: "Source Serif 4", serif; }
.article-detail__standfirst { font-size: 1.125rem; line-height: 1.6; color: #334155; margin: 0 0 1rem; text-align: justify; }
.article-detail__meta { font-size: 0.875rem; color: #334155; }
.article-detail__meta time { margin-left: 1rem; }
.article-detail__img { margin-bottom: 2rem; border-radius: 1rem; overflow: hidden; height: 280px; max-width: 36rem; margin-inline: auto; }
.article-detail__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.article-detail__download { margin-bottom: 2rem; }
.article-detail__download-btn { display: inline-block; }
.article-detail__body.prose { line-height: 1.75; text-align: justify; }

@media (max-width: 767px) {
  .article-detail { padding: 2rem 0; }
  .article-detail .container { width: min(100% - 2rem, 72rem); }
  .article-detail__inner { padding-inline: 1.25rem; margin-inline: auto; }
  .article-detail__img { height: 200px; max-width: none; }
  .article-detail__header { margin-bottom: 1.5rem; }
  .article-detail__standfirst { font-size: 1rem; }
  .article-detail__download { margin-bottom: 1.5rem; }
  .article-detail__download-btn { display: block; width: 100%; text-align: center; padding: 0.75rem 1rem; }
  .judgment-section { padding-left: 1rem; margin-bottom: 0.5rem; }
  .judgment-brief { gap: 1.5rem; }
  .article-detail__footer { margin-top: 2rem; padding-top: 1.25rem; }
}
.article-detail__body.prose p { margin: 0 0 1rem; }
.article-detail__footer { margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid #e7e5e4; }

/* Judgment brief structure */
.judgment-brief { display: flex; flex-direction: column; gap: 1.75rem; }
.judgment-section { border-left: 3px solid var(--emerald-700); padding-left: 1.25rem; }
.judgment-section__title { font-size: 1rem; font-weight: 700; color: var(--emerald-700); margin: 0 0 0.5rem; text-transform: uppercase; letter-spacing: 0.04em; }
.judgment-section__content { font-size: 1rem; line-height: 1.75; color: #334155; text-align: justify; }
.judgment-section__content p { margin: 0 0 0.5rem; }
.alert { padding: 1rem 1.5rem; border-radius: 1rem; margin-bottom: 1rem; }
.alert--success { background: #d1fae5; border: 1px solid #6ee7b7; color: #065f46; }
.alert--danger { background: #fee2e2; border: 1px solid #fca5a5; color: #991b1b; }

/* ── Admin Login Page (Matiku branding) ───────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: repeating-linear-gradient(45deg, #92c9b1, #92c9b1 20px, #b3e0d2 20px, #b3e0d2 40px);
  padding: 1.25rem;
}
.login-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}
.login-container {
  max-width: 350px;
  width: 100%;
  background: linear-gradient(180deg, #fff 0%, var(--porcelain-050) 100%);
  border-radius: 40px;
  padding: 25px 35px;
  border: 5px solid #fff;
  box-shadow: rgba(23, 98, 74, 0.25) 0 30px 30px -20px;
}
.login-container__logo {
  display: block;
  width: 100%;
  max-width: 200px;
  height: auto;
  margin: 0 auto 1.25rem;
}
.login-heading {
  text-align: center;
  font-weight: 900;
  font-size: 1.875rem;
  font-family: "Source Serif 4", serif;
  color: var(--emerald-700);
}
.login-sub {
  text-align: center;
  font-size: 0.875rem;
  color: #64748b;
  margin: 0 0 1rem;
}
.login-form {
  margin-top: 1.25rem;
}
.login-form .input {
  width: 100%;
  box-sizing: border-box;
  background: #fff;
  border: none;
  padding: 15px 20px;
  border-radius: 20px;
  margin-top: 15px;
  box-shadow: rgba(23, 98, 74, 0.08) 0 10px 10px -5px;
  border-inline: 2px solid transparent;
  font-family: Manrope, system-ui, sans-serif;
  font-size: 1rem;
}
.login-form .input::placeholder {
  color: #a3a3a3;
}
.login-form .input:focus {
  outline: none;
  border-inline-color: var(--emerald-700);
}
.login-form .login-button {
  display: block;
  width: 100%;
  font-weight: 700;
  font-family: Manrope, system-ui, sans-serif;
  font-size: 1rem;
  background: linear-gradient(135deg, var(--emerald-700) 0%, #1e7a5e 100%);
  color: #fff;
  padding: 15px;
  margin: 20px auto 0;
  border-radius: 20px;
  box-shadow: rgba(23, 98, 74, 0.3) 0 20px 10px -15px;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}
.login-form .login-button:hover {
  transform: scale(1.02);
  box-shadow: rgba(23, 98, 74, 0.35) 0 23px 10px -20px;
}
.login-form .login-button:active {
  transform: scale(0.98);
  box-shadow: rgba(23, 98, 74, 0.25) 0 15px 10px -10px;
}
.login-back {
  display: block;
  text-align: center;
  margin-top: 1.25rem;
}
.login-back a {
  text-decoration: none;
  color: var(--emerald-700);
  font-size: 0.875rem;
  font-weight: 500;
}
.login-back a:hover {
  text-decoration: underline;
}
.login-container .alert--danger {
  margin-top: 1rem;
}
@media (prefers-reduced-motion: reduce) {
  .login-form .login-button {
    transition: none;
  }
  .login-form .login-button:hover,
  .login-form .login-button:active {
    transform: none;
  }
}
