/* ============================================================
   The Wordliners Nigeria – Custom Stylesheet
   Pure CSS enhancements on top of Tailwind
   ============================================================ */

/* ---------- CSS Variables ---------- */
:root {
    --brand-dark: #080c14;
    --brand-card: #111726;
    --brand-card-hover: #172033;
    --brand-accent: #f97316;
    --brand-accent-hover: #ea580c;
    --brand-blue: #3b82f6;
    --brand-purple: #8b5cf6;
    --brand-border: rgba(255, 255, 255, 0.08);
    --brand-glow: rgba(249, 115, 22, 0.15);
    --font-outfit: 'Outfit', system-ui, -apple-system, sans-serif;
    --font-playfair: 'Playfair Display', Georgia, serif;
}

/* ---------- Base & Body ---------- */
html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-outfit);
    background-color: var(--brand-dark);
    background-image:
        radial-gradient(circle at 50% 0%, rgba(249, 115, 22, 0.14) 0%, transparent 55%),
        radial-gradient(circle at 100% 60%, rgba(59, 130, 246, 0.08) 0%, transparent 45%),
        radial-gradient(circle at 0% 100%, rgba(139, 92, 246, 0.08) 0%, transparent 45%);
    background-attachment: fixed;
    color: #f1f5f9;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Selection */
::selection {
    background-color: var(--brand-accent);
    color: #fff;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--brand-dark);
}
::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--brand-accent);
}

/* ---------- Typography Helpers ---------- */
.font-playfair {
    font-family: var(--font-playfair);
}

.gradient-text {
    background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 50%, #f97316 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ---------- Gradient Border Card ---------- */
.gradient-border {
    position: relative;
}
.gradient-border::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(
        135deg,
        rgba(249, 115, 22, 0.45),
        rgba(255, 255, 255, 0.06),
        rgba(59, 130, 246, 0.35)
    );
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: 0;
}

/* ---------- Navigation ---------- */
.nav-blur {
    background: rgba(8, 12, 20, 0.82);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

/* ---------- Buttons & Interactive ---------- */
.btn-accent {
    background: linear-gradient(to right, #f97316, #f59e0b);
    color: #fff;
    font-weight: 800;
    border-radius: 0.75rem;
    transition: all 0.2s ease;
    box-shadow: 0 10px 25px -5px rgba(249, 115, 22, 0.25);
}
.btn-accent:hover {
    background: linear-gradient(to right, #ea580c, #d97706);
    transform: translateY(-2px);
    box-shadow: 0 14px 30px -5px rgba(249, 115, 22, 0.35);
}

.btn-ghost {
    background: var(--brand-card);
    border: 1px solid rgba(249, 115, 22, 0.4);
    color: var(--brand-accent);
    font-weight: 800;
    border-radius: 0.75rem;
    transition: all 0.2s ease;
}
.btn-ghost:hover {
    background: var(--brand-card-hover);
    color: #fbbf24;
    transform: translateY(-2px);
}

/* ---------- Cards ---------- */
.card {
    background: var(--brand-card);
    border: 1px solid var(--brand-border);
    border-radius: 1.5rem;
    transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover {
    background: var(--brand-card-hover);
}

.card-image {
    transition: transform 0.5s ease;
}
.group:hover .card-image {
    transform: scale(1.05);
}

/* ---------- Form Elements ---------- */
input, textarea, select {
    font-family: inherit;
}
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--brand-accent) !important;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15);
}

/* ---------- Animations ---------- */
@keyframes ping {
    75%, 100% {
        transform: scale(2);
        opacity: 0;
    }
}
.animate-ping {
    animation: ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.4);
    }
    50% {
        box-shadow: 0 0 20px 4px rgba(249, 115, 22, 0.25);
    }
}
.pulse-glow {
    animation: pulse-glow 2.5s ease-in-out infinite;
}

/* ---------- Hero Badge ---------- */
.hero-badge {
    background: rgba(17, 23, 38, 0.9);
    border: 1px solid rgba(249, 115, 22, 0.3);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* ---------- Spec Badges ---------- */
.spec-badge {
    background: rgba(17, 23, 38, 0.6);
    border: 1px solid var(--brand-border);
    border-radius: 0.75rem;
    padding: 0.5rem 0.875rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: #94a3b8;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* ---------- Admin Panel Extras ---------- */
.admin-sidebar {
    background: var(--brand-card);
    border-right: 1px solid var(--brand-border);
}

.admin-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    border-radius: 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #94a3b8;
    transition: all 0.15s ease;
}
.admin-nav-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}
.admin-nav-link.active {
    background: rgba(249, 115, 22, 0.2);
    color: var(--brand-accent);
}

/* ---------- Status Pills ---------- */
.pill-published {
    background: rgba(6, 78, 59, 0.5);
    color: #6ee7b7;
}
.pill-draft {
    background: rgba(120, 53, 15, 0.5);
    color: #fcd34d;
}
.pill-archived {
    background: #334155;
    color: #94a3b8;
}

/* ---------- Flash Messages ---------- */
.flash-success {
    background: rgba(6, 78, 59, 0.4);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #6ee7b7;
}
.flash-error {
    background: rgba(127, 29, 29, 0.4);
    border: 1px solid rgba(244, 63, 94, 0.4);
    color: #fda4af;
}

/* ---------- Tables ---------- */
.admin-table th {
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.7rem;
    color: #94a3b8;
}
.admin-table tbody tr {
    transition: background 0.15s ease;
}
.admin-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

/* ---------- Responsive Tweaks ---------- */
@media (max-width: 768px) {
    .gradient-text {
        font-size: clamp(2rem, 8vw, 3.5rem);
    }
}

/* ---------- Print / Accessibility ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus visible for keyboard users */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid var(--brand-accent);
    outline-offset: 2px;
}

/* ---------- Mobile enhancements ---------- */
@media (max-width: 640px) {
  .hero-cta-grid {
    flex-direction: column;
  }
  .hero-cta-grid a {
    width: 100%;
  }
}

/* Touch-friendly nav links */
.mobile-nav-link {
  min-height: 44px;
}

/* Prevent horizontal overflow */
img, video, iframe {
  max-width: 100%;
  height: auto;
}

.instagram-embed iframe {
  max-width: 100% !important;
}

/* Team card image aspect on small screens */
@media (max-width: 640px) {
  .aspect-\[4\/5\] {
    aspect-ratio: 1 / 1;
  }
}

/* ---------- Priority Popup Ads ---------- */
html.wl-popup-open,
body.wl-popup-open {
  overflow: hidden;
}

.wl-popup-root {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.wl-popup-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.wl-popup-dialog {
  position: relative;
  z-index: 1;
  width: min(92vw, 420px);
  max-height: 90vh;
  background: #111726;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1.25rem;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
}

.wl-popup-timer {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 2;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  background: rgba(8, 12, 20, 0.85);
  border: 2px solid #f97316;
  color: #fff;
  font-weight: 800;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wl-popup-skip {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 2;
  background: rgba(8, 12, 20, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
  align-items: center;
  transition: background 0.15s, color 0.15s;
}
.wl-popup-skip:hover {
  background: #f97316;
  color: #fff;
  border-color: #f97316;
}

.wl-popup-media {
  display: block;
  width: 100%;
  background: #080c14;
}

.wl-popup-media img {
  display: block;
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  margin: 0 auto;
}

.wl-popup-title {
  margin: 0;
  padding: 0.75rem 1rem 0.25rem;
  font-size: 0.8rem;
  color: #94a3b8;
  text-align: center;
}

.wl-popup-progress {
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  width: 100%;
}
.wl-popup-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #f97316, #fbbf24);
  transition: width 0.9s linear;
}

@media (max-width: 480px) {
  .wl-popup-dialog {
    width: 96vw;
    border-radius: 1rem;
  }
  .wl-popup-media img {
    max-height: 65vh;
  }
}
