:root {
  --cope-grid-gap: clamp(1rem, 1.2vw, 1.5rem);
  --cope-card-bg: rgba(8, 12, 24, 0.6);
  --cope-card-border: rgba(0, 255, 255, 0.25);
  --cope-card-border-strong: rgba(0, 255, 255, 0.4);
  --cope-card-shadow: 0 1px 0 rgba(255, 255, 255, 0.05), 0 20px 80px rgba(0, 0, 0, 0.35);
  --cope-holo: linear-gradient(120deg, rgba(0, 255, 255, 0.2), rgba(255, 122, 255, 0.16), rgba(0, 132, 255, 0.18));
  --cope-holo-strong: radial-gradient(circle at 20% 20%, rgba(0, 255, 255, 0.3), transparent 30%),
    radial-gradient(circle at 80% 10%, rgba(255, 255, 255, 0.28), transparent 35%);
}

html {
  overflow-y: auto;
}

body.cope-page {
  color: #e9f3ff;
  background: radial-gradient(circle at 20% 20%, rgba(0, 255, 255, 0.05), transparent 35%),
              radial-gradient(circle at 80% 10%, rgba(255, 255, 255, 0.08), transparent 32%),
              #050910;
  min-height: 100vh;
  /* Override the global overflow: hidden so the page can scroll. */
  overflow-y: auto;
}

body.cope-closed {
  display: grid;
  place-items: center;
  padding: clamp(2.5rem, 5vw, 4rem);
  background: radial-gradient(circle at 20% 20%, rgba(0, 255, 255, 0.04), transparent 26%),
    radial-gradient(circle at 80% 0%, rgba(148, 195, 255, 0.06), transparent 20%),
    linear-gradient(145deg, #05080e, #0b1628 55%, #0b1b2f);
}

.cope-closure {
  width: min(720px, 90vw);
  padding: clamp(2.5rem, 5vw, 3.25rem);
  border: 1px solid var(--cope-card-border);
  border-radius: 18px;
  background: rgba(6, 12, 22, 0.8);
  box-shadow: var(--cope-card-shadow);
  text-align: center;
}

.cope-closure__eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7fd7ff;
}

.cope-closure h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.8rem, 3vw, 2.25rem);
}

.cope-closure__body {
  margin: 0;
  font-size: clamp(1rem, 2.4vw, 1.1rem);
  color: #d6e9ff;
}

.cope-shell {
  padding: clamp(1.5rem, 3vw, 3rem);
  max-width: 1100px;
  margin: 0 auto;
}

.cope-hero {
  padding: clamp(1.5rem, 4vw, 3.5rem);
  border: 1px solid rgba(0, 255, 255, 0.18);
  border-radius: 18px;
  background:
    var(--cope-holo-strong),
    linear-gradient(140deg, rgba(0, 255, 255, 0.12) 0%, rgba(15, 22, 40, 0.75) 60%, rgba(5, 9, 16, 0.9) 100%);
  box-shadow: var(--cope-card-shadow);
  position: relative;
  overflow: hidden;
}

.cope-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 75% 25%, rgba(0, 255, 255, 0.25), transparent 45%);
  opacity: 0.5;
  pointer-events: none;
}

.cope-hero__eyebrow {
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9be7ff;
  margin-bottom: 0.75rem;
}

.cope-hero h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin: 0 0 1rem;
}

.cope-hero__tagline {
  font-size: clamp(1.05rem, 2.2vw, 1.2rem);
  color: #c2d8ef;
  line-height: 1.6;
  max-width: 48ch;
}

.cope-hero__cta {
  margin-top: 1.5rem;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.cope-taglines {
  margin-top: 1.25rem;
  display: grid;
  gap: 0.6rem;
}

.cope-taglines span {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  color: #b7cde6;
  font-size: 0.95rem;
}

.cope-taglines span::before {
  content: '';
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: radial-gradient(circle, #0ff, rgba(0, 255, 255, 0.2));
  box-shadow: 0 0 12px rgba(0, 255, 255, 0.6);
}

.cta-link--ghost {
  background: transparent;
  border: 1px solid rgba(0, 255, 255, 0.35);
  color: #9be7ff;
}

.cope-grid {
  margin-top: clamp(1.5rem, 4vw, 3rem);
  display: grid;
  gap: var(--cope-grid-gap);
}

.cope-grid__intro h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 0.35rem;
}

.cope-grid__intro p {
  color: #c5d6ea;
  max-width: 60ch;
}

.cope-grid__tracks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--cope-grid-gap);
  padding: 0.5rem 0 1rem;
  min-height: 220px;
  perspective: 1200px;
}

.cope-card {
  list-style: none;
  border: 1px solid var(--cope-card-border);
  border-radius: 14px;
  padding: 1.25rem;
  background: var(--cope-card-bg);
  box-shadow: var(--cope-card-shadow);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
  transition: transform 0.4s ease, border-color 0.3s ease, box-shadow 0.4s ease;
  transform-style: preserve-3d;
}

.cope-card__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.85rem;
  color: #8ed8ff;
}

.cope-card h3 {
  font-size: 1.2rem;
  margin: 0;
  color: #e9f3ff;
}

.cope-card p {
  margin: 0;
  color: #c9ddf3;
  line-height: 1.55;
}

.cope-card__footnote {
  font-size: 0.9rem;
  color: #9fb8d6;
  margin-top: auto;
}

.cope-card::before,
.cope-card::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  transition: opacity 0.35s ease, transform 0.45s ease;
}

.cope-card::before {
  background: var(--cope-holo);
  opacity: 0;
  mix-blend-mode: screen;
  transform: translate3d(-6%, -8%, 0) rotate(-2deg);
}

.cope-card::after {
  border: 1px solid var(--cope-card-border-strong);
  opacity: 0.5;
  box-shadow: 0 10px 50px rgba(0, 255, 255, 0.06);
}

.cope-card:hover,
.cope-card:focus-within {
  border-color: var(--cope-card-border-strong);
  transform: translateY(-8px) rotateX(6deg);
  box-shadow: 0 16px 60px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(0, 255, 255, 0.16);
}

.cope-card:hover::before,
.cope-card:focus-within::before {
  opacity: 0.8;
  transform: translate3d(0, 0, 0) rotate(0deg);
}

.cope-card:hover::after,
.cope-card:focus-within::after {
  opacity: 1;
}

.cope-card__footnote strong {
  color: #d2e7ff;
}

.cope-filters {
  margin: 1.25rem 0 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.cope-chip {
  border: 1px solid rgba(0, 255, 255, 0.35);
  background: rgba(5, 9, 16, 0.8);
  color: #d6e8ff;
  border-radius: 999px;
  padding: 0.5rem 0.85rem;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  display: inline-flex;
  gap: 0.4rem;
  align-items: center;
  transition: background 0.25s ease, box-shadow 0.35s ease, border-color 0.25s ease;
}

.cope-chip::before {
  content: '◎';
  color: #8ff0ff;
  font-size: 0.9rem;
  opacity: 0.9;
}

.cope-chip:hover,
.cope-chip:focus-visible,
.cope-chip[aria-pressed='true'] {
  border-color: rgba(0, 255, 255, 0.55);
  background: linear-gradient(120deg, rgba(0, 255, 255, 0.16), rgba(0, 255, 255, 0.02));
  box-shadow: 0 8px 30px rgba(0, 255, 255, 0.15);
  outline: 2px solid #f4fbff;
  outline-offset: 2px;
}

.cope-chip[aria-pressed='true']::before {
  content: '◆';
  color: #f7d7ff;
}

.cope-carousel {
  position: relative;
  display: grid;
  gap: 0.75rem;
}

.cope-carousel__toolbar {
  display: grid;
  gap: 0.5rem;
  align-items: start;
}

.cope-carousel__playback {
  display: grid;
  gap: 0.35rem;
  align-items: center;
}

.cope-carousel__playback-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.cope-carousel__controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.cope-carousel__hint {
  margin: 0;
  font-size: 0.95rem;
  color: #c2d8ef;
}

.cope-carousel__dots {
  display: flex;
  gap: 0.35rem;
}

.cope-carousel__dot {
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(0, 255, 255, 0.3);
  transition: transform 0.25s ease, background 0.25s ease;
}

.cope-carousel__dot[aria-current='true'] {
  background: linear-gradient(135deg, #0ff, #7ef8ff);
  transform: scale(1.1);
  box-shadow: 0 0 0 4px rgba(0, 255, 255, 0.12);
}

.cope-carousel__dot:hover,
.cope-carousel__dot:focus-visible {
  outline: 2px solid #f4fbff;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(0, 255, 255, 0.3);
  background: linear-gradient(135deg, rgba(0, 255, 255, 0.22), rgba(126, 248, 255, 0.2));
}

.cope-carousel__button {
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
  border: 1px solid rgba(0, 255, 255, 0.35);
  background: rgba(8, 12, 24, 0.8);
  color: #cbe6ff;
  font-weight: 700;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.25s ease;
}

.cope-carousel__button:hover,
.cope-carousel__button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(0, 255, 255, 0.55);
  box-shadow: 0 10px 30px rgba(0, 255, 255, 0.14);
  outline: 2px solid #f4fbff;
  outline-offset: 3px;
}

.cope-carousel__button:active {
  transform: translateY(0);
}

.cope-carousel__button[aria-pressed='true'] {
  border-color: rgba(0, 255, 255, 0.65);
  box-shadow: 0 12px 34px rgba(0, 255, 255, 0.16);
  background: linear-gradient(135deg, rgba(8, 12, 24, 0.9), rgba(0, 255, 255, 0.08));
}

.cope-carousel__button--secondary {
  background: rgba(5, 9, 16, 0.72);
  color: #f2f7ff;
}

.cope-carousel__button--secondary:focus-visible {
  background: linear-gradient(135deg, rgba(5, 9, 16, 0.9), rgba(0, 255, 255, 0.14));
}

.cope-carousel__live {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.cope-submit__note {
  color: #d6e4ff;
  margin: 0.25rem 0 0.75rem;
  font-size: 0.98rem;
}

.cope-submit__error {
  color: #ff7088;
  min-height: 1.25rem;
  margin: 0.25rem 0 0.5rem;
}

.cope-submit__status,
.cope-submit__meta {
  color: #c5d8ff;
  margin: 0.25rem 0 0.5rem;
  font-size: 0.95rem;
}

.cope-submit__status.cope-status--success {
  color: #7af5c9;
}

.cope-submit__status.cope-status--error {
  color: #ff7088;
}

.cope-submit__status.cope-status--info {
  color: #c5d8ff;
}

.cope-submit__form--error {
  outline: 1px solid rgba(255, 112, 136, 0.4);
  outline-offset: 6px;
}

.cope-submit__form--success {
  outline: 1px solid rgba(122, 245, 201, 0.45);
  outline-offset: 6px;
}

.cope-submit__button[aria-busy="true"] {
  opacity: 0.7;
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .cope-card,
  .cope-chip,
  .cope-carousel__dot,
  .cope-carousel__button,
  .cta-link {
    transition: none;
  }
}

@media (max-width: 640px) {
  .cope-hero {
    padding: 1.25rem;
  }

  .cope-hero__cta {
    flex-direction: column;
  }

  .cope-grid__tracks {
    grid-template-columns: 1fr;
  }

  .cope-card {
    transform: none;
  }
}
