/* FILE: css/home.css (Vibe Final Clean Version) */

/* =========================================
   LOADER
========================================= */
#loader {
  position: fixed;
  inset: 0;
  background: linear-gradient(180deg, #000, #050505);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99999;
  transition: opacity 0.45s ease, visibility 0.45s;
}
#loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

#hyperspaceCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.loader-center {
  z-index: 10;
  text-align: center;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 18px;
}

.loader-logo {
  width: 140px;
  filter: drop-shadow(0 12px 30px rgba(0, 210, 255, 0.08));
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent);
  padding: 8px;
}

.glitch {
  position: relative;
  font-size: clamp(14px, 2.4vw, 22px);
  font-weight: 800;
  letter-spacing: 4px;
  color: #fff;
  z-index: 1;
  animation: shift 1s ease-in-out infinite alternate;
  text-transform: uppercase;
}
.glitch:before,
.glitch:after {
  display: block;
  content: attr(data-glitch);
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0.9;
  pointer-events: none;
}
.glitch:before {
  animation: glitch 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) both infinite;
  color: var(--neon-magenta);
  z-index: -1;
}
.glitch:after {
  animation: glitch 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) reverse both infinite;
  color: var(--neon-cyan);
  z-index: -2;
}
@keyframes glitch {
  0% { transform: translate(0); }
  20% { transform: translate(-3px, 3px); }
  40% { transform: translate(-3px, -3px); }
  60% { transform: translate(3px, 3px); }
  80% { transform: translate(3px, -3px); }
  100% { transform: translate(0); }
}
@keyframes shift {
  0%, 40%, 44%, 58%, 61%, 65%, 69%, 73%, 100% { transform: skewX(0deg); }
  41% { transform: skewX(10deg); }
  42% { transform: skewX(-10deg); }
  59% { transform: skewX(40deg) skewY(10deg); }
  60% { transform: skewX(-40deg) skewY(-10deg); }
  63% { transform: skewX(10deg) skewY(-5deg); }
  70% { transform: skewX(-50deg) skewY(-20deg); }
  71% { transform: skewX(10deg) skewY(-10deg); }
}

.loader-tag {
  color: var(--neon-cyan);
  font-weight: 600;
  letter-spacing: 1px;
  text-shadow: 0 0 8px rgba(0, 210, 255, 0.08);
}

/* Neon background canvas */
#neonParticles {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

/* =========================================
   HERO SECTION
========================================= */
.hero-section {
  position: relative;
  min-height: 85vh;
  padding-top: 130px;  /* room for fixed header */
  padding-bottom: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  text-align: left;
  box-sizing: border-box;
}

/* Desktop: 2-column layout (text + video) */
.hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 40px;
  align-items: center;
  box-sizing: border-box;
}

/* LEFT: TEXT SIDE */
.hero-left {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.hero-title {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 900;
  line-height: 1.1;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  /* keeps area stable even as text changes */
  min-height: 2.8em;
}

/* ===================== HERO HEADING – WHITE + NEON GLOW ===================== */

.glitch-wrapper {
  position: relative;
  font-size: clamp(3rem, 6vw, 5.4rem);
  line-height: 1.05;
  display: inline-block;
  white-space: normal;
  word-break: break-word;
}

/* Base heading – clean white with soft neon glow */
.glitch-text {
  position: relative;
  color: #ffffff;
  text-shadow:
    0 0 8px rgba(255, 0, 180, 0.35),   /* soft pink */
    0 0 12px rgba(0, 180, 255, 0.25); /* soft blue */
  font-weight: 900;
  letter-spacing: 0.6px;
  display: inline-block;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  padding: 0 6px;
  text-align: left;
}



/* layered copies – used ONLY when glitch is active */
.glitch-text::before,
.glitch-text::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  pointer-events: none;
  mix-blend-mode: screen;
  opacity: 0;                    /* ✅ off by default */
}

/* When JS adds .glitch-active, turn on colored layers + animations */
.glitch-active {
  animation: glitch-skew 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) infinite;
}

.glitch-active::before,
.glitch-active::after {
  opacity: 0.9;
}

.glitch-active::before {
  color: #ff00b3;                /* pink fringe */
  transform: translate3d(-2px, 1px, 0);
  filter: blur(0.3px);
  animation: glitch-anim 0.4s cubic-bezier(0.25,0.46,0.45,0.94) infinite;
}

.glitch-active::after {
  color: #00fff0;                /* cyan fringe */
  transform: translate3d(2px, -1px, 0);
  filter: blur(0.3px);
  animation: glitch-anim-2 0.4s cubic-bezier(0.25,0.46,0.45,0.94) infinite;
}


/* Neon strip (desktop – clean, no scrollbar) */
.neon-strip {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 20px;
  text-align: left;

  text-shadow:
    0 0 2px rgba(255, 255, 255, 0.5),
    0 0 8px var(--neon-cyan);

  border-top: 1px solid rgba(0, 245, 255, 0.3);
  border-bottom: 1px solid rgba(0, 245, 255, 0.3);

  background: linear-gradient(
    90deg,
    transparent,
    rgba(0, 245, 255, 0.05),
    transparent
  );

  padding: 12px 20px;
  display: block;
  white-space: normal;
  overflow: hidden;
}
/* Mobile rotating hero text */
#rotatingText {
  display: inline-block;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

#rotatingText.fade-out {
  opacity: 0;
  transform: translateY(6px);
}

/* HERO DESCRIPTION – base */
.vibe-desc {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.75);
  max-width: 540px;
  margin: 0 0 18px 0;
  line-height: 1.6;
  font-weight: 350;
  letter-spacing: 0.3px;
}

/* CTA BUTTONS - always side by side (mobile + desktop) */
.hero-ctas {
  width: 100%;
  max-width: 360px;
  margin: 6px auto 0;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 8px;
}
.hero-ctas .btn {
  flex: 1 1 0;
  min-width: 0;
  padding: 10px 6px;
  font-size: 0.9rem;
  border-radius: 10px;
}

/* RIGHT: VIDEO SIDE */
.hero-right {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-video-shell {
  position: relative;
  width: 100%;
  max-width: 420px;
  aspect-ratio: 1 / 1;
  border-radius: 26px;
  overflow: hidden;
  border: 1px solid rgba(0, 255, 255, 0.35);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.03),
    0 25px 80px rgba(0, 255, 255, 0.18);
  background:
    radial-gradient(circle at 0% 0%, rgba(0, 255, 255, 0.12), transparent 55%),
    radial-gradient(circle at 100% 100%, rgba(255, 105, 180, 0.14), transparent 55%),
    #020308;
}

.hero-video-glow {
  position: absolute;
  inset: -30%;
  background:
    radial-gradient(circle at 20% 0%, rgba(0, 255, 255, 0.18), transparent 55%),
    radial-gradient(circle at 90% 90%, rgba(255, 105, 180, 0.22), transparent 55%);
  opacity: 0.55;
  pointer-events: none;
  mix-blend-mode: screen;
}

.hero-video {
  position: relative;
  z-index: 2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.hero-video-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 10px;
  z-index: 3;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.hero-video-tag {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.65);
  border: 1px solid rgba(0, 255, 255, 0.5);
  color: #e5feff;
  box-shadow: 0 0 16px rgba(0, 255, 255, 0.3);
}

/* Hover / focus micro interaction on desktop */
@media (hover: hover) {
  .hero-video-shell {
    transition: transform 0.35s ease, box-shadow 0.35s ease;
  }
  .hero-video-shell:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow:
      0 0 0 1px rgba(255, 255, 255, 0.06),
      0 30px 90px rgba(0, 255, 255, 0.26);
  }
}

/* =========================================
   HERO DESCRIPTION: READ MORE / LESS
========================================= */

/* Split text: first sentence always visible, second inside .desc-more */
.vibe-desc {
  position: relative;
  max-width: 540px;
}

.vibe-desc .desc-more {
  display: none;
}

.vibe-desc.expanded .desc-more {
  display: inline;
}

/* Read more / less button - small capsule */
.read-more-btn {
  display: inline-block;
  margin-left: 6px;
  margin-top: 4px;
  padding: 3px 10px;
  font-size: 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  cursor: pointer;
}
.vibe-desc.expanded .read-more-btn {
  background: rgba(0, 0, 0, 0.8);
}

/* On mobile: stack description & center */
@media (max-width: 768px) {
  .vibe-desc {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}



/* =========================================
   FEATURED VIBES SECTION
========================================= */

#featured {
  text-align: center;
  position: relative;
  z-index: 5;
}

/* Center heading + subheading */
#featured .container {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
#featured .section-title {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}
#featured .section-sub {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
  max-width: 600px;
}

/* Slider */
.slider-container {
  overflow: hidden;
  margin-top: 40px;
  -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
  mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
  position: relative;
}
.slider-track {
  display: flex;
  width: calc((280px + 30px) * 12);
  animation: scroll 40s linear infinite;
}
.slide {
  flex-shrink: 0;
  width: 280px;
  height: 180px;
  margin: 0 15px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border-color);
  transition: var(--transition);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}
.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(0.9) saturate(0.9);
  transition: var(--transition);
}
.slide:hover {
  box-shadow: 0 10px 25px rgba(0, 255, 255, 0.2);
}
.slide:hover img {
  filter: brightness(1.1) saturate(1.1);
  transform: scale(1.05);
}
.slider-container:hover .slider-track {
  animation-play-state: paused;
}
@keyframes scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(calc((280px + 30px) * -4)); }
}

/* =========================================
   WHAT WE PRINT SECTION
========================================= */
#what-we-print {
  position: relative;
  z-index: 5;
  color: var(--text-primary);
  padding: 100px 0;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}
#what-we-print .container {
  position: relative;
  z-index: 10;
}
#what-we-print .section-head {
  text-align: center;
  margin-bottom: 60px;
  position: relative;
  z-index: 15;
}
#what-we-print .section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  margin-bottom: 10px;
  color: white;
}
#what-we-print .section-sub {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 550px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Cards grid */
#what-we-print .cards-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  position: relative;
  z-index: 1;
  min-height: 100px;
}
#what-we-print .vibe-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  display: flex !important;
  flex-direction: column !important;
  border-radius: var(--radius);
  overflow: hidden;
  text-align: center;
  transition: all 0.4s ease;
  backdrop-filter: blur(10px);
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
}
.vibe-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}
#what-we-print .vibe-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 0 35px rgba(0, 255, 255, 0.25);
  border-color: rgba(0, 255, 255, 0.5);
}
#what-we-print .card-media {
  aspect-ratio: 1 / 1;
  background-size: cover;
  background-position: center;
  border-bottom: 1px solid var(--border-color);
  transition: transform 0.6s ease;
  width: 100%;
  background-color: #333;
  min-height: 200px;
}
#what-we-print .vibe-card:hover .card-media {
  transform: scale(1.05);
}
#what-we-print .card-body {
  padding: 25px 20px 30px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}
#what-we-print .card-body h3 {
  font-size: 1.4rem;
  margin-bottom: 10px;
  color: var(--text-primary);
}
#what-we-print .card-body p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.6;
  flex-grow: 1;
  margin-bottom: 0;
}

/* ===============================
   WHAT WE PRINT – RESPONSIVE UX
=============================== */

/* Desktop: Horizontal scroll */
#what-we-print .cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  width: 100%;
  box-sizing: border-box;
}
#what-we-print .vibe-card,
#what-we-print .vibe-card-link {
  width: 100%;
  max-width: 100%;
}


/* Mobile: Grid with View More */
@media (max-width: 768px) {
  #what-we-print .cards-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    max-height: 1520px; /* shows ~3 cards */
    overflow: hidden;
    transition: max-height 0.5s ease;
  }
  @media (max-width: 480px) {
    #what-we-print .cards-grid {
      grid-template-columns: 1fr;
      gap: 18px;
    }
  }
  

  #what-we-print .cards-grid.expanded {
    max-height: 4200px; /* enough to show all */
  }

  .view-more-btn {
    display: block;
    margin: 25px auto 0;
    padding: 10px 26px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.4);
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 0.85rem;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
  }

  .view-more-btn:hover {
    background: rgba(0,245,255,0.15);
    color: var(--neon-cyan);
    border-color: var(--neon-cyan);
  }
}


/* =========================================
   JOIN SECTION (EMAIL FORM)
========================================= */
#join {
  position: relative;
  z-index: 5;
}
.join-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
  background: var(--panel-light);
  border: 1px solid var(--border-color);
  padding: 40px;
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}
.join-grid h3 {
  margin: 0 0 5px 0;
  font-size: 1.8rem;
}
.join-grid p {
  margin: 0;
  color: var(--text-secondary);
}

.inline-form {
  display: flex;
  gap: 10px;
  flex-grow: 1;
  justify-content: flex-end;
  flex-wrap: wrap;
}

/* Input + micro note wrapper */
.input-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1 1 auto;
}
.input-wrap input[type="email"] {
  padding: 12px 18px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: rgba(0, 0, 0, 0.2);
  color: var(--text-primary);
  min-width: 250px;
  flex-grow: 1;
  outline: none;
  transition: var(--transition);
}
.input-wrap input[type="email"]:focus {
  border-color: var(--neon-cyan);
  box-shadow: 0 0 10px rgba(0, 255, 255, 0.2);
}

/* Micro trust line under input */
.micro-note {
  font-size: 0.75rem;
  color: var(--text-muted);
  opacity: 0.85;
  padding-left: 4px;
  user-select: none;
}

.inline-form button {
  flex-shrink: 0;
}
.form-status {
  width: 100%;
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 0.9rem;
  min-height: 1.2em;
  text-align: right;
}

/* =========================================
   OTHER SECTIONS (Story, Join, etc.) RESPONSIVE
========================================= */

#our-story {
  position: relative;
  z-index: 5;
}
.story-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 40px;
  align-items: center;
}
.story-media img {
  width: 100%;
  max-width: 240px;
  border-radius: var(--radius);
  background: var(--panel-light);
  padding: 20px;
  border: 1px solid var(--border-color);
  display: block;
  margin: 0 auto;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}
.story-content h2 {
  text-align: left;
}
.story-content p {
  color: var(--text-secondary);
  margin-bottom: 15px;
  line-height: 1.7;
}
.story-content .btn {
  margin-top: 10px;
}

/* =========================================
   RESPONSIVE BREAKPOINTS
========================================= */

/* Tablet & below: stack hero columns, video first */
@media (max-width: 1024px) {
  .hero-section {
    padding-top: 100px;
    padding-bottom: 40px;
  }
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 32px;
    text-align: center;
  }
  .hero-right {
    order: 1;
  }
  .hero-left {
    order: 2;
    align-items: center;
    text-align: center;
  }
  .hero-title {
    padding-top: 50px;
    padding-bottom: 20px;
    justify-content: center;
  }
  .neon-strip,
  .vibe-desc {
    text-align: center;
    max-width: 100%;
  }

  .join-grid {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    padding: 30px;
  }
  .inline-form {
    justify-content: center;
  }
  .form-status {
    text-align: center;
  }

  .story-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .story-media img {
    margin: 0 auto 30px;
    max-width: 200px;
    padding: 15px;
  }
  .story-content h2 {
    text-align: center;
  }
}

/* Phones */
@media (max-width: 768px) {
  .hero-section {
    padding-top: 90px;
    padding-bottom: 32px;
  }
  .hero-inner {
    padding-top: 50px;
    gap: 24px;
  }
  .hero-video-shell {
    max-width: 360px;
  }

  /* mobile glitch size */
  .glitch-wrapper {
    font-size: 1.8rem;
  }

  .vibe-desc {
    font-size: 0.9rem;
    max-width: 94%;
    margin-bottom: 12px;
  }

  /* Mobile neon strip – full width, swipeable, scrollbar hidden */
  .neon-strip {
    display: block;
    width: 100vw;
    margin-left: -20px;
    margin-right: -20px;
    padding-left: 20px;
    padding-right: 20px;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    border-left: none;
    border-right: none;
    background: rgba(0, 245, 255, 0.05);
    scrollbar-width: none;
  }
  .neon-strip::-webkit-scrollbar {
    display: none;
  }

  /* Hero CTAs – still side by side, but full width */
  .hero-ctas {
    max-width: 360px;
  }

  .cards-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
  }
}

/* Extra small phones */
@media (max-width: 480px) {
  .hero-section {
    padding-top: 90px;
    padding-bottom: 30px;
  }
  .hero-video-shell {
    max-width: 320px;
  }
  .glitch-wrapper {
    font-size: 1.5rem;
  }
  .vibe-desc {
    font-size: 0.8rem;
    max-width: 300px;
  }

  .slide {
    width: 200px;
    height: 130px;
    margin: 0 10px;
  }
  .slider-track {
    width: calc((200px + 20px) * 12);
  }
  @keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(calc((200px + 20px) * -4)); }
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }
  .vibe-card {
    min-height: auto;
  }

  .inline-form input[type="email"] {
    min-width: 100%;
  }
  .inline-form button {
    width: 100%;
    margin-top: 10px;
  }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
  .glitch-active,
  .slider-track,
  #hyperspaceCanvas {
    animation: none !important;
    transition: none !important;
  }
  .glitch-text::before,
  .glitch-text::after {
    display: none;
  }
}
