/* ===== TEZ Creations — coming soon (Moltorino-inspired, green) ===== */

:root {
  /* Dark, warm-cool near-black with a faint green cast */
  --bg: #050806;
  --bg-2: #0a0f0b;

  /* Soft mint-tinted text instead of pure white */
  --text: #eaf2ec;
  --muted: #8fa394;

  /* Green accent system (parallels Moltorino's orange) */
  --accent: #2bd46a;
  --accent-bright: #4ade80;
  --accent-deep: #16a34a;
  --accent-glow: rgba(43, 212, 106, 0.16);

  --font-display: "Space Grotesk", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Keep the backdrop dark during cross-page fades */
html {
  background: var(--bg);
}

/* Fade out before leaving a page */
body.fading {
  opacity: 0;
  transition: opacity 0.7s ease;
}

/* Fade in on page load (home + drop pages) */
body.fade-in {
  animation: page-fade 0.8s ease both;
}

@keyframes page-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

body {
  background:
    radial-gradient(1200px 600px at 50% -10%, var(--bg-2), transparent 70%),
    var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

/* Animated grid drifting in the background.
   Wrapper holds the screen-space fade mask; inner layer is larger so it can
   pan/parallax behind everything without revealing its edges. */
.grid-wrap {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  -webkit-mask-image: radial-gradient(
    ellipse 85% 85% at 50% 50%,
    #000 25%,
    transparent 80%
  );
  mask-image: radial-gradient(ellipse 85% 85% at 50% 50%, #000 25%, transparent 80%);
}

/* Parallax layer: pans 40% of the camera's travel, in sync with .deck */
.grid-pan {
  position: absolute;
  inset: 0;
  transform: translateY(calc(var(--pan, 0) * -40vh));
  transition: transform 1.15s cubic-bezier(0.76, 0, 0.24, 1);
  will-change: transform;
}

.grid {
  position: absolute;
  top: -110%;
  left: -20%;
  width: 140%;
  height: 320%;
  background-image:
    linear-gradient(to right, rgba(120, 200, 150, 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(120, 200, 150, 0.06) 1px, transparent 1px);
  background-size: 64px 64px;
  animation: grid-drift 28s linear infinite;
  /* warp + parallax transform applied via JS */
  transform: perspective(1200px) scale(1.08);
  will-change: transform;
}

@keyframes grid-drift {
  to {
    background-position: 64px 64px;
  }
}

/* Vignette to deepen the edges */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: radial-gradient(120% 100% at 50% 50%, transparent 55%, rgba(0, 0, 0, 0.55));
}

/* Breathing green glow blobs behind the title */
.glow {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 64vw;
  height: 64vw;
  max-width: 680px;
  max-height: 680px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 60%);
  filter: blur(40px);
  pointer-events: none;
  z-index: 0;
  animation: breathe 8s ease-in-out infinite;
}

.glow::before {
  content: "";
  position: absolute;
  top: 18%;
  left: 12%;
  width: 40%;
  height: 40%;
  background: radial-gradient(circle, rgba(74, 222, 128, 0.12) 0%, transparent 65%);
  filter: blur(40px);
}

@keyframes breathe {
  0%,
  100% {
    opacity: 0.7;
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.08);
  }
}

/* Fine film grain overlay for that premium texture */
.grain {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ===== Panning deck (camera moves vertically between screens) ===== */
.deck {
  position: fixed;
  inset: 0;
  z-index: 3;
  transform: translateY(calc(var(--pan, 0) * -100vh));
  transition: transform 1.15s cubic-bezier(0.76, 0, 0.24, 1);
  will-change: transform;
}

.view {
  position: relative;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}

/* Small glassy "coming soon" tag */
.tag {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 10px 20px;
  margin-bottom: 40px;
  text-indent: 0.26em;
  backdrop-filter: blur(8px);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.05);
  opacity: 0;
  animation: rise 0.9s ease forwards 0.05s;
}

/* Pill flips to "Access granted" and hard-blinks its text green before the reveal */
.tag.granted-flash {
  opacity: 1;
  animation: tag-blink 0.4s steps(1, end) 3 both;
}

@keyframes tag-blink {
  0% {
    color: var(--muted);
  }
  50% {
    color: var(--accent-bright);
  }
}

/* Display title — bold modern sans */
.hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.9rem, 11vw, 7.5rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin-bottom: 24px;
  color: var(--text);
  text-shadow: 0 0 70px rgba(43, 212, 106, 0.12);
  opacity: 0;
  animation: rise 1s ease forwards 0.15s;
}

.hero h1 .accent {
  font-style: italic;
  color: var(--accent-bright);
}

.hero p {
  font-family: var(--font-sans);
  font-weight: 400;
  font-size: clamp(1rem, 3vw, 1.4rem);
  line-height: 1.6;
  color: var(--muted);
  letter-spacing: 0.01em;
  opacity: 0;
  animation: rise 1s ease forwards 0.38s;
}

/* Animated trailing dots */
.hero p .dots span {
  opacity: 0;
  color: var(--accent-bright);
  animation: blink 1.6s infinite;
}

.hero p .dots span:nth-child(1) {
  animation-delay: 0s;
}
.hero p .dots span:nth-child(2) {
  animation-delay: 0.25s;
}
.hero p .dots span:nth-child(3) {
  animation-delay: 0.5s;
}

@keyframes blink {
  0%,
  60%,
  100% {
    opacity: 0;
  }
  30% {
    opacity: 1;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== Buttons ===== */
.btn {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.02em;
  padding: 15px 32px;
  border-radius: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.25s ease, box-shadow 0.25s ease,
    transform 0.15s ease, border-color 0.25s ease;
}

.btn-primary {
  background: linear-gradient(180deg, var(--accent-bright) 0%, var(--accent-deep) 100%);
  border: 1px solid var(--accent-deep);
  color: #04160b;
  font-weight: 700;
  box-shadow:
    0 0 28px rgba(43, 212, 106, 0.3),
    0 8px 18px rgba(0, 0, 0, 0.4),
    inset 0 1px rgba(255, 255, 255, 0.5),
    inset 0 -1px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover {
  background: linear-gradient(180deg, #5eea8f 0%, #1bb255 100%);
  transform: translateY(-2px);
  box-shadow:
    0 0 38px rgba(43, 212, 106, 0.45),
    0 12px 24px rgba(0, 0, 0, 0.45),
    inset 0 1px rgba(255, 255, 255, 0.55),
    inset 0 -1px rgba(0, 0, 0, 0.2);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow:
    0 0 22px rgba(43, 212, 106, 0.3),
    0 4px 10px rgba(0, 0, 0, 0.4),
    inset 0 2px 5px rgba(0, 0, 0, 0.35);
}

.btn span {
  transition: transform 0.2s ease;
}

.btn-primary:hover span {
  transform: translateX(3px);
}

/* Enter button fades in with the hero */
.hero .enter {
  margin-top: 40px;
  opacity: 0;
  animation: rise 1s ease forwards 0.55s;
}

/* ===== Password gate ===== */
.gate-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 7vw, 3.5rem);
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin-bottom: 32px;
  color: var(--text);
  text-shadow: 0 0 70px rgba(43, 212, 106, 0.12);
}

.gate-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: center;
}

.input {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 14px 18px;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  letter-spacing: 0.15em;
  text-align: center;
  width: min(320px, 80vw);
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.input::placeholder {
  color: rgba(255, 255, 255, 0.25);
  letter-spacing: 0.3em;
}

.input:focus {
  border-color: rgba(43, 212, 106, 0.5);
  box-shadow: 0 0 24px var(--accent-glow);
}

.err {
  margin-top: 16px;
  font-size: 14px;
  color: #f78a8a;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.err.show {
  opacity: 1;
}

.shake {
  animation: shake 0.4s ease;
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  20%,
  60% {
    transform: translateX(-8px);
  }
  40%,
  80% {
    transform: translateX(8px);
  }
}

.back {
  position: absolute;
  top: clamp(20px, 5vw, 40px);
  left: clamp(20px, 5vw, 40px);
  background: none;
  border: none;
  color: var(--muted);
  font-size: 24px;
  line-height: 1;
  padding: 8px;
  cursor: pointer;
  transition: color 0.2s ease, transform 0.2s ease;
}

.back:hover {
  color: var(--text);
  transform: translateY(-3px);
}

.sub-muted {
  font-family: var(--font-sans);
  color: var(--muted);
  font-size: clamp(1rem, 3vw, 1.25rem);
  line-height: 1.6;
}

/* ===== Catalog pages (home + drop detail) ===== */
body.page {
  display: block;
  overflow-x: hidden;
  overflow-y: auto;
}

.site-head {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(24px, 5vw, 48px) clamp(24px, 6vw, 96px);
}

.wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.02em;
  color: var(--text);
  text-decoration: none;
}

.wordmark .star {
  color: var(--accent-bright);
}

.tagline {
  font-family: var(--font-sans);
  font-size: 14px;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.back-link {
  font-family: var(--font-sans);
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.back-link:hover {
  color: var(--text);
}

/* ---- Feed ---- */
.feed {
  position: relative;
  z-index: 3;
  max-width: 1080px;
  margin: 0 auto;
  padding: 16px clamp(24px, 6vw, 96px) 64px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--text);
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  overflow: hidden;
  rotate: var(--tilt, 0deg);
  transition: transform 0.25s ease, border-color 0.25s ease,
    box-shadow 0.25s ease;
  will-change: transform;
}

.card:hover {
  border-color: rgba(43, 212, 106, 0.35);
  box-shadow: 0 0 36px var(--accent-glow), 0 16px 32px rgba(0, 0, 0, 0.4);
}

.card.featured {
  grid-column: 1 / -1;
}

.cover {
  position: relative;
  aspect-ratio: 16 / 8;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.card.featured .cover {
  aspect-ratio: 16 / 6;
}

.cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Auto-generated cover when a drop has no image yet */
.cover-gen {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(120% 140% at 30% 20%, rgba(43, 212, 106, 0.12), transparent 60%),
    linear-gradient(160deg, #0a130d 0%, #050806 100%);
}

.cover-gen span {
  font-family: "Space Mono", monospace;
  font-weight: 700;
  font-size: clamp(2.5rem, 6vw, 4rem);
  color: rgba(234, 242, 236, 0.14);
  letter-spacing: 0.04em;
}

.fresh {
  position: absolute;
  top: 16px;
  left: 16px;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #04160b;
  background: var(--accent-bright);
  border-radius: 8px;
  padding: 6px 12px;
  box-shadow: 0 0 20px rgba(43, 212, 106, 0.4);
}

.card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}

.num {
  font-family: "Space Mono", monospace;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--accent-bright);
}

.card-body h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.25rem, 3vw, 1.6rem);
  letter-spacing: -0.01em;
  line-height: 1.15;
}

.card-body p {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
}

.card-body time {
  font-family: var(--font-sans);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: rgba(143, 163, 148, 0.7);
  margin-top: 8px;
}

/* ---- Drop detail ---- */
.drop-detail {
  position: relative;
  z-index: 3;
  max-width: 880px;
  margin: 0 auto;
  padding: 16px clamp(24px, 6vw, 96px) 64px;
}

.detail-cover {
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 16 / 7;
  margin-bottom: 32px;
}

.cover-gen.big span {
  font-size: clamp(3.5rem, 9vw, 6rem);
}

.detail-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.type-tag {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 5px 12px;
}

.detail-meta time {
  font-family: var(--font-sans);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: rgba(143, 163, 148, 0.7);
}

.detail-info h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 6vw, 3.5rem);
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin-bottom: 16px;
  text-shadow: 0 0 70px rgba(43, 212, 106, 0.12);
}

.detail-info > p {
  font-family: var(--font-sans);
  font-size: clamp(1rem, 2.4vw, 1.15rem);
  line-height: 1.65;
  color: var(--muted);
  max-width: 60ch;
  margin-bottom: 32px;
}

.detail-info .btn {
  text-decoration: none;
}

.not-found {
  text-align: center;
  padding: 96px 0;
}

.site-foot {
  position: relative;
  z-index: 3;
  text-align: center;
  font-family: var(--font-sans);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: rgba(143, 163, 148, 0.55);
  padding: 32px 24px 40px;
}

@media (max-width: 720px) {
  .feed {
    grid-template-columns: 1fr;
  }
  .site-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .glow,
  .grid,
  .hero h1,
  .hero p,
  .hero p .dots span,
  .tag,
  .hero .enter {
    animation: none;
    opacity: 1;
  }
  .deck,
  .grid-pan {
    transition: none;
  }
}
