/* 🌐 General Link Styling */
html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  background: linear-gradient(0deg, #d201cb, #fbc2ff) !important;
  background-repeat: no-repeat !important;
  background-attachment: fixed !important;
}

body.dark-mode {
  background: linear-gradient(0deg, #592986, #7c6492) !important;
  background-repeat: no-repeat !important;
  background-attachment: fixed !important;
}

a {
  text-decoration: none;
  display: inline-block;
  transition: transform 0.3s ease;
}

/* 🎯 Link Split Animation with White Underline & Shadow */
.link {
  position: relative;
  display: inline-block;
  padding: 0;
  line-height: 1em;
  margin: 0;
  color: var(--color-primary);
  font-size: 4rem;
}

.link--top {
  position: absolute;
  color: inherit;
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.6);
  top: 0;
  left: 0;
  display: inline-block;
  clip-path: polygon(0% 66%, 0% 0%, 100% 0%, 100% 40%);
  transition:
    transform 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.25s,
    color 0.5s ease 0.22s;
  z-index: 1;
}

.link--top:after {
  content: "";
  position: absolute;
  top: calc(66% - 4px);
  left: 0;
  width: 100%;
  height: 4px;
  background: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  transform: rotateZ(-2.2deg) scaleX(0);
  transform-origin: left center;
  transition: transform 0.3s ease-out 0.2s;
  z-index: 2;
}

.link--bottom {
  display: inline-block;
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.6);
  clip-path: polygon(0% 65%, 100% 40%, 100% 110%, 0% 110%);
  color: inherit;
  transition: color 0.5s ease 0.22s;
  text-decoration: none;
  position: relative;
  z-index: 1;
}

.link--bottom:after {
  content: "";
  position: absolute;
  top: 65%;
  left: 0;
  width: 100%;
  height: 8%;
  background: white;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  transform: rotateZ(-2deg) scaleX(0);
  transform-origin: left center;
  transition: transform 0.3s ease-out 0.2s;
  z-index: 2;
}

.link:hover .link--top {
  color: var(--color-accent);
  transform: translateY(-0.5em) rotateZ(-3deg);
  transition:
    transform 0.5s cubic-bezier(0.12, 0.8, 0.57, 1) 0.42s,
    color 0.5s ease 0.22s;
}

.link:hover .link--bottom {
  color: var(--color-accent);
  transition: color 0.5s ease 0.2s;
}

.link:hover .link--top:after {
  transform: rotateZ(-2.2deg) scaleX(1);
}

.link:hover .link--bottom:after {
  transform: rotateZ(-2deg) scaleX(1);
}

/* 🖼️ Gallery Intro Section */
.gallery-intro {
  text-align: center;
  margin: var(--space-xl) 0;
}

.gallery-intro h1 {
  font-size: 4rem;
  margin-bottom: var(--space-md);
  text-align: center;
  color: rgb(255, 255, 255);
  text-shadow: #000 0px 0px 10px;
}

.gallery-intro .subtitle {
  font-size: 0.5rem;
  color: #000;
  margin-top: var(--space-sm);
}

.SubheadImg {
  width: 100%;
  max-width: 500px;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* 🌟 Featured Artist Section */
.featured-artist {
  margin: var(--space-xl) 0;
}

.featured-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-lg);
  background: var(--color-light);
  border-radius: 15px;
  padding: var(--space-lg);
  box-shadow: var(--shadow-md);
  border: 3px solid var(--color-primary);
  text-align: center;
}

/* 📝 Split Hover Text Block */
.link-block {
  position: relative;
  display: inline-block;
  font-size: 2rem;
  font-weight: bold;
  line-height: 1.2;
  margin-bottom: var(--space-md);
  text-align: center;
  overflow: hidden;
}

.link-block--top {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  color: #000;
  clip-path: polygon(0% 66%, 0% 0%, 100% 0%, 100% 40%);
  z-index: 2;
  transition:
    color 0.4s ease,
    -webkit-text-stroke 0.4s ease;
}

.link-block--bottom {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  color: #000;
  opacity: 0.3;
  clip-path: polygon(0% 65%, 100% 40%, 100% 110%, 0% 110%);
  z-index: 1;
  transition: opacity 0.4s ease;
}

.link-block:hover .link-block--top {
  color: transparent;
  -webkit-text-stroke: 1px #000;
}

.link-block:hover .link-block--bottom {
  opacity: 0.4;
}

/* 📝 Description Reveal */
.featured-description {
  width: 100%;
  max-width: 700px;
  opacity: 0;
  transition: opacity 0.4s ease;
  padding: var(--space-md);
}

.featured-container:hover .featured-description {
  opacity: 1;
}

.featured-description h3,
.featured-description p {
  color: #000;
}

/* 🖼️ Gallery Sections */
.gallery-section {
  margin: var(--space-xl) 0;
}

.gallery-section h2 {
  color: var(--color-primary);
  text-align: center;
  margin-bottom: var(--space-lg);
  font-size: 2rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.gallery-item {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition-normal);
  border: 2px solid #d201cb;
  text-align: center;
  position: relative; /* Needed for absolute positioning */
}

.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.gallery-item img {
  width: 100%;
  height: 250px;
  object-fit: fill;
}

.gallery-item p {
  padding: var(--space-md);
  font-weight: bold;
  color: var(--text-primary);
}

/* 🔄 Hover Swap: Text → Buy Button */
.hover-swap {
  position: absolute;
  bottom: 10px; /* position overlay */
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  text-align: center;
}

.hover-text {
  display: inline-block;
  font-size: 1.2rem;
  font-weight: bold;
  color: white;
  background: rgba(0, 0, 0, 0.6);
  padding: 6px 12px;
  border-radius: 6px;
  transition: opacity 0.3s ease;
}

.hover-button {
  display: none; /* hidden until hover */
}

.gallery-item:hover .hover-text {
  display: none;
}

.gallery-item:hover .hover-button {
  display: block;
}

/* 🎨 Gradient Text Animation (kept for reference) */
@keyframes gradient-slide {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 100% 50%;
  }
}

/* 🧪 Experimental Link Split (backup) */
.link-split {
  position: relative;
  display: inline-block;
}

.link-split-top,
.link-split-bottom {
  position: absolute;
  left: 0;
  width: 100%;
  display: inline-block;
  color: var(--color-primary);
  font-size: inherit;
  white-space: nowrap;
}

.link-split-top {
  top: 0;
  clip-path: polygon(0% 66%, 0% 0%, 100% 0%, 100% 40%);
  transition:
    transform 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.25s,
    color 0.5s ease 0.22s;
}

.link-split-bottom {
  clip-path: polygon(0% 65%, 100% 40%, 100% 110%, 0% 110%);
  background-size: 200% 8%;
  background-position: left bottom;
  background-repeat: no-repeat;
  background-image: linear-gradient(
    to right,
    var(--color-accent) 50%,
    transparent 50%
  );
  transition:
    color 0.5s ease 0.22s,
    background-position 0.2s ease 0.22s;
}

.link-split:hover .link-split-top {
  color: var(--color-accent);
  transform: translateY(-0.5em) rotateZ(-3deg);
}

.link-split:hover .link-split-bottom {
  color: var(--color-accent);
  background-position: 100% bottom;
}

/* 🧠 Typographic Card System */
.card-system {
  display: flex;
  justify-content: center;
  max-width: 1200px;
  margin: var(--space-lg) auto;
}

.deconstructed-card {
  position: relative;
  width: 600px;
  height: 400px;
  cursor: pointer;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  transform-style: preserve-3d;
  perspective: 1200px;
  overflow: hidden;
  background: var(--color-light);
  border-radius: 15px;
  box-shadow: var(--shadow-md);
  border: 3px solid var(--color-primary);
}

/* 🧱 Card Layers */
.card-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transition:
    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.8s;
}

.card-background {
  background: var(--color-light);
  z-index: 0;
}

.card-frame {
  z-index: 3;
  pointer-events: none;
}

.frame-path {
  fill: none;
  stroke: rgba(8, 8, 8, 0.8);
  stroke-width: 1;
  stroke-dasharray: 1520;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 🔡 Letter Matrix */
.letter-matrix {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.word-fragment {
  font-size: 3.5rem; /* Slightly smaller to fit wider layout */
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.2em;
  margin: 0.5em 0;
}

.letter {
  display: inline-block;
  position: relative;
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.letter-shadow {
  position: absolute;
  top: 0;
  left: 0;
  color: transparent;
  -webkit-text-stroke: 1px #080808;
  opacity: 0;
  transform: translate(0, 0);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.letter-particle {
  position: absolute;
  width: 3px;
  height: 3px;
  background: #080808;
  opacity: 0;
  pointer-events: none;
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 🧬 Glyph Grid */
.glyph-grid {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.03;
  pointer-events: none;
  overflow: hidden;
}

.glyph {
  position: absolute;
  font-family: "Space Mono", monospace;
  font-size: 10px;
  color: #080808;
  opacity: 0;
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 📄 Content Layer */
.card-content {
  z-index: 2;
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.content-fragment {
  position: relative;
  overflow: hidden;
}

.fragment-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: var(--space-md);
}

.meta-line {
  width: 40px;
  height: 1px;
  background-color: #080808;
  transform: scaleX(0.5);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.meta-text {
  font-family: "Space Mono", monospace;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  opacity: 0.6;
  transform: translateX(0);
  transition:
    transform 0.4s ease,
    opacity 0.4s ease;
}

.fragment-body .content-text {
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: normal;
  opacity: 0.6;
  transition:
    transform 0.4s ease,
    opacity 0.4s ease;
}

.fragment-cta {
  margin-top: auto;
  overflow: visible;
}

.cta-link {
  text-decoration: none;
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 8px 0;
}

.cta-box {
  position: absolute;
  top: 0;
  left: -10px;
  width: calc(100% + 20px);
  height: 100%;
  background-color: #080808;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.cta-text {
  position: relative;
  font-family: "Space Mono", monospace;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #080808;
  transition:
    color 0.4s ease,
    transform 0.4s ease,
    opacity 0.4s ease;
  transform: translateX(0);
  opacity: 0.7;
}

/* 🧠 Hover Effects */
.typographic-card:hover .letter {
  color: transparent;
  -webkit-text-stroke: 1px #080808;
}

.typographic-card:hover .letter-shadow {
  opacity: 0.3;
}

.typographic-card:hover .glyph {
  opacity: 1;
}

.typographic-card:hover .content-text,
.typographic-card:hover .meta-text,
.typographic-card:hover .cta-text {
  opacity: 1;
  transform: translateY(0);
}

.typographic-card:hover .meta-line {
  transform: scaleX(1);
}

.typographic-card:hover .cta-link:hover .cta-box {
  transform: scaleX(1);
}

.typographic-card:hover .cta-link:hover .cta-text {
  color: #fafafa;
}
