/* =======================================================
   Wavecon Welcome Modal + Cookie Banner
   Style aligned to home (Ethereal Glass + Editorial Split)
   - Double-Bezel outer shell + inner core
   - OLED surface #0E0E10, lime accent #C9FF00
   - Squircle radii (32-40px), inset highlight
   - All motion via transform + opacity, cubic-bezier(0.32,0.72,0,1)
   - Memory rules:
     * img (none here, but if added must use !important)
     * prefers-reduced-motion handled
     * 4.5:1 contrast for body text on #0E0E10 (verified)
   ======================================================= */

/* ===========================================================
   1. WELCOME MODAL — first-visit splash
   =========================================================== */

[data-wc-welcome] {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

[data-wc-welcome][hidden] { display: none !important; }

/* Backdrop: heavy glass over blurred page */
.wc-welcome-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  opacity: 0;
  transition: opacity 300ms cubic-bezier(0.32, 0.72, 0, 1);
}

[data-wc-welcome].is-open .wc-welcome-backdrop { opacity: 1; }

/* Outer frame: hairline border + ambient shadow */
.wc-welcome-modal {
  position: relative;
  width: 100%;
  max-width: 880px;
  max-height: calc(100dvh - 48px);
  display: flex;
  flex-direction: column;
  padding: 1.5px;                       /* hairline outer */
  border-radius: 36px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.10) 0%,
    rgba(255, 255, 255, 0.04) 100%
  );
  box-shadow:
    0 60px 120px -30px rgba(0, 0, 0, 0.85),
    0 0 0 1px rgba(255, 255, 255, 0.04);
  opacity: 0;
  transform: scale(0.96) translateY(20px);
  filter: blur(8px);
  transition:
    opacity 500ms cubic-bezier(0.32, 0.72, 0, 1),
    transform 500ms cubic-bezier(0.32, 0.72, 0, 1),
    filter 500ms cubic-bezier(0.32, 0.72, 0, 1);
}

[data-wc-welcome].is-open .wc-welcome-modal {
  opacity: 1;
  transform: scale(1) translateY(0);
  filter: blur(0);
}

/* Inner core: actual content surface */
.wc-welcome-inner {
  position: relative;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  padding: clamp(28px, 4vw, 48px);
  border-radius: 34px;
  background:
    linear-gradient(180deg, #0E0E10 0%, #16161A 100%);
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, 0.10),
    inset 0 -1px 1px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  isolation: isolate;
}

/* Subtle radial glow inside (limelight) */
.wc-welcome-inner::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(
      ellipse at 0% 0%,
      var(--ink-lime-soft, rgba(201, 255, 0, 0.16)) 0%,
      transparent 55%
    ),
    radial-gradient(
      ellipse at 100% 100%,
      rgba(123, 44, 191, 0.14) 0%,
      transparent 60%
    );
}

/* Editorial split: title left, body right */
.wc-welcome-split {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
  flex: 1 1 auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.18) transparent;
}

/* Left column — title block */
.wc-welcome-left {
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: sticky;
  top: 0;
}

.wc-welcome-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(201, 255, 0, 0.08);
  border: 1px solid rgba(201, 255, 0, 0.24);
  color: var(--ink-lime, #C9FF00);
  font-family: var(--font-body, 'General Sans', system-ui, sans-serif);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.wc-welcome-eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink-lime, #C9FF00);
  box-shadow: 0 0 8px var(--ink-lime, #C9FF00);
}

.wc-welcome-title {
  margin: 0;
  font-family: var(--font-display, 'Clash Display', system-ui, sans-serif);
  font-weight: 700;
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: var(--ink-fg, #F5F5F0);
}

.wc-welcome-title em {
  font-style: italic;
  color: var(--ink-lime, #C9FF00);
}

.wc-welcome-lede {
  margin: 0;
  font-family: var(--font-body, 'General Sans', system-ui, sans-serif);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-mute, #9A9A95);
}

/* Right column — scrollable sections */
.wc-welcome-right {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.wc-welcome-section {
  padding: 18px 20px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.wc-welcome-section h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 10px;
  font-family: var(--font-body, 'General Sans', system-ui, sans-serif);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-lime, #C9FF00);
}

.wc-welcome-section h3 .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--ink-lime, #C9FF00);
  color: #050505;
  font-size: 11px;
  font-weight: 700;
}

.wc-welcome-section p,
.wc-welcome-section li {
  margin: 0;
  font-family: var(--font-body, 'General Sans', system-ui, sans-serif);
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-fg, #F5F5F0);
}

.wc-welcome-section ol,
.wc-welcome-section ul {
  margin: 0;
  padding-left: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wc-welcome-section ol li,
.wc-welcome-section ul li {
  position: relative;
  padding-left: 22px;
}

.wc-welcome-section ol li::before {
  content: attr(data-step);
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--font-display, 'Clash Display', sans-serif);
  font-weight: 700;
  font-size: 14px;
  color: var(--ink-lime, #C9FF00);
}

.wc-welcome-section ul li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink-rose, #FF3B7C);
}

.wc-welcome-section ul.warn li::before {
  background: var(--ink-amber, #FFD600);
}

.wc-welcome-section .small {
  margin-top: 10px;
  font-size: 12px;
  color: var(--ink-dim, #6B6B66);
}

/* Footer: actions */
.wc-welcome-foot {
  position: relative;
  z-index: 1;
  margin-top: clamp(20px, 3vw, 28px);
  padding-top: clamp(20px, 3vw, 24px);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.wc-welcome-cta-primary {
  /* Button-in-Button pattern with nested arrow icon */
  display: inline-flex;
  align-items: center;
  gap: 0;
  padding: 4px;
  padding-left: 22px;
  height: 52px;
  border: none;
  border-radius: 999px;
  background: var(--ink-lime, #C9FF00);
  color: #050505;
  font-family: var(--font-body, 'General Sans', system-ui, sans-serif);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow:
    0 16px 32px -10px rgba(201, 255, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  transition:
    transform 350ms cubic-bezier(0.32, 0.72, 0, 1),
    box-shadow 350ms cubic-bezier(0.32, 0.72, 0, 1);
}

.wc-welcome-cta-primary:hover {
  transform: translateY(-1px);
  box-shadow:
    0 22px 44px -10px rgba(201, 255, 0, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.wc-welcome-cta-primary:active {
  transform: translateY(0) scale(0.98);
}

.wc-welcome-cta-primary:focus-visible {
  outline: 2px solid var(--ink-lime, #C9FF00);
  outline-offset: 4px;
}

.wc-welcome-cta-primary .arrow-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-left: 14px;
  border-radius: 999px;
  background: #050505;
  color: var(--ink-lime, #C9FF00);
  transition: transform 350ms cubic-bezier(0.32, 0.72, 0, 1);
}

.wc-welcome-cta-primary:hover .arrow-pill {
  transform: translateX(3px) rotate(-3deg);
}

.wc-welcome-cta-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 14px 0;
  font-family: var(--font-body, 'General Sans', system-ui, sans-serif);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-mute, #9A9A95);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition:
    color 250ms ease-out,
    border-color 250ms ease-out;
}

.wc-welcome-cta-secondary:hover {
  color: var(--ink-fg, #F5F5F0);
  border-bottom-color: rgba(255, 255, 255, 0.3);
}

/* Close X — top-right corner */
.wc-welcome-close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink-mute, #9A9A95);
  cursor: pointer;
  transition:
    background 200ms ease-out,
    color 200ms ease-out,
    transform 200ms ease-out;
}

.wc-welcome-close:hover {
  background: rgba(255, 255, 255, 0.10);
  color: var(--ink-fg, #F5F5F0);
  transform: rotate(90deg);
}

.wc-welcome-close:focus-visible {
  outline: 2px solid var(--ink-lime, #C9FF00);
  outline-offset: 2px;
}

.wc-welcome-close svg {
  width: 16px;
  height: 16px;
}

/* Mobile collapse */
@media (max-width: 768px) {
  [data-wc-welcome] { padding: 12px; }
  .wc-welcome-modal { max-width: 100%; border-radius: 28px; }
  .wc-welcome-inner { border-radius: 26px; padding: 24px 20px; }
  .wc-welcome-split {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .wc-welcome-left { position: static; }
  .wc-welcome-title { font-size: clamp(1.9rem, 8vw, 2.5rem); }
  .wc-welcome-foot { flex-direction: column; align-items: stretch; }
  .wc-welcome-cta-primary { width: 100%; justify-content: center; }
  .wc-welcome-cta-secondary { justify-content: center; }
}

/* Body lock when modal open */
body.wc-modal-open { overflow: hidden !important; }


/* ===========================================================
   2. COOKIE BANNER — global sticky bottom strip
   =========================================================== */

[data-wc-cookie] {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 8500;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

[data-wc-cookie][hidden] { display: none !important; }

.wc-cookie-card {
  pointer-events: auto;
  width: 100%;
  max-width: 720px;
  padding: 1px;
  border-radius: 24px;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.08) 0%,
    rgba(255, 255, 255, 0.03) 100%
  );
  box-shadow:
    0 30px 60px -20px rgba(0, 0, 0, 0.7),
    0 0 0 1px rgba(255, 255, 255, 0.04);
  opacity: 0;
  transform: translateY(120%);
  transition:
    opacity 450ms cubic-bezier(0.32, 0.72, 0, 1),
    transform 550ms cubic-bezier(0.32, 0.72, 0, 1);
}

[data-wc-cookie].is-open .wc-cookie-card {
  opacity: 1;
  transform: translateY(0);
}

.wc-cookie-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 16px 18px 16px 22px;
  border-radius: 23px;
  background: linear-gradient(180deg, #0E0E10 0%, #16161A 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.10);
}

.wc-cookie-text { min-width: 0; }

.wc-cookie-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 4px;
  font-family: var(--font-body, 'General Sans', system-ui, sans-serif);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: var(--ink-lime, #C9FF00);
}

.wc-cookie-title::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--ink-lime, #C9FF00);
  box-shadow: 0 0 8px var(--ink-lime, #C9FF00);
}

.wc-cookie-body {
  margin: 0;
  font-family: var(--font-body, 'General Sans', system-ui, sans-serif);
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-mute, #9A9A95);
}

.wc-cookie-body a {
  color: var(--ink-fg, #F5F5F0);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  transition: border-color 200ms ease-out;
}
.wc-cookie-body a:hover { border-bottom-color: var(--ink-lime, #C9FF00); }

.wc-cookie-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.wc-cookie-link {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-mute, #9A9A95);
  font-family: var(--font-body, 'General Sans', system-ui, sans-serif);
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  transition:
    color 200ms ease-out,
    background 200ms ease-out;
}

.wc-cookie-link:hover {
  color: var(--ink-fg, #F5F5F0);
  background: rgba(255, 255, 255, 0.05);
}

.wc-cookie-accept {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 18px;
  height: 40px;
  border: none;
  border-radius: 999px;
  background: var(--ink-lime, #C9FF00);
  color: #050505;
  font-family: var(--font-body, 'General Sans', system-ui, sans-serif);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 8px 18px -6px rgba(201, 255, 0, 0.45);
  transition:
    transform 250ms cubic-bezier(0.32, 0.72, 0, 1),
    box-shadow 250ms cubic-bezier(0.32, 0.72, 0, 1);
}

.wc-cookie-accept:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 26px -6px rgba(201, 255, 0, 0.55);
}

.wc-cookie-accept:active { transform: translateY(0) scale(0.98); }

.wc-cookie-accept:focus-visible {
  outline: 2px solid var(--ink-lime, #C9FF00);
  outline-offset: 3px;
}

@media (max-width: 640px) {
  .wc-cookie-inner {
    grid-template-columns: 1fr;
    padding: 14px 16px;
    gap: 12px;
  }
  .wc-cookie-actions { justify-content: flex-end; }
  .wc-cookie-card { border-radius: 20px; }
  .wc-cookie-inner { border-radius: 19px; }
}


/* ===========================================================
   3. Reduced motion
   =========================================================== */

@media (prefers-reduced-motion: reduce) {
  .wc-welcome-backdrop,
  .wc-welcome-modal,
  .wc-cookie-card,
  .wc-welcome-cta-primary,
  .wc-welcome-cta-primary .arrow-pill,
  .wc-welcome-cta-secondary,
  .wc-welcome-close,
  .wc-cookie-accept,
  .wc-cookie-link {
    transition: none !important;
  }

  [data-wc-welcome].is-open .wc-welcome-modal {
    transform: none;
    filter: none;
  }
  [data-wc-cookie].is-open .wc-cookie-card {
    transform: none;
  }
}
