/* ============================================================
   WordSearchZ — site custom styles
   Holds everything that isn't compiled Tailwind or the gallery:
   modernized navigation, the animated mobile menu (cooperates
   with index.js's .hidden toggle — untouched), externalized
   hero backgrounds, the text-glow helper, and v2.2 release bits.
   Loaded AFTER tailwind-index.css so ID-scoped overrides win.
   ============================================================ */

:root { --wsz-nav-h: 4.5rem; }

/* small helper the markup references but Tailwind never defined */
.text-glow { text-shadow: 0 0 24px rgba(74, 222, 128, 0.45); }

/* ------------------------------------------------------------
   Externalized hero backgrounds (were inline style="" attrs)
   ------------------------------------------------------------ */
.hero-glow {
  background:
    radial-gradient(60% 55% at 78% 30%, rgba(34, 197, 94, 0.15) 0%, transparent 60%),
    radial-gradient(45% 45% at 10% 90%, rgba(34, 197, 94, 0.10) 0%, transparent 60%);
}
.hero-grid {
  background-image:
    linear-gradient(rgba(74, 222, 128, 0.2) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74, 222, 128, 0.2) 1px, transparent 1px);
  background-size: 42px 42px;
  -webkit-mask-image: radial-gradient(70% 70% at 50% 40%, #000 0%, transparent 100%);
          mask-image: radial-gradient(70% 70% at 50% 40%, #000 0%, transparent 100%);
}

/* ------------------------------------------------------------
   Modernized navigation
   ------------------------------------------------------------ */
.wsz-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(17, 24, 39, 0.72);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
          backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.wsz-nav.is-scrolled {
  background: rgba(11, 16, 26, 0.92);
  border-bottom-color: rgba(74, 222, 128, 0.28);
  box-shadow: 0 10px 30px -18px rgba(0, 0, 0, 0.9),
              0 1px 0 0 rgba(74, 222, 128, 0.06);
}

.wsz-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--wsz-nav-h);
}

/* desktop links: animated underline reveal */
.wsz-navlink {
  position: relative;
  color: #9ca3af;
  font-weight: 500;
  transition: color 0.2s ease;
}
.wsz-navlink::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.4rem;
  height: 2px;
  width: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, #4ade80, #22c55e);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.wsz-navlink:hover,
.wsz-navlink:focus-visible { color: #f9fafb; }
.wsz-navlink:hover::after,
.wsz-navlink:focus-visible::after { transform: scaleX(1); }

/* Buy Now pill with a soft green halo */
.wsz-nav-cta {
  box-shadow: 0 8px 24px -10px rgba(34, 197, 94, 0.7);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.wsz-nav-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 30px -10px rgba(34, 197, 94, 0.85);
}

/* hamburger / close icon buttons */
.wsz-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.9rem;
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.wsz-icon-btn:hover {
  color: #4ade80;
  border-color: rgba(74, 222, 128, 0.4);
  background: rgba(74, 222, 128, 0.08);
}
.wsz-icon-btn:focus-visible {
  outline: 2px solid #4ade80;
  outline-offset: 2px;
}
/* The base .wsz-icon-btn display would otherwise override Tailwind's
   md:hidden (equal specificity, loaded later), leaking the hamburger
   onto desktop. This ID rule wins and keeps it mobile-only. */
@media (min-width: 768px) {
  #menu-button { display: none; }
}

/* ------------------------------------------------------------
   Mobile menu overlay
   index.js toggles `.hidden`; these ID-scoped rules (specificity
   1,1,0 > .hidden's 0,1,0) animate instead of hard display:none.
   Scoped to the mobile breakpoint so desktop keeps md:hidden.
   ------------------------------------------------------------ */
@media (max-width: 767px) {
  #mobile-menu {
    position: fixed;
    top: var(--wsz-nav-h);
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 45;
    display: block;                 /* override Tailwind .hidden */
    padding: 1.25rem;
    background: rgba(3, 7, 18, 0.97);
    -webkit-backdrop-filter: blur(16px);
            backdrop-filter: blur(16px);
    border-top: 1px solid rgba(74, 222, 128, 0.18);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transition: opacity 0.28s ease, transform 0.28s ease, visibility 0.28s ease;
  }
  #mobile-menu.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-0.6rem);
  }
  #mobile-menu:not(.hidden) {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }

  /* staggered entrance for the links when the menu opens */
  #mobile-menu:not(.hidden) .wsz-m-link {
    animation: wszMenuIn 0.4s both;
  }
  #mobile-menu:not(.hidden) .wsz-m-link:nth-child(1) { animation-delay: 0.04s; }
  #mobile-menu:not(.hidden) .wsz-m-link:nth-child(2) { animation-delay: 0.08s; }
  #mobile-menu:not(.hidden) .wsz-m-link:nth-child(3) { animation-delay: 0.12s; }
  #mobile-menu:not(.hidden) .wsz-m-link:nth-child(4) { animation-delay: 0.16s; }
  #mobile-menu:not(.hidden) .wsz-m-link:nth-child(5) { animation-delay: 0.20s; }
}

@keyframes wszMenuIn {
  from { opacity: 0; transform: translateY(0.5rem); }
  to   { opacity: 1; transform: translateY(0); }
}

/* mobile menu link rows */
.wsz-m-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.1rem;
  border-radius: 1rem;
  color: #e5e7eb;
  font-size: 1.1rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.02);
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.wsz-m-link i { color: #4ade80; opacity: 0.7; transition: transform 0.2s ease; }
.wsz-m-link:hover,
.wsz-m-link:active {
  color: #4ade80;
  background: rgba(74, 222, 128, 0.08);
  border-color: rgba(74, 222, 128, 0.3);
}
.wsz-m-link:hover i { transform: translateX(3px); }

.wsz-m-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1.05rem 1.1rem;
  border-radius: 1rem;
  background: #22c55e;
  color: #030712;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow: 0 12px 30px -12px rgba(34, 197, 94, 0.8);
}
.wsz-m-cta:active { transform: scale(0.99); }

/* ------------------------------------------------------------
   v2.2 release chip (hero)
   ------------------------------------------------------------ */
.wsz-release-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #4ade80;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(74, 222, 128, 0.3);
}
.wsz-release-chip .wsz-tag {
  color: #030712;
  background: #4ade80;
  border-radius: 9999px;
  padding: 0.05rem 0.45rem;
  letter-spacing: 0.08em;
}

@media (prefers-reduced-motion: reduce) {
  .wsz-nav, .wsz-navlink::after, .wsz-nav-cta, #mobile-menu,
  .wsz-m-link, .wsz-icon-btn { transition: none; }
  #mobile-menu:not(.hidden) .wsz-m-link { animation: none; }
}

/* ------------------------------------------------------------
   Footer — responsive multi-column
   ------------------------------------------------------------ */
.wsz-foot { padding: 4rem 0 2rem; }
@media (max-width: 767px) {
  .wsz-foot { padding-bottom: 6rem; }
}

.wsz-foot-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  text-align: left;
  padding-bottom: 2.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
@media (min-width: 640px) {
  .wsz-foot-grid { grid-template-columns: 1fr 1fr; gap: 2.5rem 2rem; }
  .wsz-foot-brand { grid-column: 1 / -1; }        /* brand spans full width */
}
@media (min-width: 1024px) {
  .wsz-foot-grid { grid-template-columns: 1.9fr 1fr 1fr 1fr; gap: 2rem; }
  .wsz-foot-brand { grid-column: auto; }          /* own column on desktop */
}

.wsz-foot-brand { max-width: 32rem; }
.wsz-foot-blurb {
  margin-top: 1rem;
  color: #9ca3af;
  font-size: 0.9rem;
  line-height: 1.7;
  max-width: 30rem;
}

/* free web-app call-to-action */
.wsz-foot-app {
  margin-top: 1.4rem;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 1rem;
  border-radius: 0.9rem;
  color: #d1fae5;
  background: rgba(34, 197, 94, 0.10);
  border: 1px solid rgba(74, 222, 128, 0.3);
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.2s ease, border-color 0.2s ease,
              transform 0.2s ease, color 0.2s ease;
}
.wsz-foot-app svg { width: 1.05rem; height: 1.05rem; color: #4ade80; flex: 0 0 auto; }
.wsz-foot-app:hover {
  background: rgba(34, 197, 94, 0.18);
  border-color: rgba(74, 222, 128, 0.55);
  color: #ffffff;
  transform: translateY(-1px);
}
.wsz-foot-app:focus-visible { outline: 2px solid #4ade80; outline-offset: 2px; }
.wsz-foot-badge {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #04120a;
  background: #4ade80;
  border-radius: 9999px;
  padding: 0.12rem 0.45rem;
}

.wsz-foot-col { display: flex; flex-direction: column; align-items: flex-start; }
.wsz-foot-head {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #6b7280;
  margin-bottom: 0.9rem;
}
.wsz-foot-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0;
  color: #9ca3af;
  font-size: 0.95rem;
  line-height: 1.3;
  transition: color 0.2s ease, transform 0.2s ease;
}
.wsz-foot-link svg { width: 0.85rem; height: 0.85rem; opacity: 0.7; flex: 0 0 auto; }
.wsz-foot-link:hover { color: #4ade80; transform: translateX(2px); }
.wsz-foot-link:focus-visible {
  outline: 2px solid #4ade80; outline-offset: 3px; border-radius: 4px;
}

/* bottom bar */
.wsz-foot-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  padding-top: 2rem;
  text-align: center;
}
.wsz-foot-copy {
  color: #6b7280;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.wsz-foot-owner { color: #6b7280; font-size: 0.85rem; }
@media (min-width: 768px) {
  .wsz-foot-bottom {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
    /* keep the right-hand line clear of the fixed back-to-top button */
    padding-right: 5.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wsz-foot-app, .wsz-foot-link { transition: none; }
}
