/* =========================================================================
   Aversions Crown — Privacy Section (glitchy scrollbox)
   ========================================================================= */

/* Base section */
.privacy-section {
  text-align: center;
  padding: 80px 20px;
  border-top: 1px solid #111;
  background: rgba(0,0,0,0.6); /* dark theme */
  color: var(--text);
  position: relative;
  z-index: 1;
}

.privacy-title {
  font-weight: 800;
  font-size: 1.8rem;
  letter-spacing: .05em;
  margin-bottom: 16px;
  color: var(--accent);
  text-shadow: 0 0 6px rgba(255,0,0,0.5);
}

/* Toggle + close buttons */
.privacy-toggle,
.privacy-close,
.footer-links-static .link-chip[type="button"] {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--text);
  padding: 10px 20px;
  font-weight: 600;
  font-size: 1rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all .25s;
  margin: 10px 0;
}

.privacy-toggle:hover,
.privacy-close:hover,
.footer-links-static .link-chip[type="button"]:hover {
  background: var(--accent);
  color: #000;
  box-shadow: 0 0 12px var(--accent), 0 0 24px rgba(214,26,26,0.6);
}

/* Collapsible box container */
.privacy-box {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.45s ease, padding 0.3s ease, opacity 0.3s ease;
  margin-top: 20px;
  background: rgba(20,20,20,0.9);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 6px;
  opacity: 0;
  position: relative;
}

/* Open state with glitchy fade */
.privacy-box.open {
  max-height: 400px; /* adjust height if needed */
  opacity: 1;
  padding: 16px;
  animation: glitchFade 0.6s steps(2, start);
}

/* Inner content area */
.privacy-content {
  max-height: 340px;
  overflow-y: auto;
  text-align: left;
  line-height: 1.6;
  padding-right: 8px;
  position: relative;
  z-index: 2; /* ensure text above static overlay */
  font-size: 0.95rem;
}

/* Custom Scrollbar (WebKit browsers) */
.privacy-content::-webkit-scrollbar {
  width: 8px;
}
.privacy-content::-webkit-scrollbar-track {
  background: rgba(40,40,40,0.7);
  border-radius: 4px;
}
.privacy-content::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 4px;
  box-shadow: 0 0 6px rgba(214,26,26,0.7);
}
.privacy-content::-webkit-scrollbar-thumb:hover {
  background: #ff3c50;
}

/* Firefox scrollbar */
.privacy-content {
  scrollbar-width: thin;
  scrollbar-color: var(--accent) rgba(40,40,40,0.7);
}

/* Glitchy fade animation */
@keyframes glitchFade {
  0%   { opacity: 0; transform: scale(0.98) skewX(0deg);   filter: hue-rotate(0deg); }
  20%  { opacity: 1; transform: scale(1.02) skewX(2deg);   filter: hue-rotate(-12deg); }
  40%  { opacity: .6; transform: scale(0.97) skewX(-2deg); filter: hue-rotate(12deg); }
  60%  { opacity: 1; transform: scale(1.01) skewX(1deg);   filter: hue-rotate(-6deg); }
  80%  { opacity: .85;transform: scale(0.99) skewX(-1deg); filter: hue-rotate(6deg); }
  100% { opacity: 1; transform: scale(1)    skewX(0deg);   filter: hue-rotate(0deg); }
}

/* VHS static overlay inside the box */
.privacy-box::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("/assets/grain.png"); /* reuse your grain texture */
  background-size: cover;
  opacity: 0.1;
  mix-blend-mode: screen;
  pointer-events: none;
  animation: staticNoise 1s steps(8) infinite;
}

@keyframes staticNoise {
  0%   { transform: translate(0,0); }
  20%  { transform: translate(-2px, 1px); }
  40%  { transform: translate(1px,-1px); }
  60%  { transform: translate(-1px,2px); }
  80%  { transform: translate(2px,-2px); }
  100% { transform: translate(0,0); }
}
/* =========================================================================
   Overrides: Footer Tabs (Contact | Privacy)
   ========================================================================= */

/* Tabs container */
.policy-tabs {
  margin: 40px 0;
}

/* Tab header row */
.tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 18px;
}
.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(20,20,20,0.7);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  color: var(--text);
  cursor: pointer;
  transition: all .25s;
  font-weight: 600;
  font-size: 0.95rem;
}
.tab-btn svg { opacity: .9; }
.tab-btn:hover {
  border-color: var(--accent);
  box-shadow: 0 0 10px rgba(214,26,26,.35);
}
.tab-btn.is-active {
  border-color: var(--accent);
  background: radial-gradient(80% 60% at 50% 50%, rgba(214,26,26,.18), rgba(0,0,0,0));
  box-shadow: 0 0 18px rgba(214,26,26,.45);
}

/* Panels */
.tab-panels { position: relative; }
.tab-panel { display: none; }
.tab-panel.is-active { display: block; }

/* Contact panel */
.contact-card {
  background: rgba(20,20,20,.9);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 18px 60px rgba(0,0,0,.45);
  text-align: left;
}
.contact-card h3 {
  margin: 0 0 12px;
  font-weight: 800;
  letter-spacing: .04em;
  color: var(--accent);
  text-shadow: 0 0 6px rgba(255,0,0,.4);
}
.contact-grid {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
}
.cbox h4 {
  margin: 0 0 4px;
  font-weight: 700;
  color: #fff;
}
.btn-line {
  display: inline-block;
  padding: 8px 12px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 6px;
  text-decoration: none;
  transition: .2s;
}
.btn-line:hover {
  border-color: var(--accent);
  box-shadow: 0 0 10px rgba(214,26,26,.3);
}

/* Make 3 columns on wider screens */
@media (min-width: 720px) {
  .contact-grid { grid-template-columns: repeat(3,1fr); }
}

/* Contact CTAs */
.contact-ctas {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.cta {
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  text-decoration: none;
  transition: .2s;
}
.cta:hover {
  background: var(--accent);
  color: #000;
  box-shadow: 0 0 12px var(--accent);
}
.cta--alt { border-color: rgba(255,255,255,.22); }
.cta--alt:hover { border-color: var(--accent); }

/* Privacy panel (already styled earlier) will inherit existing glitch styles */
/* ==== FIX: Tab buttons clickable ==== */
.tabs .tab-btn {
  position: relative;
  z-index: 2;
  pointer-events: auto; /* ensure clicks work */
}

/* ==== FIX: Contact CTAs inline ==== */
.contact-ctas {
  display: flex;
  flex-wrap: nowrap; /* force one line */
  justify-content: center;
  gap: 12px;
}

.contact-ctas .cta {
  flex: 0 0 auto; /* don’t stretch, stay inline */
}
/* ===== Fix: make Contact / Privacy buttons and CTAs clickable ===== */
.policy-tabs { position: relative; z-index: 1; }

.tabs {
  position: relative;
  z-index: 3;               /* keep the tab pills above background effects */
}

.tab-panels {
  position: relative;
  z-index: 2;               /* panels above anything behind */
}

/* ensure the active panel sits above any overlays */
.tab-panel.is-active { position: relative; z-index: 4; }

.contact-card,
.privacy-section {
  position: relative;
  z-index: 5;               /* card content above */
}

/* CTAs themselves always clickable */
.contact-ctas .cta,
.privacy-toggle,
.privacy-close {
  position: relative;
  z-index: 6;
  pointer-events: auto;
}

/* if any global overlay is present in the footer, clicks should pass through it */
.crt-footer::before,
.crt-footer::after {
  pointer-events: none;
}

/* keep contact CTAs on one line */
.contact-ctas {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 12px;
}

.contact-ctas .cta { flex: 0 0 auto; }