/* =============================================================================
   CueArr — "What Is This?" primer page (whatisthis.php).

   Loaded AFTER codex.css, which supplies all the shared chrome: topbar,
   mobile menu, hero scaffolding, .section / .chapter-* headers, .fleet-card,
   .arena-card, .btn / .btn-pill, .torn-edge, footer and .reveal.

   Everything here is a component that only this page uses:
     - the lock-screen phone mockup (scan notifications)
     - the four-step scan flow strip
     - the scan-alert chapter layout
     - the app/dashboard cards
     - the closing parchment scroll
   Cache-busted via ?v= from lang.php's asset_url().
   ============================================================================= */

/* ============ HERO ============ */
/* Slightly shorter than the index hero — this page gets to the point faster. */
.wit-hero { min-height: auto; padding-bottom: clamp(5rem, 10vw, 8rem); }

/* ============ LOCK SCREEN PHONE (hero + scan-alert chapter) ============ */
/* Reuses .hero-phone / __glow / __frame / __notch from codex.css so the
   handset shell is pixel-identical to the one on the index page. */
.wit-lock {
  background: linear-gradient(170deg, #10243d 0%, #071427 45%, #04101f 100%);
  border-radius: 22px;
  overflow: hidden;
  padding: 40px 10px 18px;
  aspect-ratio: 9 / 19;
  display: flex; flex-direction: column;
  gap: 10px;
  position: relative;
  font-family: system-ui, -apple-system, sans-serif;
  color: #fff;
}
/* Faint starfield so the lock screen reads as "night", matching the hero. */
.wit-lock::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 18% 12%, rgba(255,255,255,0.7), transparent),
    radial-gradient(1px 1px   at 62% 20%, rgba(255,255,255,0.5), transparent),
    radial-gradient(1.5px 1.5px at 82% 34%, rgba(255,255,255,0.45), transparent),
    radial-gradient(1px 1px   at 34% 44%, rgba(255,255,255,0.4), transparent);
  pointer-events: none;
}
.wit-lock__clock { text-align: center; position: relative; z-index: 1; }
.wit-lock__time {
  font-size: 40px; font-weight: 250; letter-spacing: -0.02em;
  line-height: 1;
  text-shadow: 0 2px 12px rgba(0,0,0,0.5);
}
.wit-lock__date {
  margin-top: 4px;
  font-size: 11px; font-weight: 500;
  color: rgba(255,255,255,0.75);
}

/* A single notification card — frosted glass over the wallpaper. */
.wit-notif {
  position: relative; z-index: 1;
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 14px;
  background: rgba(240,244,255,0.92);
  color: #0c1020;
  box-shadow: 0 6px 18px rgba(0,0,0,0.45);
  text-align: left;
}
/* The freshest alert gets a brass hairline + a glow so the eye lands there. */
.wit-notif--fresh {
  box-shadow: 0 0 0 1.5px rgba(255,205,107,0.9), 0 6px 20px rgba(0,0,0,0.5);
  animation: wit-notif-pop 3.2s ease-in-out infinite;
}
@keyframes wit-notif-pop {
  0%, 88%, 100% { transform: translateY(0)     scale(1); }
  92%           { transform: translateY(-2px)  scale(1.02); }
}
@media (prefers-reduced-motion: reduce) { .wit-notif--fresh { animation: none; } }

.wit-notif__icon {
  width: 26px; height: 26px; border-radius: 6px;
  background: linear-gradient(150deg, #17293e, #050a15);
  border: 1px solid rgba(201,143,61,0.65);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.wit-notif__icon img { width: 100%; height: 100%; object-fit: contain; padding: 2px; display: block; }
.wit-notif__head {
  display: flex; align-items: baseline; gap: 6px;
  font-size: 9px; letter-spacing: 0.08em; text-transform: uppercase;
  color: #5c6474; font-weight: 700;
}
.wit-notif__app { flex: 1; min-width: 0; }
.wit-notif__time { flex: 0 0 auto; font-weight: 600; letter-spacing: 0.04em; }
.wit-notif__title {
  margin-top: 2px;
  font-size: 11.5px; font-weight: 700; line-height: 1.25;
}
.wit-notif__body {
  margin-top: 1px;
  font-size: 10.5px; line-height: 1.35; color: #454c5a;
}

.wit-lock__hint {
  margin-top: auto;
  position: relative; z-index: 1;
  text-align: center;
  font-size: 9.5px; letter-spacing: 0.16em; text-transform: uppercase;
  color: rgba(255,255,255,0.45);
}

/* ============ CHAPTER I — THE SHORT ANSWER ============ */
.chapter-answer {
  background:
    radial-gradient(ellipse at 20% 0%, rgba(15,32,56,0.45), transparent 55%),
    radial-gradient(ellipse at 80% 100%, rgba(21,58,95,0.3), transparent 55%),
    linear-gradient(180deg, var(--midnight) 0%, #08131f 100%);
}

/* ============ CHAPTER II — THE GATEWAY ============ */
.chapter-gate {
  background:
    radial-gradient(ellipse at 70% 10%, rgba(23,41,62,0.7), transparent 60%),
    linear-gradient(180deg, #08131f 0%, var(--midnight) 100%);
}
.wit-gate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(1.1rem, 2vw, 1.6rem);
}

/* Four-step "what happens on a scan" strip below the cards. */
.wit-flow {
  margin-top: clamp(2.5rem, 4vw, 3.5rem);
  padding: clamp(1.4rem, 2.5vw, 2rem) clamp(1rem, 2vw, 1.8rem);
  border: 1px solid rgba(201,143,61,0.35);
  border-radius: 10px;
  background: rgba(10,23,40,0.6);
  box-shadow: inset 0 1px 0 rgba(255,205,107,0.08);
}
.wit-flow__steps {
  display: flex; align-items: stretch; justify-content: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.wit-flow__step {
  flex: 1 1 150px;
  min-width: 130px; max-width: 220px;
  text-align: center;
  padding: 0.9rem 0.6rem;
}
.wit-flow__num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; margin-bottom: 0.6rem;
  border-radius: 50%;
  border: 1.5px solid var(--brass);
  background: rgba(255,205,107,0.08);
  color: var(--brass-hot);
  font-family: "Cinzel Decorative", serif; font-weight: 900; font-size: 0.95rem;
}
/* The final step is the notification — flag it in cyan, not brass. */
.wit-flow__step:last-child .wit-flow__num {
  border-color: var(--cyan);
  background: rgba(79,183,255,0.12);
  color: var(--cyan-hot);
  box-shadow: 0 0 18px rgba(79,183,255,0.35);
}
.wit-flow__label {
  font-family: "IM Fell English", serif;
  font-size: 0.98rem; line-height: 1.4;
  color: var(--parchment);
}
.wit-flow__arrow {
  align-self: center;
  color: var(--brass); opacity: 0.6;
  font-size: 1.2rem;
  padding: 0 0.2rem;
}
@media (max-width: 760px) {
  .wit-flow__steps { flex-direction: column; align-items: center; }
  .wit-flow__step  { max-width: none; width: 100%; padding: 0.6rem; }
  .wit-flow__arrow { transform: rotate(90deg); padding: 0; }
}
.wit-flow__note {
  margin-top: 0.8rem; text-align: center;
  font-family: "IM Fell English", serif; font-style: italic;
  color: var(--parchment-dim); font-size: 0.95rem;
}

/* ============ CHAPTER III — SCAN ALERTS (the headline feature) ============ */
/* Cyan-lit rather than brass-lit, so the page's key promise reads as its own
   moment instead of another parchment chapter. */
.chapter-alert {
  overflow: hidden;
  background:
    radial-gradient(ellipse at 25% 20%, rgba(79,183,255,0.16), transparent 55%),
    radial-gradient(ellipse at 85% 80%, rgba(126,212,255,0.1), transparent 55%),
    linear-gradient(180deg, var(--midnight) 0%, #071729 55%, var(--midnight) 100%);
}
/* Concentric "signal" rings radiating behind the phone. */
.wit-signal {
  position: absolute; top: 50%; left: 22%;
  width: min(660px, 70vw); aspect-ratio: 1;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
}
.wit-signal span {
  position: absolute; inset: 0;
  border: 1px solid rgba(126,212,255,0.35);
  border-radius: 50%;
  animation: wit-ping 4s ease-out infinite;
}
.wit-signal span:nth-child(2) { animation-delay: 1.33s; }
.wit-signal span:nth-child(3) { animation-delay: 2.66s; }
@keyframes wit-ping {
  0%   { transform: scale(0.35); opacity: 0; }
  15%  { opacity: 0.8; }
  100% { transform: scale(1);    opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .wit-signal span { animation: none; opacity: 0.25; } }
@media (max-width: 900px) { .wit-signal { display: none; } }

.wit-alert-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
@media (max-width: 900px) {
  .wit-alert-grid { grid-template-columns: 1fr; }
  .wit-alert-grid .hero-phone { max-width: 260px; }
}

.wit-alert-points {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: clamp(1.1rem, 2vw, 1.6rem);
}
.wit-alert-point {
  position: relative;
  padding: 1.3rem 1.2rem 1.2rem;
  border: 1px solid rgba(79,183,255,0.3);
  border-radius: 8px;
  background: linear-gradient(160deg, rgba(23,41,62,0.85), rgba(10,23,40,0.85));
  box-shadow: 0 14px 30px rgba(0,0,0,0.45);
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.wit-alert-point:hover {
  transform: translateY(-3px);
  border-color: rgba(126,212,255,0.65);
}
.wit-alert-point__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; margin-bottom: 0.8rem;
  border-radius: 50%;
  background: rgba(79,183,255,0.12);
  border: 1px solid rgba(79,183,255,0.45);
  color: var(--cyan-hot);
}
.wit-alert-point__icon svg { width: 20px; height: 20px; }
.wit-alert-point h3 {
  font-family: "Cinzel Decorative", serif; font-weight: 900;
  font-size: 1.05rem; line-height: 1.2;
  color: var(--parchment);
  margin-bottom: 0.5rem;
}
.wit-alert-point p {
  font-size: 0.95rem; line-height: 1.6;
  color: var(--parchment-dim);
}

.wit-alert-aside {
  margin-top: clamp(1.6rem, 3vw, 2.2rem);
  padding: 0.9rem 1.2rem;
  border-left: 3px solid var(--cyan);
  background: rgba(79,183,255,0.07);
  border-radius: 0 6px 6px 0;
  font-family: "IM Fell English", serif; font-style: italic;
  font-size: 1rem; line-height: 1.6;
  color: var(--parchment-dim);
}
.wit-alert-aside strong { color: var(--cyan-hot); font-style: normal; }

/* ============ CHAPTER IV — THE ARENA ============ */
.chapter-wit-arena {
  background:
    radial-gradient(ellipse at 15% 15%, rgba(61,26,62,0.55), transparent 55%),
    radial-gradient(ellipse at 90% 85%, rgba(122,42,90,0.3), transparent 55%),
    linear-gradient(180deg, var(--midnight) 0%, #0a0f1e 100%);
}
.wit-arena-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(1.1rem, 2vw, 1.6rem);
}
.wit-arena-cta { margin-top: clamp(2rem, 4vw, 2.8rem); text-align: center; }

/* ============ CHAPTER V — THE APPS ============ */
.chapter-apps {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(15,32,56,0.6), transparent 60%),
    linear-gradient(180deg, #08131f 0%, var(--midnight) 100%);
}
.wit-apps-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
@media (max-width: 960px) { .wit-apps-wrap { grid-template-columns: 1fr; } }

.wit-apps-list {
  list-style: none;
  display: grid; gap: 0.75rem;
}
.wit-apps-list li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 0.7rem;
  align-items: start;
  font-size: 1.02rem; line-height: 1.55;
  color: var(--parchment-dim);
}
.wit-apps-list li::before {
  content: "☑";
  color: var(--brass-hot);
  font-size: 0.95rem;
  line-height: 1.55;
}

.wit-app-cards { display: grid; gap: 0.9rem; }
.wit-app-card {
  display: flex; align-items: center; gap: 1rem;
  padding: 1.1rem 1.3rem;
  border: 1px solid rgba(201,143,61,0.4);
  border-radius: 8px;
  background: linear-gradient(160deg, rgba(23,41,62,0.9), rgba(10,23,40,0.9));
  box-shadow: 0 14px 30px rgba(0,0,0,0.45);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}
.wit-app-card:hover {
  transform: translateY(-3px);
  border-color: var(--brass-hot);
  box-shadow: 0 18px 36px rgba(0,0,0,0.55), 0 0 24px rgba(255,205,107,0.18);
}
.wit-app-card__icon {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(201,143,61,0.5);
  background: rgba(255,205,107,0.08);
  color: var(--brass-hot);
}
.wit-app-card__icon svg { width: 24px; height: 24px; }
/* Spans, not divs, because the whole card is an <a> — so stack them explicitly. */
.wit-app-card__text { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.wit-app-card__name {
  display: block;
  font-family: "Cinzel Decorative", serif; font-weight: 900;
  font-size: 0.95rem; letter-spacing: 0.06em;
  color: var(--parchment);
}
.wit-app-card__sub {
  display: block;
  font-family: "IM Fell English", serif; font-style: italic;
  font-size: 0.9rem; color: var(--parchment-dim);
}
.wit-app-card__go { margin-left: auto; color: var(--brass); font-size: 1.1rem; }

/* ============ CLOSING CALL TO ACTION ============ */
.chapter-wit-cta {
  background: linear-gradient(180deg, var(--midnight) 0%, #08131f 100%);
}
.wit-cta-scroll {
  position: relative;
  max-width: 52rem; margin: 0 auto;
  padding: clamp(2.2rem, 4vw, 3.2rem) clamp(1.6rem, 4vw, 3rem);
  background: linear-gradient(180deg, #f0dfb3, #ddc890);
  color: var(--ink);
  border-radius: 4px;
  box-shadow: 0 4px 0 #a89575, 0 24px 50px rgba(0,0,0,0.6);
  text-align: center;
}
/* Torn top/bottom edges, matching .fleet-card in codex.css. */
.wit-cta-scroll::before, .wit-cta-scroll::after {
  content: ""; position: absolute; left: 0; right: 0; height: 8px;
  background:
    radial-gradient(circle at 5% 50%,  transparent 3px, #f0dfb3 4px),
    radial-gradient(circle at 20% 50%, transparent 5px, #f0dfb3 6px),
    radial-gradient(circle at 40% 50%, transparent 3px, #f0dfb3 4px),
    radial-gradient(circle at 60% 50%, transparent 5px, #f0dfb3 6px),
    radial-gradient(circle at 80% 50%, transparent 4px, #f0dfb3 5px),
    radial-gradient(circle at 95% 50%, transparent 3px, #f0dfb3 4px);
}
.wit-cta-scroll::before { top: -8px; }
.wit-cta-scroll::after  { bottom: -8px; transform: rotate(180deg); }

.wit-cta-scroll h2 {
  font-family: "Cinzel Decorative", serif; font-weight: 900;
  font-size: clamp(1.7rem, 2.5vw + 1rem, 2.6rem);
  line-height: 1.12;
  color: #3a1a04;
  margin-bottom: 0.8rem;
  text-shadow: 0 1px 0 rgba(255,255,255,0.35);
}
/* .gold is a light-on-dark gradient in codex.css — re-tint it for parchment. */
.wit-cta-scroll h2 .gold {
  background: linear-gradient(180deg, #d94656, #a01e28, #5a0f18);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.wit-cta-scroll p {
  font-family: "IM Fell English", serif; font-style: italic;
  font-size: 1.1rem; line-height: 1.6;
  color: #5a3218;
  max-width: 34rem; margin: 0 auto 1.6rem;
}
.wit-cta-buttons {
  display: flex; flex-wrap: wrap; gap: 0.8rem; justify-content: center;
}
