/* =====================================================================
   RISS — advertisement units (placeholder creatives)
   ---------------------------------------------------------------------
   Everything here is a DUMMY placeholder with a dummy link.
   Search markers:  AD-A1 … AD-A4   (see ADS-GUIDE.md)

   When you swap a placeholder for a real ad snippet, keep the outer
   .ad-section / .ad wrapper so spacing and the "Advertisement" label
   stay intact. Only the <a class="ad__unit"> (or .ad__native) gets
   replaced.

   Sizes in use — chosen for this layout (shell max 680px, phones
   360–430px):
     A1 Top Banner ............ 320x50   fits every phone
     A2 Native Banner ......... responsive card (300x250 footprint)
     A3 Content Rectangle ..... 300x250  fits phones
     A4 Footer Banner ......... 468x60   desktop/tablet only (>= 560px)

   A5 (social bar) has been replaced by the join bar in style.css.
   ===================================================================== */

/* ---------------------------------------------------------------
   Shared frame
--------------------------------------------------------------- */
.ad-section {
  position: relative;
  z-index: 1;
  margin-top: 34px;
}

.ad-section--top { margin-top: 26px; }

.ad {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
}

.ad__label {
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  text-align: center;
  color: var(--ink-mute);
  opacity: 0.72;
}

/* ---------------------------------------------------------------
   A1 / A3 / A4 — dummy display banners
--------------------------------------------------------------- */
.ad__unit {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  overflow: hidden;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px dashed rgba(139, 120, 255, 0.28);
  background:
    radial-gradient(130% 160% at 0% 0%, rgba(255, 111, 165, 0.14), transparent 62%),
    rgba(18, 18, 52, 0.3);
  color: var(--ink-dim);
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
}

.ad__unit:hover,
.ad__unit:focus-visible {
  border-color: rgba(139, 120, 255, 0.55);
  color: var(--ink);
}

.ad__dummy-title {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
  text-align: center;
}

.ad__dummy-sub {
  font-size: 0.7rem;
  line-height: 1.35;
  color: var(--ink-mute);
  text-align: center;
}

/* A1 — Top Banner 320x50 */
.ad__unit--320x50 {
  width: 320px;
  max-width: 100%;
  height: 50px;
}

/* A3 — Content Rectangle 300x250 */
.ad__unit--300x250 {
  width: 300px;
  max-width: 100%;
  height: 250px;
  flex-direction: column;
  gap: 8px;
  padding: 12px;
}

.ad__dummy-art {
  width: 100%;
  height: 150px;
  flex: none;
  border-radius: 9px;
  background:
    radial-gradient(120% 120% at 15% 10%, rgba(255, 111, 165, 0.5), transparent 62%),
    radial-gradient(110% 120% at 90% 90%, rgba(91, 91, 255, 0.45), transparent 60%),
    linear-gradient(140deg, rgba(139, 92, 246, 0.42), rgba(10, 10, 28, 0.6));
  box-shadow: inset 0 1px 0 rgba(199, 192, 255, 0.22);
}

/* A4 — Footer Banner 468x60 (hidden on narrow phones) */
.ad-section--wide { display: none; margin-top: 44px; }

@media (min-width: 560px) {
  .ad-section--wide { display: block; }
}

.ad__unit--468x60 {
  width: 468px;
  max-width: 100%;
  height: 60px;
  flex-direction: column;
  gap: 1px;
  padding: 0 16px;
}

/* ---------------------------------------------------------------
   A2 — Native Banner (responsive card)
--------------------------------------------------------------- */
.ad--native {
  align-items: stretch;
  gap: 8px;
}

.ad__native {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 13px;
  border-radius: 18px;
  border: 1px solid var(--glass-border);
  background: linear-gradient(160deg, rgba(18, 18, 52, 0.5), rgba(18, 18, 52, 0.2));
  box-shadow: inset 0 1px 0 rgba(139, 120, 255, 0.12);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.2s, transform 0.2s var(--ease-out);
}

.ad__native:hover,
.ad__native:focus-visible {
  border-color: rgba(139, 120, 255, 0.45);
  transform: translateY(-1px);
}

.ad__native-art {
  position: relative;
  flex: none;
  width: 84px;
  height: 84px;
  overflow: hidden;
  border-radius: 13px;
  background:
    radial-gradient(120% 120% at 18% 12%, rgba(255, 111, 165, 0.85), transparent 62%),
    radial-gradient(110% 120% at 88% 92%, rgba(91, 91, 255, 0.75), transparent 58%),
    linear-gradient(140deg, rgba(139, 92, 246, 0.85), rgba(10, 10, 28, 0.9));
  box-shadow: inset 0 1px 0 rgba(199, 192, 255, 0.28);
}

.ad__native-art::after {
  content: "";
  position: absolute;
  inset: -30% -60% auto;
  height: 120%;
  transform: rotate(24deg);
  background: linear-gradient(90deg, transparent, rgba(199, 192, 255, 0.22), transparent);
}

.ad__native-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  text-align: left;
}

.ad__native-kicker {
  font-size: 0.56rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-accent);
}

.ad__native-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.ad__native-text {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-size: 0.75rem;
  line-height: 1.45;
  color: var(--ink-mute);
}

.ad__native-cta {
  margin-top: 2px;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--edge-pink);
}

/* ---------------------------------------------------------------
   Motion preferences
--------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .ad__native:hover,
  .ad__native:focus-visible { transform: none; }
}
