/* ============================================
   Liko Header Grid — Affogato Framer Replica
   Full cinematic entrance sequence
   ============================================ */

:root {
  --lhg-radius: 4px;
}

/* Base (Light Theme Default) */
.liko-header-grid-container {
  --lhg-bg: rgba(0, 0, 0, 0.03);
  --lhg-final: #1e1e1e;
  --lhg-neg: #ffffff;
  --lhg-curtain: #1a1a1a;
  --lhg-neg-op: rgba(255, 255, 255, 0.7);
  --lhg-neg-bg: rgba(255, 255, 255, 0.15);
  background-color: var(--lhg-bg) !important;
}

/* DARK THEME (Liko Theme Global Support) */
.liko-dark-active .liko-header-grid-container,
[data-theme="dark"] .liko-header-grid-container,
.liko-header-grid-container.liko-theme-dark {
  --lhg-bg: var(--tp-common-black, #0a0a0a);
  --lhg-final: #E8E5E2;
  --lhg-neg: #1e1e1e;
  --lhg-curtain: #ffffff;
  --lhg-neg-op: rgba(30, 30, 30, 0.7);
  --lhg-neg-bg: rgba(30, 30, 30, 0.15);
  background-color: var(--lhg-bg) !important;
}

/* Force light override if selected in Elementor */
.liko-header-grid-container.liko-theme-light {
  --lhg-bg: rgba(0, 0, 0, 0.03);
  --lhg-final: #1e1e1e;
  --lhg-neg: #ffffff;
  --lhg-curtain: #1a1a1a;
  background-color: var(--lhg-bg) !important;
}

.liko-header-grid-container {
  width: 100%;
  max-width: none !important;
  position: relative;
  overflow: hidden;
}

/* ======= BACKGROUND CURTAIN =======
   BEHIND the grid (z-index: 1).
   Grid sits on top (z-index: 2) with transparent bg,
   so the dark curtain is visible through it.
   Text starts white = negative on dark.
   Curtain slides right → beige bg appears → text shifts to dark.
*/
@keyframes bgCurtainSlide {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(100%);
  }
}

.liko-grid-revealer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  background-color: var(--curtain-color, var(--lhg-curtain));
  animation: bgCurtainSlide 1.4s cubic-bezier(0.77, 0, 0.175, 1) 2.2s forwards;
  pointer-events: none;
}

/* ======= 4-COLUMN GRID — sits ABOVE curtain ======= */
.liko-header-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: auto auto auto;
  gap: 10px;
  width: 100%;
  margin: 0 auto;
  padding: 30px 30px 20px;
  background-color: transparent;
  font-family: 'Syne', 'Urbanist', sans-serif;
  min-height: calc(100vh - 80px);
  align-content: start;
  align-items: stretch;
  position: relative;
  z-index: 2;
}

/* ======= BASE SLOT ======= */
.grid-slot {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: transparent;
}


/* =============================================
   PHASE 1 (0s–0.6s): Text fades in as NEGATIVE
   White text visible against dark curtain behind
   ============================================= */

@keyframes fadeInNegative {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.header-title-slot {
  opacity: 0;
  animation: fadeInNegative 0.6s ease 0.15s forwards;
}

.content-description-slot {
  opacity: 0;
  animation: fadeInNegative 0.6s ease 0.3s forwards;
}

.bottom-socials-slot {
  opacity: 0;
  animation: fadeInNegative 0.6s ease 0.45s forwards;
}

.bottom-contact-slot {
  opacity: 0;
  animation: fadeInNegative 0.6s ease 0.55s forwards;
}


/* =============================================
   PHASE 3 (2.2s): Curtain slides → text shifts
   All text/borders/fills: white → dark
   ============================================= */

/* TITLE */
@keyframes titleColorShift {
  0% {
    color: var(--lhg-neg);
  }

  100% {
    color: var(--lhg-final);
  }
}

.header-title {
  font-family: inherit;
  font-size: clamp(40px, 7.5vw, 130px);
  line-height: 0.72;
  margin: 0;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: -0.03em;
  color: var(--lhg-neg);
  white-space: normal;
  word-wrap: break-word;
  animation: titleColorShift 0.8s ease 2.2s forwards;
}

/* SUBTITLE */
@keyframes subtitleColorShift {
  0% {
    color: var(--lhg-neg-op);
  }

  100% {
    color: var(--lhg-final);
  }
}

.header-subtitle {
  font-family: 'Syne', 'Urbanist', sans-serif;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-top: 0;
  margin-bottom: 20px;
  display: block;
  font-weight: 500;
  color: var(--lhg-neg-op);
  animation: subtitleColorShift 0.8s ease 2.2s forwards;
  transition: color 0.4s ease;
}

/* DESCRIPTION */
@keyframes descColorShift {
  0% {
    color: var(--lhg-neg-op);
  }

  100% {
    color: var(--lhg-final);
  }
}

.header-description {
  font-family: 'Syne', 'Urbanist', sans-serif;
  font-size: 17px;
  line-height: 1.55;
  max-width: 480px;
  font-weight: 400;
  color: var(--lhg-neg-op);
  animation: descColorShift 0.8s ease 2.3s forwards;
}

/* SOCIAL LABEL */
@keyframes socialLabelShift {
  0% {
    color: var(--lhg-neg-op);
  }

  100% {
    color: var(--lhg-final);
  }
}

.social-label {
  font-family: 'Syne', 'Urbanist', sans-serif;
  font-size: 14px;
  margin-bottom: 14px;
  line-height: 1.45;
  font-weight: 400;
  color: var(--lhg-neg-op);
  animation: socialLabelShift 0.8s ease 2.3s forwards;
}

/* SOCIAL ICONS — border + fill: white → dark */
@keyframes iconBorderShift {
  0% {
    border-color: var(--lhg-neg);
  }

  100% {
    border-color: var(--lhg-final);
  }
}

@keyframes iconFillShift {
  0% {
    fill: var(--lhg-neg);
  }

  100% {
    fill: var(--lhg-final);
  }
}

.social-icons-list {
  display: flex;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.social-icons-list li a {
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: transparent;
  border-radius: var(--lhg-radius);
  text-decoration: none;
  padding: 11px;
  transition: all 0.3s ease;
}

.social-icons-list li a:hover::after {
  border-color: rgb(254, 87, 51) !important;
}

.social-icons-list li a:hover svg {
  fill: rgb(254, 87, 51) !important;
}

.social-icons-list li a::after {
  content: "";
  border-width: 1px;
  border-style: solid;
  border-color: #fff;
  width: 100%;
  height: 100%;
  position: absolute;
  box-sizing: border-box;
  left: 0;
  top: 0;
  border-radius: inherit;
  pointer-events: none;
  animation: iconBorderShift 0.8s ease 2.4s forwards;
}

.social-icons-list li a svg {
  width: 100%;
  height: 100%;
  display: block;
  fill: #fff;
  flex-shrink: 0;
  animation: iconFillShift 0.8s ease 2.4s forwards;
}

.social-icons-list li a .social-phosphor-icon~i,
.social-icons-list li a .social-phosphor-icon~svg:not(.social-phosphor-icon) {
  display: none;
}


@keyframes contactTextShift {
  0% {
    color: var(--lhg-neg);
  }

  100% {
    color: var(--lhg-final);
  }
}

@keyframes contactDescShift {
  0% {
    color: var(--lhg-neg-op);
  }

  100% {
    color: var(--lhg-final);
  }
}

@keyframes arrowStrokeShift {
  0% {
    stroke: var(--lhg-neg);
  }

  100% {
    stroke: var(--lhg-final);
  }
}

@keyframes contactBorderShift {
  0% {
    border-color: var(--lhg-neg-bg);
  }

  100% {
    border-color: var(--lhg-final);
  }
}

.bottom-contact-slot {
  grid-column: span 1;
  background: transparent;
  padding: 24px;
  border-radius: var(--lhg-radius);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  position: relative;
  justify-content: space-between;
  align-self: stretch;
}

.bottom-contact-slot::after {
  content: "";
  border-width: 1px;
  border-style: solid;
  border-color: var(--lhg-neg-bg);
  width: 100%;
  height: 100%;
  position: absolute;
  box-sizing: border-box;
  left: 0;
  top: 0;
  border-radius: inherit;
  pointer-events: none;
  animation: contactBorderShift 0.8s ease 2.5s forwards;
}

.contact-box {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.contact-title {
  font-family: inherit;
  margin: 0 0 10px 0;
  font-size: 20px;
  font-weight: 600;
  color: var(--lhg-neg);
  animation: contactTextShift 0.8s ease 2.5s forwards;
}

.contact-desc {
  font-family: inherit;
  font-size: 14px;
  line-height: 1.45;
  margin-bottom: 0;
  font-weight: 400;
  color: var(--lhg-neg-op);
  animation: contactDescShift 0.8s ease 2.5s forwards;
}

.contact-arrow {
  align-self: flex-end;
  margin-top: auto;
  transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.contact-arrow svg path {
  stroke: var(--lhg-neg);
  animation: arrowStrokeShift 0.8s ease 2.5s forwards;
}

.bottom-contact-slot:hover::after {
  border-color: rgb(254, 87, 51) !important;
}

.bottom-contact-slot:hover .contact-title,
.bottom-contact-slot:hover .contact-desc {
  color: rgb(254, 87, 51) !important;
  transition: color 0.3s ease;
}

.bottom-contact-slot:hover .contact-arrow {
  transform: translate(4px, -4px);
}

.bottom-contact-slot:hover .contact-arrow svg path {
  stroke: rgb(254, 87, 51) !important;
  transition: stroke 0.3s ease;
}


/* =============================================
   PHASE 2 (1.0s–1.85s): Images appear sequentially
   ============================================= */

@keyframes fadeInMedia {
  0% {
    opacity: 0;
    transform: scale(0.96);
  }

  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.top-right-media-slot,
.middle-media-1-slot,
.middle-media-2-slot,
.bottom-media-1-slot,
.bottom-media-2-slot {
  grid-column: span 1;
  border-radius: var(--lhg-radius);
  overflow: hidden;
  opacity: 0;
  animation: fadeInMedia 0.5s cubic-bezier(0.23, 1, 0.32, 1) forwards;
  align-self: end;
  position: relative;
  aspect-ratio: 3 / 2;
}

.top-right-media-slot {
  animation-delay: 1.0s;
}

.middle-media-1-slot {
  animation-delay: 1.25s;
}

.middle-media-2-slot {
  animation-delay: 1.45s;
}

.bottom-media-1-slot {
  animation-delay: 1.65s;
}

.bottom-media-2-slot {
  animation-delay: 1.85s;
}

.grid-media-content {
  position: absolute;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block;
  border-radius: var(--lhg-radius);
  transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Hover ONLY on media */
/* Consolidated media slot styling — ensures consistent row heights */
[class*="-media-slot"] {
  width: 100%;
  height: auto;
}

.top-right-media-slot:hover .grid-media-content,
.middle-media-1-slot:hover .grid-media-content,
.middle-media-2-slot:hover .grid-media-content,
.bottom-media-1-slot:hover .grid-media-content,
.bottom-media-2-slot:hover .grid-media-content {
  transform: scale(1.05);
}


/* ======= ROW LAYOUT ======= */

/* ROW 1 — Title and Image strictly aligned at the bottom */
.header-title-slot {
  grid-column: span 3;
  padding: 10px 30px 0 0;
  justify-content: flex-end;
  display: flex;
  flex-direction: column;
}

.header-title {
  font-family: inherit;
  margin: 0;
  display: block;
}


.highlight-neg {
  background-color: rgba(255, 255, 255, 0.15);
  padding: 0.05em 0.12em;
  display: inline-block;
  line-height: 0.92;
}

/* ROW 2 */
.content-description-slot {
  grid-column: span 2;
  padding: 15px 40px 15px 0;
  justify-content: flex-start;
}

/* ROW 3 */
.bottom-socials-slot {
  grid-column: span 1;
  padding: 0;
  justify-content: flex-end;
  align-items: flex-start;
  align-self: stretch;
}



/* ======= MODAL ======= */
.liko-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.liko-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
}

.liko-modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  padding: 40px;
  border-radius: 12px;
  width: 90%;
  max-width: 600px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.liko-modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 30px;
  cursor: pointer;
  color: var(--lhg-dark);
  z-index: 10;
}

.liko-modal-text-header {
  margin-bottom: 25px;
  padding-right: 30px;
}

.modal-title-primary {
  font-size: 24px;
  font-weight: 600;
  line-height: 1.3;
  color: #1e1e1e;
  margin-bottom: 20px;
  text-transform: none;
}

/* Match the info style from project pages */
.liko-modal .project-cta-contact-info {
  display: flex;
  gap: 25px;
  margin-bottom: 20px;
  font-weight: 500;
  font-size: 16px;
}

.liko-modal .project-cta-contact-info a {
  display: inline-flex;
  align-items: center;
  color: #1e1e1e;
  transition: all 0.3s ease;
  text-decoration: none;
}

.liko-modal .project-cta-contact-info i {
  margin-right: 8px;
  color: #EB5939;
  font-size: 18px;
}

/* DARK MODE SUPPORT */
.liko-dark-active .liko-modal-content {
  background: #1a1a1a;
  color: #fff;
}

.liko-dark-active .modal-title-primary {
  color: #fff;
}

.liko-dark-active .project-cta-contact-info a {
  color: #fff;
}

.liko-dark-active .liko-modal-close {
  color: #fff;
}


/* ======= RESPONSIVE ======= */

/* --- Tablet (1024px) --- */
@media (max-width: 1024px) {
  .liko-header-grid {
    grid-template-columns: repeat(2, 1fr);
    min-height: auto;
    padding: 30px 24px 20px;
    gap: 10px;
  }

  .header-title {
    font-size: clamp(40px, 10vw, 90px);
  }

  .header-title-slot {
    grid-column: span 2;
    padding: 10px 0;
  }

  .content-description-slot {
    grid-column: span 2;
    padding: 10px 0;
  }

  .top-right-media-slot {
    grid-column: span 1;
  }

  .middle-media-1-slot {
    grid-column: span 1;
  }

  .middle-media-2-slot {
    grid-column: span 1;
  }

  .bottom-socials-slot {
    grid-column: span 1;
  }

  .bottom-contact-slot {
    grid-column: span 1;
  }

  .bottom-media-1-slot {
    grid-column: span 1;
  }

  .bottom-media-2-slot {
    grid-column: span 1;
  }

  .header-description {
    font-size: 16px;
    max-width: 100%;
  }

  /* Disable curtain animation on tablet */
  .liko-grid-revealer {
    animation-delay: 1.5s;
  }
}

/* --- Mobile (768px) --- */
@media (max-width: 768px) {
  .liko-header-grid-container {
    background-color: var(--lhg-bg);
  }

  /* Hide curtain on mobile for performance */
  .liko-grid-revealer {
    display: none;
  }

  .liko-header-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 24px 16px 30px;
    min-height: auto;
  }

  .grid-slot {
    width: 100%;
  }

  /* Ordering */
  .header-title-slot {
    order: 1;
  }

  .top-right-media-slot {
    order: 2;
  }

  .content-description-slot {
    order: 3;
  }

  .middle-media-1-slot {
    order: 4;
  }

  .middle-media-2-slot {
    order: 5;
  }

  .bottom-socials-slot {
    order: 6;
  }

  .bottom-media-1-slot {
    order: 7;
  }

  .bottom-media-2-slot {
    order: 8;
  }

  .bottom-contact-slot {
    order: 9;
  }

  /* Typography */
  .header-title {
    font-size: 13vw;
    line-height: 0.95;
    color: var(--lhg-dark);
    /* No negative on mobile */
    animation: none;
  }

  .header-subtitle {
    font-size: 11px;
    letter-spacing: 0.1em;
    margin-bottom: 12px;
    color: var(--lhg-dark);
    animation: none;
  }

  .header-description {
    font-size: 15px;
    line-height: 1.5;
    max-width: 100%;
    color: var(--lhg-dark);
    animation: none;
  }

  .header-title-slot {
    padding: 0;
  }

  .content-description-slot {
    padding: 0;
  }

  /* Media — full width, proper aspect ratio */
  .top-right-media-slot,
  .middle-media-1-slot,
  .middle-media-2-slot,
  .bottom-media-1-slot,
  .bottom-media-2-slot {
    aspect-ratio: 16 / 10;
    border-radius: var(--lhg-radius);
    opacity: 1;
    animation: none;
  }

  /* Socials — no negative on mobile */
  .social-label {
    color: var(--lhg-dark);
    animation: none;
  }

  .social-icons-list li a::after {
    border-color: var(--lhg-dark);
    animation: none;
  }

  .social-icons-list li a svg {
    fill: var(--lhg-dark);
    animation: none;
  }

  /* Bigger touch targets on mobile */
  .social-icons-list li a {
    width: 48px;
    height: 48px;
    padding: 12px;
  }

  .social-icons-list {
    gap: 10px;
  }

  /* Contact — no negative on mobile */
  .contact-title {
    color: var(--lhg-dark);
    animation: none;
  }

  .contact-desc {
    color: var(--lhg-dark);
    animation: none;
  }

  .contact-arrow svg path {
    stroke: var(--lhg-dark);
    animation: none;
  }

  .bottom-contact-slot::after {
    border-color: var(--lhg-dark);
    animation: none;
  }

  .bottom-contact-slot {
    padding: 20px;
    min-height: 120px;
  }

  /* Modal — full screen on mobile */
  .liko-modal-content {
    width: 95%;
    padding: 24px;
    border-radius: 8px;
  }
}

/* --- Small mobile (480px) --- */
@media (max-width: 480px) {
  .header-title {
    font-size: 15vw;
  }

  .header-description {
    font-size: 14px;
  }

  .social-label {
    font-size: 13px;
  }

  .contact-title {
    font-size: 18px;
  }

  .contact-desc {
    font-size: 13px;
  }
}