/* PJ INFRA — Brand update: logo hero, fire border, dark cards, gallery */

@property --snake-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

/* ——— Logo hero (no slideshow) ——— */
.hero-logo-section {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #050508 0%, #0a0a0f 45%, #12100c 100%);
  overflow: hidden;
  padding: 6rem 1rem 4rem;
}

.hero-logo-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 50% at 50% 30%, rgba(255, 120, 0, 0.08) 0%, transparent 60%);
  pointer-events: none;
}

.hero-logo-section .hero-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.hero-logo-section .hero-particle {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 140, 0, 0.5);
  animation: particleFloat 8s ease-in-out infinite;
}

@keyframes particleFloat {
  0%, 100% { transform: translateY(0) scale(1); opacity: 0.3; }
  50% { transform: translateY(-30px) scale(1.2); opacity: 0.8; }
}

.hero-snake-frame {
  position: relative;
  display: inline-block;
  padding: 12px 20px 28px;
  max-width: min(520px, 92vw);
  animation: heroFloat 5s ease-in-out infinite;
}

@keyframes heroFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* Fire snake — half border only, 2x speed (4s loop) */
.hero-snake-frame::before {
  content: '';
  position: absolute;
  top: -3px;
  left: 8%;
  right: 8%;
  height: 52%;
  border-radius: 28px 28px 0 0;
  padding: 3px;
  background: conic-gradient(
    from var(--snake-angle),
    transparent 0deg,
    transparent 120deg,
    #ff4500 160deg,
    #ff8c00 200deg,
    #ffcc00 240deg,
    #ff6b00 280deg,
    transparent 320deg,
    transparent 360deg
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: fireSnake 4s linear infinite;
  pointer-events: none;
  z-index: 2;
}

@keyframes fireSnake {
  to { --snake-angle: 360deg; }
}

.hero-logo-img {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 420px;
  height: auto;
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 12px 40px rgba(255, 140, 0, 0.2));
  animation: logoGlow 3s ease-in-out infinite alternate;
}

@keyframes logoGlow {
  from { filter: drop-shadow(0 8px 24px rgba(255, 100, 0, 0.15)); }
  to { filter: drop-shadow(0 16px 48px rgba(255, 180, 0, 0.35)); }
}

.hero-logo-tagline {
  text-align: center;
  margin-top: 1.5rem;
  color: rgba(255, 255, 255, 0.75);
  font-size: 1rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  animation: fadeUp 1s ease 0.4s both;
}

.hero-logo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
  animation: fadeUp 1s ease 0.6s both;
}

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

/* ——— Dark project cards + bronze / gold hover ——— */
.project-card-dark,
.project-card-premium.project-card-dark,
#all-projects-grid .project-card,
#current-projects-grid .project-card,
#upcoming-projects-grid .project-card,
.featured-projects-home .project-card {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 1rem;
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
}

.project-card-dark .border-flare-inner,
.project-card-dark .card-body,
#all-projects-grid .project-card .card-body,
#current-projects-grid .project-card .card-body,
#upcoming-projects-grid .project-card .card-body {
  background: #ffffff !important;
  color: #334155;
}

.project-card-dark h2,
.project-card-dark h3,
.project-card-luxury h2,
.project-card-luxury h3,
#current-projects-grid .project-card h2,
#upcoming-projects-grid .project-card h2 {
  color: #111111 !important;
}

.project-card-dark .text-slate-500,
.project-card-dark .text-slate-600,
.project-card-luxury .text-slate-500,
.project-card-luxury .text-slate-600,
#current-projects-grid .text-slate-500 {
  color: #5c6478 !important;
}

.project-card-dark:hover,
.project-card-premium.project-card-dark:hover,
.project-card-luxury:hover,
#current-projects-grid .project-card:hover,
#upcoming-projects-grid .project-card:hover {
  transform: translateY(-8px);
  border-color: #d4af37 !important;
  box-shadow: 0 12px 32px rgba(255, 215, 0, 0.15) !important;
}

.project-card-dark:hover .border-flare-inner,
.project-card-luxury:hover .border-flare-inner {
  background: #ffffff !important;
}

/* ——— Project tier tabs ——— */
.projects-tier-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.projects-tier-tab {
  padding: 0.85rem 1.75rem;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid #333;
  background: #111;
  color: #aaa;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: 'Roboto', Calibri, sans-serif;
}

.projects-tier-tab:hover {
  border-color: #cd7f32;
  color: #ffb347;
}

.projects-tier-tab.active {
  background: linear-gradient(135deg, #d4af37, #ffd700, #b8860b);
  color: #050505;
  border-color: #d4af37;
  box-shadow: 0 4px 20px rgba(255, 215, 0, 0.3);
}

.projects-tier-panel {
  display: none;
  animation: panelIn 0.45s ease;
}

.projects-tier-panel.active {
  display: block;
}

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

.completed-tier-message {
  text-align: center;
  padding: 4rem 2rem;
  background: #111;
  border: 1px dashed #cd7f32;
  border-radius: 1rem;
  color: #ccc;
  max-width: 36rem;
  margin: 0 auto;
}

.completed-tier-message i {
  font-size: 2.5rem;
  color: #ff8c00;
  margin-bottom: 1rem;
  display: block;
}

/* ——— Search projects ——— */
.search-projects-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
}

.search-wrap-enhanced {
  flex: 1;
  min-width: min(100%, 320px);
  max-width: 480px;
  position: relative;
}

.search-wrap-enhanced i {
  position: absolute;
  left: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #d4af37;
  z-index: 2;
}

.search-wrap-enhanced .project-search {
  width: 100%;
  padding: 0.95rem 1.25rem 0.95rem 2.75rem;
  border-radius: 999px;
  border: 1px solid #333;
  background: #0a0a0a;
  color: #fff;
  font-size: 1rem;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.search-wrap-enhanced .project-search:focus {
  outline: none;
  border-color: #ff8c00;
  box-shadow: 0 0 0 3px rgba(255, 140, 0, 0.2);
}

.btn-search-projects {
  padding: 0.95rem 1.5rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #d4af37, #ffd700, #b8860b);
  color: #050505;
  font-weight: 700;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: transform 0.25s, box-shadow 0.25s;
  white-space: nowrap;
}

.btn-search-projects:hover {
  transform: scale(1.04);
  box-shadow: 0 8px 24px rgba(255, 100, 0, 0.4);
}

/* ——— Gallery page ——— */
.gallery-hero {
  padding-top: 8rem;
  padding-bottom: 3rem;
  background: linear-gradient(180deg, #0a0a0f, #111);
  text-align: center;
}

.gallery-hero h1 {
  color: #fff;
  font-size: clamp(2rem, 4vw, 3rem);
}

.gallery-tabs {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 2rem auto 3rem;
  flex-wrap: wrap;
}

.gallery-tab {
  padding: 1rem 2.5rem;
  border-radius: 999px;
  font-weight: 600;
  border: 2px solid #333;
  background: #111;
  color: #ccc;
  cursor: pointer;
  transition: all 0.35s ease;
  min-width: 140px;
}

.gallery-tab:hover {
  border-color: #cd7f32;
  color: #ffb347;
}

.gallery-tab.active {
  background: linear-gradient(135deg, #d4af37, #ffd700, #b8860b);
  color: #050505;
  border-color: #d4af37;
  transform: scale(1.05);
}

.gallery-panel {
  display: none;
  animation: panelIn 0.5s ease;
}

.gallery-panel.active {
  display: block;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.gallery-item {
  position: relative;
  border-radius: 1rem;
  overflow: hidden;
  aspect-ratio: 4/3;
  background: #111;
  border: 1px solid #222;
  transition: transform 0.35s, border-color 0.35s, box-shadow 0.35s;
  cursor: pointer;
}

.gallery-item:hover {
  transform: scale(1.03);
  border-color: #ff8c00;
  box-shadow: 0 12px 32px rgba(255, 120, 0, 0.2);
}

.gallery-item img,
.gallery-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-item-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 50%, rgba(0, 0, 0, 0.85));
  display: flex;
  align-items: flex-end;
  padding: 1rem;
  color: #fff;
  font-size: 0.85rem;
}

.gallery-video-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #888;
  gap: 0.75rem;
}

.gallery-video-placeholder i {
  font-size: 2.5rem;
  color: #ff8c00;
}

/* Homepage projects strip */
.home-projects-nav {
  background: #0a0a0a;
  padding: 4rem 0;
}

.home-projects-nav .projects-tier-tabs {
  margin-bottom: 2.5rem;
}

/* More animations */
.animate-pulse-soft {
  animation: pulseSoft 2s ease-in-out infinite;
}

@keyframes pulseSoft {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.85; }
}

.reveal.revealed,
.reveal-left.revealed,
.reveal-right.revealed {
  animation: fadeUp 0.7s ease forwards;
}

.brand-logo-img-header {
  height: 36px;
  width: auto;
  object-fit: contain;
}

/* Stagger card entrance */
.projects-tier-panel.active .project-card {
  animation: cardStagger 0.55s ease backwards;
}

.projects-tier-panel.active .project-card:nth-child(1) { animation-delay: 0.05s; }
.projects-tier-panel.active .project-card:nth-child(2) { animation-delay: 0.12s; }
.projects-tier-panel.active .project-card:nth-child(3) { animation-delay: 0.19s; }
.projects-tier-panel.active .project-card:nth-child(4) { animation-delay: 0.26s; }
.projects-tier-panel.active .project-card:nth-child(5) { animation-delay: 0.33s; }

@keyframes cardStagger {
  from { opacity: 0; transform: translateY(24px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.gallery-item.reveal.revealed {
  animation: galleryPop 0.6s ease forwards;
}

@keyframes galleryPop {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

.home-projects-nav .glass-card,
.section-alt .stat-box {
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.home-projects-nav .glass-card:hover,
.section-alt .stat-box:hover {
  transform: translateY(-6px);
}
